ath79: convert ath10k calibration data to NVMEM (ASCII MAC)
[openwrt/staging/dangole.git] / target / linux / ath79 / dts / qca9563_nec_wg800hp.dts
index 2efedcffec66012b0b8bd3efc9712d76cb6a25c5..a7390573cd642f1758194c92760b4d5626851d2c 100644 (file)
@@ -1,19 +1,14 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-/dts-v1/;
+
+#include "qca956x.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
-#include "qca956x.dtsi"
-
 / {
        model = "NEC Aterm WG800HP";
        compatible = "nec,wg800hp", "qca,qca9563";
 
-       chosen {
-               bootargs = "console=ttyS0,115200n8";
-       };
-
        aliases {
                led-boot = &led_power_green;
                led-failsafe = &led_power_red;
                pinctrl-0 = <&jtag_disable_pins>;
 
                wlan2g_red {
-                       label = "wg800hp:red:wlan2g";
+                       label = "red:wlan2g";
                        gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
                };
 
                active_red {
-                       label = "wg800hp:red:active";
+                       label = "red:active";
                        gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
                };
 
                active_green {
-                       label = "wg800hp:green:active";
+                       label = "green:active";
                        gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
                };
 
                led_power_red: power_red {
-                       label = "wg800hp:red:power";
+                       label = "red:power";
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
                };
 
                led_power_green: power_green {
-                       label = "wg800hp:green:power";
+                       label = "green:power";
                        gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
                        default-state = "on";
                };
 
                wlan5g_red {
-                       label = "wg800hp:red:wlan5g";
+                       label = "red:wlan5g";
                        gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
                };
 
                wlan5g_green {
-                       label = "wg800hp:green:wlan5g";
+                       label = "green:wlan5g";
                        gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "phy0tpt";
                };
 
                wlan2g_green {
-                       label = "wg800hp:green:wlan2g";
+                       label = "green:wlan2g";
                        gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy1tpt";
                };
@@ -99,7 +94,6 @@
 
 &spi {
        status = "okay";
-       num-cs = <1>;
 
        flash@0 {
                compatible = "jedec,spi-nor";
                                label = "board_data";
                                reg = <0x7e0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_board_data_880: macaddr@880 {
+                                               compatible = "mac-base";
+                                               reg = <0x880 0x11>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
                        };
 
                        art: partition@7f0000 {
                                label = "art";
                                reg = <0x7f0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
+                               };
                        };
                };
        };
 
 &pcie {
        status = "okay";
-};
 
-&uart {
-       status = "okay";
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_board_data_880 0>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &wmac {