ath79: add Embedded Wireless Balin Platform
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7161_aruba_ap-105.dts
index 45d4d03f314c54b092b98c12ce8800732715bda9..8180e0d6bd5232dd91d1b1419a706f3475d41166 100644 (file)
@@ -1,11 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-/dts-v1/;
+
+#include "ar7100.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
-#include "ar7100.dtsi"
-
 / {
        compatible = "aruba,ap-105", "qca,ar7161";
        model = "Aruba AP-105";
        };
 
        aliases {
-               led-boot = &power_green;
-               led-failsafe = &power_red;
-               led-running = &power_green;
-               led-upgrade = &power_green;
+               led-boot = &led_power_green;
+               led-failsafe = &led_power_red;
+               led-running = &led_power_green;
+               led-upgrade = &led_power_green;
+               label-mac-device = &eth0;
        };
 
        extosc: ref {
        leds {
                compatible = "gpio-leds";
 
-               power_green: power_green {
-                       label = "ap-105:green:power";
+               led_power_green: power_green {
+                       label = "green:power";
                        gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
                };
 
-               power_red: power_red {
-                       label = "ap-105:red:power";
+               led_power_red: power_red {
+                       label = "red:power";
                        gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
                        panic-indicator;
                };
 
-               wifi_2g_red: wifi_2g_red {
-                       label = "ap-105:red:wlan2g";
+               wifi_2g_red {
+                       label = "red:wlan2g";
                        gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
                };
 
-               wifi_5g_red: wifi_5g_red {
-                       label = "ap-105:red:wlan5g";
+               wifi_5g_red {
+                       label = "red:wlan5g";
                        gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
                };
        };
                compatible = "gpio-leds";
 
                wifi_2g_green {
-                       label = "ap-105:green:wlan2g";
+                       label = "green:wlan2g";
                        gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy0tpt";
                };
 
                wifi_5g_green {
-                       label = "ap-105:green:wlan5g";
+                       label = "green:wlan5g";
                        gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy1tpt";
                };
                sda-gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
                scl-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
 
-               /* can be removed on 4.19 */
-               gpios = <&gpio 5 GPIO_ACTIVE_LOW>,
-                       <&gpio 4 GPIO_ACTIVE_LOW>;
-
                #address-cells = <1>;
                #size-cells = <0>;
 
 
        ath9k0: wifi@0,11 { /* 2.4 GHz */
                compatible = "pci168c,0029";
-               mtd-mac-address = <&hwinfo 0x1c>;
-               mtd-mac-address-increment = <1>;
+               nvmem-cells = <&macaddr_hwinfo_1c>;
+               nvmem-cell-names = "mac-address";
+               mac-address-increment = <1>;
                reg = <0x8800 0 0 0 0>;
                #gpio-cells = <2>;
                gpio-controller;
 
        ath9k1: wifi@0,12 { /* 5 GHz */
                compatible = "pci168c,0029";
-               mtd-mac-address = <&hwinfo 0x1c>;
-               mtd-mac-address-increment = <2>;
+               nvmem-cells = <&macaddr_hwinfo_1c>;
+               nvmem-cell-names = "mac-address";
+               mac-address-increment = <2>;
                reg = <0x9000 0 0 0 0>;
                #gpio-cells = <2>;
                gpio-controller;
        };
 };
 
-&uart {
-       status = "okay";
-};
-
 &mdio0 {
        status = "okay";
 
 
 &eth0 {
        status = "okay";
-       mtd-mac-address = <&hwinfo 0x1c>;
+       nvmem-cells = <&macaddr_hwinfo_1c>;
+       nvmem-cell-names = "mac-address";
 
        pll-data = <0x00110000 0x00001099 0x00991099>;
 
 
 &spi {
        status = "okay";
-       num-cs = <1>;
 
        flash@0 {
                compatible = "jedec,spi-nor";
                };
        };
 };
+
+&hwinfo {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_hwinfo_1c: macaddr@1c {
+               reg = <0x1c 0x6>;
+       };
+};