|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
MIPI DSI Host (DSI-2) register layout for the RA8D2. More...
Go to the source code of this file.
Data Structures | |
| struct | r_mipi_dsi_descriptor_t |
| One sequence-channel descriptor slot (4 x 32-bit registers). More... | |
| struct | r_mipi_dsi_regs_t |
| MIPI DSI host register block (full layout). More... | |
Functions | |
| static volatile r_mipi_dsi_regs_t * | ra8_mipi_dsi (void) |
| Pointer to the RA8D2 MIPI DSI host register block. | |
MIPI DSI Host (DSI-2) register layout for the RA8D2.
The RA8D2 MIPI DSI Host module is a MIPI DSI-2 transmitter that pairs with the GLCDC parallel-RGB stream and the on-die D-PHY (1 or 2 lanes, 80-720 Mbps/lane). The block exposes a 0x880-byte window at base 0x40346000 (Secure alias) / 0x50346000 (Non-Secure alias).
This header is the complete register layout for HUM Ch 65 (MIPI DSI, p 3839-3934). Every documented offset is named, and every documented bit field is exposed via a typed enum so the driver code can stay magic-number-free.
Register table (slim summary – bit fields are in dedicated enums below):
| Offset | Name | Width | Purpose |
|---|---|---|---|
| 0x000 | ISR | 32 | Top-level interrupt status (read-only). |
| 0x010 | LINKSR | 32 | Link status (SQ0/SQ1/VRUN/HSBUSY/LPBUSY). |
| 0x100 | TXSETR | 32 | Number of lanes + clock/data lane enable. |
| 0x104 | HSCLKSETR | 32 | HS clock start + continuous mode select. |
| 0x108 | ULPSSETR | 32 | ULPS wakeup period. |
| 0x10C | ULPSCR | 32 | ULPS enter/exit pulses (clock + data lanes). |
| 0x110 | RSTCR | 32 | Software reset + force-Tx-stop. |
| 0x114 | RSTSR | 32 | Reset status (HS/LP/APB/AXI/Video, lane stop, lane dir). |
| 0x120 | DSISETR | 32 | DSI link configuration (ECC, CRC, scramble, EoTp, etc). |
| 0x160 | TXPPD0..3R | 32 | Transmit packet payload data 0..15 (4 x 32-bit). |
| 0x200 | RXSR | 32 | Receive status register. |
| 0x204 | RXSCR | 32 | Receive status clear register. |
| 0x208 | RXIER | 32 | Receive interrupt enable. |
| 0x210 | PRESPTOBTASETR | 32 | Peripheral response timeout (BTA). |
| 0x214 | PRESPTOLPSETR | 32 | Peripheral response timeout (LP read/write). |
| 0x218 | PRESPTOHSSETR | 32 | Peripheral response timeout (HS read/write). |
| 0x220 | AKEPLATIR | 32 | Ack-and-error report latest info (RO). |
| 0x224 | AKEPACMSR | 32 | Ack-and-error report accumulated status (RO). |
| 0x228 | AKEPSCR | 32 | Ack-and-error report status clear. |
| 0x230 | RXRSSR | 32 | Receive Result Save status (slot valid bits). |
| 0x234 | RXRSSCR | 32 | Receive Result Save status clear. |
| 0x238 | RXRINFOOWSR | 32 | Receive Result info-overwrite status. |
| 0x23C | RXRINFOOWSCR | 32 | Receive Result info-overwrite status clear. |
| 0x240 | RXRSS0..3R | 32 | Receive result save slot 0..3 (header captured). |
| 0x2C0 | RXPPD0..3R | 32 | Receive packet payload data (4 x 32-bit, 16 bytes). |
| 0x2E0 | HSTXTOSETR | 32 | HS transmit timeout count. |
| 0x2E4 | LRXHTOSETR | 32 | LP-RX host processor timeout. |
| 0x2E8 | TATOSETR | 32 | Turnaround acknowledge timeout. |
| 0x300 | FERRSR/SCR/IER | 32 | Fatal-error status / clear / enable. |
| 0x314 | CLSTPTSETR | 32 | Clock-lane stop / beforehand / keep timing. |
| 0x318 | LPTRNSTSETR | 32 | LP transition (Go LP and Back) timing. |
| 0x320 | PLSR/SCR/IER | 32 | PHY (PPI) status / clear / enable. |
| 0x400 | VMSET0R | 32 | Video-mode set 0 (HSA/HBP/HFP no-LP, START/STOP). |
| 0x404 | VMSET1R | 32 | Video-mode set 1 (DLY value). |
| 0x410 | VMSR/SCR/IER | 32 | Video-mode status / clear / enable. |
| 0x420 | VMPPSETR | 32 | Video-mode pixel-packet set (TXESYNC, DT, VC). |
| 0x428 | VMVSSETR | 32 | Vertical sync (VSA, VSPOL, VACT). |
| 0x42C | VMVPSETR | 32 | Vertical porch (VBP, VFP). |
| 0x430 | VMHSSETR | 32 | Horizontal sync (HSA, HSPOL, HACT). |
| 0x434 | VMHPSETR | 32 | Horizontal porch (HBP, HFP). |
| 0x5C0 | SQCH0SET0R | 32 | Sequence channel 0 START bit. |
| 0x5D0 | SQCH0SR/SCR/IER | 32 | Sequence channel 0 status / clear / enable. |
| 0x600 | SQCH1SET0R | 32 | Sequence channel 1 START bit. |
| 0x610 | SQCH1SR/SCR/IER | 32 | Sequence channel 1 status / clear / enable. |
| 0x780 | SQCH0DSC0..7 | 32x4 | Sequence ch0 descriptor 0..7 (A/B/C/D each). |
| 0x800 | SQCH1DSC0..7 | 32x4 | Sequence ch1 descriptor 0..7 (A/B/C/D each). |
Citations: HUM Ch 65 "MIPI DSI" subsections 65.2.1..65.2.140, pages 3839-3934. The struct member offsets and total window size (0x880 bytes) match the FSP R_MIPI_DSI_Type declaration in R7KA8D2KF_core0.h line 54968-61047.
Definition in file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_addr_t : uintptr_t |
Memory-mapped base addresses for the MIPI DSI host.
HUM Ch 65.2.1 lists the Secure alias as 0x4034_6000 and the Non-Secure alias as 0x5034_6000. The bare-metal driver always targets the Secure alias.
| Enumerator | |
|---|---|
| k_ra8_mipi_dsi_base_addr_s | Secure-world MMIO base. |
| k_ra8_mipi_dsi_base_addr_ns | Non-Secure alias base. |
Definition at line 99 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_akep_t : uint32_t |
Bit fields for AKEPLATIR / AKEPACMSR / AKEPSCR.
HUM Ch 65.2 "Register Description" – AKEPLATIR @ 0x220, AKEPACMSR @ 0x224, AKEPSCR @ 0x228, p 3839-3934. EREP[15:0] is the 16-bit DSI ack/error-report bitmap, VC[19:16] tags the virtual channel that issued the report.
| Enumerator | |
|---|---|
| k_ra8_mipi_dsi_akep_erep_mask | 16-bit error report. |
| k_ra8_mipi_dsi_akep_vc_mask | Virtual channel id. |
Definition at line 361 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_bta_t : uint8_t |
Bus Turn Around (BTA) selector for descriptor word A.
HUM Ch 65.2 "Register Description" – SQCH0DSC0AR.BTA[27:26]. Mirrors MIPI_DSI_CMD_FLAG_BTA* from the FSP.
Definition at line 702 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_busy_loop_t : uint32_t |
Bounded poll iteration cap shared by every busy-wait helper.
Honours NASA Power of 10 Rule 2: every loop in the driver has a statically provable upper bound. Tuned so the worst-case wait is still under one ms at 1 GHz Cortex-M85, but small enough that the unit tests on host don't spin meaningfully.
| Enumerator | |
|---|---|
| k_ra8_mipi_dsi_busy_loop_max | Max iterations per wait. |
Definition at line 128 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_clstpt_t : uint32_t |
Bit fields for CLSTPTSETR (clock-lane stop / beforehand / keep).
HUM Ch 65.2 "Register Description" – CLSTPTSETR @ 0x314. CLKSTPT[11:2], CLKBFHT[23:16], CLKKPT[31:24].
Definition at line 556 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_dsc0a_shift_t : uint8_t |
Bit shifts for SQCH*DSC?AR (descriptor word A).
HUM Ch 65.2 "Register Description" – SQCH0DSC0AR @ 0x780. Bit layout: [DATA0:8][DATA1:8][DT:6][VC:2][FMT:1][SPD:1][BTA:2] [NXACT:2][rsvd:2]. Used to assemble a generic DSI short or long packet header in software.
Definition at line 653 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_dsc0b_t : uint32_t |
SQCH*DSC?BR (descriptor word B) DTSEL field.
HUM Ch 65.2 "Register Description" – SQCH0DSC0BR @ 0x784. DTSEL[25:24]: 0 = TXPPD, 1 = sequence RAM.
| Enumerator | |
|---|---|
| k_ra8_mipi_dsi_dsc0b_dtsel_txppd | Use TXPPD0..3R buffer. |
| k_ra8_mipi_dsi_dsc0b_dtsel_seqrm | Use sequence RAM. |
Definition at line 672 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_dsc0c_t : uint32_t |
SQCH*DSC?CR (descriptor word C) bit fields.
HUM Ch 65.2 "Register Description" – SQCH0DSC0CR @ 0x788. FINACT[0], AUXOP[22], ACTCODE[31:24]. AUXOP signals an auxiliary operation (BTA / skew calibration / NOOP); ACTCODE picks the specific aux command.
Definition at line 687 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_dsisetr_t : uint32_t |
Bit fields for DSISETR (DSI link configuration).
HUM Ch 65.2 "Register Description" – DSISETR @ 0x120, p 3839-3934. MRPSZ[15:0] is the maximum return packet size (set as a value, not a single-bit mask, so it is exposed as a shift).
Definition at line 260 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_ferrsr_t : uint32_t |
Bit fields for FERRSR / FERRSCR / FERRIER (fatal errors).
HUM Ch 65.2 "Register Description" – FERRSR @ 0x300, FERRSCR @ 0x304, FERRIER @ 0x308, p 3839-3934.
Definition at line 374 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_hsclk_t : uint32_t |
Bit fields for HSCLKSETR.
HUM Ch 65.2 "Register Description" – HSCLKSETR @ 0x104, p 3839-3934.
| Enumerator | |
|---|---|
| k_ra8_mipi_dsi_hsclk_start | HSCLST: HS clock start. |
| k_ra8_mipi_dsi_hsclk_continuous | HSCLMD: continuous mode. |
Definition at line 200 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_isr_mask_t : uint32_t |
Bit masks for the top-level Interrupt Status Register (ISR).
HUM Ch 65.2.1 "ISR : Interrupt Status Register" p 3840.
Definition at line 154 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_linksr_mask_t : uint32_t |
Bit masks for the Link Status Register (LINKSR).
HUM Ch 65.2 "Register Description" – LINKSR @ 0x010, p 3839-3934.
Definition at line 170 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_lptrnst_t : uint32_t |
Bit fields for LPTRNSTSETR (LP transition timing).
HUM Ch 65.2 "Register Description" – LPTRNSTSETR @ 0x318. GOLPBKT[9:0].
| Enumerator | |
|---|---|
| k_ra8_mipi_dsi_lptrnst_golpbkt_mask | GOLPBKT[9:0]. |
Definition at line 575 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_offset_t : uint16_t |
Verified MMIO offsets (in bytes) of select named registers.
Used by static_assert declarations below to lock layout to the HUM/FSP register window definition.
Definition at line 758 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_plsr_t : uint32_t |
Bit fields for PLSR / PLSCR / PLIER (PHY/PPI lane status).
HUM Ch 65.2 "Register Description" – PLSR @ 0x320, PLSCR @ 0x324, PLIER @ 0x328, p 3839-3934.
Definition at line 398 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_presptohs_t : uint32_t |
Bit fields for PRESPTOHSSETR (HS read/write timeouts).
HUM Ch 65.2 "Register Description" – PRESPTOHSSETR @ 0x218. HSWTO[15:0], HSRTO[31:16].
Definition at line 602 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_presptolp_t : uint32_t |
Bit fields for PRESPTOLPSETR (LP read/write timeouts).
HUM Ch 65.2 "Register Description" – PRESPTOLPSETR @ 0x214. LPWTO[15:0], LPRTO[31:16].
Definition at line 587 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_reserved_words_t : uint8_t |
Reserved-word array sizes (in 32-bit words) used by the host register block to keep named offsets aligned with HUM Ch 65.
Each value corresponds to a reserved gap between named registers. Replaces inline magic numbers in the r_mipi_dsi_regs_t struct.
Definition at line 735 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_rstcr_t : uint32_t |
Bit fields for RSTCR (software reset control).
HUM Ch 65.2 "Register Description" – RSTCR @ 0x110, p 3839-3934.
| Enumerator | |
|---|---|
| k_ra8_mipi_dsi_rstcr_swrst | Assert software reset. |
| k_ra8_mipi_dsi_rstcr_ftxstp | Force Tx stop mode. |
Definition at line 226 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_rstsr_t : uint32_t |
Bit fields for RSTSR (software reset status).
HUM Ch 65.2 "Register Description" – RSTSR @ 0x114, p 3839-3934.
Definition at line 238 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_rxrinfoowscr_t : uint32_t |
Bit masks for RXRINFOOWSCR (receive-result info-overwrite clear).
HUM Ch 65.2 "Register Description" – RXRINFOOWSR @ 0x238, RXRINFOOWSCR @ 0x23C.
Definition at line 140 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_rxrss_t : uint32_t |
Decoded fields for an RXRSS slot value (header capture).
HUM Ch 65.2 "Register Description" – RXRSS0..3R @ 0x240..0x24C. Each 32-bit slot register packs a captured DSI packet header: DATA0[7:0], DATA1[15:8], DT[21:16], VC[23:22], FMT[24], status flags RXSUC[25], RXFERR[26], RXFAIL[27], RXPFAIL[28], RXCERR[29], RXAKE[30], INFOOW[31].
Definition at line 336 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_rxrssr_t : uint32_t |
Bit fields for RXRSSR / RXRSSCR (receive-result slot valid).
HUM Ch 65.2 "Register Description" – RXRSSR @ 0x230, RXRSSCR @ 0x234.
Definition at line 318 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_rxsr_t : uint32_t |
Bit fields for RXSR / RXSCR / RXIER (receive status path).
HUM Ch 65.2 "Register Description" – RXSR @ 0x200, RXSCR @ 0x204, RXIER @ 0x208, p 3839-3934. The same layout is used for status (read-only), clear (RW1C), and interrupt enable.
Definition at line 283 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_size_t : uint16_t |
Window size and key constants for the MIPI DSI block.
Definition at line 108 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_sqch_t : uint32_t |
Bit fields for SQCH0SET0R / SQCH1SET0R / SQCH*SR.
HUM Ch 65.2 "Register Description" – SQCH0SET0R @ 0x5C0, SQCH0SR @ 0x5D0, SQCH1SET0R @ 0x600, SQCH1SR @ 0x610. Same layout applies to both channels and to the corresponding SCR / IER registers.
NOTE on SQCH*SET0R: the FSP source emits bit 23 alongside the START bit (SQCHnSET0R_BIT_23 | (n == channel)). That extra bit is the channel select latch. Both bits are exposed here.
Definition at line 623 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_txset_t : uint32_t |
Bit fields for TXSETR (lane configuration).
HUM Ch 65.2 "Register Description" – TXSETR @ 0x100, p 3839-3934. NUMLANE [1:0] = 0 -> 1 lane, 1 -> 2 lanes.
Definition at line 186 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_ulpscr_t : uint32_t |
Bit fields for ULPSCR.
HUM Ch 65.2 "Register Description" – ULPSCR @ 0x10C, p 3839-3934.
Definition at line 212 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_vmhpsetr_t : uint32_t |
Bit fields for VMHPSETR (horizontal porch timing).
HUM Ch 65.2 "Register Description" – VMHPSETR @ 0x434. HBP[12:0], HFP[28:16].
| Enumerator | |
|---|---|
| k_ra8_mipi_dsi_vmhp_hbp_mask | HBP[12:0]. |
| k_ra8_mipi_dsi_vmhp_hfp_shift | HFP shift. |
| k_ra8_mipi_dsi_vmhp_hfp_mask | HFP[28:16]. |
Definition at line 542 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_vmhssetr_t : uint32_t |
Bit fields for VMHSSETR (horizontal sync timing).
HUM Ch 65.2 "Register Description" – VMHSSETR @ 0x430. HSA[11:0], HSPOL[15], HACT[30:16].
| Enumerator | |
|---|---|
| k_ra8_mipi_dsi_vmhs_hsa_mask | HSA[11:0]. |
| k_ra8_mipi_dsi_vmhs_hspol | HSYNC polarity. |
| k_ra8_mipi_dsi_vmhs_hact_shift | HACT shift. |
| k_ra8_mipi_dsi_vmhs_hact_mask | HACT[30:16]. |
Definition at line 527 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_vmppsetr_t : uint32_t |
Bit fields for VMPPSETR (video-mode pixel-packet set).
HUM Ch 65.2 "Register Description" – VMPPSETR @ 0x420. TXESYNC[15], DT[21:16], VC[23:22].
Definition at line 480 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_vmset0_t : uint32_t |
Bit fields for VMSET0R (video-mode set 0).
HUM Ch 65.2 "Register Description" – VMSET0R @ 0x400, p 3839-3934.
Definition at line 428 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_vmset1_t : uint32_t |
Bit fields for VMSET1R (video-mode set 1: pipeline delay).
HUM Ch 65.2 "Register Description" – VMSET1R @ 0x404, p 3839-3934. DLY[13:2] – 12-bit delay value, scaled by 4 by hardware.
| Enumerator | |
|---|---|
| k_ra8_mipi_dsi_vmset1_dly_shift | DLY position. |
| k_ra8_mipi_dsi_vmset1_dly_mask | DLY[13:2] field mask. |
Definition at line 444 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_vmsr_t : uint32_t |
Bit fields for VMSR / VMSCR / VMIER.
HUM Ch 65.2 "Register Description" – VMSR @ 0x410, VMSCR @ 0x414, VMIER @ 0x418, p 3839-3934. NOTE the VMSR layout from the FSP shows start[0] / stop[1] / running[2] / virdy[3] but the HUM places RUNNING at bit 0 and VIRDY at bit 4. We follow the HUM (and downstream test fixtures) which use the latter layout.
Definition at line 460 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_vmvpsetr_t : uint32_t |
Bit fields for VMVPSETR (vertical porch timing).
HUM Ch 65.2 "Register Description" – VMVPSETR @ 0x42C. VBP[12:0], VFP[28:16].
| Enumerator | |
|---|---|
| k_ra8_mipi_dsi_vmvp_vbp_mask | VBP[12:0]. |
| k_ra8_mipi_dsi_vmvp_vfp_shift | VFP shift. |
| k_ra8_mipi_dsi_vmvp_vfp_mask | VFP[28:16]. |
Definition at line 513 of file ra8_mipi_dsi_regs.h.
| enum ra8_mipi_dsi_vmvssetr_t : uint32_t |
Bit fields for VMVSSETR (vertical sync timing).
HUM Ch 65.2 "Register Description" – VMVSSETR @ 0x428. VSA[11:0], VSPOL[15], VACT[30:16].
| Enumerator | |
|---|---|
| k_ra8_mipi_dsi_vmvs_vsa_mask | VSA[11:0]. |
| k_ra8_mipi_dsi_vmvs_vspol | VSYNC polarity. |
| k_ra8_mipi_dsi_vmvs_vact_shift | VACT shift. |
| k_ra8_mipi_dsi_vmvs_vact_mask | VACT[30:16]. |
Definition at line 498 of file ra8_mipi_dsi_regs.h.
|
inlinestatic |
Pointer to the RA8D2 MIPI DSI host register block.
Always returns the Secure-world alias. In RA8_OFF_TARGET the host test harness has already mmap'd the peripheral window so this pointer is dereferenceable.
Definition at line 917 of file ra8_mipi_dsi_regs.h.
References k_ra8_mipi_dsi_base_addr_s.
Referenced by internal_check_link_state(), internal_program_link(), internal_program_timeouts(), internal_ra8_mipi_dsi_clear_all_status(), internal_ra8_mipi_dsi_pulse_start(), internal_ra8_mipi_dsi_stage_payload(), internal_send_stage_and_pulse(), ra8_mipi_dsi_ack_error_get(), ra8_mipi_dsi_clear_status(), ra8_mipi_dsi_deinit(), ra8_mipi_dsi_dispatch(), ra8_mipi_dsi_dispatch_fatal(), ra8_mipi_dsi_dispatch_phy(), ra8_mipi_dsi_dispatch_receive(), ra8_mipi_dsi_dispatch_seq0(), ra8_mipi_dsi_dispatch_seq1(), ra8_mipi_dsi_dispatch_video(), ra8_mipi_dsi_get_status(), ra8_mipi_dsi_hs_clock_start(), ra8_mipi_dsi_hs_clock_stop(), ra8_mipi_dsi_irq_enable(), ra8_mipi_dsi_link_status_get(), ra8_mipi_dsi_rx_payload_read(), ra8_mipi_dsi_rx_result_get(), ra8_mipi_dsi_soft_reset(), ra8_mipi_dsi_te_event_clear(), ra8_mipi_dsi_te_event_pending(), ra8_mipi_dsi_ulps_enter(), ra8_mipi_dsi_ulps_exit(), ra8_mipi_dsi_video_configure(), ra8_mipi_dsi_video_start(), and ra8_mipi_dsi_video_stop().