ramips: add support for Amped Wireless B1200EX
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7620a_edimax_ew-747x.dtsi
index 11cf9bb291f0925465c5b9d2e82b1e729a70c03b..abac0208d0722b4263655e8c84504bc15b422833 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
        compatible = "ralink,mt7620a-soc";
                led-upgrade = &led_power;
        };
 
-       chosen {
-               bootargs = "console=ttyS0,57600";
-       };
-
        keys {
                compatible = "gpio-keys";
 
                        gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
+       };
+
+       leds {
+               compatible = "gpio-leds";
 
-               switch_high {
-                       label = "switch high";
-                       gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
-                       linux,code = <BTN_0>;
-                       linux,input-type = <EV_SW>;
+               led_power: power {
+                       label = "green:power";
+                       gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
                };
 
-               switch_off {
-                       label = "switch off";
-                       gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
-                       linux,code = <BTN_1>;
-                       linux,input-type = <EV_SW>;
+               lan {
+                       label = "green:lan";
+                       gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
+               };
+
+               wps {
+                       label = "green:wps";
+                       gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
                };
        };
 };
@@ -90,7 +92,9 @@
                        };
 
                        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>;
                        };
 };
 
 &ethernet {
-       status = "okay";
-
-       mtd-mac-address = <&factory 0x4>;
-
        pinctrl-names = "default";
        pinctrl-0 = <&rgmii1_pins &mdio_pins &phy_reset_pins>;
 
-       mediatek,mdio-mode = <1>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 
        phy-reset-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
        phy-reset-duration = <30>;
 };
 
 &gsw {
-       mediatek,port5 = "gmac";
+       mediatek,ephy-base = /bits/ 8 <8>;
 };
 
 &wmac {
        ralink,mtd-eeprom = <&factory 0x0>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 };
 
 &pcie {
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&factory 0x8000>;
-               mediatek,2ghz = <0>;
+               ieee80211-freq-limit = <5000000 6000000>;
+               nvmem-cells = <&macaddr_factory_4>;
+               nvmem-cell-names = "mac-address";
+               mac-address-increment = <2>;
+       };
+};
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_4: macaddr@4 {
+               reg = <0x4 0x6>;
        };
 };