60 if (out_rates ==
nullptr) {
92typedef enum : uint16_t {
116 .max_return_packet_size = 16U,
117 .ulps_wakeup_period = 0U,
118 .ecc_check_enable =
true,
120 .scramble_enable =
false,
121 .tearing_detect_enable =
true,
122 .crc_check_vc_mask = 0x01U,
235typedef enum : uint32_t {
253 uint32_t pclka_hz = 0U;
268 "ra8_board.uart.console.txd");
274 "ra8_board.uart.console.rxd");
299 if (data ==
nullptr) {
310 if (out_len ==
nullptr) {
317 if (out ==
nullptr) {
327 for (
size_t i = 0U; i < cap; ++i) {
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
static const ra8_mipi_phy_timing_t s_mipi_phy_timing_placeholder
Placeholder D-PHY HS/LP transition timing block.
ra8_err_t ra8_board_uart_console_read(uint8_t *out, size_t cap, size_t *out_len)
Polled non-blocking read from the J-Link OB VCOM console.
bool priv_ra8_board_uart_console_is_up(void)
Implementation of priv_ra8_board_uart_console_is_up() – reads the same flag the write / read / flush ...
ra8_err_t ra8_board_clocks_init(ra8_board_clock_rates_t *out_rates)
Initialize the board-standard PLL1 clock tree and publish its rates.
ra8_board_uart_console_clock_t
Minimum SCI module operating clock accepted by the console init.
@ k_ra8_board_uart_console_min_pclka_hz
RA8 board UART console minimum pclka Hz.
static const ra8_mipi_phy_config_t s_mipi_phy_cfg
MIPI D-PHY config for the J32 mezzanine.
ra8_err_t ra8_board_uart_console_write(const uint8_t *data, size_t len)
Polled blocking write to the J-Link OB VCOM console.
ra8_err_t ra8_board_mipi_dsi_init(void)
Bring the MIPI-DSI link up (PHY + DSI controller).
ra8_err_t ra8_board_uart_console_init(uint32_t baud)
Configure SCI8 + PD02/PD03 as the debug-console UART.
ra8_err_t ra8_board_uart_console_flush(void)
Block until every byte queued on the J-Link OB VCOM console has finished clocking out on the wire.
ra8_board_mipi_panel_geometry_t
Static placeholder geometry + line rate for the J32 panel.
@ k_ra8_board_mipi_panel_v_active
RA8 board mipi panel v active.
@ k_ra8_board_mipi_panel_line_rate_mbps
RA8 board mipi panel line rate mbps.
@ k_ra8_board_mipi_panel_h_active
RA8 board mipi panel h active.
static bool s_uart_console_initialized
Tracks whether ra8_board_uart_console_init has succeeded.
static const ra8_mipi_dsi_config_t s_mipi_panel_cfg
MIPI DSI host link-layer config for the J32 mezzanine.
Cross-translation-unit seam for the EK-RA8D2 BSP implementation.
@ k_panel_pll_nmul
PLL integer multiplier.
@ k_panel_pclka_mhz
PCLKA assumed CGC reset default.
@ k_ra8_board_uart_console_pin_txd
PD02 TXD.
@ k_ra8_board_uart_console_pin_rxd
PD03 RXD.
@ k_ra8_board_uart_console_sci_channel
PD02/PD03 -> SCI8 (verified on real EK-RA8D2 v1 silicon).
High-level Clock Generation Circuit driver.
ra8_err_t ra8_cgc_get_clock_hz(ra8_clock_id_t id, uint32_t *out_hz)
Query the current frequency of a clock-tree domain.
@ k_ra8_clock_id_pclka
PCLKA.
ra8_err_t ra8_cgc_init(void)
Configure the clock tree to a safe default.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_invalid_arg
Invalid function argument.
@ k_ra8_err_not_initialized
Module not initialized – _init() not yet called successfully.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
PSEL codes for peripheral pin routing on the RA8D2.
@ k_ra8_psel_sci_async
00100b: SCI async serial (UART).
MIPI DSI-2 host driver – public API (full HUM Ch 65 surface).
ra8_err_t ra8_mipi_dsi_hs_clock_start(void)
Start the high-speed differential clock to the panel.
ra8_err_t ra8_mipi_dsi_init(const ra8_mipi_dsi_config_t *cfg)
Bring up the MIPI DSI host link layer.
@ k_ra8_mipi_dsi_clock_non_continuous
HS clock idles in LP.
@ k_ra8_mipi_dsi_lanes_2
2 data lanes + 1 clock lane.
MIPI D-PHY driver – physical layer shared by DSI and CSI.
ra8_err_t ra8_mipi_phy_init(const ra8_mipi_phy_config_t *cfg)
Bring up the D-PHY end-to-end per HUM Ch 64.3.1 p 3837.
@ k_ra8_mipi_phy_idiv_1
IDIV = 1 (no division).
@ k_ra8_mipi_phy_lane_count_2
2 data lanes (silicon maximum).
@ k_ra8_mipi_phy_mode_dsi_host
Host mode used by MIPI DSI.
@ k_ra8_mipi_phy_nfmul_0_00
NF = 0.00.
@ k_ra8_mipi_phy_clk_noncontinuous
Drop to LP-11 between bursts.
@ k_ra8_mipi_phy_pmul_4
P = 1/4 (240.
@ k_ra8_mipi_phy_eotp_enabled
Append EoTP packet.
Typed Port / Pin Constants for the RA8D2 IOPORT Module.
ra8_port_pin_t
Packed (port << 8) | pin pin identifier.
High-level GPIO helpers on top of the PORT + PFS register layer.
ra8_err_t ra8_pfs_route_peripheral(ra8_port_pin_t pin, ra8_psel_t psel, const char *owner)
Route a pin to a non-IRQ peripheral function via PFS.PSEL.
Full-featured Serial Communications Interface driver.
ra8_err_t ra8_sci_write_polling(uint8_t channel, const uint8_t *data, uint32_t len)
Send len bytes by polling (convenience wrapper).
@ k_ra8_sci_stop_1
RA8 SCI stop 1.
@ k_ra8_sci_parity_none
RA8 SCI parity none.
ra8_err_t ra8_sci_init(uint8_t channel, const ra8_sci_cfg_t *cfg)
Initialise an SCI channel using the descriptor.
ra8_err_t ra8_sci_getc_polling(uint8_t channel, uint8_t *out_byte)
Poll-receive one byte (blocking, bounded spin).
@ k_ra8_sci_data_8
RA8 SCI data 8.
ra8_err_t ra8_sci_flush(uint8_t channel)
Block until the channel's transmit shift register is empty.
Named Time Unit Constants for Delay / Timeout / Tick Math.
@ k_ra8_pclka_hz
PCLKA = PLL1P/8 = 125 MHz.
@ k_ra8_cpuclk0_hz
CPUCLK0 = PLL1P/1 = 1 GHz.
Clock rates published by the standard EK-RA8D2 bring-up.
Static configuration passed to ra8_mipi_dsi_init.
Top-level configuration for ra8_mipi_phy_init.
D-PHY HS/LP transition timing values (DPHYTIM1..6).
Configuration descriptor for ra8_sci_init.