Merge tag 'uniphier-v2019.07' of https://gitlab.denx.de/u-boot/custodians/u-boot...
authorTom Rini <trini@konsulko.com>
Sat, 29 Jun 2019 16:09:23 +0000 (12:09 -0400)
committerTom Rini <trini@konsulko.com>
Sat, 29 Jun 2019 16:09:23 +0000 (12:09 -0400)
UniPhier SoC updates for v2019.07

- Add SPI pin-mux data for pinctrl driver

- Remove unused code

- Trivial bug-fix and clean-up

17 files changed:
arch/arm/mach-uniphier/arm32/debug_ll.S
arch/arm/mach-uniphier/debug-uart/Makefile
arch/arm/mach-uniphier/debug-uart/debug-uart-ld20.c [deleted file]
arch/arm/mach-uniphier/debug-uart/debug-uart.c
arch/arm/mach-uniphier/debug-uart/debug-uart.h
arch/arm/mach-uniphier/dram_init.c
arch/arm/mach-uniphier/sc-regs.h
arch/arm/mach-uniphier/sg-regs.h
drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c
drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c
drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c

index 9fe3eaadf1d95adfd6a1884d89dd60274e978c0e..e56e1f679ca811097db0ef3232cf8b2a5c7d2fa2 100644 (file)
 #include CONFIG_DEBUG_LL_INCLUDE
 #endif
 
+#define SG_REVISION_TYPE_SHIFT         16
+#define SG_REVISION_TYPE_MASK          (0xff << SG_REVISION_TYPE_SHIFT)
 #define BAUDRATE               115200
 #define DIV_ROUND(x, d)                (((x) + ((d) / 2)) / (d))
 
+.macro sg_set_pinsel, pin, muxval, mux_bits, reg_stride, ra, rd
+       ldr     \ra, =(SG_PINCTRL_BASE + \pin * \mux_bits / 32 * \reg_stride)
+       ldr     \rd, [\ra]
+       and     \rd, \rd, #~(((1 << \mux_bits) - 1) << (\pin * \mux_bits % 32))
+       orr     \rd, \rd, #(\muxval << (\pin * \mux_bits % 32))
+       str     \rd, [\ra]
+.endm
+
 ENTRY(debug_ll_init)
        ldr             r0, =SG_REVISION
        ldr             r1, [r0]
index 5d78db58cb7604327f1c6dd4cf3aef2976fe1d69..81e9314a50d362f8b4611f046f2be5c9cc83e19f 100644 (file)
@@ -7,8 +7,6 @@ obj-$(CONFIG_ARCH_UNIPHIER_SLD8)        += debug-uart-sld8.o
 obj-$(CONFIG_ARCH_UNIPHIER_PRO5)       += debug-uart-pro5.o
 obj-$(CONFIG_ARCH_UNIPHIER_PXS2)       += debug-uart-pxs2.o
 obj-$(CONFIG_ARCH_UNIPHIER_LD6B)       += debug-uart-ld6b.o
-obj-$(CONFIG_ARCH_UNIPHIER_LD11)       += debug-uart-ld20.o
-obj-$(CONFIG_ARCH_UNIPHIER_LD20)       += debug-uart-ld20.o
 endif
 
 obj-y                                  += debug-uart.o
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-ld20.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-ld20.c
deleted file mode 100644 (file)
index b742feb..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
- */
-
-#include <config.h>
-#include <linux/kernel.h>
-#include <linux/io.h>
-
-#include "../sc64-regs.h"
-#include "../sg-regs.h"
-#include "debug-uart.h"
-
-#define UNIPHIER_LD20_UART_CLK         58820000
-
-unsigned int uniphier_ld20_debug_uart_init(void)
-{
-       u32 tmp;
-
-       sg_set_iectrl(54);              /* TXD0 */
-       sg_set_iectrl(58);              /* TXD1 */
-       sg_set_iectrl(90);              /* TXD2 */
-       sg_set_iectrl(94);              /* TXD3 */
-       sg_set_pinsel(54, 0, 8, 4);     /* TXD0 -> TXD0 */
-       sg_set_pinsel(58, 1, 8, 4);     /* SPITXD1 -> TXD1 */
-       sg_set_pinsel(90, 1, 8, 4);     /* PC0WE -> TXD2 */
-       sg_set_pinsel(94, 1, 8, 4);     /* PCD00 -> TXD3 */
-
-       tmp = readl(SC_CLKCTRL4);
-       tmp |= SC_CLKCTRL4_PERI;
-       writel(tmp, SC_CLKCTRL4);
-
-       return DIV_ROUND_CLOSEST(UNIPHIER_LD20_UART_CLK, 16 * CONFIG_BAUDRATE);
-}
index 992b4a9857fd0bba27568d6e820c271a5ab4fe93..bc96b2e7be1fb517d9b8081613cc505c9798bc85 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/io.h>
 #include <linux/serial_reg.h>
 
