ramips: soc wmac eeprom cleanup
authorJohn Crispin <blogic@openwrt.org>
Thu, 17 Jul 2014 10:55:31 +0000 (10:55 +0000)
committerJohn Crispin <blogic@openwrt.org>
Thu, 17 Jul 2014 10:55:31 +0000 (10:55 +0000)
Move eeprom extraction from scripts to dts files.
Additionally there are few other changes like:
- whitespace fixes
- add partition labels where needed
- BR6524N board doesn't exist (lost in translation?)
- fix Edimax 3g-6200nl model
- add wmac eeprom to dts for Asus RT-N14U board

Compile tested all subtargets and their profiles.
Run tested on:
- Asus RT-N15
- Asus RT-N14U
- Buffalo WHR-600D
- Argus ATP52B
- Sparklan WCR-150GN

Few problems noted:
- many boards didn't have wmac eeprom information defined at all
- several boards don't have any patitions defined (see FIXME comments in dts)

Signed-off-by: Roman Yeryomin <roman@advem.lv>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41680 3c298f89-4303-0410-b956-a3cf2f4a3e73

90 files changed:
target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
target/linux/ramips/base-files/lib/ramips.sh
target/linux/ramips/dts/3G-6200N.dts
target/linux/ramips/dts/3G-6200NL.dts
target/linux/ramips/dts/3G300M.dts
target/linux/ramips/dts/AIR3GII.dts
target/linux/ramips/dts/ALL0239-3G.dts
target/linux/ramips/dts/ALL0256N-4M.dts
target/linux/ramips/dts/ALL0256N-8M.dts
target/linux/ramips/dts/ALL5002.dts
target/linux/ramips/dts/ALL5003.dts
target/linux/ramips/dts/ARGUS_ATP52B.dts
target/linux/ramips/dts/ASL26555-16M.dts
target/linux/ramips/dts/ASL26555-8M.dts
target/linux/ramips/dts/AWAPN2403.dts
target/linux/ramips/dts/AWM002-EVB-4M.dts
target/linux/ramips/dts/AWM002-EVB-8M.dts
target/linux/ramips/dts/BC2.dts
target/linux/ramips/dts/BR-6425.dts
target/linux/ramips/dts/BR-6475ND.dts
target/linux/ramips/dts/BROADWAY.dts
target/linux/ramips/dts/CARAMBOLA.dts
target/linux/ramips/dts/CY-SWR1100.dts
target/linux/ramips/dts/D105.dts
target/linux/ramips/dts/DAP-1350.dts
target/linux/ramips/dts/DCS-930.dts
target/linux/ramips/dts/DIR-300-B1.dts
target/linux/ramips/dts/DIR-300-B7.dts
target/linux/ramips/dts/DIR-320-B1.dts
target/linux/ramips/dts/DIR-600-B1.dts
target/linux/ramips/dts/DIR-600-B2.dts
target/linux/ramips/dts/DIR-610-A1.dts
target/linux/ramips/dts/DIR-615-D.dts
target/linux/ramips/dts/DIR-615-H1.dts
target/linux/ramips/dts/DIR-620-A1.dts
target/linux/ramips/dts/DIR-620-D1.dts
target/linux/ramips/dts/DIR-645.dts
target/linux/ramips/dts/ESR-9753.dts
target/linux/ramips/dts/F5D8235_V1.dts
target/linux/ramips/dts/F5D8235_V2.dts
target/linux/ramips/dts/F7C027.dts
target/linux/ramips/dts/FONERA20N.dts
target/linux/ramips/dts/FREESTATION5.dts
target/linux/ramips/dts/HG255D.dts
target/linux/ramips/dts/HW550-3G.dts
target/linux/ramips/dts/MOFI3500-3GN.dts
target/linux/ramips/dts/MPRA1.dts
target/linux/ramips/dts/MPRA2.dts
target/linux/ramips/dts/MZK-750DHP.dts
target/linux/ramips/dts/MZK-W300NH2.dts
target/linux/ramips/dts/NBG-419N.dts
target/linux/ramips/dts/NCS601W.dts
target/linux/ramips/dts/NW718.dts
target/linux/ramips/dts/OMNI-EMB-HPM.dts
target/linux/ramips/dts/OMNI-EMB.dts
target/linux/ramips/dts/PSR-680W.dts
target/linux/ramips/dts/PWH2004.dts
target/linux/ramips/dts/RT-G32-B1.dts
target/linux/ramips/dts/RT-N10-PLUS.dts
target/linux/ramips/dts/RT-N13U.dts
target/linux/ramips/dts/RT-N14U.dts
target/linux/ramips/dts/RT-N15.dts
target/linux/ramips/dts/RTN56U.dts
target/linux/ramips/dts/RUT5XX.dts
target/linux/ramips/dts/SL-R7205.dts
target/linux/ramips/dts/UR-326N4G.dts
target/linux/ramips/dts/UR-336UN.dts
target/linux/ramips/dts/V11STFE.dts
target/linux/ramips/dts/V22RW-2X2.dts
target/linux/ramips/dts/W150M.dts
target/linux/ramips/dts/W306R_V20.dts
target/linux/ramips/dts/W502U.dts
target/linux/ramips/dts/WCR150GN.dts
target/linux/ramips/dts/WHR-1166D.dts
target/linux/ramips/dts/WHR-300HP2.dts
target/linux/ramips/dts/WHR-600D.dts
target/linux/ramips/dts/WHR-G300N.dts
target/linux/ramips/dts/WL-351.dts
target/linux/ramips/dts/WL341V3.dts
target/linux/ramips/dts/WLI-TX4-AG300N.dts
target/linux/ramips/dts/WL_330N.dts
target/linux/ramips/dts/WL_330N3G.dts
target/linux/ramips/dts/WMR300.dts
target/linux/ramips/dts/WNCE2001.dts
target/linux/ramips/dts/WR512-3GN-4M.dts
target/linux/ramips/dts/WR512-3GN-8M.dts
target/linux/ramips/dts/WR6202.dts
target/linux/ramips/dts/WR8305RT.dts
target/linux/ramips/dts/WRTNODE.dts
target/linux/ramips/dts/XDXRN502J.dts

