ramips: add support for D-Link COVR-X1860 A1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_mtc_wr1201.dts
index 66b4f92852f38294f821b1bbd35538241b4c08aa..5872a710b886d4e04c0d58e65b1c483aa5ad8684 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "mt7621.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
                label-mac-device = &gmac0;
        };
 
-       chosen {
-               bootargs = "console=ttyS0,57600";
-       };
-
        leds {
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "wr1201:green:power";
+                       label = "green:power";
                        gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
                };
 
                usb {
-                       label = "wr1201:green:usb";
+                       label = "green:usb";
                        gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
                        trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
                        linux,default-trigger = "usbport";
                };
 
                eth_link {
-                       label = "wr1201:green:eth_link";
+                       label = "green:eth_link";
                        gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
                };
 
                wps {
-                       label = "wr1201:green:wps";
+                       label = "green:wps";
                        gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
                };
        };
                        };
 
                        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>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
                        };
 
                        partition@50000 {
        };
 };
 
+&ethernet {
+       pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
+};
+
 &gmac0 {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
                port@4 {
                        status = "okay";
                        label = "wan";
-                       mtd-mac-address = <&factory 0x4>;
-                       mtd-mac-address-increment = <1>;
+                       nvmem-cells = <&macaddr_factory_4>;
+                       nvmem-cell-names = "mac-address";
+                       mac-address-increment = <1>;
                };
        };
 };
 &pcie0 {
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
 
                led {
                        led-sources = <2>;
 &pcie1 {
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
                ieee80211-freq-limit = <2400000 2500000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
 
                led {
                        led-sources = <2>;