[openwrt/openwrt] ipq40xx: improve support for Edgecore ECW5211
LEDE Commits
lede-commits at lists.infradead.org
Wed Oct 7 12:33:35 EDT 2020
adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/8f29e36963e799c7aa5362bb5ad4c303890dc1c3
commit 8f29e36963e799c7aa5362bb5ad4c303890dc1c3
Author: Sungbo Eo <mans0n at gorani.run>
AuthorDate: Fri Sep 18 22:31:59 2020 +0900
ipq40xx: improve support for Edgecore ECW5211
This adds several stylistic and functional improvements of the recently
added Edgecore ECW5211, especially:
* Drop the local BDFs as those are already in the upstream under different names
* Add SPDX tag to DTS
* Add label MAC address
* Move LED trigger to DTS
* Remove unnecessary status="okay"
* Disable unused SS USB phy as the USB port only supports USB 2.0
* Make uboot-env partition writable
* Remove qcom,poll_required_dynamic property as the driver does not use it
* Tidy up the device recipe
Fixes: 4488b260a02e ("ipq40xx: add Edgecore ECW5211 support")
Signed-off-by: Sungbo Eo <mans0n at gorani.run>
Acked-by: Robert Marko <robert.marko at sartura.hr>
---
package/firmware/ipq-wifi/Makefile | 2 -
.../ipq-wifi/board-edgecore_ecw5211.qca4019 | Bin 24324 -> 0 bytes
.../linux/ipq40xx/base-files/etc/board.d/01_leds | 11 ++---
.../arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts | 52 ++++++++++-----------
target/linux/ipq40xx/image/Makefile | 8 ++--
5 files changed, 34 insertions(+), 39 deletions(-)
diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 39e22b50d3..9aa6852046 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -31,7 +31,6 @@ ALLWIFIBOARDS:= \
buffalo_wtr-m2133hp \
cellc_rtl30vw \
dlink_dap2610 \
- edgecore_ecw5211 \
edgecore_ecw5410 \
edgecore_oap100 \
engenius_eap2200 \
@@ -110,7 +109,6 @@ $(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater
$(eval $(call generate-ipq-wifi-package,buffalo_wtr-m2133hp,Buffalo WTR-M2133HP))
$(eval $(call generate-ipq-wifi-package,cellc_rtl30vw, Cell C RTL30VW))
$(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610))
-$(eval $(call generate-ipq-wifi-package,edgecore_ecw5211,Edgecore ECW5211))
$(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410))
$(eval $(call generate-ipq-wifi-package,edgecore_oap100,Edgecore OAP100))
$(eval $(call generate-ipq-wifi-package,engenius_eap2200,EnGenius EAP2200))
diff --git a/package/firmware/ipq-wifi/board-edgecore_ecw5211.qca4019 b/package/firmware/ipq-wifi/board-edgecore_ecw5211.qca4019
deleted file mode 100644
index 340cfcc7a2..0000000000
Binary files a/package/firmware/ipq-wifi/board-edgecore_ecw5211.qca4019 and /dev/null differ
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
index 8a87b68532..3e0f3ab258 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
@@ -26,12 +26,6 @@ avm,fritzbox-7530 |\
glinet,gl-b1300)
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
;;
-edgecore,ecw5211 |\
-zyxel,nbg6617 |\
-zyxel,wre6606)
- ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy0tpt"
- ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy1tpt"
- ;;
edgecore,oap100)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wlan5g" "phy1tpt"
@@ -67,6 +61,11 @@ qxwlan,e2600ac-c2)
ucidef_set_led_wlan "wlan2g" "WLAN0" "green:wlan0" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN1" "green:wlan1" "phy1tpt"
;;
+zyxel,nbg6617 |\
+zyxel,wre6606)
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy0tpt"
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy1tpt"
+ ;;
esac
board_config_flush
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts
index 244dfac750..0ee8d1a52e 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
#include "qcom-ipq4019.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
@@ -12,6 +14,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
+ label-mac-device = &gmac0;
};
chosen {
@@ -39,11 +42,13 @@
wlan2g {
label = "green:wlan2g";
gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy0tpt";
};
wlan5g {
label = "green:wlan5g";
gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy1tpt";
};
};
@@ -52,13 +57,6 @@
status = "okay";
};
- mdio at 90000 {
- status = "okay";
-
- pinctrl-0 = <&mdio_pins>;
- pinctrl-names = "default";
- };
-
ess-psgmii at 98000 {
status = "okay";
};
@@ -75,8 +73,6 @@
};
tcsr at 194b000 {
- status = "okay";
-
compatible = "qcom,tcsr";
reg = <0x194b000 0x100>;
qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
@@ -94,12 +90,17 @@
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
};
- usb2: usb2 at 60f8800 {
+ usb2 at 60f8800 {
status = "okay";
};
- usb3: usb3 at 8af8800 {
+ usb3 at 8af8800 {
status = "okay";
+
+ dwc3 at 8a00000 {
+ phys = <&usb3_hs_phy>;
+ phy-names = "usb2-phy";
+ };
};
crypto at 8e3a000 {
@@ -112,6 +113,9 @@
ess-switch at c000000 {
status = "okay";
+
+ switch_lan_bmp = <0x10>;
+ switch_wan_bmp = <0x20>;
};
edma at c080000 {
@@ -182,8 +186,6 @@
cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 4 GPIO_ACTIVE_HIGH>;
flash at 0 {
- status = "okay";
-
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <24000000>;
@@ -224,9 +226,8 @@
};
partition at e0000 {
- label = "0:APPSBLENV"; /* uboot env*/
+ label = "0:APPSBLENV"; /* uboot env */
reg = <0x000e0000 0x00010000>;
- read-only;
};
partition at f0000 {
@@ -243,9 +244,7 @@
};
};
- spi-nand at 1 {
- status = "okay";
-
+ flash at 1 {
compatible = "spi-nand";
reg = <1>;
spi-max-frequency = <24000000>;
@@ -286,34 +285,33 @@
status = "okay";
};
+&mdio {
+ status = "okay";
+
+ pinctrl-0 = <&mdio_pins>;
+ pinctrl-names = "default";
+};
+
&gmac0 {
qcom,poll_required = <1>;
- qcom,poll_required_dynamic = <1>;
qcom,phy_mdio_addr = <4>;
vlan_tag = <2 0x20>;
};
&gmac1 {
qcom,poll_required = <1>;
- qcom,poll_required_dynamic = <1>;
qcom,phy_mdio_addr = <3>;
vlan_tag = <1 0x10>;
};
&wifi0 {
status = "okay";
-
- qcom,ath10k-calibration-variant = "Edgecore-ECW5211";
};
&wifi1 {
status = "okay";
- qcom,ath10k-calibration-variant = "Edgecore-ECW5211";
-};
-
-&usb3_ss_phy {
- status = "okay";
+ qcom,ath10k-calibration-variant = "ALFA-Network-AP120C-AC";
};
&usb3_hs_phy {
diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile
index 6e5620a140..142896bde8 100644
--- a/target/linux/ipq40xx/image/Makefile
+++ b/target/linux/ipq40xx/image/Makefile
@@ -347,12 +347,12 @@ TARGET_DEVICES += dlink_dap-2610
define Device/edgecore_ecw5211
$(call Device/FitImage)
$(call Device/UbiFit)
- DEVICE_TITLE := Edgecore ECW5211
+ DEVICE_VENDOR := Edgecore
+ DEVICE_MODEL := ECW5211
+ SOC := qcom-ipq4018
BLOCKSIZE := 128k
PAGESIZE := 2048
- DEVICE_DTS_CONFIG := config at ap.dk01.1-c2
- DEVICE_DTS := qcom-ipq4018-ecw5211
- DEVICE_PACKAGES := ipq-wifi-edgecore_ecw5211 kmod-tpm-i2c-atmel kmod-usb-acm uboot-envtools
+ DEVICE_PACKAGES := kmod-tpm-i2c-atmel kmod-usb-acm uboot-envtools
endef
TARGET_DEVICES += edgecore_ecw5211
More information about the lede-commits
mailing list