The pin functions used by the PocketBook Verse.

Signed-off-by: Pablo Mazzini <[email protected]>
---
 drivers/pinctrl/sunxi/Kconfig         |  5 +++++
 drivers/pinctrl/sunxi/pinctrl-sunxi.c | 22 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/drivers/pinctrl/sunxi/Kconfig b/drivers/pinctrl/sunxi/Kconfig
index 54314992299..748a4140fbd 100644
--- a/drivers/pinctrl/sunxi/Kconfig
+++ b/drivers/pinctrl/sunxi/Kconfig
@@ -54,6 +54,11 @@ config PINCTRL_SUN8I_A33
        default MACH_SUN8I_A33
        select PINCTRL_SUNXI
 
+config PINCTRL_SUN8I_B288
+       bool "Support for the Allwinner B288 PIO"
+       default MACH_SUN8I_B288
+       select PINCTRL_SUNXI
+
 config PINCTRL_SUN8I_A83T
        bool "Support for the Allwinner A83T PIO"
        default MACH_SUN8I_A83T
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c 
b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
index ab4e88c9918..29219c11b93 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
@@ -448,6 +448,22 @@ static const struct sunxi_pinctrl_desc __maybe_unused 
sun8i_a33_pinctrl_desc = {
        .num_banks      = 8,
 };
 
+static const struct sunxi_pinctrl_function sun8i_b288_pinctrl_functions[] = {
+       { "gpio_in",    0 },
+       { "gpio_out",   1 },
+       { "i2c0",       2 },    /* PB6-PB7 */
+       { "mmc0",       2 },    /* PF0-PF5 */
+       { "mmc3",       5 },    /* PC1, PC4-PC14 */
+       { "uart0",      2 },    /* PB4-PB5 */
+};
+
+static const struct sunxi_pinctrl_desc __maybe_unused sun8i_b288_pinctrl_desc 
= {
+       .functions      = sun8i_b288_pinctrl_functions,
+       .num_functions  = ARRAY_SIZE(sun8i_b288_pinctrl_functions),
+       .first_bank     = SUNXI_GPIO_A,
+       .num_banks      = 7,
+};
+
 static const struct sunxi_pinctrl_function sun8i_a83t_pinctrl_functions[] = {
        { "gmac",       4 },    /* PD2-PD23 */
        { "gpio_in",    0 },
@@ -912,6 +928,12 @@ static const struct udevice_id sunxi_pinctrl_ids[] = {
                .data = (ulong)&sun8i_a33_pinctrl_desc,
        },
 #endif
+#ifdef CONFIG_PINCTRL_SUN8I_B288
+       {
+               .compatible = "allwinner,sun8i-b288-pinctrl",
+               .data = (ulong)&sun8i_b288_pinctrl_desc,
+       },
+#endif
 #ifdef CONFIG_PINCTRL_SUN8I_A83T
        {
                .compatible = "allwinner,sun8i-a83t-pinctrl",
-- 
2.52.0

Reply via email to