ramips: clean up useless dts partition labels
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620a_linksys_e1700.dts
index 6efe9d2b063415e51b10ac52518ddc358a2289fc..caa6780d600a4dc91421550f983c778ce82b32b5 100644 (file)
@@ -1,19 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
- * Device Tree file for the Linksys E1700
- *
  * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
  */
 
-/dts-v1/;
-
 #include "mt7620a.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        compatible = "linksys,e1700", "ralink,mt7620a-soc";
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "e1700:green:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
                };
 
                wan {
-                       label = "e1700:green:wps";
+                       function = LED_FUNCTION_WPS;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
                };
        };
@@ -60,7 +56,7 @@
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
                                read-only;
                        };
 
-                       factory: partition@40000 {
+                       partition@40000 {
                                label = "factory";
                                reg = <0x40000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       eeprom_factory_0: eeprom@0 {
+                                               reg = <0x0 0x200>;
+                                       };
+
+                                       macaddr_factory_28: macaddr@28 {
+                                               reg = <0x28 0x6>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
 };
 
 &ethernet {
-       status = "okay";
-       mtd-mac-address = <&factory 0x28>;
        pinctrl-names = "default";
        pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
 
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
+
        port@5 {
                status = "okay";
                mediatek,fixed-link = <1000 1 1 1>;
 };
 
 &gsw {
-       mediatek,port4 = "gmac";
+       mediatek,ephy-base = /bits/ 8 <12>;
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };