[openwrt/openwrt] ipq40xx: fix RUTX10 Wi-Fi woes

LEDE Commits lede-commits at lists.infradead.org
Sat Sep 24 14:55:54 PDT 2022


chunkeey pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e562746263b37ae7943c3700998f2be30b815a2e

commit e562746263b37ae7943c3700998f2be30b815a2e
Author: Kasparas Elzbutas <elzkas at gmail.com>
AuthorDate: Mon Jul 18 10:05:33 2022 +0300

    ipq40xx: fix RUTX10 Wi-Fi woes
    
    This partially reverts:
    commit cfc13c44595d ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data")
    
    U-Boot on these devices mangles the device tree,
    so nvmem-cell type calibration doesn't work.
    
    Fixes: cfc13c44595d ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data")
    Signed-off-by: Kasparas Elzbutas <elzkas at gmail.com>
    (added reference to commit, rewrote commit message)
    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 .../etc/hotplug.d/firmware/11-ath10k-caldata       |  8 ++++++
 .../files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi | 30 ----------------------
 2 files changed, 8 insertions(+), 30 deletions(-)

diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index a0280b7f22..6adf6f23f1 100644
--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -138,6 +138,10 @@ case "$FIRMWARE" in
 		caldata_extract "0:ART" 0x1000 0x2f20
 		ath10k_patch_mac $(macaddr_add $(get_mac_label) 2)
 		;;
+	teltonika,rutx10)
+		caldata_extract "0:ART" 0x1000 0x2f20
+		ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:CONFIG" 0x0) 2)
+		;;
 	zyxel,nbg6617 |\
 	zyxel,wre6606)
 		caldata_extract "ART" 0x1000 0x2f20
@@ -229,6 +233,10 @@ case "$FIRMWARE" in
 		caldata_extract "0:ART" 0x5000 0x2f20
 		ath10k_patch_mac $(macaddr_add $(get_mac_label) 4)
 		;;
+	teltonika,rutx10)
+		caldata_extract "0:ART" 0x5000 0x2f20
+		ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:CONFIG" 0x0) 3)
+		;;
 	zyxel,nbg6617 |\
 	zyxel,wre6606)
 		caldata_extract "ART" 0x5000 0x2f20
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi
index ebb2d08e73..3673a13430 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi
@@ -188,30 +188,12 @@
 				label = "0:ART";
 				reg = <0x2e0000 0x10000>;
 				read-only;
-				compatible = "nvmem-cells";
-				#address-cells = <1>;
-				#size-cells = <1>;
-
-				precal_art_1000: precal at 1000 {
-					reg = <0x1000 0x2f20>;
-				};
-
-				precal_art_5000: precal at 5000 {
-					reg = <0x5000 0x2f20>;
-				};
 			};
 
 			config: partition at 2f0000 {
 				label = "0:CONFIG";
 				reg = <0x2f0000 0x10000>;
 				read-only;
-				compatible = "nvmem-cells";
-				#address-cells = <1>;
-				#size-cells = <1>;
-
-				macaddr_config_0: macaddr at 0 {
-					reg = <0x0 0x6>;
-				};
 			};
 
 			partition at 300000 {
@@ -267,15 +249,3 @@
 	pinctrl-names = "default";
 	phy-reset-gpio = <&tlmm 62 0>;
 };
-
-&wifi0 {
-	nvmem-cell-names = "pre-calibration", "mac-address";
-	nvmem-cells = <&precal_art_1000>, <&macaddr_config_0>;
-	mac-address-increment = <2>;
-};
-
-&wifi1 {
-	nvmem-cell-names = "pre-calibration", "mac-address";
-	nvmem-cells = <&precal_art_5000>, <&macaddr_config_0>;
-	mac-address-increment = <3>;
-};




More information about the lede-commits mailing list