ipq40xx: fix RUTX10 Wi-Fi woes
authorKasparas Elzbutas <elzkas@gmail.com>
Mon, 18 Jul 2022 07:05:33 +0000 (10:05 +0300)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 5 Aug 2022 13:24:57 +0000 (15:24 +0200)
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@gmail.com>
(added reference to commit, rewrote commit message)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi

index e0b4eed6f2b94481007de0a2d7e7fc090e51e0a6..8fb9d81d3bb22083a1a8e33567f4259844fd82d8 100644 (file)
@@ -127,6 +127,10 @@ case "$FIRMWARE" in
                caldata_extract_mmc "0:ART" 0x1000 0x2f20
                ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0x0)
                ;;
+       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
@@ -208,6 +212,10 @@ case "$FIRMWARE" in
                caldata_extract_mmc "0:ART" 0x5000 0x2f20
                ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0xc)
                ;;
+       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
index ebb2d08e738df308085e86934c0181bd34498bab..3673a13430cb2e011ec58735b0e5b31775042980 100644 (file)
                                label = "0:ART";
                                reg = <0x2e0000 0x10000>;
                                read-only;
-                               compatible = "nvmem-cells";
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-
-                               precal_art_1000: precal@1000 {
-                                       reg = <0x1000 0x2f20>;
-                               };
-
-                               precal_art_5000: precal@5000 {
-                                       reg = <0x5000 0x2f20>;
-                               };
                        };
 
                        config: partition@2f0000 {
                                label = "0:CONFIG";
                                reg = <0x2f0000 0x10000>;
                                read-only;
-                               compatible = "nvmem-cells";
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-
-                               macaddr_config_0: macaddr@0 {
-                                       reg = <0x0 0x6>;
-                               };
                        };
 
                        partition@300000 {
        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>;
-};