Skip to contentSkip to conversation

MSCC: Add Serval SoC family.

PATCH New Horatiu Vultur 2 participants 13 messages Jan 23, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover MSCC: Add Serval SoC family.

This patch series adds support for MSCC Serval SoC family. In this family there are the following boards: pcb105 and pcb106.

This is based off the patch series[1].

[1] https://lists.denx.de/pipermail/u-boot/2019-January/355031.html

Horatiu Vultur (5):
pinctrl: mscc: Add gpio and pinctrl for Serval SoC family.
MSCC: Add support for Serval SoC family.
MSCC: add device tree for Serval pcb105 board
MSCC: Add device tree for Serval pcb106 board
MSCC: Add board support for Serval SoC family.

 arch/mips/dts/Makefile                             |   1 +
 arch/mips/dts/mscc,serval.dtsi                     | 149 ++++++++++
 arch/mips/dts/serval_pcb105.dts                    |  56 ++++
 arch/mips/dts/serval_pcb106.dts                    |  56 ++++
 arch/mips/mach-mscc/Kconfig                        |   9 +
 arch/mips/mach-mscc/Makefile                       |   1 +
 arch/mips/mach-mscc/cpu.c                          |   2 +-
 arch/mips/mach-mscc/dram.c                         |   2 +-
 arch/mips/mach-mscc/include/mach/common.h          |   5 +
 arch/mips/mach-mscc/include/mach/ddr.h             |  20 +-
 arch/mips/mach-mscc/include/mach/serval/serval.h   |  24 ++
 .../include/mach/serval/serval_devcpu_gcb.h        |  21 ++
 .../mach/serval/serval_devcpu_gcb_miim_regs.h      |  25 ++
 .../include/mach/serval/serval_icpu_cfg.h          | 314 +++++++++++++++++++++
 arch/mips/mach-mscc/reset.c                        |  25 +-
 board/mscc/serval/Kconfig                          |  14 +
 board/mscc/serval/Makefile                         |   3 +
 board/mscc/serval/serval.c                         |  74 +++++
 configs/mscc_serval_defconfig                      |  62 ++++
 drivers/pinctrl/mscc/Kconfig                       |  10 +
 drivers/pinctrl/mscc/Makefile                      |   1 +
 drivers/pinctrl/mscc/pinctrl-serval.c              | 233 +++++++++++++++
 include/configs/vcoreiii.h                         |   5 +-
 23 files changed, 1098 insertions(+), 14 deletions(-)
 create mode 100644 arch/mips/dts/mscc,serval.dtsi
 create mode 100644 arch/mips/dts/serval_pcb105.dts
 create mode 100644 arch/mips/dts/serval_pcb106.dts
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval.h
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h
 create mode 100644 board/mscc/serval/Kconfig
 create mode 100644 board/mscc/serval/Makefile
 create mode 100644 board/mscc/serval/serval.c
 create mode 100644 configs/mscc_serval_defconfig
 create mode 100644 drivers/pinctrl/mscc/pinctrl-serval.c
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/5 pinctrl: mscc: Add gpio and pinctrl for Serval SoC family.

The Serval SoC family has 32 pins. Currently there is no support for Serval in Linux kernel.

---
 drivers/pinctrl/mscc/Kconfig          |  10 ++
 drivers/pinctrl/mscc/Makefile         |   1 +
 drivers/pinctrl/mscc/pinctrl-serval.c | 233 ++++++++++++++++++++++++++++++++++
 3 files changed, 244 insertions(+)
 create mode 100644 drivers/pinctrl/mscc/pinctrl-serval.c
drivers/pinctrl/mscc/Kconfig +10 -0
index 0269565..aab67fa 100644
@@ -38,3 +38,13 @@ config PINCTRL_MSCC_SERVALT
 	help
 	    Support pin multiplexing and pin configuration control on
 	    Microsemi servalt SoCs.
+
+config PINCTRL_MSCC_SERVAL
+	depends on SOC_SERVAL && PINCTRL_FULL && OF_CONTROL
+	select PINCTRL_MSCC
+	default y
+	bool "Microsemi serval family pin control driver"
+	help
+	    Support pin multiplexing and pin configuration control on
+	    Microsemi serval SoCs.
+
drivers/pinctrl/mscc/Makefile +1 -0
index c6b0373..fd7eba2 100644
@@ -5,3 +5,4 @@ obj-$(CONFIG_PINCTRL_MSCC_OCELOT) += pinctrl-ocelot.o
 obj-$(CONFIG_PINCTRL_MSCC_LUTON) += pinctrl-luton.o
 obj-$(CONFIG_PINCTRL_MSCC_JR2) += pinctrl-jr2.o
 obj-$(CONFIG_PINCTRL_MSCC_SERVALT) += pinctrl-servalt.o
+obj-$(CONFIG_PINCTRL_MSCC_SERVAL) += pinctrl-serval.o
drivers/pinctrl/mscc/pinctrl-serval.c new file +233 -0

