ramips: fix Gigabit Ethernet port of the HiWiFi HC5861
[openwrt/openwrt.git] / target / linux / ramips / dts / rt5350_hilink_hlk-rm04.dts
index 7b2791fa62d0365f838eaa827eea3ae8b775c653..c4f785d0308ba77b7be358595441909cc71307c2 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt5350.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
@@ -9,11 +7,6 @@
        compatible = "hilink,hlk-rm04", "ralink,rt5350-soc";
        model = "HILINK HLK-RM04";
 
-       memory@0 {
-               device_type = "memory";
-               reg = <0x0 0x1000000>;
-       };
-
        chosen {
                bootargs = "console=ttyS1,57600";
        };
@@ -60,7 +53,7 @@
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
                        };
 
                        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 0x200>;
+                               };
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
                        };
 
                        partition@50000 {
        };
 };
 
-&pinctrl {
-       state_default: pinctrl0 {
-               gpio {
-                       ralink,group = "i2c", "jtag";
-                       ralink,function = "gpio";
-               };
+&state_default {
+       gpio {
+               groups = "i2c", "jtag";
+               function = "gpio";
+       };
 
-               uartf_gpio {
-                       ralink,group = "uartf";
-                       ralink,function = "gpio uartf";
-               };
+       uartf_gpio {
+               groups = "uartf";
+               function = "gpio uartf";
        };
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0>;
-};
-
-&ehci {
-       status = "okay";
-};
-
-&ohci {
-       status = "okay";
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };