ramips: clean up useless dts partition labels
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_edimax_ew-7478apc.dts
index 9d59755ac8718b7afe5f0b5aefd74477d8b816c4..091f6ecd784c5786b7f25f68839c74cffd5cec50 100644 (file)
@@ -4,6 +4,8 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
        compatible = "edimax,ew-7478apc", "ralink,mt7620a-soc";
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "ew-7478apc:white:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_WHITE>;
                        gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
                };
 
                internet {
-                       label = "ew-7478apc:blue:internet";
+                       label = "blue:internet";
                        gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
                };
 
                wlan {
-                       label = "ew-7478apc:blue:wlan";
+                       function = LED_FUNCTION_WLAN;
+                       color = <LED_COLOR_ID_BLUE>;
                        gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
                };
 
                usb {
-                       label = "ew-7478apc:blue:usb";
+                       function = LED_FUNCTION_USB;
+                       color = <LED_COLOR_ID_BLUE>;
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                        trigger-sources = <&ohci_port1>, <&ehci_port1>;
                        linux,default-trigger = "usbport";
                                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>;
+                                       };
+
+                                       eeprom_factory_8000: eeprom@8000 {
+                                               reg = <0x8000 0x200>;
+                                       };
+
+                                       macaddr_factory_4: macaddr@4 {
+                                               reg = <0x4 0x6>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
                        };
 
                        partition@70000 {
-                               compatible = "edimax,uimage";
+                               compatible = "openwrt,uimage", "denx,uimage";
+                               openwrt,offset = <FW_EDIMAX_OFFSET>;
+                               openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
                                label = "firmware";
                                reg = <0x00070000 0x00790000>;
                        };
        pinctrl-names = "default";
        pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
 
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 
        mediatek,portmap = "wllll";
 
 };
 
 &gsw {
-       mediatek,port4 = "gmac";
+       mediatek,ephy-base = /bits/ 8 <12>;
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0x0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };
 
 &pcie {
 &pcie0 {
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
-               mediatek,2ghz = <0>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
+               ieee80211-freq-limit = <5000000 6000000>;
        };
 };