Add network support for ServalT SoCs
Subsystems (2)
cover Add network support for ServalT SoCs
This patch series adds network support for ServalT SoCs family. There is only one pcb in this family: ServalT(pcb116).
This patch series is based on: u-boot-mips/next.
Horatiu Vultur (3):
net: Add MSCC ServalT network driver.
net: mscc: servalt: Add ethernet nodes for ServalT
configs: mscc_servalt: Add network support
arch/mips/dts/mscc,servalt.dtsi | 40 ++ arch/mips/dts/servalt_pcb116.dts | 25 + .../include/mach/servalt/servalt_devcpu_gcb.h | 2 + configs/mscc_servalt_defconfig | 6 +- drivers/net/mscc_eswitch/Kconfig | 7 + drivers/net/mscc_eswitch/Makefile | 1 + drivers/net/mscc_eswitch/servalt_switch.c | 622 +++++++++++++++++++++ 7 files changed, 702 insertions(+), 1 deletion(-) create mode 100644 drivers/net/mscc_eswitch/servalt_switch.c
Signature · 1 line
2.7.4
PATCH 1/3 net: Add MSCC ServalT network driver.
Add network driver for Microsemi Ethernet switch.
It is present on ServalT SoCs.
--- .../include/mach/servalt/servalt_devcpu_gcb.h | 2 + drivers/net/mscc_eswitch/Kconfig | 7 + drivers/net/mscc_eswitch/Makefile | 1 + drivers/net/mscc_eswitch/servalt_switch.c | 622 +++++++++++++++++++++ 4 files changed, 632 insertions(+) create mode 100644 drivers/net/mscc_eswitch/servalt_switch.c
arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb.h +2 -0
@@ -17,4 +17,6 @@#define GPIO_GPIO_ALT (x) (0x74 + 4 * (x))#define GPIO_GPIO_ALT1 (x) (0x7c + 4 * (x)) +#define GCB_PHY_CFG 0x118 +#endif
drivers/net/mscc_eswitch/Kconfig +7 -0
@@ -22,3 +22,10 @@ config MSCC_JR2_SWITCH select PHYLIB help This driver supports the Jaguar2 network switch device. + +config MSCC_SERVALT_SWITCH + bool "Servalt switch driver" + depends on DM_ETH && ARCH_MSCC + select PHYLIB + help + This driver supports the Servalt network switch device.
drivers/net/mscc_eswitch/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-$(CONFIG_MSCC_OCELOT_SWITCH) += ocelot_switch.o mscc_miim.o mscc_xfer.o mscc_mac_table.o 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
drivers/net/mscc_eswitch/servalt_switch.c new file +622 -0
622 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 1/3 net: Add MSCC ServalT network driver.
Am 08.04.19 um 10:31 schrieb Horatiu Vultur:
Quoted 12 lines
Add network driver for Microsemi Ethernet switch.
It is present on ServalT SoCs.Signed-off-by Horatiu Vultur <[email protected]>--- .../include/mach/servalt/servalt_devcpu_gcb.h | 2 + drivers/net/mscc_eswitch/Kconfig | 7 + drivers/net/mscc_eswitch/Makefile | 1 + drivers/net/mscc_eswitch/servalt_switch.c | 622 +++++++++++++++++++++ 4 files changed, 632 insertions(+) create mode 100644 drivers/net/mscc_eswitch/servalt_switch.c
Signature · 1 line
- Daniel
PATCH 2/3 net: mscc: servalt: Add ethernet nodes for ServalT
In reply to Horatiu VulturAdd ethernet nodes for ServalT SoCs family. Currently there is only one pcb(pcb116) in this family.
--- arch/mips/dts/mscc,servalt.dtsi | 40 ++++++++++++++++++++++++++++++++++++++++ arch/mips/dts/servalt_pcb116.dts | 25 +++++++++++++++++++++++++ 2 files changed, 65 insertions(+)
arch/mips/dts/mscc,servalt.dtsi +40 -0
@@ -145,5 +145,45 @@ #gpio-cells = <2>; gpio-ranges = <&sgpio 0 0 128>; }; + + switch: switch at 1010000 { + compatible = "mscc,vsc7437-switch"; + reg = <0x01030000 0x0100>, // VTSS_TO_DEV_0 + <0x01040000 0x0100>, // VTSS_TO_DEV_1 + <0x01f00000 0x100000>, // ANA_AC + <0x01d00000 0x100000>, // ANA_CL + <0x01e00000 0x100000>, // ANA_L2 + <0x01120000 0x10000>, // ASM + <0x01130000 0x00000>, // LRN + <0x017d0000 0x10000>, // QFWD + <0x01020000 0x20000>, // QS + <0x017e0000 0x10000>, // QSYS + <0x01b00000 0x80000>; // REW + reg-names = "port0", "port1", + "ana_ac", "ana_cl", "ana_l2", "asm", "lrn", + "qfwd", "qs", "qsys", "rew"; + status = "okay"; + + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + }; + }; + + mdio0: mdio at 010100c4 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mscc,jr2-miim"; + reg = <0x010100c4 0x24>; + status = "disabled"; + }; + + mdio1: mdio at 010100e8 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mscc,jr2-miim"; + reg = <0x010100e8 0x24>; + status = "disabled"; + }; }; };
arch/mips/dts/servalt_pcb116.dts +25 -0
@@ -54,3 +54,28 @@ status = "okay"; sgpio-ports = <0x0000fe7f>; }; + +&mdio0 { + status = "okay"; + + phy0: ethernet-phy at 0 { + reg = <0>; + }; + phy1: ethernet-phy at 1 { + reg = <1>; + }; +}; + +&switch { + ethernet-ports { + + port0: port at 0 { + reg = <0>; + phy-handle = <&phy0>; + }; + port1: port at 1 { + reg = <1>; + phy-handle = <&phy1>; + }; + }; +};
Signature · 1 line
2.7.4
PATCH 3/3 configs: mscc_servalt: Add network support
In reply to Horatiu VulturUpdate default config to use network driver for ServalT SoCs.
--- configs/mscc_servalt_defconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
configs/mscc_servalt_defconfig +5 -1
@@ -24,7 +24,6 @@ CONFIG_CMD_MEMTEST=y CONFIG_CMD_GPIO=y CONFIG_CMD_SF=y CONFIG_CMD_SPI=y -# CONFIG_CMD_NET 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)"
@@ -59,3 +58,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_SERVALT_SWITCH=y
Signature · 1 line
2.7.4
cover Add network support for ServalT SoCs
In reply to Horatiu VulturAm 08.04.19 um 10:31 schrieb Horatiu Vultur:
Quoted 10 lines
This patch series adds network support for ServalT SoCs family. There is only one pcb in this family: ServalT(pcb116).
This patch series is based on: u-boot-mips/next.
Horatiu Vultur (3):
net: Add MSCC ServalT network driver.
net: mscc: servalt: Add ethernet nodes for ServalT
configs:mscc_servalt: Add network support
Quoted 10 lines
arch/mips/dts/mscc,servalt.dtsi | 40 ++ arch/mips/dts/servalt_pcb116.dts | 25 + .../include/mach/servalt/servalt_devcpu_gcb.h | 2 + configs/mscc_servalt_defconfig | 6 +- drivers/net/mscc_eswitch/Kconfig | 7 + drivers/net/mscc_eswitch/Makefile | 1 + drivers/net/mscc_eswitch/servalt_switch.c | 622 +++++++++++++++++++++ 7 files changed, 702 insertions(+), 1 deletion(-) create mode 100644 drivers/net/mscc_eswitch/servalt_switch.c
series applied to u-boot-mips/next, thanks.
Signature · 1 line
- Daniel