ramips: cleanup SPI flash device tree properties usage
[openwrt/openwrt.git] / target / linux / ramips / dts / OY-0001.dts
index b008afd1d7b00ebde84e5a1d6e6fb149e6135908..ff6fe1e2e22009f417b87cf3ecd9abcd08c5b22c 100644 (file)
@@ -1,6 +1,8 @@
 /dts-v1/;
 
-/include/ "mt7620a.dtsi"
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/input/input.h>
 
 / {
        compatible = "ralink,mt7620a-soc";
                bootargs = "console=ttyS0,115200";
        };
 
-       palmbus@10000000 {
-               gpio2: gpio@660 {
-                       status = "okay";
-               };
+       gpio-leds {
+               compatible = "gpio-leds";
 
-               gpio3: gpio@688 {
-                       status = "okay";
+               powerled {
+                       label = "oy-0001:green:power";
+                       gpios = <&gpio0 9 1>;
                };
 
-               spi@b00 {
-                       status = "okay";
-
-                       m25p80@0 {
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-                               compatible = "w25q128";
-                               reg = <0 0>;
-                               linux,modalias = "m25p80", "w25q128";
-                               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 0xfb0000>;
-                               };
-
-                       };
+               wifiled {
+                       label = "oy-0001:green:wifi";
+                       gpios = <&gpio3 0 1>;
                };
        };
 
-       pinctrl {
-               state_default: pinctrl0 {
-                       gpio {
-                               ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
-                               ralink,function = "gpio";
-                       };
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+
+               s1 {
+                       label = "reset";
+                       gpios = <&gpio0 1 1>;
+                       linux,code = <KEY_RESTART>;
                };
        };
+};
 
-       ethernet@10100000 {
-               pinctrl-names = "default";
-               pinctrl-0 = <&ephy_pins>;
-               ralink,port-map = "llllw";
-       };
+&gpio2 {
+       status = "okay";
+};
 
-       gsw@10110000 {
-               ralink,port4 = "ephy";
-       };
+&gpio3 {
+       status = "okay";
+};
 
-       wmac@10180000 {
-               ralink,mtd-eeprom = <&factory 0>;
-       };
+&spi0 {
+       status = "okay";
 
-       gpio-leds {
-               compatible = "gpio-leds";
+       m25p80@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <10000000>;
+
+               partition@0 {
+                       label = "u-boot";
+                       reg = <0x0 0x30000>;
+                       read-only;
+               };
 
-               powerled {
-                       label = "oy:green:power";
-                       gpios = <&gpio0 9 1>;
+               partition@30000 {
+                       label = "u-boot-env";
+                       reg = <0x30000 0x10000>;
+                       read-only;
                };
 
-               wifiled {
-                       label = "oy:green:wifi";
-                       gpios = <&gpio3 0 1>;
+               factory: partition@40000 {
+                       label = "factory";
+                       reg = <0x40000 0x10000>;
+                       read-only;
                };
-       };
 
-       sdhci@10130000 {
-               status = "okay";
+               partition@50000 {
+                       label = "firmware";
+                       reg = <0x50000 0xfb0000>;
+               };
        };
+};
 
-       ehci@101c0000 {
-               status = "okay";
+&pinctrl {
+       state_default: pinctrl0 {
+               gpio {
+                       ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
+                       ralink,function = "gpio";
+               };
        };
+};
 
-       ohci@101c1000 {
-               status = "okay";
-       };
+&ethernet {
+       pinctrl-names = "default";
+       pinctrl-0 = <&ephy_pins>;
+       mediatek,portmap = "llllw";
+};
 
-       pcie@10140000 {
-               status = "okay";
-       };
+&gsw {
+       mediatek,port4 = "ephy";
+};
 
-       gpio-keys-polled {
-               compatible = "gpio-keys-polled";
-               #address-cells = <1>;
-               #size-cells = <0>;
-               poll-interval = <20>;
+&wmac {
+       ralink,mtd-eeprom = <&factory 0>;
+};
 
-               s1 {
-                       label = "reset";
-                       gpios = <&gpio0 1 1>;
-                       linux,code = <0x198>;
-               };
-       };
+&sdhci {
+       status = "okay";
+};
+
+&ehci {
+       status = "okay";
+};
+
+&ohci {
+       status = "okay";
+};
+
+&pcie {
+       status = "okay";
 };