|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Macros for pin control configuration of Renesas RZ/V SoCs. More...
Files | |
| file | pinctrl-rzv-common.h |
| Devicetree pin control helpers for Renesas RZ/V. | |
| file | pinctrl-rzv2h.h |
| Renesas RZ/V2H pin and function definitions. | |
| file | pinctrl-rzv2n.h |
| Renesas RZ/V2N pin and function definitions. | |
Macros | |
| #define | RZV_PINMUX(port, pin, func) |
| Create an encoded value containing port/pin/function information. | |
| #define | RZV_FILTER_SET(filnum, filclksel) |
| Encode filter stage count and clock selection into one configuration value. | |
Renesas RZ/V digital noise filter options | |
Set the number of filter stages (FILNUM) and the sampling clock divider (FILCLKSEL). | |
| #define | RZV_FILNUM_4_STAGE 0 |
| FILNUM: 4-stage filter. | |
| #define | RZV_FILNUM_8_STAGE 1 |
| FILNUM: 8-stage filter. | |
| #define | RZV_FILNUM_12_STAGE 2 |
| FILNUM: 12-stage filter. | |
| #define | RZV_FILNUM_16_STAGE 3 |
| FILNUM: 16-stage filter. | |
| #define | RZV_FILCLKSEL_NOT_DIV 0 |
| FILCLKSEL: no division. | |
| #define | RZV_FILCLKSEL_DIV_9000 1 |
| FILCLKSEL: divided by 9000. | |
| #define | RZV_FILCLKSEL_DIV_18000 2 |
| FILCLKSEL: divided by 18000. | |
| #define | RZV_FILCLKSEL_DIV_36000 3 |
| FILCLKSEL: divided by 36000. | |
Macros for pin control configuration of Renesas RZ/V SoCs.
General-purpose pins are configured with the RZV_PINMUX() macro, which takes three fields:
port — the port identifier, one of the PORT_* values.pin — the pin number within that port.func — the alternate-function number selecting the peripheral signal routed to the pin, taken from the SoC's Pin Function Controller table; it has no symbolic macro and is passed as a plain integer.Dedicated-function pins that sit outside the general-purpose port matrix are referenced directly through their BSP_IO_* identifiers, covering debug (BSP_IO_NMI, BSP_IO_TMS_SWDIO, BSP_IO_TDO), audio clocks, SD/MMC, QSPI flash, RIIC (I2C), watchdog overflow and, on some variants, Ethernet and PCIe reset.
An optional digital noise filter can be applied to a pin group with RZV_FILTER_SET(), built from a stage count (RZV_FILNUM_*) and a sampling clock divider (RZV_FILCLKSEL_*).
The pre-defined port/pin combinations differ between RZ/V variants and are provided by a dedicated header per variant:
pinctrl-rzv-common.h — RZ/V general-purpose port supersetpinctrl-rzv2h.h — RZ/V2Hpinctrl-rzv2n.h — RZ/V2N| #define RZV_FILCLKSEL_DIV_18000 2 |
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzv-common.h>
FILCLKSEL: divided by 18000.
| #define RZV_FILCLKSEL_DIV_36000 3 |
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzv-common.h>
FILCLKSEL: divided by 36000.
| #define RZV_FILCLKSEL_DIV_9000 1 |
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzv-common.h>
FILCLKSEL: divided by 9000.
| #define RZV_FILCLKSEL_NOT_DIV 0 |
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzv-common.h>
FILCLKSEL: no division.
| #define RZV_FILNUM_12_STAGE 2 |
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzv-common.h>
FILNUM: 12-stage filter.
| #define RZV_FILNUM_16_STAGE 3 |
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzv-common.h>
FILNUM: 16-stage filter.
| #define RZV_FILNUM_4_STAGE 0 |
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzv-common.h>
FILNUM: 4-stage filter.
| #define RZV_FILNUM_8_STAGE 1 |
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzv-common.h>
FILNUM: 8-stage filter.
| #define RZV_FILTER_SET | ( | filnum, | |
| filclksel ) |
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzv-common.h>
Encode filter stage count and clock selection into one configuration value.
Encoding:
| filnum | Filter stage selection (RZV_FILNUM_*). |
| filclksel | Filter clock selection (RZV_FILCLKSEL_*). |
| #define RZV_PINMUX | ( | port, | |
| pin, | |||
| func ) |
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzv-common.h>
Create an encoded value containing port/pin/function information.
| port | Port identifier (PORT_00..PORT_48). |
| pin | Pin number within the port. |
| func | Pin function selector. |