233 lines not on this page · raw message

Signature · 1 line
2.7.4
#2 lore raw

PATCH 1/5 pinctrl: mscc: Add gpio and pinctrl for Serval SoC family.

Am 23.01.19 um 16:39 schrieb Horatiu Vultur:

Quoted 11 lines

The Serval SoC family has 32 pins. Currently there is no support for Serval in Linux kernel.

---
 drivers/pinctrl/mscc/Kconfig          |  10 ++
 drivers/pinctrl/mscc/Makefile         |   1 +
 drivers/pinctrl/mscc/pinctrl-serval.c | 233 ++++++++++++++++++++++++++++++++++
 3 files changed, 244 insertions(+)
 create mode 100644 drivers/pinctrl/mscc/pinctrl-serval.c
Signature · 1 line
- Daniel
#3 lore raw

PATCH 2/5 MSCC: Add support for Serval SoC family.

In reply to Horatiu Vultur

As Ocelot, Servalt, Luton and Jaguar2, this family of SoCs are found in Microsemi Switches solution.

---
 arch/mips/mach-mscc/Kconfig                        |   9 +
 arch/mips/mach-mscc/cpu.c                          |   2 +-
 arch/mips/mach-mscc/dram.c                         |   2 +-
 arch/mips/mach-mscc/include/mach/common.h          |   5 +
 arch/mips/mach-mscc/include/mach/ddr.h             |  20 +-
 arch/mips/mach-mscc/include/mach/serval/serval.h   |  24 ++
 .../include/mach/serval/serval_devcpu_gcb.h        |  21 ++
 .../mach/serval/serval_devcpu_gcb_miim_regs.h      |  25 ++
 .../include/mach/serval/serval_icpu_cfg.h          | 314 +++++++++++++++++++++
 arch/mips/mach-mscc/reset.c                        |  25 +-
 include/configs/vcoreiii.h                         |   5 +-
 11 files changed, 438 insertions(+), 14 deletions(-)
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval.h
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h
arch/mips/mach-mscc/Kconfig +9 -0
index 80e4b44..34584a1 100644
@@ -47,6 +47,13 @@ config SOC_SERVALT
 	help
 	  This supports MSCC Servalt family of SOCs.
 
+config SOC_SERVAL
+	bool "Serval SOC Family"
+	select SOC_VCOREIII
+	select MSCC_BB_SPI
+	help
+	  This supports MSCC Serval family of SOCs.
+
 endchoice
 
 config SYS_CONFIG_NAME
@@ -82,4 +89,6 @@ source "board/mscc/luton/Kconfig"
 source "board/mscc/jr2/Kconfig"
 
 source "board/mscc/servalt/Kconfig"
+
+source "board/mscc/serval/Kconfig"
 endmenu
arch/mips/mach-mscc/cpu.c +1 -1
index 1bfd636..ac75d51 100644
@@ -87,7 +87,7 @@ int mach_cpu_init(void)
 	       ICPU_SPI_MST_CFG_CS_DESELECT_TIME(0x19) +
 	       ICPU_SPI_MST_CFG_CLK_DIV(9), BASE_CFG + ICPU_SPI_MST_CFG);
 #else
-#ifdef CONFIG_SOC_OCELOT
+#if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_SERVAL)
 	writel(ICPU_SPI_MST_CFG_CS_DESELECT_TIME(0x19) +
 	       ICPU_SPI_MST_CFG_CLK_DIV(9), BASE_CFG + ICPU_SPI_MST_CFG);
 #endif
arch/mips/mach-mscc/dram.c +1 -1
index 2073821..c43f7a5 100644
@@ -20,7 +20,7 @@ static inline int vcoreiii_train_bytelane(void)
 	ret = hal_vcoreiii_train_bytelane(0);
 
 #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) || \
-	defined(CONFIG_SOC_SERVALT)
+	defined(CONFIG_SOC_SERVALT) || defined(CONFIG_SOC_SERVAL)
 	if (ret)
 		return ret;
 	ret = hal_vcoreiii_train_bytelane(1);
arch/mips/mach-mscc/include/mach/common.h +5 -0
index 97b3f82..8f9a9c2 100644
@@ -26,6 +26,11 @@
 #include <mach/servalt/servalt_devcpu_gcb.h>
 #include <mach/servalt/servalt_devcpu_gcb_miim_regs.h>
 #include <mach/servalt/servalt_icpu_cfg.h>
+#elif defined(CONFIG_SOC_SERVAL)
+#include <mach/serval/serval.h>
+#include <mach/serval/serval_devcpu_gcb.h>
+#include <mach/serval/serval_devcpu_gcb_miim_regs.h>
+#include <mach/serval/serval_icpu_cfg.h>
 #else
 #error Unsupported platform
 #endif
arch/mips/mach-mscc/include/mach/ddr.h +11 -9
index ff32f22..84ecfbd 100644
@@ -25,7 +25,7 @@
 #define VC3_MPAR_CL               6
 #define VC3_MPAR_tWTR             4
 #define VC3_MPAR_tRC              16
