r7s9210-pinctrl.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Defines macros and constants for Renesas RZ/A2 pin controller pin
  4. * muxing functions.
  5. */
  6. #ifndef __DT_BINDINGS_PINCTRL_RENESAS_RZA2_H
  7. #define __DT_BINDINGS_PINCTRL_RENESAS_RZA2_H
  8. #define RZA2_PINS_PER_PORT 8
  9. /* Port names as labeled in the Hardware Manual */
  10. #define PORT0 0
  11. #define PORT1 1
  12. #define PORT2 2
  13. #define PORT3 3
  14. #define PORT4 4
  15. #define PORT5 5
  16. #define PORT6 6
  17. #define PORT7 7
  18. #define PORT8 8
  19. #define PORT9 9
  20. #define PORTA 10
  21. #define PORTB 11
  22. #define PORTC 12
  23. #define PORTD 13
  24. #define PORTE 14
  25. #define PORTF 15
  26. #define PORTG 16
  27. #define PORTH 17
  28. /* No I */
  29. #define PORTJ 18
  30. #define PORTK 19
  31. #define PORTL 20
  32. #define PORTM 21 /* Pins PM_0/1 are labeled JP_0/1 in HW manual */
  33. /*
  34. * Create the pin index from its bank and position numbers and store in
  35. * the upper 16 bits the alternate function identifier
  36. */
  37. #define RZA2_PINMUX(b, p, f) ((b) * RZA2_PINS_PER_PORT + (p) | (f << 16))
  38. /*
  39. * Convert a port and pin label to its global pin index
  40. */
  41. #define RZA2_PIN(port, pin) ((port) * RZA2_PINS_PER_PORT + (pin))
  42. #endif /* __DT_BINDINGS_PINCTRL_RENESAS_RZA2_H */