From dd979547725b37c28f84974a292a44593cef457d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=20=E9=B9=8F?= Date: Wed, 22 Feb 2023 20:55:44 +0800 Subject: ipq40xx: add e2600ac c2 to dsa MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert E2600ac c2 to DSA and enable it. Signed-off-by: 张 鹏 [ rename port to more generic name ] Signed-off-by: Christian Marangi (cherry picked from commit 0dca52cf595cedcabec5d384ddc83f1954cca46d) --- .../ipq40xx/base-files/etc/board.d/02_network | 3 ++ .../arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts | 40 ++++++++++++++++++++++ target/linux/ipq40xx/image/generic.mk | 3 +- 3 files changed, 44 insertions(+), 2 deletions(-) (limited to 'target') diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 0d9be90ddb..d6b19c981e 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -100,6 +100,9 @@ ipq40xx_setup_interfaces() qxwlan,e2600ac-c1) ucidef_set_interfaces_lan_wan "sw-eth1" "sw-eth2" ;; + qxwlan,e2600ac-c2) + ucidef_set_interfaces_lan_wan "sw-eth1 sw-eth2" "sw-eth3" + ;; zte,mf286d) ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" "wan" ;; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts index 1f88322a4f..2ad794e8ec 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts @@ -79,6 +79,14 @@ precal_art_5000: precal@5000 { reg = <0x5000 0x2f20>; }; + + macaddr_gmac0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_gmac1: macaddr@6 { + reg = <0x6 0x6>; + }; }; }; }; @@ -137,3 +145,35 @@ nvmem-cells = <&precal_art_5000>; qcom,ath10k-calibration-variant = "Qxwlan-E2600AC-C2"; }; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport2 { + status = "okay"; + label = "sw-eth1"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_gmac0>; +}; + +&swport4 { + status = "okay"; + label = "sw-eth2"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_gmac0>; +}; + +&swport5 { + status = "okay"; + + label = "sw-eth3"; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_gmac1>; +}; diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index 6cde091b2b..59dfb00628 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -1046,8 +1046,7 @@ define Device/qxwlan_e2600ac-c2 BLOCKSIZE := 128k PAGESIZE := 2048 endef -# Missing DSA Setup -#TARGET_DEVICES += qxwlan_e2600ac-c2 +TARGET_DEVICES += qxwlan_e2600ac-c2 define Device/sony_ncp-hg100-cellular $(call Device/FitImage) -- cgit v1.2.3