-#define VC3_MPR_tFAW             16
+#define VC3_MPAR_tFAW             16
 #define VC3_MPAR_tRP              5
 #define VC3_MPAR_tRRD             4
 #define VC3_MPAR_tRCD             5
@@ -162,7 +162,7 @@
 #endif
 
 #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) || \
-	defined(CONFIG_SOC_SERVALT)
+	defined(CONFIG_SOC_SERVALT) || defined(CONFIG_SOC_SERVAL)
 #define MIPS_VCOREIII_MEMORY_16BIT 1
 #endif
 
@@ -241,7 +241,7 @@
 	ICPU_MEMCTRL_CFG_MSB_COL_ADDR(VC3_MPAR_col_addr_cnt - 1)
 
 #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) || \
-	defined(CONFIG_SOC_SERVALT)
+	defined(CONFIG_SOC_SERVALT) || defined(CONFIG_SOC_SERVAL)
 #define MSCC_MEMPARM_PERIOD					\
 	ICPU_MEMCTRL_REF_PERIOD_MAX_PEND_REF(8) |		\
 	ICPU_MEMCTRL_REF_PERIOD_REF_PERIOD(VC3_MPAR_tREFI)
@@ -381,7 +381,7 @@ static inline void memphy_soft_reset(void)
 }
 
 #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) || \
-	defined(CONFIG_SOC_SERVALT)
+	defined(CONFIG_SOC_SERVALT) || defined(CONFIG_SOC_SERVAL)
 static u8 training_data[] = { 0xfe, 0x11, 0x33, 0x55, 0x77, 0x99, 0xbb, 0xdd };
 
 static inline void sleep_100ns(u32 val)
@@ -452,7 +452,7 @@ static inline void hal_vcoreiii_ddr_failed(void)
 
 	panic("DDR init failed\n");
 }
-#else				/* JR2 || ServalT */
+#else				/* JR2 || ServalT || Serval */
 static inline void hal_vcoreiii_ddr_reset_assert(void)
 {
 	/* Ensure the memory controller physical iface is forced reset */
@@ -471,7 +471,7 @@ static inline void hal_vcoreiii_ddr_failed(void)
 
 	panic("DDR init failed\n");
 }
-#endif
+#endif				/* JR2 || ServalT || Serval */
 
 /*
  * DDR memory sanity checking done, possibly enable ECC.
@@ -778,7 +778,7 @@ static inline void hal_vcoreiii_init_memctl(void)
 	writel(MSCC_MEMPARM_PERIOD, BASE_CFG + ICPU_MEMCTRL_REF_PERIOD);
 
 #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) || \
-	defined(CONFIG_SOC_SERVALT)
+	defined(CONFIG_SOC_SERVALT) || defined(CONFIG_SOC_SERVAL)
 	writel(MSCC_MEMPARM_TIMING0, BASE_CFG + ICPU_MEMCTRL_TIMING0);
 #else /* Luton */
 	clrbits_le32(BASE_CFG + ICPU_MEMCTRL_TIMING0, ((1 << 20) - 1));
@@ -793,7 +793,7 @@ static inline void hal_vcoreiii_init_memctl(void)
 	writel(MSCC_MEMPARM_MR2, BASE_CFG + ICPU_MEMCTRL_MR2_VAL);
 	writel(MSCC_MEMPARM_MR3, BASE_CFG + ICPU_MEMCTRL_MR3_VAL);
 
-#if defined(CONFIG_SOC_OCELOT)
+#if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_SERVAL)
 	/* Termination setup - enable ODT */
 	writel(ICPU_MEMCTRL_TERMRES_CTRL_LOCAL_ODT_RD_ENA |
 	       /* Assert ODT0 for any write */
@@ -801,7 +801,9 @@ static inline void hal_vcoreiii_init_memctl(void)
 	       BASE_CFG + ICPU_MEMCTRL_TERMRES_CTRL);
 
 	/* Release Reset from DDR */
+#if defined(CONFIG_SOC_OCELOT)
 	hal_vcoreiii_ddr_reset_release();
+#endif
 
 	writel(readl(BASE_CFG + ICPU_GPR(7)) + 1, BASE_CFG + ICPU_GPR(7));
 #elif defined(CONFIG_SOC_JR2) || defined(CONFIG_SOC_SERVALT)
@@ -826,7 +828,7 @@ static inline void hal_vcoreiii_wait_memctl(void)
 	/* Settle...? */
 	sleep_100ns(10000);
 #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) || \
-	defined(CONFIG_SOC_SERVALT)
+	defined(CONFIG_SOC_SERVALT) || defined(CONFIG_SOC_SERVAL)
 	/* Establish data contents in DDR RAM for training */
 
 	__raw_writel(0xcacafefe, ((void __iomem *)MSCC_DDR_TO));
