ramips: mt7620: add missing pci wifi nodes to dts files
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / TINY-AC.dts
index 855f206ba46bf3fefb72add5fb01d0cfd07aea24..d5a232124dbdcea70c49d3b85adbd885be0bcce8 100644 (file)
 /dts-v1/;
 
-/include/ "mt7620a.dtsi"
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
-       compatible = "TINY-AC", "ralink,mt7620a-soc";
+       compatible = "dovado,tiny-ac", "ralink,mt7620a-soc";
        model = "Dovado Tiny AC";
 
        chosen {
                bootargs = "console=ttyS0,57600";
        };
 
-       palmbus@10000000 {
-               gpio0: gpio@600 {
-                       status = "okay";
-               };
+       gpio-leds {
+               compatible = "gpio-leds";
 
-               gpio2: gpio@660 {
-                       status = "okay";
+               usb {
+                       label = "tiny-ac:green:usb";
+                       gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+                       trigger-sources = <&ohci_port1>, <&ehci_port1>;
+                       linux,default-trigger = "usbport";
                };
 
-               gpio3: gpio@688 {
-                       status = "okay";
+               wifi {
+                       label = "tiny-ac:orange:wifi";
+                       gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
                };
+       };
 
-               spi@b00 {
-                       status = "okay";
-
-                       m25p80@0 {
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-                               compatible = "mx25l6405d";
-                               reg = <0 0>;
-                               linux,modalias = "m25p80", "mx25l6405d";
-                               spi-max-frequency = <10000000>;
-
-                               partition@0 {
-                                       label = "u-boot";
-                                       reg = <0x0 0x30000>;
-                                       read-only;
-                               };
-
-                               partition@30000 {
-                                       label = "u-boot-env";
-                                       reg = <0x30000 0x10000>;
-                                       read-only;
-                               };
-
-                               factory: partition@40000 {
-                                       label = "factory";
-                                       reg = <0x40000 0x10000>;
-                                       read-only;
-                               };
-
-                               partition@50000 {
-                                       label = "firmware";
-                                       reg = <0x50000 0x7b0000>;
-                               };
-                       };
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               poll-interval = <20>;
+
+               reset {
+                       label = "reset";
+                       gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
                };
        };
 
-       ehci@101c0000 {
-               status = "okay";
-       };
+       gpio_export {
+               compatible = "gpio-export";
+               #size-cells = <0>;
 
-       ohci@101c1000 {
-               status = "okay";
+               usbpower {
+                       gpio-export,name = "usbpower";
+                       gpio-export,output = <1>;
+                       gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
+               };
        };
+};
 
-       ethernet@10100000 {
-               status = "okay";
-               pinctrl-names = "default";
-               pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
-               mediatek,portmap = "llllw";
+&gpio0 {
+       status = "okay";
+};
 
-               port@4 {
-                       status = "okay";
-                       phy-mode = "rgmii";
-                       phy-handle = <&phy4>;
-               };
+&gpio2 {
+       status = "okay";
+};
 
-               port@5 {
-                       status = "okay";
-                       phy-mode = "rgmii";
-                       phy-handle = <&phy5>;
-               };
+&gpio3 {
+       status = "okay";
+};
 
-               mdio-bus {
-                       status = "okay";
+&spi0 {
+       status = "okay";
 
-                       phy4: ethernet-phy@4 {
-                               reg = <4>;
-                               phy-mode = "rgmii";
+       m25p80@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <10000000>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x30000>;
+                               read-only;
                        };
 
-                       phy5: ethernet-phy@5 {
-                               reg = <5>;
-                               phy-mode = "rgmii";
+                       partition@30000 {
+                               label = "u-boot-env";
+                               reg = <0x30000 0x10000>;
+                               read-only;
+                       };
+
+                       factory: partition@40000 {
+                               label = "factory";
+                               reg = <0x40000 0x10000>;
+                               read-only;
+                       };
+
+                       partition@50000 {
+                               compatible = "denx,uimage";
+                               label = "firmware";
+                               reg = <0x50000 0x7b0000>;
                        };
                };
        };
+};
 
-       gsw@10110000 {
-               mediatek,port4 = "gmac";
-               mediatek,mt7530 = <1>;
+&ehci {
+       status = "okay";
+};
 
-       };
+&ohci {
+       status = "okay";
+};
 
-       wmac@10180000 {
-               ralink,eeprom = "rt2x00pci_1_0.eeprom";
-       };
+&ethernet {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+       mediatek,portmap = "llllw";
 
-       pcie@10140000 {
+       port@4 {
                status = "okay";
+               phy-mode = "rgmii";
+               phy-handle = <&phy4>;
        };
 
-       pinctrl {
-               state_default: pinctrl0 {
-                       gpio {
-                               ralink,group = "uartf", "nd_sd", "wled";
-                               ralink,function = "gpio";
-                       };
-               };
+       port@5 {
+               status = "okay";
+               phy-mode = "rgmii";
+               phy-handle = <&phy5>;
        };
 
-       gpio-leds {
-               compatible = "gpio-leds";
+       mdio-bus {
+               status = "okay";
 
-               usb {
-                       label = "tiny-ac:green:usb";
-                       gpios = <&gpio0 11 1>;
+               phy4: ethernet-phy@4 {
+                       reg = <4>;
+                       phy-mode = "rgmii";
                };
 
-               wifi {
-                       label = "tiny-ac:orange:wifi";
-                       gpios = <&gpio3 0 1>;
+               phy5: ethernet-phy@5 {
+                       reg = <5>;
+                       phy-mode = "rgmii";
                };
-
        };
+};
 
-       gpio-keys-polled {
-               compatible = "gpio-keys-polled";
-               #address-cells = <1>;
-               #size-cells = <0>;
-               poll-interval = <20>;
+&gsw {
+       mediatek,port4 = "gmac";
+};
 
-               reset {
-                       label = "reset";
-                       gpios = <&gpio0 13 1>;
-                       linux,code = <0x198>;
-               };
+&pcie {
+       status = "okay";
+};
 
+&pinctrl {
+       state_default: pinctrl0 {
+               gpio {
+                       ralink,group = "uartf", "nd_sd", "wled";
+                       ralink,function = "gpio";
+               };
        };
+};
 
-       gpio_export {
-               compatible = "gpio-export";
-               #size-cells = <0>;
-
-               usbpower {
-                       gpio-export,name = "usbpower";
-                       gpio-export,output = <1>;
-                       gpios = <&gpio2 5 0>;
-               };
+&pcie0 {
+       mt76@0,0 {
+               reg = <0x0000 0 0 0 0>;
+               mediatek,mtd-eeprom = <&factory 0x8000>;
+               ieee80211-freq-limit = <5000000 6000000>;
        };
 };