Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Defines macros and constants for Renesas RZ/A2 pin controller pin
0004  * muxing functions.
0005  */
0006 #ifndef __DT_BINDINGS_PINCTRL_RENESAS_RZA2_H
0007 #define __DT_BINDINGS_PINCTRL_RENESAS_RZA2_H
0008 
0009 #define RZA2_PINS_PER_PORT  8
0010 
0011 /* Port names as labeled in the Hardware Manual */
0012 #define PORT0 0
0013 #define PORT1 1
0014 #define PORT2 2
0015 #define PORT3 3
0016 #define PORT4 4
0017 #define PORT5 5
0018 #define PORT6 6
0019 #define PORT7 7
0020 #define PORT8 8
0021 #define PORT9 9
0022 #define PORTA 10
0023 #define PORTB 11
0024 #define PORTC 12
0025 #define PORTD 13
0026 #define PORTE 14
0027 #define PORTF 15
0028 #define PORTG 16
0029 #define PORTH 17
0030 /* No I */
0031 #define PORTJ 18
0032 #define PORTK 19
0033 #define PORTL 20
0034 #define PORTM 21    /* Pins PM_0/1 are labeled JP_0/1 in HW manual */
0035 
0036 /*
0037  * Create the pin index from its bank and position numbers and store in
0038  * the upper 16 bits the alternate function identifier
0039  */
0040 #define RZA2_PINMUX(b, p, f)    ((b) * RZA2_PINS_PER_PORT + (p) | (f << 16))
0041 
0042 /*
0043  * Convert a port and pin label to its global pin index
0044  */
0045 #define RZA2_PIN(port, pin) ((port) * RZA2_PINS_PER_PORT + (pin))
0046 
0047 #endif /* __DT_BINDINGS_PINCTRL_RENESAS_RZA2_H */