arch/mips/mach-mscc/include/mach/serval/serval.h new file +24 -0
new file mode 100644
index 0000000..763d18f
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
+/*
+ * Microsemi Serval Switch driver
+ *
+ * Copyright (c) 2018 Microsemi Corporation
+ */
+
+#ifndef _MSCC_SERVAL_H_
+#define _MSCC_SERVAL_H_
+
+#include <linux/bitops.h>
+#include <dm.h>
+
+/*
+ * Target offset base(s)
+ */
+#define MSCC_IO_ORIGIN1_OFFSET 0x70000000
+#define MSCC_IO_ORIGIN1_SIZE   0x00200000
+#define MSCC_IO_ORIGIN2_OFFSET 0x71000000
+#define MSCC_IO_ORIGIN2_SIZE   0x01000000
+#define BASE_CFG        ((void __iomem *)0x70000000)
+#define BASE_DEVCPU_GCB ((void __iomem *)0x71070000)
+
+#endif
arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h new file +21 -0
new file mode 100644
index 0000000..9b80fdb
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
+/*
+ * Copyright (c) 2018 Microsemi Corporation
+ */
+
+#ifndef _MSCC_SERVAL_DEVCPU_GCB_H_
+#define _MSCC_SERVAL_DEVCPU_GCB_H_
+
+#define CHIP_ID                                           0x0
+
+#define PERF_GPR                                          0x4
+
+#define PERF_SOFT_RST                                     0x8
+
+#define PERF_SOFT_RST_SOFT_NON_CFG_RST                    BIT(2)
+#define PERF_SOFT_RST_SOFT_SWC_RST                        BIT(1)
+#define PERF_SOFT_RST_SOFT_CHIP_RST                       BIT(0)
+
+#define GPIO_ALT(x)                                       (0x54 + 4 * (x))
+
+#endif
arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h new file +25 -0
new file mode 100644
index 0000000..a3abbc40
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
+/*
+ * Copyright (c) 2018 Microsemi Corporation
+ */
+
+#ifndef _MSCC_SERVAL_DEVCPU_GCB_MIIM_REGS_H_
+#define _MSCC_SERVAL_DEVCPU_GCB_MIIM_REGS_H_
+
+#define MIIM_MII_STATUS(gi)  (0x5c + (gi * 36))
+#define MIIM_MII_CMD(gi)     (0x64 + (gi * 36))
+#define MIIM_MII_DATA(gi)    (0x68 + (gi * 36))
+
+#define  MSCC_F_MII_STATUS_MIIM_STAT_BUSY(x)  ((x) ? BIT(3) : 0)
+
+#define MSCC_F_MII_CMD_MIIM_CMD_VLD(x)        ((x) ? BIT(31) : 0)
+#define MSCC_F_MII_CMD_MIIM_CMD_PHYAD(x)      (GENMASK(29, 25) & ((x) << 25))
+#define MSCC_F_MII_CMD_MIIM_CMD_REGAD(x)      (GENMASK(24, 20) & ((x) << 20))
+#define MSCC_F_MII_CMD_MIIM_CMD_WRDATA(x)     (GENMASK(19, 4) & ((x) << 4))
+#define MSCC_F_MII_CMD_MIIM_CMD_OPR_FIELD(x)  (GENMASK(2, 1) & ((x) << 1))
+#define MSCC_F_MII_CMD_MIIM_CMD_SCAN(x)       ((x) ? BIT(0) : 0)
+
+#define MSCC_M_MII_DATA_MIIM_DATA_SUCCESS     GENMASK(17, 16)
+#define MSCC_X_MII_DATA_MIIM_DATA_RDDATA(x)   (((x) >> 0) & GENMASK(15, 0))
+
+#endif
arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h new file +314 -0

314 lines not on this page · raw message

arch/mips/mach-mscc/reset.c +24 -1
index 3740225..a555fc9 100644
@@ -27,7 +27,30 @@ void _machine_restart(void)
 	       ICPU_RESET_CORE_RST_CPU_ONLY |
 	       ICPU_RESET_CORE_RST_FORCE,
 	       BASE_CFG + ICPU_RESET);
-#else
+#elif defined(CONFIG_SOC_SERVAL)
+	register unsigned long i;
+
+	/* Prevent VCore-III from being reset with a global reset */
+	writel(ICPU_RESET_CORE_RST_PROTECT, BASE_CFG + ICPU_RESET);
+
+	/* Do global reset */
+	writel(PERF_SOFT_RST_SOFT_CHIP_RST, BASE_DEVCPU_GCB + PERF_SOFT_RST);
+
+	for (i = 0; i < 1000; i++)
+		;
+
+	/* Power down DDR for clean DDR re-training */
+	writel(readl(BASE_CFG + ICPU_MEMCTRL_CTRL) |
+	       ICPU_MEMCTRL_CTRL_PWR_DOWN,
+	       BASE_CFG + ICPU_MEMCTRL_CTRL);
+
+	while (!(readl(BASE_CFG + ICPU_MEMCTRL_STAT) &
+		 ICPU_MEMCTRL_STAT_PWR_DOWN_ACK))
+		;
+
+	/* Reset VCore-III, only. */
+	writel(ICPU_RESET_CORE_RST_FORCE, BASE_CFG + ICPU_RESET);
+#else		/* Luton || Ocelot */
 	register u32 resetbits = PERF_SOFT_RST_SOFT_CHIP_RST;
 	(void)readl(BASE_DEVCPU_GCB + PERF_SOFT_RST);
 
