aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorPawel Dembicki <paweldembicki@gmail.com>2020-04-20 10:06:36 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-04-28 16:49:31 +0200
commit4fd7e539e4f90128bdd7cb71c729a4b32f5de86e (patch)
tree74caf584970ce1d8c1b5c6604e2c228d3a97faea /target/linux
parent4b3b8ec81cd1965d0bd548fa31db491295b83354 (diff)
downloadupstream-4fd7e539e4f90128bdd7cb71c729a4b32f5de86e.tar.gz
upstream-4fd7e539e4f90128bdd7cb71c729a4b32f5de86e.tar.bz2
upstream-4fd7e539e4f90128bdd7cb71c729a4b32f5de86e.zip
kirkwood: switch from swconfig to dsa
This patch removes support for swconfig and switches to dsa driver. swconfig and switch drivers are removed. DSA driver is enabled and configuration is adjusted. In kirkwood only two devices have switches: Linksys EA3500 and EA4500. WAN MAC configuration in 02_network is required because otherwise WAN would have the same MAC address as lan interfaces. In swconfig solution the WAN address was assigned in u-Boot to eth1. Now, as eth1 is disabled and wan is part of the switch, we have to set it manually. Compile tested: EA3500, EA4500 Run tested: EA4500 Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> [minor commit title/message adjustments, remove swconfig package for devices] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux')
-rwxr-xr-xtarget/linux/kirkwood/base-files/etc/board.d/02_network4
-rw-r--r--target/linux/kirkwood/config-5.411
-rw-r--r--target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-linksys-audi.dts71
-rw-r--r--target/linux/kirkwood/image/Makefile4
-rw-r--r--target/linux/kirkwood/patches-5.4/105-ea4500.patch45
-rw-r--r--target/linux/kirkwood/profiles/00-default.mk2
6 files changed, 68 insertions, 69 deletions
diff --git a/target/linux/kirkwood/base-files/etc/board.d/02_network b/target/linux/kirkwood/base-files/etc/board.d/02_network
index 15e51d88f2..df01b0bb1b 100755
--- a/target/linux/kirkwood/base-files/etc/board.d/02_network
+++ b/target/linux/kirkwood/base-files/etc/board.d/02_network
@@ -26,8 +26,8 @@ case "$board" in
;;
"linksys,audi"|\
"linksys,viper")
- ucidef_add_switch "switch0" \
- "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" "6@eth1"
+ ucidef_set_interfaces_lan_wan "ethernet1 ethernet2 ethernet3 ethernet4" "internet"
+ ucidef_set_interface_macaddr "wan" $( mtd_get_mac_ascii u_env eth1addr )
;;
"zyxel,nsa310b"|\
"zyxel,nsa325")
diff --git a/target/linux/kirkwood/config-5.4 b/target/linux/kirkwood/config-5.4
index e149631f0e..c14ca3778f 100644
--- a/target/linux/kirkwood/config-5.4
+++ b/target/linux/kirkwood/config-5.4
@@ -245,10 +245,17 @@ CONFIG_MVEBU_MBUS=y
CONFIG_MVMDIO=y
# CONFIG_MVNETA is not set
# CONFIG_MVPP2 is not set
-CONFIG_MVSW61XX_PHY=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_KUSER_HELPERS=y
CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_MV88E6XXX=y
+CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y
+# CONFIG_NET_DSA_MV88E6XXX_PTP is not set
+CONFIG_NET_DSA_TAG_DSA=y
+CONFIG_NET_DSA_TAG_EDSA=y
+CONFIG_NET_SWITCHDEV=y
CONFIG_NLS=y
CONFIG_NVMEM=y
# CONFIG_NVMEM_REBOOT_MODE is not set
@@ -276,6 +283,7 @@ CONFIG_PCI_MVEBU=y
CONFIG_PERF_USE_VMALLOC=y
CONFIG_PGTABLE_LEVELS=2
CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
# CONFIG_PHY_MVEBU_A3700_UTMI is not set
# CONFIG_PHY_MVEBU_A38X_COMPHY is not set
CONFIG_PHY_MVEBU_SATA=y
@@ -317,7 +325,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=999999
CONFIG_SRAM=y
CONFIG_SRAM_EXEC=y
CONFIG_SRCU=y
-CONFIG_SWCONFIG=y
CONFIG_SWPHY=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_THERMAL=y
diff --git a/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-linksys-audi.dts b/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-linksys-audi.dts
index eff9102d33..90250fefc8 100644
--- a/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-linksys-audi.dts
+++ b/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-linksys-audi.dts
@@ -66,17 +66,6 @@
default-state = "on";
};
};
-
- mvsw61xx {
- compatible = "marvell,88e6171";
- status = "okay";
- reg = <0x10>;
-
- mii-bus = <&mdio>;
- cpu-port-0 = <5>;
- cpu-port-1 = <6>;
- is-indirect;
- };
};
&pinctrl {
@@ -96,6 +85,57 @@
};
};
+&mdio {
+ status = "okay";
+
+ switch@10 {
+ compatible = "marvell,mv88e6085";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <16>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ label = "ethernet1";
+ };
+
+ port@1 {
+ reg = <1>;
+ label = "ethernet2";
+ };
+
+ port@2 {
+ reg = <2>;
+ label = "ethernet3";
+ };
+
+ port@3 {
+ reg = <3>;
+ label = "ethernet4";
+ };
+
+ port@4 {
+ reg = <4>;
+ label = "internet";
+ };
+
+ port@5 {
+ reg = <5>;
+ label = "cpu";
+ ethernet = <&eth0port>;
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+};
+
&nand {
status = "okay";
@@ -188,15 +228,10 @@
};
/* eth1 is connected to the switch at port 6. However DSA only supports a
- * single CPU port. Upstream uses DSA so they disable this port to avoid confusion.
+ * single CPU port. This port is disabled to avoid confusion.
*/
&eth1 {
- status = "okay";
-
- ethernet1-port@0 {
- speed = <1000>;
- duplex = <1>;
- };
+ status = "disabled";
};
/* There is no battery on the board, so the RTC does not keep
diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index 865122ae19..4ba9f9a1b2 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -82,7 +82,7 @@ TARGET_DEVICES += iom_ix2-200
define Device/linksys_audi
DEVICE_VENDOR := Linksys
DEVICE_MODEL := EA3500 (Audi)
- DEVICE_PACKAGES := kmod-mwl8k swconfig wpad-basic kmod-gpio-button-hotplug
+ DEVICE_PACKAGES := kmod-mwl8k wpad-basic kmod-gpio-button-hotplug
PAGESIZE := 512
SUBPAGESIZE := 256
BLOCKSIZE := 16k
@@ -97,7 +97,7 @@ TARGET_DEVICES += linksys_audi
define Device/linksys_viper
DEVICE_VENDOR := Linksys
DEVICE_MODEL := E4200v2 / EA4500 (Viper)
- DEVICE_PACKAGES := kmod-mwl8k swconfig wpad-basic kmod-gpio-button-hotplug
+ DEVICE_PACKAGES := kmod-mwl8k wpad-basic kmod-gpio-button-hotplug
KERNEL_SIZE := 2688k
KERNEL_IN_UBI :=
UBINIZE_OPTS := -E 5
diff --git a/target/linux/kirkwood/patches-5.4/105-ea4500.patch b/target/linux/kirkwood/patches-5.4/105-ea4500.patch
index 7302723029..0d97ad14a2 100644
--- a/target/linux/kirkwood/patches-5.4/105-ea4500.patch
+++ b/target/linux/kirkwood/patches-5.4/105-ea4500.patch
@@ -23,25 +23,7 @@
};
white-pulse {
-@@ -66,6 +71,17 @@
- gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
- };
- };
-+
-+ mvsw61xx@10 {
-+ compatible = "marvell,88e6171";
-+ status = "okay";
-+ reg = <0x10>;
-+
-+ mii-bus = <&mdio>;
-+ cpu-port-0 = <5>;
-+ cpu-port-1 = <6>;
-+ is-indirect;
-+ };
- };
-
- &pinctrl {
-@@ -114,22 +130,22 @@
+@@ -114,22 +119,22 @@
};
partition@200000 {
@@ -68,28 +50,3 @@
reg = <0x1EA0000 0x1760000>;
};
-@@ -162,6 +178,7 @@
- status = "okay";
-
- switch@10 {
-+ status = "disabled";
- compatible = "marvell,mv88e6085";
- #address-cells = <1>;
- #size-cells = <0>;
-@@ -225,10 +242,14 @@
- };
-
- /* eth1 is connected to the switch at port 6. However DSA only supports a
-- * single CPU port. So leave this port disabled to avoid confusion.
-+ * single CPU port. Upstream uses DSA so they disable this port to avoid confusion.
- */
- &eth1 {
-- status = "disabled";
-+ status = "okay";
-+ ethernet1-port@0 {
-+ speed = <1000>;
-+ duplex = <1>;
-+ };
- };
-
- /* There is no battery on the board, so the RTC does not keep
diff --git a/target/linux/kirkwood/profiles/00-default.mk b/target/linux/kirkwood/profiles/00-default.mk
index 002751714e..bfc2154c48 100644
--- a/target/linux/kirkwood/profiles/00-default.mk
+++ b/target/linux/kirkwood/profiles/00-default.mk
@@ -7,7 +7,7 @@
define Profile/Default
NAME:=Default Profile
- PACKAGES:=kmod-mwl8k swconfig wpad-basic
+ PACKAGES:=kmod-mwl8k wpad-basic
PRIORITY:=1
endef