ath79: TP-Link EAP245 v3: convert radios to nvmem-cells
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_alfa-network_ap121f.dtsi
index 74d65d828a2a7760024416df240149d2749f9b72..2be7cdb05d59a1d928aff8780ee4cc730220be29 100644 (file)
@@ -11,7 +11,6 @@
                led-boot = &led_vpn;
                led-failsafe = &led_vpn;
                led-upgrade = &led_vpn;
-               serial0 = &uart;
        };
 
        keys {
                        debounce-interval = <60>;
                };
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               lan {
+                       label = "green:lan";
+                       gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+               };
+
+               led_vpn: vpn {
+                       label = "green:vpn";
+                       gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+               };
+
+               wlan {
+                       label = "green:wlan";
+                       gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "phy0tpt";
+               };
+       };
 };
 
 &eth0 {
        status = "okay";
 
-       mtd-mac-address = <&art 0x0>;
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
 
        gmac-config {
                device = <&gmac>;
@@ -54,8 +74,6 @@
 &spi {
        status = "okay";
 
-       num-cs = <1>;
-
        flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                                reg = <0x030000 0x010000>;
                        };
 
-                       art: partition@40000 {
+                       partition@40000 {
                                label = "art";
                                reg = <0x040000 0x010000>;
                                read-only;
+
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               cal_art_1000: cal@1000 {
+                                       reg = <0x1000 0x440>;
+                               };
+
+                               macaddr_art_0: macaddr@0 {
+                                       reg = <0x0 0x6>;
+                               };
+
+                               macaddr_art_1002: macaddr@1002 {
+                                       reg = <0x1002 0x6>;
+                               };
                        };
 
                        partition@50000 {
        };
 };
 
-&uart {
-       status = "okay";
-};
-
 &usb {
        status = "okay";
 };
 &wmac {
        status = "okay";
 
-       mtd-cal-data = <&art 0x1000>;
+       nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>;
+       nvmem-cell-names = "calibration", "mac-address";
 };