Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Macros for pin control configuration of Renesas RA SoCs. More...

Files

file  pinctrl-ra.h
 Devicetree pin control helpers for Renesas RA.

Macros

#define RA_PSEL(psel, port_num, pin_num)
 Macro to encode a pin configuration for Renesas RA SoCs.

Detailed Description

Macros for pin control configuration of Renesas RA SoCs.

Each pin configuration is built with the RA_PSEL() macro, which combines a peripheral-function selector, the port number, and the pin number within that port.

The selector follows the naming convention RA_PSEL_<FUNCTION>, where <FUNCTION> is one of:

  • Analog: ADC, DAC, ACMPHS, ACMPHS_VCOUT, CAC_ADC, CAC_DAC, CTSU
  • Timers: AGT, GPT0, GPT1
  • Serial: SCI_0 ... SCI_9, SPI, I2C, I3C
  • Connectivity: CANFD, QSPI, OSPI, SSIE, USBFS, USBHS, SDHI, ETH_MII, ETH_RMII, ETH_RGMII
  • Graphics / capture: GLCDC, CEU
  • System: HIZ_JTAG_SWD, CLKOUT_RTC, ETHPHYCLK, BUS
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-ra.h>
&pinctrl {
sci0_default: sci0_default {
group1 {
psels = <RA_PSEL(RA_PSEL_SCI_0, 4, 11)>,
<RA_PSEL(RA_PSEL_SCI_0, 4, 10)>;
};
};
};

Macro Definition Documentation

◆ RA_PSEL

#define RA_PSEL ( psel,
port_num,
pin_num )

#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-ra.h>

Value:
(1 << RA_MODE_POS | psel << RA_PSEL_POS | port_num << RA_PORT_NUM_POS | \
pin_num << RA_PIN_NUM_POS)

Macro to encode a pin configuration for Renesas RA SoCs.

This macro encodes the mode, peripheral selection (PSEL), port number, and pin number into a single 32-bit value suitable for use in DeviceTree pinctrl configurations.

Parameters
pselPeripheral selection value (use RA_PSEL_* macros).
port_numPort number.
pin_numPin number within the port.
Returns
Encoded pin configuration value.