+#include "../sg-regs.h"
 #include "../soc-info.h"
 #include "debug-uart.h"
 
@@ -26,8 +27,36 @@ static void _debug_uart_putc(int c)
        writel(c, base + UNIPHIER_UART_TX);
 }
 
+#ifdef CONFIG_SPL_BUILD
+void sg_set_pinsel(unsigned int pin, unsigned int muxval,
+                  unsigned int mux_bits, unsigned int reg_stride)
+{
+       unsigned int shift = pin * mux_bits % 32;
+       unsigned long reg = SG_PINCTRL_BASE + pin * mux_bits / 32 * reg_stride;
+       u32 mask = (1U << mux_bits) - 1;
+       u32 tmp;
+
+       tmp = readl(reg);
+       tmp &= ~(mask << shift);
+       tmp |= (mask & muxval) << shift;
+       writel(tmp, reg);
+}
+
+void sg_set_iectrl(unsigned int pin)
+{
+       unsigned int bit = pin % 32;
+       unsigned long reg = SG_IECTRL + pin / 32 * 4;
+       u32 tmp;
+
+       tmp = readl(reg);
+       tmp |= 1 << bit;
+       writel(tmp, reg);
+}
+#endif
+
 void _debug_uart_init(void)
 {
+#ifdef CONFIG_SPL_BUILD
        void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
        unsigned int divisor;
 
@@ -61,12 +90,6 @@ void _debug_uart_init(void)
        case UNIPHIER_LD6B_ID:
                divisor = uniphier_ld6b_debug_uart_init();
                break;
-#endif
-#if defined(CONFIG_ARCH_UNIPHIER_LD11) || defined(CONFIG_ARCH_UNIPHIER_LD20)
-       case UNIPHIER_LD11_ID:
-       case UNIPHIER_LD20_ID:
-               divisor = uniphier_ld20_debug_uart_init();
-               break;
 #endif
        default:
                return;
@@ -75,5 +98,6 @@ void _debug_uart_init(void)
        writel(UART_LCR_WLEN8 << 8, base + UNIPHIER_UART_LCR_MCR);
 
        writel(divisor, base + UNIPHIER_UART_LDR);
+#endif
 }
 DEBUG_UART_FUNCS
index 4cbd2f08e7573e79343fa112b20571aae25b596a..f4e98c0bb0250b4a9ce5573c01c5d8d1a66c5da0 100644 (file)
@@ -12,7 +12,9 @@ unsigned int uniphier_sld8_debug_uart_init(void);
 unsigned int uniphier_pro5_debug_uart_init(void);
 unsigned int uniphier_pxs2_debug_uart_init(void);
 unsigned int uniphier_ld6b_debug_uart_init(void);
-unsigned int uniphier_ld11_debug_uart_init(void);
-unsigned int uniphier_ld20_debug_uart_init(void);
+
+void sg_set_pinsel(unsigned int pin, unsigned int muxval,
+                  unsigned int mux_bits, unsigned int reg_stride);
+void sg_set_iectrl(unsigned int pin);
 
 #endif /* _MACH_DEBUG_UART_H */
index 7e7c1d98db4088f1c513646d07f43344e340c8ae..fa4b3e386b83075205bfe1edeb92b5d11952f0eb 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <linux/errno.h>
+#include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/sizes.h>
index b105335f693108ad2a45dddf64217e9f9ab2bb68..28de19c039c2d774b083ffa905eec6da7365384b 100644 (file)
 
 #define SC_BASE_ADDR                   0x61840000
 
-#define SC_DPLLOSCCTRL                 (SC_BASE_ADDR | 0x1110)
-#define SC_DPLLOSCCTRL_DPLLST          (0x1 << 1)
-#define SC_DPLLOSCCTRL_DPLLEN          (0x1 << 0)
-
 #define SC_DPLLCTRL                    (SC_BASE_ADDR | 0x1200)
 #define SC_DPLLCTRL_SSC_EN             (0x1 << 31)
 #define SC_DPLLCTRL_FOUTMODE_MASK        (0xf << 16)
