[RFC PATCH 05/23] pinctrl: sunxi: Add UART pinmuxes
Samuel Holland
samuel at sholland.org
Thu Oct 21 06:55:22 CEST 2021
This includes UART0 and R_UART (s_uart) on all supported platforms, plus
the additional UART configurations from arch/arm/mach-sunxi/board.c.
Pin lists and mux values were taken from the Linux drivers.
Signed-off-by: Samuel Holland <samuel at sholland.org>
---
drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c | 5 +++++
drivers/pinctrl/sunxi/pinctrl-sun50i-a64-r.c | 1 +
drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c | 7 +++++++
drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c | 7 +++++++
drivers/pinctrl/sunxi/pinctrl-sun50i-h6-r.c | 1 +
drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c | 6 ++++++
drivers/pinctrl/sunxi/pinctrl-sun50i-h616-r.c | 1 +
drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c | 6 ++++++
drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c | 6 ++++++
drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c | 1 +
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 5 +++++
drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c | 5 +++++
drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c | 1 +
drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c | 5 +++++
drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c | 7 +++++++
drivers/pinctrl/sunxi/pinctrl-sun8i-a83t-r.c | 1 +
drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c | 7 +++++++
drivers/pinctrl/sunxi/pinctrl-sun8i-h3-r.c | 1 +
drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c | 7 +++++++
drivers/pinctrl/sunxi/pinctrl-sun8i-v3s.c | 7 +++++++
drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c | 1 +
drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c | 5 +++++
22 files changed, 93 insertions(+)
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
index 3ade2d204e..b7d3413b8b 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
@@ -9,6 +9,11 @@
static const struct sunxi_pinctrl_function sun4i_a10_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 4 }, /* PF2-PF4 */
+#else
+ { "uart0", 2 }, /* PB22-PB23 */
+#endif
};
static const struct sunxi_pinctrl_desc sun4i_a10_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-a64-r.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-a64-r.c
index 971e441434..3bbca3a19f 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun50i-a64-r.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-a64-r.c
@@ -9,6 +9,7 @@
static const struct sunxi_pinctrl_function sun50i_a64_r_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+ { "s_uart", 2 }, /* PL2-PL3 */
};
static const struct sunxi_pinctrl_desc sun50i_a64_r_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c
index 4494ce7cd7..978ad1d2a1 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c
@@ -9,6 +9,13 @@
static const struct sunxi_pinctrl_function sun50i_a64_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 3 }, /* PF2-PF4 */
+#else
+ { "uart0", 4 }, /* PB8-PB9 */
+#endif
+ { "uart1", 2 }, /* PG6-PG7 */
+ { "uart2", 2 }, /* PB0-PB1 */
};
static const struct sunxi_pinctrl_desc sun50i_a64_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c
index 442771d4bd..604ea89de2 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c
@@ -9,6 +9,13 @@
static const struct sunxi_pinctrl_function sun50i_h5_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 3 }, /* PF2-PF4 */
+#else
+ { "uart0", 2 }, /* PA4-PA5 */
+#endif
+ { "uart1", 2 }, /* PG6-PG7 */
+ { "uart2", 2 }, /* PA0-PA1 */
};
static const struct sunxi_pinctrl_desc sun50i_h5_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-h6-r.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-h6-r.c
index e60775f15e..d45e580ceb 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun50i-h6-r.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-h6-r.c
@@ -9,6 +9,7 @@
static const struct sunxi_pinctrl_function sun50i_h6_r_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+ { "s_uart", 2 }, /* PL2-PL3 */
};
static const struct sunxi_pinctrl_desc sun50i_h6_r_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c
index 9d64942ce0..389be2e577 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c
@@ -9,6 +9,12 @@
static const struct sunxi_pinctrl_function sun50i_h6_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 3 }, /* PF2-PF4 */
+#else
+ { "uart0", 2 }, /* PH0-PH1 */
+#endif
+ { "uart1", 2 }, /* PG6-PG7 */
};
static const struct sunxi_pinctrl_desc sun50i_h6_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-h616-r.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-h616-r.c
index e4cd60b70e..7fb7692239 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun50i-h616-r.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-h616-r.c
@@ -9,6 +9,7 @@
static const struct sunxi_pinctrl_function sun50i_h616_r_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+ { "s_uart", 2 }, /* PL2-PL3 */
};
static const struct sunxi_pinctrl_desc sun50i_h616_r_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c
index 1c9768087b..c2192098f7 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c
@@ -9,6 +9,12 @@
static const struct sunxi_pinctrl_function sun50i_h616_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 3 }, /* PF2-PF4 */
+#else
+ { "uart0", 2 }, /* PH0-PH1 */
+#endif
+ { "uart1", 2 }, /* PG6-PG7 */
};
static const struct sunxi_pinctrl_desc sun50i_h616_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c b/drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c
index d6ffa08c8f..fca7165fed 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c
@@ -9,6 +9,12 @@
static const struct sunxi_pinctrl_function sun5i_a13_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 4 }, /* PF2-PF4 */
+#else
+ { "uart0", 2 }, /* PB19-PB20 */
+#endif
+ { "uart1", 4 }, /* PG3-PG4 */
};
static const struct sunxi_pinctrl_desc sun5i_a13_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c
index 9ae676b208..57182f1dc8 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c
@@ -9,6 +9,7 @@
static const struct sunxi_pinctrl_function sun6i_a31_r_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+ { "s_uart", 2 }, /* PL2-PL3 */
};
static const struct sunxi_pinctrl_desc sun6i_a31_r_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
index 5b6ab37592..ca395fb701 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
@@ -9,6 +9,11 @@
static const struct sunxi_pinctrl_function sun6i_a31_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 3 }, /* PF2-PF4 */
+#else
+ { "uart0", 2 }, /* PH20-PH21 */
+#endif
};
static const struct sunxi_pinctrl_desc sun6i_a31_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c b/drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c
index 25b4b57e14..b5714a63f4 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c
@@ -9,6 +9,11 @@
static const struct sunxi_pinctrl_function sun7i_a20_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 4 }, /* PF2-PF4 */
+#else
+ { "uart0", 2 }, /* PB22-PB23 */
+#endif
};
static const struct sunxi_pinctrl_desc sun7i_a20_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c
index fafee0cbf9..e602808c38 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c
@@ -9,6 +9,7 @@
static const struct sunxi_pinctrl_function sun8i_a23_r_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+ { "s_uart", 2 }, /* PL2-PL3 */
};
static const struct sunxi_pinctrl_desc sun8i_a23_r_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c
index 40222ca10d..0325d8cc54 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c
@@ -9,6 +9,11 @@
static const struct sunxi_pinctrl_function sun8i_a23_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 3 }, /* PF2-PF4 */
+#endif
+ { "uart1", 2 }, /* PG6-PG7 */
+ { "uart2", 2 }, /* PB0-PB1 */
};
static const struct sunxi_pinctrl_desc sun8i_a23_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c
index d275b5b7c2..259c9bbeb5 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c
@@ -9,6 +9,13 @@
static const struct sunxi_pinctrl_function sun8i_a33_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 3 }, /* PF2-PF4 */
+#else
+ { "uart0", 3 }, /* PB0-PB1 */
+#endif
+ { "uart1", 2 }, /* PG6-PG7 */
+ { "uart2", 2 }, /* PB0-PB1 */
};
static const struct sunxi_pinctrl_desc sun8i_a33_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t-r.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t-r.c
index 4301132203..4daed78ac2 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t-r.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t-r.c
@@ -9,6 +9,7 @@
static const struct sunxi_pinctrl_function sun8i_a83t_r_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+ { "s_uart", 2 }, /* PL2-PL3 */
};
static const struct sunxi_pinctrl_desc sun8i_a83t_r_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c
index e916db3c80..531800e58e 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c
@@ -9,6 +9,13 @@
static const struct sunxi_pinctrl_function sun8i_a83t_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 3 }, /* PF2-PF4 */
+#else
+ { "uart0", 2 }, /* PB9-PB10 */
+#endif
+ { "uart1", 2 }, /* PG6-PG7 */
+ { "uart2", 2 }, /* PB0-PB1 */
};
static const struct sunxi_pinctrl_desc sun8i_a83t_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-h3-r.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3-r.c
index 5c2df17f15..c05a30c8df 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-h3-r.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3-r.c
@@ -9,6 +9,7 @@
static const struct sunxi_pinctrl_function sun8i_h3_r_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+ { "s_uart", 2 }, /* PL2-PL3 */
};
static const struct sunxi_pinctrl_desc sun8i_h3_r_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
index 50a39ce4ad..41ecaa23e2 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
@@ -9,6 +9,13 @@
static const struct sunxi_pinctrl_function sun8i_h3_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 3 }, /* PF2-PF4 */
+#else
+ { "uart0", 2 }, /* PA4-PA5 */
+#endif
+ { "uart1", 2 }, /* PG6-PG7 */
+ { "uart2", 2 }, /* PA0-PA1 */
};
static const struct sunxi_pinctrl_desc sun8i_h3_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-v3s.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-v3s.c
index 3b407c644f..df9f92f39d 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-v3s.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-v3s.c
@@ -9,6 +9,13 @@
static const struct sunxi_pinctrl_function sun8i_v3s_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 3 }, /* PF2-PF4 */
+#else
+ { "uart0", 3 }, /* PB8-PB9 */
+#endif
+ { "uart1", 2 }, /* PG6-PG7 */
+ { "uart2", 2 }, /* PB0-PB1 */
};
static const struct sunxi_pinctrl_desc sun8i_v3s_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c
index da30e98969..cf46a06f8f 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c
@@ -9,6 +9,7 @@
static const struct sunxi_pinctrl_function sun9i_a80_r_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+ { "s_uart", 3 }, /* PL0-PL1 */
};
static const struct sunxi_pinctrl_desc sun9i_a80_r_pinctrl_desc = {
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c
index 6268c35ca1..e105adfec1 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c
@@ -9,6 +9,11 @@
static const struct sunxi_pinctrl_function sun9i_a80_pinctrl_functions[] = {
{ "gpio_in", 0 },
{ "gpio_out", 1 },
+#if IS_ENABLED(CONFIG_UART0_PORT_F)
+ { "uart0", 4 }, /* PF2-PF4 */
+#else
+ { "uart0", 2 }, /* PH12-PH13 */
+#endif
};
static const struct sunxi_pinctrl_desc sun9i_a80_pinctrl_desc = {
--
2.32.0
More information about the U-Boot
mailing list