From 7c19a99201bf2c894509cbf823b8656218e4bc45 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 29 Jul 2020 20:20:09 +0200 Subject: [PATCH] ipq40xx: convert Aruba AP-303 AP-365 to DSA --- .../ipq40xx/base-files/etc/board.d/02_network | 4 +- .../arch/arm/boot/dts/qcom-ipq4029-ap-303.dts | 1 + .../arch/arm/boot/dts/qcom-ipq4029-ap-365.dts | 1 + .../dts/qcom-ipq4029-aruba-glenmorangie.dtsi | 66 ++++++++----------- 4 files changed, 32 insertions(+), 40 deletions(-) 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 df5ef207a9..4220fbcfc6 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -19,8 +19,6 @@ ipq40xx_setup_interfaces() engenius,ens620ext) ucidef_set_interfaces_lan_wan "eth0" "eth1" ;; - aruba,ap-303|\ - aruba,ap-365|\ avm,fritzrepeater-1200|\ dlink,dap-2610 |\ engenius,eap1300|\ @@ -86,6 +84,8 @@ ipq40xx_setup_interfaces() "0u@eth0" "3:lan:2" "4:lan:1" ucidef_set_interface_wan "eth1" ;; + aruba,ap-303|\ + aruba,ap-365|\ meraki,mr33) ucidef_set_interface_lan "lan" ;; diff --git a/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts b/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts index 126d944ebb..6000a8d71f 100644 --- a/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts +++ b/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts @@ -12,6 +12,7 @@ led-failsafe = &led_system_red; led-running = &led_system_green; led-upgrade = &led_system_red; + ethernet0 = &gmac; }; leds { diff --git a/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts b/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts index 07bb674520..f0682b5b7c 100644 --- a/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts +++ b/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts @@ -12,6 +12,7 @@ led-failsafe = &led_system_red; led-running = &led_system_green; led-upgrade = &led_system_red; + ethernet0 = &gmac; }; leds { diff --git a/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi b/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi index 4d1d82a272..dbc896fb46 100644 --- a/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi +++ b/target/linux/ipq40xx/files-5.4/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi @@ -16,32 +16,11 @@ status = "okay"; }; - mdio@90000 { - status = "okay"; - pinctrl-0 = <&mdio_pins>; - pinctrl-names = "default"; - - /delete-node/ ethernet-phy@0; - /delete-node/ ethernet-phy@2; - /delete-node/ ethernet-phy@3; - /delete-node/ ethernet-phy@4; - - ethernet-phy@5 { - reg = <0x5>; - }; - }; - counter@4a1000 { compatible = "qcom,qca-gcnt"; reg = <0x4a1000 0x4>; }; - ess_tcsr@1953000 { - compatible = "qcom,tcsr"; - reg = <0x1953000 0x1000>; - qcom,ess-interface-select = ; - }; - tcsr@1949000 { compatible = "qcom,tcsr"; reg = <0x1949000 0x100>; @@ -62,19 +41,6 @@ status = "okay"; }; - ess-switch@c000000 { - switch_mac_mode = <0x3>; /* mac mode for RGMII RMII */ - switch_lan_bmp = <0x0>; /* lan port bitmap */ - switch_wan_bmp = <0x10>; /* wan port bitmap */ - }; - - edma@c080000 { - qcom,single-phy; - qcom,num_gmac = <1>; - phy-mode = "rgmii-id"; - status = "okay"; - }; - i2c_0: i2c@78b7000 { pinctrl-0 = <&i2c_0_pins>; pinctrl-names = "default"; @@ -121,10 +87,34 @@ status = "okay"; }; -&gmac0 { - qcom,phy_mdio_addr = <5>; - qcom,poll_required = <1>; - vlan_tag = <0 0x20>; +&mdio { + status = "okay"; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; +}; + +&ess { + mac-mode = <0x3>; /* mac mode for RGMII RMII */ + status = "okay"; + + ports { + /delete-node/ port@0; + /delete-node/ port@1; + /delete-node/ port@2; + /delete-node/ port@3; + /delete-node/ port@4; + + port@5 { + reg = <5>; + phy-mode = "rgmii-id"; + phy-handle = <ðphy1>; + label = "lan"; + }; + }; +}; + +&gmac { + status = "okay"; }; &qpic_bam { -- 2.30.2