ramips: mt7621: nix mac-address-increment
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_mqmaker_witi.dts
index 87421486a9f02b404171daabe2e2b5f52269064c..0052040f36932132cb430e65c0a2fef4f3063622 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "mt7621.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
@@ -9,22 +7,6 @@
        compatible = "mqmaker,witi", "mediatek,mt7621-soc";
        model = "MQmaker WiTi";
 
-       chosen {
-               bootargs = "console=ttyS0,57600";
-       };
-
-       palmbus: palmbus@1E000000 {
-               i2c@900 {
-                       status = "okay";
-
-                       pcf8563: rtc@51 {
-                               status = "okay";
-                               compatible = "nxp,pcf8563";
-                               reg = <0x51>;
-                       };
-               };
-       };
-
        keys {
                compatible = "gpio-keys";
 
        };
 };
 
+&i2c {
+       status = "okay";
+
+       rtc@51 {
+               status = "okay";
+               compatible = "nxp,pcf8563";
+               reg = <0x51>;
+       };
+};
+
 &sdhci {
        status = "okay";
 };
@@ -43,7 +35,7 @@
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
                        factory: partition@40000 {
                                label = "factory";
                                reg = <0x40000 0x10000>;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       eeprom_factory_0: eeprom@0 {
+                                               reg = <0x0 0x200>;
+                                       };
+
+                                       eeprom_factory_8000: eeprom@8000 {
+                                               reg = <0x8000 0x200>;
+                                       };
+
+                                       macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
+                                               reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
 &pcie0 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
-               mtd-mac-address = <&factory 0xe000>;
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 0>;
+               nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
 &pcie1 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
                ieee80211-freq-limit = <2400000 2500000>;
-               mtd-mac-address = <&factory 0xe000>;
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 0>;
+               nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
 &gmac0 {
-       mtd-mac-address = <&factory 0xe000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+       status = "okay";
+       label = "wan2";
+       phy-mode = "rgmii-rxid";
+       phy-handle = <&ethphy5>;
+
+       nvmem-cells = <&macaddr_factory_e000 1>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy5: ethernet-phy@5 {
+               reg = <5>;
+       };
 };
 
 &switch0 {
 
                port@4 {
                        status = "okay";
-                       label = "wan";
-                       mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       label = "wan1";
+
+                       nvmem-cells = <&macaddr_factory_e000 1>;
+                       nvmem-cell-names = "mac-address";
                };
        };
 };