ramips: mt7628: use nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7628an_iptime.dtsi
index bbd8642f2a5f46a733ffc754d4d3cf7c350ace48..9c98c6f5ca10e2ea386063a8e3f8ade326626f6d 100644 (file)
 
                reset {
                        label = "reset";
-                       gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                        debounce-interval = <60>;
                };
 
                wps {
                        label = "wps";
-                       gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_WPS_BUTTON>;
                        debounce-interval = <60>;
                };
                                label = "u-boot";
                                reg = <0x0 0x20000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_uboot_1fc20: macaddr@1fc20 {
+                                               reg = <0x1fc20 0x6>;
+                                       };
+                               };
                        };
 
                        partition@20000 {
                                label = "factory";
                                reg = <0x30000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       eeprom_factory_0: eeprom@0 {
+                                               reg = <0x0 0x400>;
+                                       };
+
+                                       eeprom_factory_8000: eeprom@8000 {
+                                               reg = <0x8000 0x200>;
+                                       };
+                               };
                        };
 
                        partition@40000 {
        };
 };
 
-&pinctrl {
-       state_default: pinctrl0 {
-               gpio {
-                       ralink,group = "uart1", "wdt";
-                       ralink,function = "gpio";
-               };
+&state_default {
+       gpio {
+               groups = "uart1", "wdt";
+               function = "gpio";
        };
 };
 
 };
 
 &ethernet {
-       mtd-mac-address = <&uboot 0x1fc20>;
+       nvmem-cells = <&macaddr_uboot_1fc20>;
+       nvmem-cell-names = "mac-address";
 };
 
 &pcie {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
 
 &wmac {
        status = "okay";
+
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };