26typedef enum : uintptr_t {
54typedef enum : uint16_t {
65typedef enum : uint32_t {
132typedef enum : uint32_t {
147typedef enum : uint32_t {
164typedef enum : uint32_t {
294typedef enum : uint32_t {
309typedef enum : uint8_t {
341 volatile uint8_t
dt : 4;
347 "GWCA basic descriptor must be 8 bytes (HUM Ch 34.5.1.2.1).");
371 volatile uint8_t
dt : 4;
379 "GWCA extended descriptor must be 16 bytes (HUM Ch 34.5.1.2.1).");
395typedef enum : uint32_t {
413typedef enum : uint16_t {
440typedef enum : uint32_t {
462 enum : uint32_t { k_ra8_gwca_max_queues = 32U };
463 if (queue_index >= k_ra8_gwca_max_queues) {
467 ((uintptr_t)queue_index *
sizeof(uint32_t)));
488typedef enum : uint8_t {
513typedef enum : uint8_t {
620 "GPTP per-timer block must be 0x40 bytes (HUM Table 35.3)");
630 "PTPAVTPTMtL offset");
632 "PTPAVTPTMtU offset");
634 "PTPGPTPTMtL offset");
636 "PTPGPTPTMtM offset");
638 "PTPGPTPTMtU offset");
Annotation-attribute framework macros for ra8-firmware.
#define RA8_HW_REGISTER_ACCESS
Mark an MMIO accessor function (returns volatile register pointer).
ra8_gwca_offset_t
Offsets into R_GWCA0 for the registers the upcoming port needs.
@ k_ra8_gwca_off_gwaarss
AXI Addr RAM Searching Setting.
@ k_ra8_gwca_off_gwtrc0
TX Request Cfg, queues 0..31.
@ k_ra8_gwca_off_gwdcc_base
GWDCC[0]; stride 4 bytes.
@ k_ra8_gwca_off_gwmc
Mode Configuration.
@ k_ra8_gwca_off_gwdcbac1
Descriptor chain base addr 1 (lower).
@ k_ra8_gwca_off_gwms
Mode Status.
@ k_ra8_gwca_off_gwdcbac0
Descriptor chain base addr 0 (upper).
@ k_ra8_gwca_off_gwarirm
AXI RAM Init Req Monitoring (FSP-confirmed offset).
@ k_ra8_gwca_off_gwtrc1
TX Request Cfg, queues 32..63.
@ k_ra8_gwca_off_gwaarsr1
AXI Addr RAM Searching Result1.
@ k_ra8_gwca_off_gwaarsr0
AXI Addr RAM Searching Result0.
static volatile uint32_t * ra8_eswm_miicr1(void)
Get pointer to ESWM.MIICR1 (32-bit, RMAC port 1).
ra8_coma_offset_t
Per-register offsets into the COMA (Common Agent) block.
@ k_ra8_coma_off_rrc
Reset Configuration (RR bit 0).
@ k_ra8_coma_off_cabpirm
Buf-pool Init/Reset (BPIOG / BPR).
@ k_ra8_coma_off_rcec
Clock Enable Cfg (RCE bit 16).
@ k_ra8_coma_off_ric
Interrupt Configuration.
ra8_gwdcc_dt_t
Descriptor type field values (HUM Ch 34.5.1.2.2 "Descriptor Types").
@ k_ra8_gwdcc_dt_fempty_nd
FEMPTY_ND – reject data.
@ k_ra8_gwdcc_dt_eempty
EEMPTY – TX queue paused.
@ k_ra8_gwdcc_dt_fempty_is
FEMPTY_IS – empty, incremental start.
@ k_ra8_gwdcc_dt_fsingle
FSINGLE – single-fragment frame.
@ k_ra8_gwdcc_dt_link
LINK – chain continuation.
@ k_ra8_gwdcc_dt_fempty
FEMPTY – empty, full frame slot.
@ k_ra8_gwdcc_dt_fempty_ic
FEMPTY_IC – empty, incremental cont.
@ k_ra8_gwdcc_dt_fmid
FMID – multi-fragment middle.
@ k_ra8_gwdcc_dt_lempty
LEMPTY – queue disabled.
@ k_ra8_gwdcc_dt_fend
FEND – multi-fragment end.
@ k_ra8_gwdcc_dt_eos
EOS – end-of-set.
@ k_ra8_gwdcc_dt_fstart
FSTART – multi-fragment start.
@ k_ra8_gwdcc_dt_linkfix
LINKFIX – chain head pointer.
static volatile uint32_t * ra8_eswm_miicr0(void)
Get pointer to ESWM.MIICR0 (32-bit, RMAC port 0).
ra8_eswm_miirr_bit_t
Bit positions in ESWM.MIIRR (Media Interface Reset Register).
@ k_ra8_eswm_miirr_rgrst0
RGMII0 enable (1 = enable, 0 = reset).
@ k_ra8_eswm_miirr_rmrst1
RMII1 enable (1 = enable, 0 = reset).
@ k_ra8_eswm_miirr_rgrst1
RGMII1 enable (1 = enable, 0 = reset).
@ k_ra8_eswm_miirr_rmrst0
RMII0 enable (1 = enable, 0 = reset).
ra8_gptp_timer_idx_t
GPTP timer instance index (HUM Table 35.3 lists t = 0, 1).
@ k_ra8_gptp_timer_count
Number of timer units on this part.
@ k_ra8_gptp_timer_0
Timer unit 0 (registers at +0x0020).
@ k_ra8_gptp_timer_1
Timer unit 1 (registers at +0x0060).
ra8_gptp_layout_t
Byte offsets that r_gptp_regs_t / r_gptp_timer_regs_t must hit.
@ k_ra8_gptp_off_ptptmdc
PTPTMDC Timer Disable Cfg.
@ k_ra8_gptp_off_t_ptpgptptmu
PTPGPTPTMtU in-block offset.
@ k_ra8_gptp_off_t_ptptovcl
PTPTOVCtL in-block offset.
@ k_ra8_gptp_off_timer0
First per-timer block.
@ k_ra8_gptp_off_t_ptpgptptmm
PTPGPTPTMtM in-block offset.
@ k_ra8_gptp_off_t_ptpavtptmu
PTPAVTPTMtU in-block offset.
@ k_ra8_gptp_off_t_ptptivc
PTPTIVCt in-block offset.
@ k_ra8_gptp_off_t_ptpgptptml
PTPGPTPTMtL in-block offset.
@ k_ra8_gptp_off_t_ptpavtptml
PTPAVTPTMtL in-block offset.
@ k_ra8_gptp_off_ptpipv
PTPIPV IP Version.
@ k_ra8_gptp_off_t_ptptovcm
PTPTOVCtM in-block offset.
@ k_ra8_gptp_off_t_ptptovcu
PTPTOVCtU in-block offset.
@ k_ra8_gptp_timer_stride
Per-timer block stride (0x40 x t).
@ k_ra8_gptp_off_ptptmec
PTPTMEC Timer Enable Cfg.
static volatile uint32_t * ra8_eswm_miirr(void)
Get pointer to ESWM.MIIRR (32-bit).
static volatile r_coma_regs_t * ra8_coma(void)
Get pointer to the COMA register block.
@ k_ra8_rmac1_base_addr
RA8 rmac1 base address.
@ k_ra8_mfwd_base_addr
RA8 mfwd base address.
@ k_ra8_gwca0_base_addr
RA8 gwca0 base address.
@ k_ra8_etha0_base_addr
RA8 etha0 base address.
@ k_ra8_eswm_base_addr
RA8 eswm base address.
@ k_ra8_rmac0_base_addr
RA8 rmac0 base address.
@ k_ra8_gptp_base_addr
RA8 gptp base address.
@ k_ra8_etha1_base_addr
RA8 etha1 base address.
@ k_ra8_coma_base_addr
RA8 coma base address.
ra8_gwdcc_bits_t
Bit positions/masks for GWDCC[i] (HUM Ch 34 + FSP CMSIS header).
@ k_ra8_gwdcc_dcp_shift
RA8 gwdcc dcp shift.
@ k_ra8_gwdcc_balr
RA8 gwdcc balr.
@ k_ra8_gwdcc_osid_shift
RA8 gwdcc osid shift.
@ k_ra8_gwdcc_dqt
0 = RX queue, 1 = TX queue.
@ k_ra8_gwdcc_ets
RA8 gwdcc ets.
@ k_ra8_gwdcc_ede
RA8 gwdcc ede.
@ k_ra8_gwdcc_osid_mask
RA8 gwdcc osid mask.
@ k_ra8_gwdcc_sl
RA8 gwdcc sl.
@ k_ra8_gwdcc_dcp_mask
RA8 gwdcc dcp mask.
static volatile uint32_t * ra8_coma_rcec(void)
Get pointer to the 32-bit COMA.RCEC (Clock Enable Configuration).
static volatile uint32_t * ra8_coma_rrc(void)
Get pointer to the 32-bit COMA.RRC (Reset Configuration).
ra8_coma_bit_t
Bit positions in the COMA bring-up registers.
@ k_ra8_coma_cabpirm_bpiog
CABPIRM.BPIOG – buf-pool init kick.
@ k_ra8_coma_rrc_rr
RRC.RR – pulse to reset ESWM IP.
@ k_ra8_coma_cabpirm_bpr
CABPIRM.BPR – buf-pool ready flag.
@ k_ra8_coma_rcec_rce
RCEC.RCE – enable switch clock.
@ k_ra8_coma_rcec_ace_mask
RCEC.ACE[6:0] – agent clock enable.
static volatile r_gwca_regs_t * ra8_gwca(void)
Get pointer to the GWCA register block.
static volatile r_mfwd_regs_t * ra8_mfwd(void)
Get pointer to the MFWD register block.
ra8_eswm_miicr_field_t
Field encodings for ESWM.MIICRn (Media Interface Control n).
@ k_ra8_eswm_miicr_miisel_rgmii
MIISEL = RGMII.
@ k_ra8_eswm_miicr_miisel_mask
MIISEL field mask (bits 1:0).
@ k_ra8_eswm_miicr_txcide
TXCIDE – TXC internal delay.
@ k_ra8_eswm_miicr_miisel_rmii
MIISEL = RMII.
@ k_ra8_eswm_miicr_divstp
DIVSTP – gate the clock div.
@ k_ra8_eswm_miicr_miisel_mii
MIISEL = MII/GMII.
ra8_gwmc_opc_t
GWMC.OPC operation-mode values (HUM Ch 34.3.1 "GWMC" p 1797).
@ k_ra8_gwmc_opc_disable
DR: Disable request.
@ k_ra8_gwmc_opc_mask
RA8 gwmc opc mask.
@ k_ra8_gwmc_opc_config
CR: Config request – LINKFIX writable here.
@ k_ra8_gwmc_opc_reset
RR: Reset request.
@ k_ra8_gwmc_opc_operation
OR: Operation request – frames flow.
ra8_eswm_mii_offset_t
Offsets into the ESWM Media-Interface configuration window.
@ k_ra8_eswm_off_miirr
Media Interface Reset Register.
@ k_ra8_eswm_off_miicr0
Media Interface Control 0 (RMAC0).
@ k_ra8_eswm_off_miicr1
Media Interface Control 1 (RMAC1).
static volatile r_gptp_regs_t * ra8_gptp(void)
Get pointer to the GPTP register block.
static volatile r_eswm_regs_t * ra8_eswm(void)
Get pointer to the ESWM register block.
static volatile uint32_t * ra8_coma_cabpirm(void)
Get pointer to the 32-bit COMA.CABPIRM (Buf-pool Init/Reset/Monitor).
static volatile uint32_t * ra8_gwca_gwdcc(uint32_t queue_index)
Get pointer to GWDCC[queue_index] (per-queue descriptor chain cfg).
ra8_gwca_info1_tx_t
Bit composition of the INFO1 half of a TX extended descriptor.
@ k_ra8_gwca_info1_tx_dv_shift
info1_hi: DV[6:0] field shift.
@ k_ra8_gwca_info1_tx_dv_mask
info1_hi: DV[6:0] field mask.
@ k_ra8_gwca_info1_tx_fmt_direct
info1_lo: FMT = direct descriptor.
Minimal Common Agent (COMA) register window.
volatile uint32_t COMA_ICLR
+0x0C Interrupt Clear.
volatile uint32_t COMA_CTRL
+0x00 Common Agent Control.
volatile uint32_t COMA_IE
+0x08 Interrupt Enable.
volatile uint32_t COMA_STS
+0x04 Status.
Minimal Ethernet Switch Module (ESWM) register window.
volatile uint32_t ESWM_CTRL
+0x00 Control.
volatile uint32_t ESWM_STS
+0x04 Status.
volatile uint32_t ESWM_IE
+0x08 Interrupt Enable.
volatile uint32_t ESWM_ICLR
+0x0C Interrupt Clear.
Ethernet Generic PTP Timer (GPTP) register window, HUM Ch 35.
volatile r_gptp_timer_regs_t TIMER[k_ra8_gptp_timer_count]
+0x0020 + 0x40 x t Per-timer blocks.
volatile uint32_t reserved18[2]
+0x0018..0x001C Reserved.
volatile uint32_t reserved04[3]
+0x0004..0x000C Reserved.
volatile uint32_t PTPTMDC
+0x0014 Timer Disable Configuration.
volatile uint32_t PTPTMEC
+0x0010 Timer Enable Configuration.
volatile uint32_t PTPIPV
+0x0000 IP Version (read-only).
One GPTP timer unit's register block (HUM Ch 35.3.2 / 35.3.3).
volatile uint32_t reserved3c
+0x3C Reserved.
volatile uint32_t PTPAVTPTMU
+0x24 AVTP Timer Monitoring U.
volatile uint32_t reserved04[3]
+0x04..0x0C Reserved.
volatile uint32_t PTPAVTPTML
+0x20 AVTP Timer Monitoring L.
volatile uint32_t PTPGPTPTMU
+0x38 GPTP Timer Monitoring U.
volatile uint32_t PTPTOVCU
+0x18 Timer Offset Value Cfg U.
volatile uint32_t PTPTOVCM
+0x14 Timer Offset Value Cfg M.
volatile uint32_t PTPGPTPTMM
+0x34 GPTP Timer Monitoring M.
volatile uint32_t reserved28[2]
+0x28..0x2C Reserved.
volatile uint32_t PTPTIVC
+0x00 Timer Increment Value Cfg.
volatile uint32_t PTPTOVCL
+0x10 Timer Offset Value Cfg L.
volatile uint32_t reserved1c
+0x1C Reserved.
volatile uint32_t PTPGPTPTML
+0x30 GPTP Timer Monitoring L.
Minimal CPU Agent (GWCA) register window.
volatile uint32_t GWCA_IE
+0x08 reserved – misnamed as "IE".
volatile uint32_t GWCA_STS
+0x04 GWMS (Mode Status) – misnamed.
volatile uint32_t GWCA_ICLR
+0x0C reserved – misnamed as "ICLR".
volatile uint32_t GWCA_CTRL
+0x00 GWMC (Mode Configuration) – misnamed.
Minimal Message Forwarding Engine (MFWD) register window.
volatile uint32_t MFWD_ICLR
+0x0C Interrupt Clear.
volatile uint32_t MFWD_STS
+0x04 Status.
volatile uint32_t MFWD_CTRL
+0x00 Forwarding Control.
volatile uint32_t MFWD_IE
+0x08 Interrupt Enable.
8-byte basic descriptor (HUM Ch 34.5.1.2 "General Formats").
volatile uint8_t dt
20..23 Descriptor type (ra8_gwdcc_dt_t).
volatile uint8_t ds_h
8..11 Descriptor size (high nibble).
volatile uint8_t info0
12..15 Information 0.
volatile uint32_t ptr_l
32..63 Pointer low 32 bits.
volatile uint8_t ds_l
0..7 Descriptor size (low byte).
volatile uint8_t die
19 Descriptor interrupt enable.
volatile uint8_t ptr_h
24..31 Pointer high byte (PTR[39:32]).
volatile uint8_t err
16..18 Error bits (data/AXI errors).
16-byte extended descriptor (HUM Ch 34.5.1.2 "Extended descriptor", GWDCCi.ETS == 0 && GWDCCi....
volatile uint8_t die
19 Descriptor interrupt enable.
volatile uint8_t ptr_h
24..31 Pointer high byte (PTR[39:32]).
volatile uint8_t info0
12..15 Information 0.
volatile uint8_t ds_l
0..7 Descriptor size (low byte).
volatile uint32_t info1_lo
64..95 INFO1[31:0].
volatile uint8_t err
16..18 Error bits (data/AXI errors).
volatile uint32_t info1_hi
96..127 INFO1[63:32].
volatile uint8_t dt
20..23 Descriptor type (ra8_gwdcc_dt_t).
volatile uint8_t ds_h
8..11 Descriptor size (high nibble).
volatile uint32_t ptr_l
32..63 Pointer low 32 bits.