[PATCH v3 1/7] dt-bindings: pinctrl: renesas: Add alpha-numerical port support for RZ/V2H

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



RZ/V2H has ports P0-P9 and PA-PB. Add support for defining alpha-numerical
ports in DT using RZV2H_* macros. Add PORT_P* macros based on PFC_P_mn
offset.

Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
---
v3:
 * New patch.
---
 include/dt-bindings/pinctrl/rzg2l-pinctrl.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/include/dt-bindings/pinctrl/rzg2l-pinctrl.h b/include/dt-bindings/pinctrl/rzg2l-pinctrl.h
index c78ed5e5efb7..c70308961dfa 100644
--- a/include/dt-bindings/pinctrl/rzg2l-pinctrl.h
+++ b/include/dt-bindings/pinctrl/rzg2l-pinctrl.h
@@ -11,13 +11,29 @@
 
 #define RZG2L_PINS_PER_PORT	8
 
+/* PORT_Px = Offset address of PFC_P_mn  - 0x20 */
+#define PORT_P0		0
+#define PORT_P1		1
+#define PORT_P2		2
+#define PORT_P3		3
+#define PORT_P4		4
+#define PORT_P5		5
+#define PORT_P6		6
+#define PORT_P7		7
+#define PORT_P8		8
+#define PORT_P9		9
+#define PORT_PA		10
+#define PORT_PB		11
+
 /*
  * Create the pin index from its bank and position numbers and store in
  * the upper 16 bits the alternate function identifier
  */
 #define RZG2L_PORT_PINMUX(b, p, f)	((b) * RZG2L_PINS_PER_PORT + (p) | ((f) << 16))
+#define RZV2H_PORT_PINMUX(b, p, f)	RZG2L_PORT_PINMUX(PORT_P##b, p, f)
 
 /* Convert a port and pin label to its global pin index */
 #define RZG2L_GPIO(port, pin)	((port) * RZG2L_PINS_PER_PORT + (pin))
+#define RZV2H_GPIO(port, pin)	RZG2L_GPIO(PORT_P##port, pin)
 
 #endif /* __DT_BINDINGS_RZG2L_PINCTRL_H */
-- 
2.43.0





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux