ramips: convert MT7628 EEPROM to NVMEM format
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_hilink_hlk-7688a.dts
index 969488e4167970e6b856521ddbe682acf59b8687..5357996e92b285537b44a26c468deeb32f25b490 100644 (file)
@@ -61,6 +61,7 @@
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <40000000>;
+               broken-flash-reset;
 
                partitions {
                        compatible = "fixed-partitions";
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x400>;
+                               };
+
+                               macaddr_factory_28: macaddr@28 {
+                                       reg = <0x28 0x6>;
+                               };
                        };
 
                        partition@50000 {
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x28>;
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 
 &wmac {
        status = "okay";
+
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };