|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Ethernet controller base addresses for the Renesas RA8D2. More...
Go to the source code of this file.
Data Structures | |
| struct | r_eswm_regs_t |
| Minimal Ethernet Switch Module (ESWM) register window. More... | |
| struct | r_mfwd_regs_t |
| Minimal Message Forwarding Engine (MFWD) register window. More... | |
| struct | r_coma_regs_t |
| Minimal Common Agent (COMA) register window. More... | |
| struct | r_gwca_regs_t |
| Minimal CPU Agent (GWCA) register window. More... | |
| struct | ra8_gwca_basic_descriptor_t |
| 8-byte basic descriptor (HUM Ch 34.5.1.2 "General Formats"). More... | |
| struct | ra8_gwca_ext_descriptor_t |
| 16-byte extended descriptor (HUM Ch 34.5.1.2 "Extended
descriptor", GWDCCi.ETS == 0 && GWDCCi.EDE == 1). More... | |
| struct | r_gptp_timer_regs_t |
| One GPTP timer unit's register block (HUM Ch 35.3.2 / 35.3.3). More... | |
| struct | r_gptp_regs_t |
| Ethernet Generic PTP Timer (GPTP) register window, HUM Ch 35. More... | |
Functions | |
| static volatile uint32_t * | ra8_coma_rrc (void) |
| Get pointer to the 32-bit COMA.RRC (Reset Configuration). | |
| 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_cabpirm (void) |
| Get pointer to the 32-bit COMA.CABPIRM (Buf-pool Init/Reset/Monitor). | |
| static volatile r_eswm_regs_t * | ra8_eswm (void) |
| Get pointer to the ESWM register block. | |
| static volatile uint32_t * | ra8_eswm_miirr (void) |
| Get pointer to ESWM.MIIRR (32-bit). | |
| static volatile uint32_t * | ra8_eswm_miicr0 (void) |
| Get pointer to ESWM.MIICR0 (32-bit, RMAC port 0). | |
| static volatile uint32_t * | ra8_eswm_miicr1 (void) |
| Get pointer to ESWM.MIICR1 (32-bit, RMAC port 1). | |
| static volatile r_mfwd_regs_t * | ra8_mfwd (void) |
| Get pointer to the MFWD register block. | |
| static volatile r_coma_regs_t * | ra8_coma (void) |
| Get pointer to the COMA register block. | |
| static volatile r_gwca_regs_t * | ra8_gwca (void) |
| Get pointer to the GWCA register block. | |
| static volatile uint32_t * | ra8_gwca_gwdcc (uint32_t queue_index) |
| Get pointer to GWDCC[queue_index] (per-queue descriptor chain cfg). | |
| static volatile r_gptp_regs_t * | ra8_gptp (void) |
| Get pointer to the GPTP register block. | |
Ethernet controller base addresses for the Renesas RA8D2.
RA8D2 has a gigabit Ethernet subsystem composed of several blocks (GMAC A/B, MII forwarder, TSNSW, GPTP). Base addresses below come from R7KA8D2KF. Drivers land with a real network stack.
Definition in file ra8_ether_regs.h.
| enum ra8_coma_bit_t : uint32_t |
Bit positions in the COMA bring-up registers.
Definition at line 65 of file ra8_ether_regs.h.
| enum ra8_coma_offset_t : uint16_t |
Per-register offsets into the COMA (Common Agent) block.
COMA wraps the ESWM peripheral with the bus-arbitration counters and the shared per-port descriptor fences. The first four registers (RIC / RRC / RCEC / RNS) are the "bring-up" surface; without:
Definition at line 54 of file ra8_ether_regs.h.
| enum ra8_eswm_mii_offset_t : uint32_t |
Offsets into the ESWM Media-Interface configuration window.
HUM Ch 29 (ESWM) – the per-port media-interface registers live far past the CTRL/STS block. Cross-checked against FSP CMSIS header R7KA8D2KF_core0.h (R_ESWM_Type members MIIRR and MIICR0/1 at the offsets below). Used by the RMAC PHY bring-up path to:
Without MIIRR's per-port enable bit set, the media interface block stays in reset – no TXC, no MDC, no RGMII clocking.
| Enumerator | |
|---|---|
| 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). |
Definition at line 132 of file ra8_ether_regs.h.
| enum ra8_eswm_miicr_field_t : uint32_t |
Field encodings for ESWM.MIICRn (Media Interface Control n).
MIISEL[1:0] selects the MII flavour driven onto the n-th MAC pin group: 0 = MII/GMII, 1 = RGMII, 2 = RMII. TXCIDE (bit 12) enables the on-chip TXC internal delay for RGMII (matches the FSP default "RGMII + TX skew" board profile).
Definition at line 164 of file ra8_ether_regs.h.
| enum ra8_eswm_miirr_bit_t : uint32_t |
Bit positions in ESWM.MIIRR (Media Interface Reset Register).
HUM Ch 29.2.1.2 "MIIRR" p 1289 – each RGRSTn / RMRSTn bit is an ENABLE, not an active-high reset: 0 = Reset (block held in reset), 1 = Enable (block operational). Set the bit to bring the media-interface block out of reset.
Definition at line 147 of file ra8_ether_regs.h.
| enum ra8_ether_addr_t : uintptr_t |
Definition at line 26 of file ra8_ether_regs.h.
| enum ra8_gptp_layout_t : uint8_t |
Byte offsets that r_gptp_regs_t / r_gptp_timer_regs_t must hit.
Mirrors HUM Table 35.3 "gPTP timer registers" p 1926 so the static_asserts below cannot drift from the manual. Offsets marked _t are relative to a single timer block; the rest are absolute within the GPTP window.
Definition at line 513 of file ra8_ether_regs.h.
| enum ra8_gptp_timer_idx_t : uint8_t |
GPTP timer instance index (HUM Table 35.3 lists t = 0, 1).
The GPTP block instantiates two independent timer units. Every per-timer register is placed at base + 0x0020 + 0x40 * t, which is exactly the stride of r_gptp_timer_regs_t.
| Enumerator | |
|---|---|
| k_ra8_gptp_timer_0 | Timer unit 0 (registers at +0x0020). |
| k_ra8_gptp_timer_1 | Timer unit 1 (registers at +0x0060). |
| k_ra8_gptp_timer_count | Number of timer units on this part. |
Definition at line 488 of file ra8_ether_regs.h.
| enum ra8_gwca_info1_tx_t : uint32_t |
Bit composition of the INFO1 half of a TX extended descriptor.
HUM Ch 34.5.3 + FSP st_info1_tx. INFO1[63:0] spans ra8_gwca_ext_descriptor_t info1_lo (INFO1[31:0]) and info1_hi (INFO1[63:32]). The two fields the TX path programs:
| Enumerator | |
|---|---|
| k_ra8_gwca_info1_tx_fmt_direct | info1_lo: FMT = direct 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. |
Definition at line 395 of file ra8_ether_regs.h.
| enum ra8_gwca_offset_t : uint16_t |
Offsets into R_GWCA0 for the registers the upcoming port needs.
Subset of the full R_GWCA0_Type layout from the FSP R7KA8D2KF_core0.h CMSIS header. Reading these via the existing r_gwca_regs_t legacy view is unsafe (the struct only covers the first 16 bytes); use explicit pointer arithmetic from k_ra8_gwca0_base_addr + offset until the full struct lands.
Definition at line 413 of file ra8_ether_regs.h.
| enum ra8_gwdcc_bits_t : uint32_t |
Bit positions/masks for GWDCC[i] (HUM Ch 34 + FSP CMSIS header).
Per-queue Descriptor Chain Configuration. SM[1:0] is the Synchronization Mode (00b = Normal / full descriptor write-back, 01b = No-write-back) – always left 0, so it has no named constant here. EDE / ETS toggle extended descriptors; SL selects a "stop-on-last" mode; DQT picks TX (1) vs RX (0); DCP carries the 3-bit class priority; BALR (Base Address Load Request) reloads the AXI address RAM current_address to the chain base; OSID is the outstanding-transaction stream ID.
Definition at line 440 of file ra8_ether_regs.h.
| enum ra8_gwdcc_dt_t : uint8_t |
Descriptor type field values (HUM Ch 34.5.1.2.2 "Descriptor Types").
Set on the 4-bit DT field of every basic descriptor. See layer3_switch_basic_descriptor_t below.
Definition at line 309 of file ra8_ether_regs.h.
| enum ra8_gwmc_opc_t : uint32_t |
GWMC.OPC operation-mode values (HUM Ch 34.3.1 "GWMC" p 1797).
The ESWM state machine accepts mode transitions written here. The FSP-named LAYER3_SWITCH_AGENT_MODE_xxx enum maps 1:1. Writing the new mode and polling GWMS.OPS until it reflects the value is the "transition request" protocol used by the FSP r_layer3_switch driver.
Definition at line 294 of file ra8_ether_regs.h.
|
inlinestatic |
Get pointer to the COMA register block.
Definition at line 237 of file ra8_ether_regs.h.
References k_ra8_mfwd_base_addr.
Referenced by ra8_eth_coma_clear_status(), ra8_eth_coma_deinit(), ra8_eth_coma_dispatch(), ra8_eth_coma_enter_stop(), ra8_eth_coma_get_status(), and ra8_eth_coma_init().
|
inlinestatic |
Get pointer to the 32-bit COMA.CABPIRM (Buf-pool Init/Reset/Monitor).
Definition at line 89 of file ra8_ether_regs.h.
References k_ra8_coma_base_addr, and k_ra8_coma_off_cabpirm.
Referenced by ra8_eth_coma_bringup().
|
inlinestatic |
Get pointer to the 32-bit COMA.RCEC (Clock Enable Configuration).
Definition at line 82 of file ra8_ether_regs.h.
References k_ra8_coma_base_addr, and k_ra8_coma_off_rcec.
Referenced by ra8_eth_coma_bringup().
|
inlinestatic |
Get pointer to the 32-bit COMA.RRC (Reset Configuration).
Definition at line 75 of file ra8_ether_regs.h.
References k_ra8_coma_base_addr, and k_ra8_coma_off_rrc.
Referenced by ra8_eth_coma_bringup().
|
inlinestatic |
Get pointer to the ESWM register block.
Definition at line 112 of file ra8_ether_regs.h.
References k_ra8_eswm_base_addr.
Referenced by ra8_eth_clear_status(), ra8_eth_deinit(), ra8_eth_dispatch(), ra8_eth_enter_stop(), ra8_eth_get_status(), and ra8_eth_init().
|
inlinestatic |
Get pointer to ESWM.MIICR0 (32-bit, RMAC port 0).
Definition at line 182 of file ra8_ether_regs.h.
References k_ra8_eswm_base_addr, and k_ra8_eswm_off_miicr0.
Referenced by ra8_eth_rgmii_select().
|
inlinestatic |
Get pointer to ESWM.MIICR1 (32-bit, RMAC port 1).
Definition at line 189 of file ra8_ether_regs.h.
References k_ra8_eswm_base_addr, and k_ra8_eswm_off_miicr1.
Referenced by ra8_eth_rgmii_select().
|
inlinestatic |
Get pointer to ESWM.MIIRR (32-bit).
Definition at line 175 of file ra8_ether_regs.h.
References k_ra8_eswm_base_addr, and k_ra8_eswm_off_miirr.
Referenced by ra8_eth_rgmii_select().
|
inlinestatic |
Get pointer to the GPTP register block.
Definition at line 646 of file ra8_ether_regs.h.
References k_ra8_gptp_base_addr.
Referenced by internal_stop(), internal_timer(), ra8_eth_gptp_ip_version(), ra8_eth_gptp_timer_enable(), and ra8_eth_gptp_timer_is_enabled().
|
inlinestatic |
Get pointer to the GWCA register block.
Definition at line 279 of file ra8_ether_regs.h.
References k_ra8_gwca0_base_addr.
Referenced by ra8_eth_gwca_clear_status(), ra8_eth_gwca_deinit(), ra8_eth_gwca_dispatch(), ra8_eth_gwca_enter_stop(), ra8_eth_gwca_get_status(), and ra8_eth_gwca_init().
|
inlinestatic |
Get pointer to GWDCC[queue_index] (per-queue descriptor chain cfg).
| [in] | queue_index | Queue number 0..31. |
< RA8 gwca maximum queues.
Definition at line 460 of file ra8_ether_regs.h.
References k_ra8_gwca0_base_addr, and k_ra8_gwca_off_gwdcc_base.
Referenced by ra8_eth_gwca_configure_queue(), and ra8_eth_gwca_reload_queue().
|
inlinestatic |
Get pointer to the MFWD register block.
Definition at line 214 of file ra8_ether_regs.h.
References k_ra8_mfwd_base_addr.
Referenced by ra8_eth_mfwd_clear_status(), ra8_eth_mfwd_deinit(), ra8_eth_mfwd_dispatch(), ra8_eth_mfwd_enter_stop(), ra8_eth_mfwd_get_status(), and ra8_eth_mfwd_init().