1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Defines macros and constants for Renesas RZ/A2 pin controller pin
6 #ifndef __DT_BINDINGS_PINCTRL_RENESAS_RZA2_H
7 #define __DT_BINDINGS_PINCTRL_RENESAS_RZA2_H
9 #define RZA2_PINS_PER_PORT 8
11 /* Port names as labeled in the Hardware Manual */
34 #define PORTM 21 /* Pins PM_0/1 are labeled JP_0/1 in HW manual */
37 * Create the pin index from its bank and position numbers and store in
38 * the upper 16 bits the alternate function identifier
40 #define RZA2_PINMUX(b, p, f) ((b) * RZA2_PINS_PER_PORT + (p) | (f << 16))
43 * Convert a port and pin label to its global pin index
45 #define RZA2_PIN(port, pin) ((port) * RZA2_PINS_PER_PORT + (pin))
47 #endif /* __DT_BINDINGS_PINCTRL_RENESAS_RZA2_H */