ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / rt3662_samsung_cy-swr1100.dts
index a25d9d02c198e9eb3724c6b08a98180b41b70171..b022b5c2be709a3b424e1a47b6b400dfc55d58ab 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt3883.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
        model = "Samsung CY-SWR1100";
 
        aliases {
-               led-boot = &led_wps;
-               led-failsafe = &led_wps;
+               led-boot = &led_power;
+               led-failsafe = &led_power;
+               led-running = &led_power;
+               led-upgrade = &led_power;
        };
 
-       nor-flash@1c000000 {
+       flash@1c000000 {
                compatible = "cfi-flash";
                reg = <0x1c000000 0x800000>;
                bank-width = <2>;
                                label = "factory";
                                reg = <0x34000 0x4000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       eeprom_factory_0: eeprom@0 {
+                                               reg = <0x0 0x200>;
+                                       };
+
+                                       eeprom_factory_2000: eeprom@2000 {
+                                               reg = <0x2000 0x200>;
+                                       };
+                               };
                        };
 
                        partition@38000 {
@@ -49,8 +63,9 @@
                        };
 
                        partition@40000 {
-                               label = "devdata";
+                               label = "devconf";
                                reg = <0x40000 0x10000>;
+                               read-only;
                        };
 
                        partition@50000 {
@@ -69,8 +84,7 @@
        };
 
        keys {
-               compatible = "gpio-keys-polled";
-               poll-interval = <100>;
+               compatible = "gpio-keys";
 
                reset {
                        label = "reset";
        leds {
                compatible = "gpio-leds";
 
-               led_wps: wps {
-                       label = "cy-swr1100:blue:wps";
+               wps {
+                       label = "blue:wps";
                        gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
                };
 
                usb {
-                       label = "cy-swr1100:blue:usb";
+                       label = "blue:usb";
                        gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
                        trigger-sources = <&ohci_port1>, <&ehci_port1>;
                        linux,default-trigger = "usbport";
                };
+
+               led_power: power {
+                       label = "blue:power";
+                       gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+               };
        };
 };
 
        status = "okay";
 };
 
-&pinctrl {
-       state_default: pinctrl0 {
-               gpio {
-                       ralink,group = "i2c", "spi";
-                       ralink,function = "gpio";
-               };
+&state_default {
+       gpio {
+               groups = "i2c", "spi";
+               function = "gpio";
        };
 };
 
        status = "okay";
 
        wifi@0,0 {
-               compatible = "pci0,0";
+               compatible = "pci1814,3091";
                reg = <0x10000 0 0 0 0>;
-               ralink,5ghz = <0>;
-               ralink,mtd-eeprom = <&factory 0x2000>;
+               nvmem-cells = <&eeprom_factory_2000>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
 &wmac {
-       status = "okay";
        ralink,2ghz = <0>;
-       ralink,mtd-eeprom = <&factory 0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };
 
 &ehci {