include/configs/vcoreiii.h +3 -2
index 4ea5f40..8c30c6f 100644
@@ -14,10 +14,11 @@
 #define CONFIG_SYS_LOAD_ADDR		0x00100000
 #define CONFIG_SYS_INIT_SP_OFFSET       0x400000
 
-#define CPU_CLOCK_RATE			500000000 /* Clock for the MIPS core */
-#ifdef CONFIG_SOC_LUTON
+#if defined(CONFIG_SOC_LUTON) || defined(CONFIG_SOC_SERVAL)
+#define CPU_CLOCK_RATE			416666666 /* Clock for the MIPS core */
 #define CONFIG_SYS_MIPS_TIMER_FREQ	208333333
 #else
+#define CPU_CLOCK_RATE			500000000 /* Clock for the MIPS core */
 #define CONFIG_SYS_MIPS_TIMER_FREQ	(CPU_CLOCK_RATE / 2)
 #endif
 #define CONFIG_SYS_NS16550_CLK		CONFIG_SYS_MIPS_TIMER_FREQ
Signature · 1 line
2.7.4
#4 lore raw

PATCH 2/5 MSCC: Add support for Serval SoC family.

Am 23.01.19 um 16:39 schrieb Horatiu Vultur:

Quoted 13 lines

As Ocelot, Servalt, Luton and Jaguar2, this family of SoCs are found in Microsemi Switches solution.

---
 arch/mips/mach-mscc/Kconfig                        |   9 +
 arch/mips/mach-mscc/cpu.c                          |   2 +-
 arch/mips/mach-mscc/dram.c                         |   2 +-
 arch/mips/mach-mscc/include/mach/common.h          |   5 +
 arch/mips/mach-mscc/include/mach/ddr.h             |  20 +-
 arch/mips/mach-mscc/include/mach/serval/serval.h   |  24 ++
 .../include/mach/serval/serval_devcpu_gcb.h        |  21 ++
 .../mach/serval/serval_devcpu_gcb_miim_regs.h      |  25 ++
Quoted 9 lines
 .../include/mach/serval/serval_icpu_cfg.h          | 314 +++++++++++++++++++++
 arch/mips/mach-mscc/reset.c                        |  25 +-
 include/configs/vcoreiii.h                         |   5 +-
 11 files changed, 438 insertions(+), 14 deletions(-)
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval.h
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h
Signature · 1 line
- Daniel
#5 lore raw

PATCH 3/5 MSCC: add device tree for Serval pcb105 board

In reply to Horatiu Vultur

Add device tree based on evaluation board pcb105.

---
 arch/mips/dts/mscc,serval.dtsi  | 149 ++++++++++++++++++++++++++++++++++++++++
 arch/mips/dts/serval_pcb105.dts |  56 +++++++++++++++
 2 files changed, 205 insertions(+)
 create mode 100644 arch/mips/dts/mscc,serval.dtsi
 create mode 100644 arch/mips/dts/serval_pcb105.dts