index 0497655fb5f7ddba4647f9c7345e699b2957008b..39ffed5885df78c995adcfbdf7413dd387fe417a 100644 (file)
 #define SG_PINMON0_CLK_MODE_AXOSEL_20480KHZ    (0x2 << 16)
 #define SG_PINMON0_CLK_MODE_AXOSEL_25000KHZ_A  (0x3 << 16)
 
-#ifdef __ASSEMBLY__
-
-       .macro  sg_set_pinsel, pin, muxval, mux_bits, reg_stride, ra, rd
-       ldr     \ra, =(SG_PINCTRL_BASE + \pin * \mux_bits / 32 * \reg_stride)
-       ldr     \rd, [\ra]
-       and     \rd, \rd, #~(((1 << \mux_bits) - 1) << (\pin * \mux_bits % 32))
-       orr     \rd, \rd, #(\muxval << (\pin * \mux_bits % 32))
-       str     \rd, [\ra]
-       .endm
-
-#else
-
-#include <linux/types.h>
-#include <linux/io.h>
-
-static inline void sg_set_pinsel(unsigned pin, unsigned muxval,
-                                unsigned mux_bits, unsigned reg_stride)
-{
-       unsigned shift = pin * mux_bits % 32;
-       unsigned long reg = SG_PINCTRL_BASE + pin * mux_bits / 32 * reg_stride;
-       u32 mask = (1U << mux_bits) - 1;
-       u32 tmp;
-
-       tmp = readl(reg);
-       tmp &= ~(mask << shift);
-       tmp |= (mask & muxval) << shift;
-       writel(tmp, reg);
-}
-
-static inline void sg_set_iectrl(unsigned pin)
-{
-       unsigned bit = pin % 32;
-       unsigned long reg = SG_IECTRL + pin / 32 * 4;
-       u32 tmp;
-
-       tmp = readl(reg);
-       tmp |= 1 << bit;
-       writel(tmp, reg);
-}
-
-static inline void sg_set_iectrl_range(unsigned min, unsigned max)
-{
-       int i;
-
-       for (i = min; i <= max; i++)
-               sg_set_iectrl(i);
-}
-
-#endif /* __ASSEMBLY__ */
-
 #endif /* UNIPHIER_SG_REGS_H */
index f2c99d4723941de815184583d48a43e160bbc24e..5efaa2f66b0395dab4ca4ee449e4b90a8c83f940 100644 (file)
@@ -28,6 +28,10 @@ static const int i2c4_muxvals[] = {1, 1};
 static const unsigned nand_pins[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
                                     15, 16, 17};
 static const int nand_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+static const unsigned spi0_pins[] = {56, 57, 58, 59};