index 18a0448..2a5a80c 100644 (file)
@@ -31,112 +31,8 @@ board=$(ramips_board_name)
 case "$FIRMWARE" in
 "soc_wmac.eeprom")
        case $board in
-       asl26555 | \
-       dir-300-b1 | \
-       dir-600-b1 | \
-       dir-600-b2 | \
-       dir-610-a1 | \
-       dir-615-d)
-               rt2x00_eeprom_extract "devdata" 16384 512
-               ;;
-
-       dap-1350)
-               rt2x00_eeprom_extract "devdata" 0 512
-               ;;
-
-       rt-n10-plus | \
-       rt-g32-b1)
-               rt2x00_eeprom_extract "devconf" 0 512
-               ;;
-
-       f5d8235-v1 | \
-       f5d8235-v2)
-               rt2x00_eeprom_extract "u-boot" 262144 512
-               ;;
-
-       3g-6200n | \
-       3g-6200nl | \
-       3g300m | \
-       air3gii | \
-       all0239-3g | \
-       all0256n | \
-       all5002 | \
-       all5003 | \
-       argus-atp52b | \
-       awm002-evb | \
-       awapn2403 | \
-       bc2 | \
-       br6425 | \
-       br-6475nd | \
-       broadway | \
-       br6524n | \
-       carambola | \
-       cy-swr1100 | \
-       d105 | \
-       dcs-930 | \
-       dir-300-b7 | \
-       dir-320-b1 | \
-       dir-615-h1 | \
-       dir-620-a1 | \
-       dir-620-d1 | \
-       dir-645 | \
-       esr-9753 | \
-       f7c027 | \
-       fonera20n | \
-       rt-n13u | \
-       freestation5 | \
-       hlk-rm04 | \
-       hw550-3g | \
-       mofi3500-3gn | \
-       mpr-a1 | \
-       mpr-a2 | \
-       mzk-750dhp | \
-       pwh2004 | \
-       ncs601w | \
-       nbg-419n | \
-       nw718 | \
-       omni-emb | \
-       omni-emb-hpm | \
-       psr-680w | \
-       px4885 | \
-       rt-n15 | \
-       rt-n56u | \
-       rut5xx | \
-       sl-r7205 | \
-       v11st-fe | \
-       v22rw-2x2 | \
-       w306r-v20 | \
-       w150m | \
-       w502u | \
-       wcr-150gn | \
-       whr-g300n | \
-       whr-300hp2 | \
-       whr-600d | \
-       whr-1166d | \
-       wl-330n | \
-       wl-330n3g | \
-       wl-351 | \
-       wli-tx4-ag300n | \
-       wmr300 | \
-       wnce2001 | \
-       wr512-3gn | \
-       wr6202 | \
-       wr8305rt | \
-       wrtnode | \
-       mzk-w300nh2 | \
-       ur-326n4g | \
-       ur-336un | \
-       xdxrn502j | \
-       hg255d)
-               rt2x00_eeprom_extract "factory" 0 512
-               ;;
-
-       wl341v3)
-               rt2x00_eeprom_extract "board-nvram" 64880 512
-               ;;
-
        *)
