ipq40xx: rt-ac58u: fix device-tree snafu
authorChristian Lamparter <chunkeey@gmail.com>
Sat, 22 Dec 2018 15:08:53 +0000 (16:08 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Thu, 27 Dec 2018 13:30:45 +0000 (14:30 +0100)
 - make the device userspace integration (WIFI,MAC,sysupgrade)
   work again by renaming the ubi to UBI_DEV as a temporary measure.
   In the future, once 4.14 support is dropped, this can all be
   refactored again. *sigh*

 - use the wifi0 and wifi1 labels

 - follow Device-Tree Release v0.2 2.2.2 Generic Names Recommendation

 - fix duplicated partition node-names

 - remove qcom,ipq4019 platform compatible. it's no longer needed
   (and wrong because the chip is a qcom,ipq4018).

Fixes: 4c67f3ad78d ("ipq40xx: Adapt 4.19 DTS for upstream SPI-NAND driver")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts

index 783061a2e84822e9699a1061b8d508d1b6dd52fc..0e09407f6f7cf52caec1f660f8e59a9d00e008ba 100644 (file)
@@ -7,7 +7,7 @@
 
 / {
        model = "ASUS RT-AC58U";
 
 / {
        model = "ASUS RT-AC58U";
-       compatible = "asus,rt-ac58u", "qcom,ipq4019";
+       compatible = "asus,rt-ac58u";
 
        memory {
                device_type = "memory";
 
        memory {
                device_type = "memory";
                        status = "okay";
                };
 
                        status = "okay";
                };
 
-               wifi@a000000 {
-                       status = "okay";
-                       qcom,ath10k-calibration-variant = "RT-AC58U";
-               };
-
-               wifi@a800000 {
-                       status = "okay";
-                       qcom,ath10k-calibration-variant = "RT-AC58U";
-               };
-
                watchdog@b017000 {
                        status = "okay";
                };
                watchdog@b017000 {
                        status = "okay";
                };
@@ -97,7 +87,7 @@
                };
        };
 
                };
        };
 
-       gpio-keys {
+       keys {
                compatible = "gpio-keys";
 
                reset {
                compatible = "gpio-keys";
 
                reset {
                };
        };
 
                };
        };
 
-       gpio-leds {
+       leds {
                compatible = "gpio-leds";
 
                power: status {
                compatible = "gpio-leds";
 
                power: status {
                        #address-cells = <1>;
                        #size-cells = <1>;
 
                        #address-cells = <1>;
                        #size-cells = <1>;
 
-                       partition0@0 {
+                       partition@0 {
                                label = "SBL1";
                                reg = <0x00000000 0x00040000>;
                                read-only;
                        };
                                label = "SBL1";
                                reg = <0x00000000 0x00040000>;
                                read-only;
                        };
-                       partition1@40000 {
+                       partition@40000 {
                                label = "MIBIB";
                                reg = <0x00040000 0x00020000>;
                                read-only;
                        };
                                label = "MIBIB";
                                reg = <0x00040000 0x00020000>;
                                read-only;
                        };
-                       partition2@60000 {
+                       partition@60000 {
                                label = "QSEE";
                                reg = <0x00060000 0x00060000>;
                                read-only;
                        };
                                label = "QSEE";
                                reg = <0x00060000 0x00060000>;
                                read-only;
                        };
-                       partition3@c0000 {
+                       partition@c0000 {
                                label = "CDT";
                                reg = <0x000c0000 0x00010000>;
                                read-only;
                        };
                                label = "CDT";
                                reg = <0x000c0000 0x00010000>;
                                read-only;
                        };
-                       partition4@d0000 {
+                       partition@d0000 {
                                label = "DDRPARAMS";
                                reg = <0x000d0000 0x00010000>;
                                read-only;
                        };
                                label = "DDRPARAMS";
                                reg = <0x000d0000 0x00010000>;
                                read-only;
                        };
-                       partition5@e0000 {
+                       partition@e0000 {
                                label = "APPSBLENV"; /* uboot env*/
                                reg = <0x000e0000 0x00010000>;
                                read-only;
                        };
                                label = "APPSBLENV"; /* uboot env*/
                                reg = <0x000e0000 0x00010000>;
                                read-only;
                        };
-                       partition5@f0000 {
+                       partition@f0000 {
                                label = "APPSBL"; /* uboot */
                                reg = <0x000f0000 0x00080000>;
                                read-only;
                        };
                                label = "APPSBL"; /* uboot */
                                reg = <0x000f0000 0x00080000>;
                                read-only;
                        };
-                       partition5@170000 {
+                       partition@170000 {
                                label = "ART";
                                reg = <0x00170000 0x00010000>;
                                read-only;
                                label = "ART";
                                reg = <0x00170000 0x00010000>;
                                read-only;
                        #size-cells = <1>;
 
                        partition@0 {
                        #size-cells = <1>;
 
                        partition@0 {
-                               label = "ubi";
+                               /*
+                                * TODO: change to label = "ubi" once we drop 4.14.
+                                *       also drop the bootargs-append and all the
+                                *       userspace CI_UBIPART="UBI_DEV" remains.
+                                */
+                               label = "UBI_DEV";
                                reg = <0x00000000 0x08000000>;
                        };
                };
                                reg = <0x00000000 0x08000000>;
                        };
                };
 &usb2_hs_phy {
        status = "okay";
 };
 &usb2_hs_phy {
        status = "okay";
 };
+
+&wifi0 {
+       status = "okay";
+       qcom,ath10k-calibration-variant = "RT-AC58U";
+};
+
+&wifi1 {
+       status = "okay";
+       qcom,ath10k-calibration-variant = "RT-AC58U";
+};