+static const int spi0_muxvals[] = {0, 0, 0, 0};
+static const unsigned spi1_pins[] = {169, 170, 171, 172};
+static const int spi1_muxvals[] = {1, 1, 1, 1};
 static const unsigned system_bus_pins[] = {1, 2, 6, 7, 8, 9, 10, 11, 12, 13,
                                           14, 15, 16, 17};
 static const int system_bus_muxvals[] = {0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -58,6 +62,8 @@ static const struct uniphier_pinctrl_group uniphier_ld11_groups[] = {
        UNIPHIER_PINCTRL_GROUP(i2c3),
        UNIPHIER_PINCTRL_GROUP(i2c4),
        UNIPHIER_PINCTRL_GROUP(nand),
+       UNIPHIER_PINCTRL_GROUP(spi0),
+       UNIPHIER_PINCTRL_GROUP(spi1),
        UNIPHIER_PINCTRL_GROUP(system_bus),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
        UNIPHIER_PINCTRL_GROUP(uart0),
@@ -77,6 +83,8 @@ static const char * const uniphier_ld11_functions[] = {
        UNIPHIER_PINMUX_FUNCTION(i2c3),
        UNIPHIER_PINMUX_FUNCTION(i2c4),
        UNIPHIER_PINMUX_FUNCTION(nand),
+       UNIPHIER_PINMUX_FUNCTION(spi0),
+       UNIPHIER_PINMUX_FUNCTION(spi1),
        UNIPHIER_PINMUX_FUNCTION(system_bus),
        UNIPHIER_PINMUX_FUNCTION(uart0),
        UNIPHIER_PINMUX_FUNCTION(uart1),
index 8ec87f285ed402dcb22d327f02bfb3f9d7a2cde5..d3c5833c993ae8e8a2bf52a484c53300b307ae40 100644 (file)
@@ -43,6 +43,14 @@ static const unsigned nand_pins[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
 static const int nand_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 static const unsigned sd_pins[] = {10, 11, 12, 13, 14, 15, 16, 17};
 static const int sd_muxvals[] = {3, 3, 3, 3, 3, 3, 3, 3};  /* No SDVOLC */
+static const unsigned spi0_pins[] = {56, 57, 58, 59};
+static const int spi0_muxvals[] = {0, 0, 0, 0};
+static const unsigned spi1_pins[] = {169, 170, 171, 172};
+static const int spi1_muxvals[] = {1, 1, 1, 1};
+static const unsigned spi2_pins[] = {86, 87, 88, 89};
+static const int spi2_muxvals[] = {1, 1, 1, 1};
+static const unsigned spi3_pins[] = {74, 75, 76, 77};
+static const int spi3_muxvals[] = {1, 1, 1, 1};
 static const unsigned system_bus_pins[] = {1, 2, 6, 7, 8, 9, 10, 11, 12, 13,
                                           14, 15, 16, 17};
 static const int system_bus_muxvals[] = {0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -77,6 +85,10 @@ static const struct uniphier_pinctrl_group uniphier_ld20_groups[] = {
        UNIPHIER_PINCTRL_GROUP(i2c4),
        UNIPHIER_PINCTRL_GROUP(nand),
        UNIPHIER_PINCTRL_GROUP(sd),
+       UNIPHIER_PINCTRL_GROUP(spi0),
+       UNIPHIER_PINCTRL_GROUP(spi1),
+       UNIPHIER_PINCTRL_GROUP(spi2),
+       UNIPHIER_PINCTRL_GROUP(spi3),
        UNIPHIER_PINCTRL_GROUP(system_bus),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
        UNIPHIER_PINCTRL_GROUP(uart0),
@@ -99,6 +111,10 @@ static const char * const uniphier_ld20_functions[] = {
        UNIPHIER_PINMUX_FUNCTION(i2c4),
        UNIPHIER_PINMUX_FUNCTION(nand),
        UNIPHIER_PINMUX_FUNCTION(sd),
+       UNIPHIER_PINMUX_FUNCTION(spi0),
+       UNIPHIER_PINMUX_FUNCTION(spi1),
+       UNIPHIER_PINMUX_FUNCTION(spi2),
+       UNIPHIER_PINMUX_FUNCTION(spi3),
        UNIPHIER_PINMUX_FUNCTION(system_bus),
        UNIPHIER_PINMUX_FUNCTION(uart0),
        UNIPHIER_PINMUX_FUNCTION(uart1),
index c822bccbd103996c20a4dd980a564a465412faf0..bf1a9e9e98995edc603470632fed1d2d0e606fc5 100644 (file)
@@ -37,6 +37,8 @@ static const unsigned nand_cs1_pins[] = {22, 23};
 static const int nand_cs1_muxvals[] = {0, 0};
 static const unsigned sd_pins[] = {44, 45, 46, 47, 48, 49, 50, 51, 52};
 static const int sd_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
+static const unsigned spi0_pins[] = {135, 136, 137, 138};
+static const int spi0_muxvals[] = {12, 12, 12, 12};
 static const unsigned system_bus_pins[] = {16, 17, 18, 19, 20, 165, 166, 167,
                                           168, 169, 170, 171, 172, 173};
 static const int system_bus_muxvals[] = {0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1,
@@ -80,6 +82,7 @@ static const struct uniphier_pinctrl_group uniphier_ld4_groups[] = {
        UNIPHIER_PINCTRL_GROUP(nand),
        UNIPHIER_PINCTRL_GROUP(nand_cs1),
        UNIPHIER_PINCTRL_GROUP(sd),
+       UNIPHIER_PINCTRL_GROUP(spi0),
        UNIPHIER_PINCTRL_GROUP(system_bus),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs0),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
@@ -106,6 +109,7 @@ static const char * const uniphier_ld4_functions[] = {
        UNIPHIER_PINMUX_FUNCTION(i2c3),
        UNIPHIER_PINMUX_FUNCTION(nand),
        UNIPHIER_PINMUX_FUNCTION(sd),
+       UNIPHIER_PINMUX_FUNCTION(spi0),
        UNIPHIER_PINMUX_FUNCTION(system_bus),
        UNIPHIER_PINMUX_FUNCTION_SPL(uart0),
        UNIPHIER_PINMUX_FUNCTION_SPL(uart1),
index 30d411694c56fa28f3c795c7f577a3fe90fc0f95..f22c046804a0fa16f6f712c2534accc763f8f810 100644 (file)
@@ -37,6 +37,10 @@ static const unsigned nand_cs1_pins[] = {37, 38};
 static const int nand_cs1_muxvals[] = {0, 0};
 static const unsigned sd_pins[] = {47, 48, 49, 50, 51, 52, 53, 54, 55};
 static const int sd_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
+static const unsigned spi0_pins[] = {199, 200, 201, 202};
+static const int spi0_muxvals[] = {8, 8, 8, 8};
+static const unsigned spi1_pins[] = {93, 94, 95, 96};
+static const int spi1_muxvals[] = {1, 1, 1, 1};
 static const unsigned system_bus_pins[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
                                           11, 12, 13};
 static const int system_bus_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -84,6 +88,8 @@ static const struct uniphier_pinctrl_group uniphier_ld6b_groups[] = {
        UNIPHIER_PINCTRL_GROUP(nand),
        UNIPHIER_PINCTRL_GROUP(nand_cs1),
        UNIPHIER_PINCTRL_GROUP(sd),
+       UNIPHIER_PINCTRL_GROUP(spi0),
+       UNIPHIER_PINCTRL_GROUP(spi1),
        UNIPHIER_PINCTRL_GROUP(system_bus),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs2),
@@ -112,6 +118,8 @@ static const char * const uniphier_ld6b_functions[] = {
        UNIPHIER_PINMUX_FUNCTION(i2c3),
        UNIPHIER_PINMUX_FUNCTION(nand),
        UNIPHIER_PINMUX_FUNCTION(sd),
+       UNIPHIER_PINMUX_FUNCTION(spi0),
+       UNIPHIER_PINMUX_FUNCTION(spi1),
        UNIPHIER_PINMUX_FUNCTION(system_bus),
        UNIPHIER_PINMUX_FUNCTION_SPL(uart0),
        UNIPHIER_PINMUX_FUNCTION_SPL(uart1),
index eb5978a1662c0cd1172cd2e88c2061f3f75109f5..8bae163a8e9be45ab9902f37514d3060e9baa973 100644 (file)
@@ -50,6 +50,10 @@ static const int sd_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
 static const unsigned sd1_pins[] = {319, 320, 321, 322, 323, 324, 325, 326,
                                    327};
 static const int sd1_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
+static const unsigned spi0_pins[] = {199, 200, 201, 202};
+static const int spi0_muxvals[] = {11, 11, 11, 11};
+static const unsigned spi1_pins[] = {195, 196, 197, 198, 235, 238, 239};
+static const int spi1_muxvals[] = {11, 11, 11, 11, 11, 11, 11};
 static const unsigned system_bus_pins[] = {25, 26, 27, 28, 29, 30, 31, 32, 33,
                                           34, 35, 36, 37, 38};
 static const int system_bus_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -103,6 +107,8 @@ static const struct uniphier_pinctrl_group uniphier_pro4_groups[] = {
        UNIPHIER_PINCTRL_GROUP(nand_cs1),
        UNIPHIER_PINCTRL_GROUP(sd),
        UNIPHIER_PINCTRL_GROUP(sd1),
+       UNIPHIER_PINCTRL_GROUP(spi0),
+       UNIPHIER_PINCTRL_GROUP(spi1),
        UNIPHIER_PINCTRL_GROUP(system_bus),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs0),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
@@ -135,6 +141,8 @@ static const char * const uniphier_pro4_functions[] = {
        UNIPHIER_PINMUX_FUNCTION(nand),
        UNIPHIER_PINMUX_FUNCTION(sd),
        UNIPHIER_PINMUX_FUNCTION(sd1),
+       UNIPHIER_PINMUX_FUNCTION(spi0),
+       UNIPHIER_PINMUX_FUNCTION(spi1),
        UNIPHIER_PINMUX_FUNCTION(system_bus),
        UNIPHIER_PINMUX_FUNCTION_SPL(uart0),
        UNIPHIER_PINMUX_FUNCTION_SPL(uart1),
index 685d8be80c47def1e80a00174e1e14b1af79922b..1f4931bcf0da4381e612f778a9b90ed142f916ac 100644 (file)
@@ -37,6 +37,12 @@ static const unsigned nand_cs1_pins[] = {26, 27};
 static const int nand_cs1_muxvals[] = {0, 0};
 static const unsigned sd_pins[] = {250, 251, 252, 253, 254, 255, 256, 257, 258};
 static const int sd_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
+static const unsigned spi0_pins[] = {120, 121, 122, 123};
+static const int spi0_muxvals[] = {0, 0, 0, 0};
+static const unsigned spi1_pins[] = {134, 139, 85, 86};
+static const int spi1_muxvals[] = {1, 1, 1, 1};
+static const unsigned spi2_pins[] = {55, 56, 57, 58, 82, 83, 84};
+static const int spi2_muxvals[] = {0, 0, 0, 0, 1, 1, 1};
 static const unsigned system_bus_pins[] = {4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
                                           14, 15, 16, 17};
 static const int system_bus_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -88,6 +94,9 @@ static const struct uniphier_pinctrl_group uniphier_pro5_groups[] = {
        UNIPHIER_PINCTRL_GROUP(nand),
        UNIPHIER_PINCTRL_GROUP(nand_cs1),
        UNIPHIER_PINCTRL_GROUP(sd),
+       UNIPHIER_PINCTRL_GROUP(spi0),
+       UNIPHIER_PINCTRL_GROUP(spi1),
+       UNIPHIER_PINCTRL_GROUP(spi2),
        UNIPHIER_PINCTRL_GROUP(system_bus),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs0),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
@@ -117,6 +126,9 @@ static const char * const uniphier_pro5_functions[] = {
        UNIPHIER_PINMUX_FUNCTION(i2c6),
        UNIPHIER_PINMUX_FUNCTION(nand),
        UNIPHIER_PINMUX_FUNCTION(sd),
+       UNIPHIER_PINMUX_FUNCTION(spi0),
+       UNIPHIER_PINMUX_FUNCTION(spi1),
+       UNIPHIER_PINMUX_FUNCTION(spi2),
        UNIPHIER_PINMUX_FUNCTION(system_bus),
        UNIPHIER_PINMUX_FUNCTION_SPL(uart0),
        UNIPHIER_PINMUX_FUNCTION_SPL(uart1),
index 8609f1b7a762eef1b0e781f7c2e8dac8e35d4a7c..038a7dd7be06df047d8daec0dc94495d2f80fde3 100644 (file)
@@ -46,6 +46,10 @@ static const unsigned nand_cs1_pins[] = {37, 38};
 static const int nand_cs1_muxvals[] = {8, 8};
 static const unsigned sd_pins[] = {47, 48, 49, 50, 51, 52, 53, 54, 55};
 static const int sd_muxvals[] = {8, 8, 8, 8, 8, 8, 8, 8, 8};
+static const unsigned spi0_pins[] = {199, 200, 201, 202};
+static const int spi0_muxvals[] = {8, 8, 8, 8};
+static const unsigned spi1_pins[] = {93, 94, 95, 96};
+static const int spi1_muxvals[] = {1, 1, 1, 1};
 static const unsigned system_bus_pins[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
                                           11, 12, 13};
 static const int system_bus_muxvals[] = {8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
@@ -88,6 +92,8 @@ static const struct uniphier_pinctrl_group uniphier_pxs2_groups[] = {
        UNIPHIER_PINCTRL_GROUP(nand),
        UNIPHIER_PINCTRL_GROUP(nand_cs1),
        UNIPHIER_PINCTRL_GROUP(sd),
+       UNIPHIER_PINCTRL_GROUP(spi0),
+       UNIPHIER_PINCTRL_GROUP(spi1),
        UNIPHIER_PINCTRL_GROUP(system_bus),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
        UNIPHIER_PINCTRL_GROUP_SPL(uart0),
@@ -115,6 +121,8 @@ static const char * const uniphier_pxs2_functions[] = {
        UNIPHIER_PINMUX_FUNCTION(i2c6),
        UNIPHIER_PINMUX_FUNCTION(nand),
        UNIPHIER_PINMUX_FUNCTION(sd),
+       UNIPHIER_PINMUX_FUNCTION(spi0),
+       UNIPHIER_PINMUX_FUNCTION(spi1),
        UNIPHIER_PINMUX_FUNCTION(system_bus),
        UNIPHIER_PINMUX_FUNCTION_SPL(uart0),
        UNIPHIER_PINMUX_FUNCTION_SPL(uart1),
index 5b4a51410345f383f59d98312ce0087258effd46..452d76d721d490b90fd7191a8265b99c29c6e7c7 100644 (file)
@@ -41,6 +41,10 @@ static const unsigned nand_pins[] = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
 static const int nand_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 static const unsigned sd_pins[] = {43, 44, 45, 46, 47, 48, 49, 50, 51};
 static const int sd_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
+static const unsigned spi0_pins[] = {100, 101, 102, 103};
+static const int spi0_muxvals[] = {0, 0, 0, 0};
+static const unsigned spi1_pins[] = {112, 113, 114, 115};
+static const int spi1_muxvals[] = {2, 2, 2, 2};
 static const unsigned system_bus_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
                                           12, 13, 14};
 static const int system_bus_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -77,6 +81,8 @@ static const struct uniphier_pinctrl_group uniphier_pxs3_groups[] = {
        UNIPHIER_PINCTRL_GROUP(i2c3),
        UNIPHIER_PINCTRL_GROUP(nand),
        UNIPHIER_PINCTRL_GROUP(sd),
+       UNIPHIER_PINCTRL_GROUP(spi0),
+       UNIPHIER_PINCTRL_GROUP(spi1),
        UNIPHIER_PINCTRL_GROUP(system_bus),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
        UNIPHIER_PINCTRL_GROUP(uart0),
@@ -101,6 +107,8 @@ static const char * const uniphier_pxs3_functions[] = {
        UNIPHIER_PINMUX_FUNCTION(i2c3),
        UNIPHIER_PINMUX_FUNCTION(nand),
        UNIPHIER_PINMUX_FUNCTION(sd),
+       UNIPHIER_PINMUX_FUNCTION(spi0),
+       UNIPHIER_PINMUX_FUNCTION(spi1),
        UNIPHIER_PINMUX_FUNCTION(system_bus),
        UNIPHIER_PINMUX_FUNCTION(uart0),
        UNIPHIER_PINMUX_FUNCTION(uart1),
index c072fc5280d6f1fe63ac636e331fde2b10f04c83..1e38ba16f9301c5dfdc6ea86ddcc2cd38c7a6fe1 100644 (file)
@@ -37,6 +37,8 @@ static const unsigned nand_cs1_pins[] = {22, 23};
 static const int nand_cs1_muxvals[] = {0, 0};
 static const unsigned sd_pins[] = {32, 33, 34, 35, 36, 37, 38, 39, 40};
 static const int sd_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
+static const unsigned spi0_pins[] = {118, 119, 120, 121};
+static const int spi0_muxvals[] = {3, 3, 3, 3};
 static const unsigned system_bus_pins[] = {136, 137, 138, 139, 140, 141, 142,
                                           143, 144, 145, 146, 147, 148, 149};
 static const int system_bus_muxvals[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -78,6 +80,7 @@ static const struct uniphier_pinctrl_group uniphier_sld8_groups[] = {
        UNIPHIER_PINCTRL_GROUP(nand),
        UNIPHIER_PINCTRL_GROUP(nand_cs1),
        UNIPHIER_PINCTRL_GROUP(sd),
+       UNIPHIER_PINCTRL_GROUP(spi0),
        UNIPHIER_PINCTRL_GROUP(system_bus),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
        UNIPHIER_PINCTRL_GROUP(system_bus_cs2),
@@ -103,6 +106,7 @@ static const char * const uniphier_sld8_functions[] = {
        UNIPHIER_PINMUX_FUNCTION(i2c3),
        UNIPHIER_PINMUX_FUNCTION(nand),
        UNIPHIER_PINMUX_FUNCTION(sd),
+       UNIPHIER_PINMUX_FUNCTION(spi0),
        UNIPHIER_PINMUX_FUNCTION(system_bus),
        UNIPHIER_PINMUX_FUNCTION_SPL(uart0),
        UNIPHIER_PINMUX_FUNCTION_SPL(uart1),