Skip to content

Commit 14fceff

Browse files
haukedavem330
authored andcommitted
net: dsa: Add Lantiq / Intel DSA driver for vrx200
This adds the DSA driver for the GSWIP Switch found in the VRX200 SoC. This switch is integrated in the DSL SoC, this SoC uses a GSWIP version 2.1, there are other SoCs using different versions of this IP block, but this driver was only tested with the version found in the VRX200. Currently only the basic features are implemented which will forward all packages to the CPU and let the CPU do the forwarding. The hardware also support Layer 2 offloading which is not yet implemented in this driver. The GPHY FW loaded is now done by this driver and not any more by the separate driver in drivers/soc/lantiq/gphy.c, I will remove this driver is a separate patch. to make use of the GPHY this switch driver is needed anyway. Other SoCs have more embedded GPHYs so this driver should support a variable number of GPHYs. After the firmware was loaded the GPHY can be probed on the MDIO bus and it behaves like an external GPHY, without the firmware it can not be probed on the MDIO bus. The clock names in the sysctrl.c file have to be changed because the clocks are now used by a different driver. This should be cleaned up and a real common clock driver should provide the clocks instead. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 86ce2bc commit 14fceff

File tree

6 files changed

+1337
-4
lines changed

6 files changed

+1337
-4
lines changed

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8173,6 +8173,8 @@ L: [email protected]
81738173
S: Maintained
81748174
F: net/dsa/tag_gswip.c
81758175
F: drivers/net/ethernet/lantiq_xrx200.c
8176+
F: drivers/net/dsa/lantiq_pce.h
8177+
F: drivers/net/dsa/intel_gswip.c
81768178

81778179
LANTIQ MIPS ARCHITECTURE
81788180
M: John Crispin <[email protected]>

arch/mips/lantiq/xway/sysctrl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,8 @@ void __init ltq_soc_init(void)
516516
clkdev_add_pmu("1e10b308.eth", NULL, 0, 0, PMU_SWITCH |
517517
PMU_PPE_DP | PMU_PPE_TC);
518518
clkdev_add_pmu("1da00000.usif", "NULL", 1, 0, PMU_USIF);
519-
clkdev_add_pmu("1f203020.gphy", NULL, 1, 0, PMU_GPHY);
520-
clkdev_add_pmu("1f203068.gphy", NULL, 1, 0, PMU_GPHY);
519+
clkdev_add_pmu("1e108000.gswip", "gphy0", 0, 0, PMU_GPHY);
520+
clkdev_add_pmu("1e108000.gswip", "gphy1", 0, 0, PMU_GPHY);
521521
clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
522522
clkdev_add_pmu("1e116000.mei", "afe", 1, 2, PMU_ANALOG_DSL_AFE);
523523
clkdev_add_pmu("1e116000.mei", "dfe", 1, 0, PMU_DFE);
@@ -540,8 +540,8 @@ void __init ltq_soc_init(void)
540540
PMU_SWITCH | PMU_PPE_DPLUS | PMU_PPE_DPLUM |
541541
PMU_PPE_EMA | PMU_PPE_TC | PMU_PPE_SLL01 |
542542
PMU_PPE_QSB | PMU_PPE_TOP);
543-
clkdev_add_pmu("1f203020.gphy", NULL, 0, 0, PMU_GPHY);
544-
clkdev_add_pmu("1f203068.gphy", NULL, 0, 0, PMU_GPHY);
543+
clkdev_add_pmu("1e108000.gswip", "gphy0", 0, 0, PMU_GPHY);
544+
clkdev_add_pmu("1e108000.gswip", "gphy1", 0, 0, PMU_GPHY);
545545
clkdev_add_pmu("1e103000.sdio", NULL, 1, 0, PMU_SDIO);
546546
clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
547547
clkdev_add_pmu("1e116000.mei", "dfe", 1, 0, PMU_DFE);

drivers/net/dsa/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ config NET_DSA_LOOP
2323
This enables support for a fake mock-up switch chip which
2424
exercises the DSA APIs.
2525

26+
config NET_DSA_LANTIQ_GSWIP
27+
tristate "Lantiq / Intel GSWIP"
28+
depends on NET_DSA
29+
select NET_DSA_TAG_GSWIP
30+
---help---
31+
This enables support for the Lantiq / Intel GSWIP 2.1 found in
32+
the xrx200 / VR9 SoC.
33+
2634
config NET_DSA_MT7530
2735
tristate "Mediatek MT7530 Ethernet switch support"
2836
depends on NET_DSA

drivers/net/dsa/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ obj-$(CONFIG_NET_DSA_LOOP) += dsa_loop.o
55
ifdef CONFIG_NET_DSA_LOOP
66
obj-$(CONFIG_FIXED_PHY) += dsa_loop_bdinfo.o
77
endif
8+
obj-$(CONFIG_NET_DSA_LANTIQ_GSWIP) += lantiq_gswip.o
89
obj-$(CONFIG_NET_DSA_MT7530) += mt7530.o
910
obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
1011
obj-$(CONFIG_NET_DSA_QCA8K) += qca8k.o

0 commit comments

Comments
 (0)