arch/mips/dts/mscc,serval.dtsi new file +149 -0
new file mode 100644
index 0000000..bd60051
@@ -0,0 +1,149 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 Microsemi Corporation
+ */
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+	compatible = "mscc,serval";
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu at 0 {
+			compatible = "mips,mips24KEc";
+			device_type = "cpu";
+			clocks = <&cpu_clk>;
+			reg = <0>;
+		};
+	};
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	cpuintc: interrupt-controller at 0 {
+		#address-cells = <0>;
+		#interrupt-cells = <1>;
+		interrupt-controller;
+		compatible = "mti,cpu-interrupt-controller";
+	};
+
+	cpu_clk: cpu-clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <416666666>;
+	};
+
+	sys_clk: sys-clk {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <208333333>;
+	};
+
+	ahb_clk: ahb-clk {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <208333333>;
+	};
+
+	ahb {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0x70000000 0x2000000>;
+
+		interrupt-parent = <&intc>;
+
+		cpu_ctrl: syscon at 0 {
+			compatible = "mscc,serval-cpu-syscon", "syscon";
+			reg = <0x0 0x2c>;
+		};
+
+		intc: interrupt-controller at 70 {
+			compatible = "mscc,serval-icpu-intr";
+			reg = <0x70 0x70>;
+			#interrupt-cells = <1>;
+			interrupt-controller;
+			interrupt-parent = <&cpuintc>;
+			interrupts = <2>;
+		};
+
+		uart0: serial at 100000 {
+			pinctrl-0 = <&uart_pins>;
+			pinctrl-names = "default";
+			compatible = "ns16550a";
+			reg = <0x100000 0x20>;
+			interrupts = <6>;
+			clocks = <&ahb_clk>;
+			reg-io-width = <4>;
+			reg-shift = <2>;
+
+			status = "disabled";
+		};
+
+		uart2: serial at 100800 {
+			pinctrl-0 = <&uart2_pins>;
+			pinctrl-names = "default";
+			compatible = "ns16550a";
+			reg = <0x100800 0x20>;
+			interrupts = <7>;
+			clocks = <&ahb_clk>;
+			reg-io-width = <4>;
+			reg-shift = <2>;
+
+			status = "disabled";
+		};
+
+		reset at 1070008 {
+			compatible = "mscc,serval-chip-reset";
+			reg = <0x1070008 0x4>;
+		};
+
+		gpio: pinctrl at 1070034 {
+			compatible = "mscc,serval-pinctrl";
+			reg = <0x1070034 0x68>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			gpio-ranges = <&gpio 0 0 22>;
+
+			sgpio_pins: sgpio-pins {
+				pins = "GPIO_0", "GPIO_2", "GPIO_3", "GPIO_1";
+				function = "sio";
+			};
+
+			uart_pins: uart-pins {
+				pins = "GPIO_26", "GPIO_27";
+				function = "uart";
+			};
+
+			uart2_pins: uart2-pins {
+				pins = "GPIO_13", "GPIO_14";
+				function = "uart2";
+			};
+		};
+
+		spi0: spi-bitbang {
+			compatible = "mscc,luton-bb-spi";
+			status = "okay";
+			reg = <0x50 0x4>;
+			num-chipselects = <1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		sgpio: gpio at 10700b4 {
+			compatible = "mscc,luton-sgpio";
+			status = "disabled";
+			clocks = <&sys_clk>;
+			pinctrl-0 = <&sgpio_pins>;
+			pinctrl-names = "default";
+			reg = <0x10700b4 0x100>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			gpio-ranges = <&sgpio 0 0 64>;
+		};
+	};
+};
arch/mips/dts/serval_pcb105.dts new file +56 -0

56 lines not on this page · raw message

Signature · 1 line
2.7.4
#6 lore raw

PATCH 4/5 MSCC: Add device tree for Serval pcb106 board

In reply to Horatiu Vultur

Add device tree based on evaluation board pcb106.

---
 arch/mips/dts/serval_pcb106.dts | 56 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 arch/mips/dts/serval_pcb106.dts
