Add network support for Serval SoCs.
Subsystems (3)
cover Add network support for Serval SoCs.
This patch series add network support for Serval SoCs family. There are the following pcb: Serval-nid(pcb106), Serval-ref (pcb105).
Horatiu Vultur (4):
net: Add MSCC Serval network driver.
board: mscc: serval: Update MSCC Serval boards
net: mscc: serval: Add ethernet nodes for Serval
configs: mscc_serval: Add network support
arch/mips/dts/mscc,serval.dtsi | 58 +++ arch/mips/dts/serval_pcb105.dts | 44 ++ arch/mips/dts/serval_pcb106.dts | 44 ++ board/mscc/serval/serval.c | 12 + configs/mscc_serval_defconfig | 6 +- drivers/net/mscc_eswitch/Kconfig | 7 + drivers/net/mscc_eswitch/Makefile | 1 + drivers/net/mscc_eswitch/serval_switch.c | 703 +++++++++++++++++++++++++++++++ include/dt-bindings/mscc/serval_data.h | 19 + 9 files changed, 893 insertions(+), 1 deletion(-) create mode 100644 drivers/net/mscc_eswitch/serval_switch.c create mode 100644 include/dt-bindings/mscc/serval_data.h
Signature · 1 line
2.7.4
PATCH 1/4 net: Add MSCC Serval network driver.
Add network driver for Microsemi Ethernet switch.
It is present on Serval SoCs.
--- drivers/net/mscc_eswitch/Kconfig | 7 + drivers/net/mscc_eswitch/Makefile | 1 + drivers/net/mscc_eswitch/serval_switch.c | 703 +++++++++++++++++++++++++++++++ 3 files changed, 711 insertions(+) create mode 100644 drivers/net/mscc_eswitch/serval_switch.c
drivers/net/mscc_eswitch/Kconfig +7 -0
@@ -29,3 +29,10 @@ config MSCC_SERVALT_SWITCH select PHYLIB help This driver supports the Servalt network switch device. + +config MSCC_SERVAL_SWITCH + bool "Serval switch driver" + depends on DM_ETH && ARCH_MSCC + select PHYLIB + help + This driver supports the Serval network switch device.
drivers/net/mscc_eswitch/Makefile +1 -0
@@ -3,3 +3,4 @@ obj-$(CONFIG_MSCC_OCELOT_SWITCH) += ocelot_switch.o mscc_miim.o mscc_xfer.o mscc obj-$(CONFIG_MSCC_LUTON_SWITCH) += luton_switch.o mscc_miim.o mscc_xfer.o mscc_mac_table.o obj-$(CONFIG_MSCC_JR2_SWITCH) += jr2_switch.o mscc_xfer.o obj-$(CONFIG_MSCC_SERVALT_SWITCH) += servalt_switch.o mscc_xfer.o +obj-$(CONFIG_MSCC_SERVAL_SWITCH) += serval_switch.o mscc_xfer.o mscc_mac_table.o
drivers/net/mscc_eswitch/serval_switch.c new file +703 -0
703 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 1/4 net: Add MSCC Serval network driver.
Am 11.04.19 um 14:11 schrieb Horatiu Vultur:
Quoted 11 lines
Add network driver for Microsemi Ethernet switch.
It is present on Serval SoCs.Signed-off-by Horatiu Vultur <[email protected]>--- drivers/net/mscc_eswitch/Kconfig | 7 + drivers/net/mscc_eswitch/Makefile | 1 + drivers/net/mscc_eswitch/serval_switch.c | 703 +++++++++++++++++++++++++++++++ 3 files changed, 711 insertions(+) create mode 100644 drivers/net/mscc_eswitch/serval_switch.c
Signature · 1 line
- Daniel
PATCH 2/4 board: mscc: serval: Update MSCC Serval boards
In reply to Horatiu VulturIn Serval SoC family there are 2 different pcb, both of them have the same phy, but with different version. Therefore implement board_phy_config and set all the phys in the same way.
--- board/mscc/serval/serval.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
board/mscc/serval/serval.c +12 -0
@@ -6,6 +6,7 @@#include <common.h> #include <asm/io.h> #include <led.h> +#include <miiphy.h> enum {BOARD_TYPE_PCB106 =0xAABBCD00 ,
@@ -27,6 +28,17 @@ int board_early_init_r(void)return 0 ; } +int board_phy_config (struct phy_device *phydev) +{ +phy_write (phydev,0 ,31 ,0x10 ); +phy_write (phydev,0 ,18 ,0x80F0 ); +while (phy_read (phydev,0 ,18 ) &0x8000 ) + ; +phy_write (phydev,0 ,14 ,0x800 ); +phy_write (phydev,0 ,31 ,0 ); +return 0 ; +} +static void do_board_detect (void ) {u16 gpio_in_reg;
Signature · 1 line
2.7.4
PATCH 3/4 net: mscc: serval: Add ethernet nodes for Serval
In reply to Horatiu VulturAdd ethernet nodes for Serval SoCs family. There are 2 pcb in this
family: pcb105 and pcb106.
--- arch/mips/dts/mscc,serval.dtsi | 58 ++++++++++++++++++++++++++++++++++ arch/mips/dts/serval_pcb105.dts | 44 ++++++++++++++++++++++++++ arch/mips/dts/serval_pcb106.dts | 44 ++++++++++++++++++++++++++ include/dt-bindings/mscc/serval_data.h | 19 +++++++++++ 4 files changed, 165 insertions(+) create mode 100644 include/dt-bindings/mscc/serval_data.h
arch/mips/dts/mscc,serval.dtsi +58 -0
@@ -145,5 +145,63 @@ #gpio-cells = <2>; gpio-ranges = <&sgpio 0 0 64>; }; + + switch: switch at 011e0000 { + compatible = "mscc,vsc7418-switch"; + reg = <0x011e0000 0x0100>, // VTSS_TO_DEV0 + <0x011f0000 0x0100>, // VTSS_TO_DEV1 + <0x01200000 0x0100>, // VTSS_TO_DEV2 + <0x01210000 0x0100>, // VTSS_TO_DEV3 + <0x01220000 0x0100>, // VTSS_TO_DEV4 + <0x01230000 0x0100>, // VTSS_TO_DEV5 + <0x01240000 0x0100>, // VTSS_TO_DEV6 + <0x01250000 0x0100>, // VTSS_TO_DEV7 + <0x01260000 0x0100>, // VTSS_TO_DEV8 + <0x01270000 0x0100>, // VTSS_TO_DEV9 + <0x01280000 0x0100>, // VTSS_TO_DEV10 + <0x01900000 0x100000>, // ANA + <0x01080000 0x20000>, // QS + <0x01800000 0x100000>, // QSYS + <0x01030000 0x10000>, // REW + <0x01010000 0x20000>, // SYS + <0x010a0000 0x10000>; // HSIO + reg-names = "port0", "port1", "port2", "port3", + "port4", "port5", "port6", "port7", + "port8", "port9", "port10", + "ana", "qs", "qsys", "rew", "sys", + "hsio"; + status = "okay"; + + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + }; + }; + + mdio0: mdio at 0107005c { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mscc,serval-miim"; + reg = <0x0107005c 0x24>; + status = "disabled"; + }; + + mdio1: mdio at 01070080 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mscc,serval-miim"; + reg = <0x01070080 0x24>; + status = "disabled"; + }; + + hsio: syscon at 10d0000 { + compatible = "mscc,serval-hsio", "syscon", "simple-mfd"; + reg = <0x10a0000 0x10000>; + + serdes_hsio: serdes_hsio { + compatible = "mscc,vsc7418-serdes"; + #phy-cells = <3>; + }; + }; }; };
arch/mips/dts/serval_pcb105.dts +44 -0
53 lines not on this page · raw message
arch/mips/dts/serval_pcb106.dts +44 -0
53 lines not on this page · raw message
include/dt-bindings/mscc/serval_data.h new file +19 -0
@@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ +/* +* Copyright (c) 2018 Microsemi Corporation +*/ + +#ifndef _SERVAL_DATA_H_ +#define _SERVAL_DATA_H_ + +#define SERDES1G (x) (x) +#define SERDES1G_MAX SERDES1G(9) +#define SERDES6G (x) (SERDES1G_MAX + 1 + (x)) +#define SERDES6G_MAX SERDES6G(11) +#define SERDES_MAX (SERDES6G_MAX + 1) + +/* similar with phy_interface_t */ +#define PHY_MODE_SGMII 2 +#define PHY_MODE_QSGMII 4 + +#endif
Signature · 1 line
2.7.4
PATCH 4/4 configs: mscc_serval: Add network support
In reply to Horatiu VulturUpdate default config to use network driver for Serval SoCs.
--- configs/mscc_serval_defconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
configs/mscc_serval_defconfig +5 -1
@@ -25,7 +25,6 @@ CONFIG_CMD_MEMTEST=y CONFIG_CMD_GPIO=y CONFIG_CMD_SF=y CONFIG_CMD_SPI=y -# CONFIG_CMD_NFS is not set CONFIG_CMD_MTDPARTS=y CONFIG_MTDIDS_DEFAULT="nor0=spi_flash" CONFIG_MTDPARTS_DEFAULT="mtdparts=spi_flash:1m(UBoot),256k(Env),256k(Env.bk)"
@@ -62,3 +61,8 @@ CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_LZMA=y +CONFIG_CMD_DHCP=y +# CONFIG_NET_TFTP_VARS is not set +# CONFIG_CMD_NFS is not set +CONFIG_CMD_PING=y +CONFIG_MSCC_SERVAL_SWITCH=y
Signature · 1 line
2.7.4
cover Add network support for Serval SoCs.
In reply to Horatiu VulturAm 11.04.19 um 14:11 schrieb Horatiu Vultur:
Quoted 10 lines
This patch series add network support for Serval SoCs family. There are the following pcb: Serval-nid(pcb106), Serval-ref (pcb105).
Horatiu Vultur (4):
net: Add MSCC Serval network driver.
board: mscc: serval: Update MSCC Serval boards
net: mscc: serval: Add ethernet nodes for Serval
configs:mscc_serval: Add network support
Quoted 13 lines
arch/mips/dts/mscc,serval.dtsi | 58 +++ arch/mips/dts/serval_pcb105.dts | 44 ++ arch/mips/dts/serval_pcb106.dts | 44 ++ board/mscc/serval/serval.c | 12 + configs/mscc_serval_defconfig | 6 +- drivers/net/mscc_eswitch/Kconfig | 7 + drivers/net/mscc_eswitch/Makefile | 1 + drivers/net/mscc_eswitch/serval_switch.c | 703 +++++++++++++++++++++++++++++++ include/dt-bindings/mscc/serval_data.h | 19 + 9 files changed, 893 insertions(+), 1 deletion(-) create mode 100644 drivers/net/mscc_eswitch/serval_switch.c create mode 100644 include/dt-bindings/mscc/serval_data.h
series applied to u-boot-mips, thanks.
Signature · 1 line
- Daniel