Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Renesas RZ/A2M pin control helpers

Macros for pin control configuration of the Renesas RZ/A2M SoC. More...

Files

file  pinctrl-rza2m.h
 Devicetree pin control helpers for Renesas RZ/A2M.

Macros

#define RZA2M_PIN_NUM_IN_PORT   8
 Number of pins per port.
#define RZA2M_PINMUX(b, p, f)
 Create an encoded pinmux value from a port, pin and function.

Detailed Description

Macros for pin control configuration of the Renesas RZ/A2M SoC.

Each pin configuration is built with the RZA2M_PINMUX() macro, which takes a port, the pin number within that port, and the alternate-function number. Ports are named as in the hardware manual: PORT_00 ... PORT_09, PORT_A ... PORT_M, plus PORT_CKIO and PORT_PPOC.

RZ/A2M uses an older pinmux scheme than the other RZ/A SoCs: the alternate-function index is encoded in the upper bits and taken from the SoC's pin-function table (there is no symbolic macro for it).

#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rza2m.h>
&pinctrl {
scifa4_default: scifa4_default {
device-pinmux {
pinmux = <RZA2M_PINMUX(PORT_09, 0, 4)>,
<RZA2M_PINMUX(PORT_09, 1, 4)>;
};
};
};

Macro Definition Documentation

◆ RZA2M_PIN_NUM_IN_PORT

#define RZA2M_PIN_NUM_IN_PORT   8

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

Number of pins per port.

◆ RZA2M_PINMUX

#define RZA2M_PINMUX ( b,
p,
f )

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

Value:
((b) * RZA2M_PIN_NUM_IN_PORT + (p) | (f << 16))
#define RZA2M_PIN_NUM_IN_PORT
Number of pins per port.
Definition pinctrl-rza2m.h:52

Create an encoded pinmux value from a port, pin and function.

The pin index is built from the port and pin position numbers; the alternate function identifier is stored in the upper 16 bits.

Parameters
bPort identifier (PORT_00..PORT_M, plus PORT_CKIO / PORT_PPOC).
pPin number within the port.
fAlternate function identifier.
Returns
Encoded pinmux value.