-               rt2x00_eeprom_die "board $board is not supported yet"
+               rt2x00_eeprom_die "Please define mtd-eeprom in $board DTS file!"
                ;;
        esac
        ;;
index 2e831d2..f9ab1e3 100755 (executable)
@@ -58,9 +58,6 @@ ramips_board_detect() {
        *"AsiaRF AWAPN2403")
                name="awapn2403"
                ;;
-       *"BR6524N")
-               name="br6524n"
-               ;;
        *"Asus WL-330N")
                name="wl-330n"
                ;;
index 0be8c72..a19ed45 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                power {
index 2658061..6a2f46f 100644 (file)
@@ -3,8 +3,8 @@
 /include/ "rt3050.dtsi"
 
 / {
-       compatible = "3G-6200N", "ralink,rt3050-soc";
-       model = "Edimax 3g-6200n";
+       compatible = "3G-6200NL", "ralink,rt3050-soc";
+       model = "Edimax 3g-6200nl";
 
        pinctrl {
                state_default: pinctrl0 {
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                wlan {
index 93e864f..5095927 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index 1276574..4a26546 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                wlan {
index fe1eba9..4da69a7 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                usb {
index e92118f..581934a 100644 (file)
                ralink,portmap = <0x3f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                rssilow {
index 6a704f1..c4815d9 100644 (file)
                ralink,portmap = <0x3f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                rssilow {
index 827e9df..7c19571 100644 (file)
                ralink,portmap = <0x3f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        ehci@101c0000 {
                status = "okay";
        };
index d599e71..0d21508 100644 (file)
                ralink,portmap = <0x3f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        ehci@101c0000 {
                status = "okay";
        };
index fb04f01..66108b1 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index 568d8f9..bd45bc3 100644 (file)
@@ -50,7 +50,7 @@
                                        reg = <0xfe0000 0x10000>;
                                        read-only;
                                };
-                               partition@ff0000 {
+                               devdata: partition@ff0000 {
                                        label = "devdata";
                                        reg = <0xff0000 0x10000>;
                                        read-only;
                ralink,portmap = <0x1e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&devdata 0x4000>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index 1ddbb1c..d7e424d 100644 (file)
                ralink,portmap = <0x1e>;
        };
 
+       /* devdata partition seems to be missing */
+/*     wmac@10180000 {
+               ralink,mtd-eeprom = <&devdata 0x4000>;
+       };
+*/
        otg@101c0000 {
                status = "okay";
        };
index 068c800..2de0402 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                link {
index 61b2d76..12887d8 100644 (file)
@@ -5,6 +5,10 @@
 / {
        model = "AsiaRF AWM002 EVB";
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                tx {
index dd1ce4c..3be34bf 100644 (file)
@@ -5,6 +5,10 @@
 / {
        model = "AsiaRF AWM002 EVB";
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                tx {
index 54adbaf..0524f2d 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index 7df63c6..6f836c8 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                power {
index b348889..60b8525 100644 (file)
                };
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        pci@10140000 {
                status = "okay";
 
index 25e3b89..db86f97 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                diskmounted {
index 520450a..c33ed42 100644 (file)
                ralink,portmap = <0x3f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index d0cc0e5..2e0af38 100644 (file)
@@ -49,6 +49,7 @@
 
        wmac@10180000 {
                status = "okay";
+               ralink,mtd-eeprom = <&factory 0>;
        };
 
        ehci@101c0000 {
index c19e0da..42f6fd3 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index 1fd9e9a..0513f57 100644 (file)
@@ -34,7 +34,7 @@
                        read-only;
                };
 
-               partition@30000 {
+               devdata: partition@30000 {
                        label = "devdata";
                        reg = <0x30000 0x10000>;
                        read-only;
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&devdata 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                power {
index 8876d9b..a497c04 100644 (file)
                };
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index 8c5fc52..621bf08 100644 (file)
@@ -30,7 +30,7 @@
                        read-only;
                };
 
-               partition@30000 {
+               devdata: partition@30000 {
                        label = "devdata";
                        reg = <0x30000 0x10000>;
                        read-only;
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&devdata 0x4000>;
+       };
+
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
index 492fd4c..c1a1385 100644 (file)
                 };
         };
 
-        wmac@10180000 {
-                status = "okay";
+       wmac@10180000 {
+               status = "okay";
                ralink,led-polarity = <1>;
-        };
+               ralink,mtd-eeprom = <&factory 0>;
+       };
 };
 
index 34d7944..8ec07c2 100644 (file)
                ralink,led_polarity = <0x17>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                status {
index aa9309f..1790379 100644 (file)
@@ -30,7 +30,7 @@
                        read-only;
                };
 
-               partition@30000 {
+               devdata: partition@30000 {
                        label = "devdata";
                        reg = <0x30000 0x10000>;
                        read-only;
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&devdata 0x4000>;
+       };
+
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
index f982ae0..70e4a50 100644 (file)
@@ -30,7 +30,7 @@
                        read-only;
                };
 
-               partition@30000 {
+               devdata: partition@30000 {
                        label = "devdata";
                        reg = <0x30000 0x10000>;
                        read-only;
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&devdata 0x4000>;
+       };
+
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
index e6c1041..9893e7a 100644 (file)
@@ -65,7 +65,7 @@
        wmac@10180000 {
                status = "okay";
                ralink,led-polarity = <1>;
-               ralink,mtd-eeprom = <&devdata 16384>;
+               ralink,mtd-eeprom = <&devdata 0x4000>;
        };
 
        gpio-leds {
index b27bca0..1a67b2d 100644 (file)
@@ -30,7 +30,7 @@
                        read-only;
                };
 
-               partition@30000 {
+               devdata: partition@30000 {
                        label = "devdata";
                        reg = <0x30000 0x10000>;
                        read-only;
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&devdata 0x4000>;
+       };
+
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
index 13d7f88..1165ff1 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                status {
index 070edaf..1ffa829 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
index c8632f0..e4eeb3e 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                status {
index 938055c..0a9d83f 100644 (file)
@@ -71,6 +71,7 @@
 
        wmac@10180000 {
                ralink,5ghz = <0>;
+               ralink,mtd-eeprom = <&factory 0>;
        };
 
        ehci@101c0000 {
index 3760a46..39e4232 100644 (file)
@@ -84,4 +84,8 @@
        esw@10110000 {
                ralink,portmap = <0x3e>;
        };
+
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
 };
index 0d1e9a8..9026d82 100644 (file)
                };
        };
 
-       wmac@480000 {
+       /* FIXME: no u-boot partition and 0x40000@uboot is out of boundaries */
+/*     wmac@480000 {
                status = "okay";
+               ralink,mtd-eeprom = <&u-boot 0x40000>;
        };
-
+*/
        rtl8367s {
                compatible = "realtek,rtl8367s";
                gpio-sda = <&gpio0 1 0>;
index 1b96cea..7eaf165 100644 (file)
@@ -25,7 +25,7 @@
                #size-cells = <1>;
 
                uboot: partition@0 {
-                       label = "u-boot";
+                       label = "uboot";
                        reg = <0x0 0x50000>;
                        read-only;
                };
                ralink,portmap = <0x3f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&uboot 0x40000>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index ea71625..f660ff8 100644 (file)
                };
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        pinctrl {
                state_default: pinctrl0 {
                        gpio {
index bb85bab..2e01457 100644 (file)
                };
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index 603ec36..b221ae4 100644 (file)
                ralink,portmap = <0x01>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index 7496ca5..41b7ddd 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index d107b55..3be3fce 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                usb {
index 058b7a2..b988dd0 100644 (file)
@@ -96,6 +96,7 @@
 
        wmac@10180000 {
                status = "okay";
+               ralink,mtd-eeprom = <&factory 0>;
        };
 
        otg@101c0000 {
index a869427..9b4ee34 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        ehci@101c0000 {
                status = "okay";
        };
index 4414141..56d6f51 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        ehci@101c0000 {
                status = "okay";
        };
index e251187..a32a1cd 100644 (file)
                ralink,port4 = "ephy";
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        pcie@10140000 {
                status = "okay";
        };
index 43a98ce..790092e 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                power {
index 07c5b3c..6ef27d0 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                power {
index dcf0e72..9f3121b 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        ehci@101c0000 {
                status = "okay";
        };
index c67b832..fa49bf1 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                cpu {
index ed94c5f..4f4ecd4 100644 (file)
                };
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        ehci@101c0000 {
                status = "okay";
        };
index 146e79b..c8bff4d 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index 62e5f72..509787a 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                wan {
index bee5e0f..f94370f 100644 (file)
@@ -75,4 +75,8 @@
        esw@10110000 {
                ralink,portmap = <0x2f>;
        };
+
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
 };
index 5b4aebc..396e683 100644 (file)
@@ -29,7 +29,7 @@
                                        read-only;
                                };
 
-                               factory: partition@40000 {
+                               devconf: partition@40000 {
                                        label = "devconf";
                                        reg = <0x40000 0x10000>;
                                        read-only;
        };
 
        ethernet@10100000 {
-               mtd-mac-address = <&factory 0x4>;
+               mtd-mac-address = <&devconf 0x4>;
        };
 
        esw@10110000 {
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&devconf 0>;
+       };
+
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
index 0606ccb..b51030c 100644 (file)
@@ -27,7 +27,7 @@
                        read-only;
                };
 
-               partition@40000 {
+               devconf: partition@40000 {
                        label = "devconf";
                        reg = <0x40000 0x10000>;
                        read-only;
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&devconf 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                wps {
index ed34485..cac0d94 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index d95365b..66ac0fc 100644 (file)
                ralink,port-map = "wllll";
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        pinctrl {
                state_default: pinctrl0 {
                        default {
index 8936520..23842d4 100644 (file)
                gpio-sck = <&gpio0 2 0>;
        };
 
+       wmac@480000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
index 305e36e..4b72583 100644 (file)
@@ -56,7 +56,7 @@
        wmac@10180000 {
                status = "okay";
                ralink,2ghz = <0>;
-               ralink,eeprom = "soc_wmac.eeprom";
+               ralink,mtd-eeprom = <&factory 0>;
        };
 
        ehci@101c0000 {
index 530b8b1..9ae6997 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                status {
index 24bf940..574de55 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                wifi {
index 4af10bb..021efe5 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                3g {
index 5ce7fa9..81d0be0 100644 (file)
                #size-cells = <1>;
        };
 
-       ethernet@10100000 {
+       /* FIXME: no partitions defined */
+/*     ethernet@10100000 {
                mtd-mac-address = <&factory 0x4004>;
        };
-
+*/
        esw@10110000 {
                ralink,portmap = <0x2f>;
        };
 
+       /* FIXME: no partitions defined */
+/*     wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+*/
        gpio-leds {
                compatible = "gpio-leds";
                3g {
index 54ead08..6fa6aa5 100644 (file)
                status = "okay";
        };
 
+       wmac@480000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        pci@10140000 {
                status = "okay";
 
@@ -54,7 +58,7 @@
                        read-only;
                };
 
-               partition@40000 {
+               factory: partition@40000 {
                        reg = <0x00040000 0x00010000>;
                        label = "factory";
                        read-only;
index 99e748e..7eff596 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                security {
index f3ab719..915fb21 100644 (file)
        esw@10110000 {
                ralink,portmap = <0x2f>;
        };
+
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
 };
index 3f57b35..1c2cf6a 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                sys {
index af448eb..6d3282e 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                usb {
index 976754e..2a4fa11 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index 47e0b1b..d62be1e 100644 (file)
                ralink,port4 = "ephy";
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        pcie@10140000 {
                status = "okay";
        };
index 28917fe..f3f2a93 100644 (file)
                ralink,port4 = "ephy";
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                power {
index df38b8c..5b4b900 100644 (file)
                ralink,port4 = "ephy";
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        pcie@10140000 {
                status = "okay";
        };
index 8cec31e..3054131 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       /* FIXME: no partitions defined */
+/*     wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+*/
        gpio-leds {
                compatible = "gpio-leds";
                diag {
index 1e6705c..fd30160 100644 (file)
                ralink,fpa2 = <0x1f003fff>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index 70317c7..1271cfa 100644 (file)
@@ -21,7 +21,7 @@
                        read-only;
                };
 
-               partition@20000 {
+               boardnvram: partition@20000 {
                        label = "board-nvram";
                        reg = <0x20000 0x10000>;
                        read-only;
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&boardnvram 0xfd70>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                first {
index 063caed..b144ca9 100644 (file)
                };
        };
 
+       wmac@480000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
index 4fc4368..999a29d 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                link {
index 1c88ed3..3b29104 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                3g {
index 56cf6a6..b6bce43 100644 (file)
                ralink,port-map = "wllll";
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        pinctrl {
                state_default: pinctrl0 {
                        default {
index 10910af..d8a3b0b 100644 (file)
                mtd-mac-address = <&factory 0x28>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                power-green {
index fccd04a..0098970 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                3g {
index 01da523..20a325c 100644 (file)
                ralink,portmap = <0x2f>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                3g {
index ed3e708..a769a98 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        otg@101c0000 {
                status = "okay";
        };
index 81653f5..c28e422 100644 (file)
                ralink,port-map = "llllw";
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        pinctrl {
                state_default: pinctrl0 {
                        ephy {
index 2e0b71b..3fb2303 100644 (file)
                ralink,port-map = "wllll";
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        pinctrl {
                state_default: pinctrl0 {
                        default {
index 628324c..000f9db 100644 (file)
                ralink,portmap = <0x3e>;
        };
 
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
                wifi {