ramips: convert most mtd-mac-address cases in DTSI to nvmem
[openwrt/openwrt.git] / target / linux / ramips / dts / rt5350_7links_px-4885.dtsi
index a15d140f3e5b14261c51f742332c83f54a5d3046..2d43e0a30d1f0e8b9b7f563e07012fa1f8ecf3f5 100644 (file)
        };
 };
 
+&spi0 {
+       status = "okay";
+
+       flash@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 0x20000>;
+                               read-only;
+                       };
+
+                       partition@20000 {
+                               label = "devdata";
+                               reg = <0x20000 0x20000>;
+                               read-only;
+                       };
+
+                       devconf: partition@40000 {
+                               label = "devconf";
+                               reg = <0x40000 0x10000>;
+                               read-only;
+                       };
+
+                       firmware: partition@50000 {
+                               compatible = "denx,uimage";
+                               label = "firmware";
+                               /* reg property is set based on flash size in DTS files */
+                       };
+               };
+       };
+};
+
 &state_default {
        gpio {
                groups = "i2c", "jtag", "uartf";
@@ -49,7 +89,8 @@
 };
 
 &ethernet {
-       mtd-mac-address = <&devconf 0x28>;
+       nvmem-cells = <&macaddr_devconf_28>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 &wmac {
        ralink,mtd-eeprom = <&devconf 0x0>;
 };
+
+&devconf {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_devconf_28: macaddr@28 {
+               reg = <0x28 0x6>;
+       };
+};