arch/mips/dts/serval_pcb106.dts new file +56 -0
new file mode 100644
index 0000000..1198249
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 Microsemi Corporation
+ */
+
+/dts-v1/;
+#include "mscc,serval.dtsi"
+
+/ {
+	model = "Serval PCB106 Reference Board";
+	compatible = "mscc,serval-pcb106", "mscc,serval";
+
+	aliases {
+		spi0 = &spi0;
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		status_green {
+			label = "pcb106:green:status";
+			gpios = <&sgpio 43 1>; /* p11.1 */
+			default-state = "on";
+		};
+
+		status_red {
+			label = "pcb106:red:status";
+			gpios = <&sgpio 11 1>; /* p11.0 */
+			default-state = "off";
+		};
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&spi0 {
+	status = "okay";
+	spi-flash at 0 {
+		compatible = "spi-flash";
+		spi-max-frequency = <18000000>; /* input clock */
+		reg = <0>; /* CS0 */
+		spi-cs-high;
+	};
+};
+
+&sgpio {
+	status = "okay";
+	sgpio-ports = <0x00FFFFFF>;
+};
Signature · 1 line
2.7.4
#7 lore raw

PATCH 5/5 MSCC: Add board support for Serval SoC family.

In reply to Horatiu Vultur

Add board support and configuration for Jaguar2 SoC family. The detection of the board type is based on the phy ids.

---
 arch/mips/dts/Makefile        |  1 +
 arch/mips/mach-mscc/Makefile  |  1 +
 board/mscc/serval/Kconfig     | 14 ++++++++
 board/mscc/serval/Makefile    |  3 ++
 board/mscc/serval/serval.c    | 74 +++++++++++++++++++++++++++++++++++++++++++
 configs/mscc_serval_defconfig | 62 ++++++++++++++++++++++++++++++++++++
 6 files changed, 155 insertions(+)
 create mode 100644 board/mscc/serval/Kconfig
 create mode 100644 board/mscc/serval/Makefile
 create mode 100644 board/mscc/serval/serval.c
 create mode 100644 configs/mscc_serval_defconfig
arch/mips/dts/Makefile +1 -0
index af264ff..b94b582 100644
@@ -21,6 +21,7 @@ dtb-$(CONFIG_SOC_LUTON) += luton_pcb090.dtb luton_pcb091.dtb
 dtb-$(CONFIG_SOC_OCELOT) += ocelot_pcb120.dtb ocelot_pcb123.dtb
 dtb-$(CONFIG_SOC_JR2) += jr2_pcb110.dtb jr2_pcb111.dtb serval2_pcb112.dtb
 dtb-$(CONFIG_SOC_SERVALT) += servalt_pcb116.dtb
+dtb-$(CONFIG_SOC_SERVAL) += serval_pcb105.dtb serval_pcb106.dtb
 
 targets += $(dtb-y)
 
arch/mips/mach-mscc/Makefile +1 -0
index f5b6968..6d60020 100644
@@ -5,3 +5,4 @@ CFLAGS_cpu.o += -finline-limit=64000
 obj-y += cpu.o dram.o reset.o phy.o lowlevel_init.o
 obj-$(CONFIG_SOC_LUTON) += lowlevel_init_luton.o gpio.o
 obj-$(CONFIG_SOC_OCELOT) += gpio.o
+obj-$(CONFIG_SOC_SERVAL) += gpio.o
board/mscc/serval/Kconfig new file +14 -0
new file mode 100644
index 0000000..64f1c68
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+config SYS_VENDOR
+	default "mscc"
+
+if SOC_SERVAL
+
+config SYS_BOARD
+	default "serval"
+
+config SYS_CONFIG_NAME
+	default "serval"
+
+endif
board/mscc/serval/Makefile new file +3 -0
new file mode 100644
index 0000000..c7ba56e
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+obj-$(CONFIG_SOC_SERVAL)	:= serval.o
board/mscc/serval/serval.c new file +74 -0

74 lines not on this page · raw message

configs/mscc_serval_defconfig new file +62 -0

62 lines not on this page · raw message

Signature · 1 line
2.7.4
#8 lore raw

PATCH 5/5 MSCC: Add board support for Serval SoC family.

Am 23.01.19 um 16:39 schrieb Horatiu Vultur:

Quoted 4 lines

Add board support and configuration for Jaguar2 SoC family. The detection of the board type is based on the phy ids.

Quoted 13 lines
---
 arch/mips/dts/Makefile        |  1 +
 arch/mips/mach-mscc/Makefile  |  1 +
 board/mscc/serval/Kconfig     | 14 ++++++++
 board/mscc/serval/Makefile    |  3 ++
 board/mscc/serval/serval.c    | 74 +++++++++++++++++++++++++++++++++++++++++++
 configs/mscc_serval_defconfig | 62 ++++++++++++++++++++++++++++++++++++
 6 files changed, 155 insertions(+)
 create mode 100644 board/mscc/serval/Kconfig
 create mode 100644 board/mscc/serval/Makefile
 create mode 100644 board/mscc/serval/serval.c
 create mode 100644 configs/mscc_serval_defconfig
Signature · 1 line
- Daniel
#9 lore raw

cover MSCC: Add Serval SoC family.

In reply to Horatiu Vultur

Am 23.01.19 um 16:39 schrieb Horatiu Vultur:

Quoted 5 lines

This patch series adds support for MSCC Serval SoC family. In this family there are the following boards: pcb105 and pcb106.

This is based off the patch series[1].

Quoted 9 lines

[1] https://lists.denx.de/pipermail/u-boot/2019-January/355031.html

Horatiu Vultur (5):
pinctrl: mscc: Add gpio and pinctrl for Serval SoC family.
MSCC: Add support for Serval SoC family.
MSCC: add device tree for Serval pcb105 board
MSCC: Add device tree for Serval pcb106 board
MSCC: Add board support for Serval SoC family.

is this a resend or an extension of your v2 series?

Normally a resend is not necessary and should be annotated accordingly. If this is an update, then you should have sent it as a v3 with a proper changelog.

Signature · 1 line
- Daniel
#10 lore raw

cover MSCC: Add Serval SoC family.

Hi Daniel,

Quoted 18 lines · Daniel Schwierzeck

Am 23.01.19 um 16:39 schrieb Horatiu Vultur:

Quoted 5 lines

This patch series adds support for MSCC Serval SoC family. In this family there are the following boards: pcb105 and pcb106.

This is based off the patch series[1].

Quoted 9 lines

[1] https://lists.denx.de/pipermail/u-boot/2019-January/355031.html

Horatiu Vultur (5):
pinctrl: mscc: Add gpio and pinctrl for Serval SoC family.
MSCC: Add support for Serval SoC family.
MSCC: add device tree for Serval pcb105 board
MSCC: Add device tree for Serval pcb106 board
MSCC: Add board support for Serval SoC family.

Quoted 5 lines

is this a resend or an extension of your v2 series?

Normally a resend is not necessary and should be annotated accordingly. If this is an update, then you should have sent it as a v3 with a proper changelog.

Well, it is none, it is a new patch series.
The one in [1] is for ServalT while this patch series is for Serval. There are 2 different SoC families.

[1] https://lists.denx.de/pipermail/u-boot/2019-January/355031.html

Quoted 3 lines
Signature · 2 lines
-- 
- Daniel
Signature · 1 line
/Horatiu
#11 lore raw

cover MSCC: Add Serval SoC family.

Am 23.01.19 um 17:47 schrieb Horatiu Vultur:

Quoted 27 lines

Hi Daniel,

Quoted 18 lines · Daniel Schwierzeck

Am 23.01.19 um 16:39 schrieb Horatiu Vultur:

Quoted 5 lines

This patch series adds support for MSCC Serval SoC family. In this family there are the following boards: pcb105 and pcb106.

This is based off the patch series[1].

Quoted 9 lines

[1] https://lists.denx.de/pipermail/u-boot/2019-January/355031.html

Horatiu Vultur (5):
pinctrl: mscc: Add gpio and pinctrl for Serval SoC family.
MSCC: Add support for Serval SoC family.
MSCC: add device tree for Serval pcb105 board
MSCC: Add device tree for Serval pcb106 board
MSCC: Add board support for Serval SoC family.

Quoted 5 lines

is this a resend or an extension of your v2 series?

Normally a resend is not necessary and should be annotated accordingly. If this is an update, then you should have sent it as a v3 with a proper changelog.

Quoted 9 lines

Well, it is none, it is a new patch series.
The one in [1] is for ServalT while this patch series is for Serval. There are 2 different SoC families.

[1] https://lists.denx.de/pipermail/u-boot/2019-January/355031.html

Quoted 3 lines
Signature · 2 lines
-- 
- Daniel

ah sorry, but with the Patchwork font it's hard to note the difference between "MSCC: Add Servalt SoC family" and "MSCC: Add Serval SoC family" ;)

Signature · 1 line
- Daniel
#12 lore raw

cover MSCC: Add Serval SoC family.

In reply to Horatiu Vultur

Am 23.01.19 um 16:39 schrieb Horatiu Vultur:

Quoted 42 lines

This patch series adds support for MSCC Serval SoC family. In this family there are the following boards: pcb105 and pcb106.

This is based off the patch series[1].

[1] https://lists.denx.de/pipermail/u-boot/2019-January/355031.html

Horatiu Vultur (5):
pinctrl: mscc: Add gpio and pinctrl for Serval SoC family.
MSCC: Add support for Serval SoC family.
MSCC: add device tree for Serval pcb105 board
MSCC: Add device tree for Serval pcb106 board
MSCC: Add board support for Serval SoC family.

 arch/mips/dts/Makefile                             |   1 +
 arch/mips/dts/mscc,serval.dtsi                     | 149 ++++++++++
 arch/mips/dts/serval_pcb105.dts                    |  56 ++++
 arch/mips/dts/serval_pcb106.dts                    |  56 ++++
 arch/mips/mach-mscc/Kconfig                        |   9 +
 arch/mips/mach-mscc/Makefile                       |   1 +
 arch/mips/mach-mscc/cpu.c                          |   2 +-
 arch/mips/mach-mscc/dram.c                         |   2 +-
 arch/mips/mach-mscc/include/mach/common.h          |   5 +
 arch/mips/mach-mscc/include/mach/ddr.h             |  20 +-
 arch/mips/mach-mscc/include/mach/serval/serval.h   |  24 ++
 .../include/mach/serval/serval_devcpu_gcb.h        |  21 ++
 .../mach/serval/serval_devcpu_gcb_miim_regs.h      |  25 ++
 .../include/mach/serval/serval_icpu_cfg.h          | 314 +++++++++++++++++++++
 arch/mips/mach-mscc/reset.c                        |  25 +-
 board/mscc/serval/Kconfig                          |  14 +
 board/mscc/serval/Makefile                         |   3 +
 board/mscc/serval/serval.c                         |  74 +++++
 configs/mscc_serval_defconfig                      |  62 ++++
 drivers/pinctrl/mscc/Kconfig                       |  10 +
 drivers/pinctrl/mscc/Makefile                      |   1 +
 drivers/pinctrl/mscc/pinctrl-serval.c              | 233 +++++++++++++++
 include/configs/vcoreiii.h                         |   5 +-
 23 files changed, 1098 insertions(+), 14 deletions(-)
 create mode 100644 arch/mips/dts/mscc,serval.dtsi
 create mode 100644 arch/mips/dts/serval_pcb105.dts
 create mode 100644 arch/mips/dts/serval_pcb106.dts
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval.h
Quoted 9 lines
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h
 create mode 100644 arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h
 create mode 100644 board/mscc/serval/Kconfig
 create mode 100644 board/mscc/serval/Makefile
 create mode 100644 board/mscc/serval/serval.c
 create mode 100644 configs/mscc_serval_defconfig
 create mode 100644 drivers/pinctrl/mscc/pinctrl-serval.c

series applied to u-boot-mips, thanks.

Signature · 1 line
- Daniel