xref: /freebsd/sys/contrib/device-tree/include/dt-bindings/pinctrl/r7s72100-pinctrl.h (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot /* SPDX-License-Identifier: GPL-2.0 */
2*c66ec88fSEmmanuel Vadot /*
3*c66ec88fSEmmanuel Vadot  * Defines macros and constants for Renesas RZ/A1 pin controller pin
4*c66ec88fSEmmanuel Vadot  * muxing functions.
5*c66ec88fSEmmanuel Vadot  */
6*c66ec88fSEmmanuel Vadot #ifndef __DT_BINDINGS_PINCTRL_RENESAS_RZA1_H
7*c66ec88fSEmmanuel Vadot #define __DT_BINDINGS_PINCTRL_RENESAS_RZA1_H
8*c66ec88fSEmmanuel Vadot 
9*c66ec88fSEmmanuel Vadot #define RZA1_PINS_PER_PORT	16
10*c66ec88fSEmmanuel Vadot 
11*c66ec88fSEmmanuel Vadot /*
12*c66ec88fSEmmanuel Vadot  * Create the pin index from its bank and position numbers and store in
13*c66ec88fSEmmanuel Vadot  * the upper 16 bits the alternate function identifier
14*c66ec88fSEmmanuel Vadot  */
15*c66ec88fSEmmanuel Vadot #define RZA1_PINMUX(b, p, f)	((b) * RZA1_PINS_PER_PORT + (p) | (f << 16))
16*c66ec88fSEmmanuel Vadot 
17*c66ec88fSEmmanuel Vadot #endif /* __DT_BINDINGS_PINCTRL_RENESAS_RZA1_H */
18