ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / rt2880_airlink101_ar670w.dts
1 /dts-v1/;
2
3 #include "rt2880.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "airlink101,ar670w", "ralink,rt2880-soc";
10         model = "Airlink101 AR670W";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         cfi@bdc00000 {
20                 compatible = "cfi-flash";
21                 reg = <0xbc400000 0x800000>;
22                 bank-width = <2>;
23
24                 partitions {
25                         compatible = "fixed-partitions";
26                         #address-cells = <1>;
27                         #size-cells = <1>;
28
29                         partition@0 {
30                                 reg = <0x0 0x30000>;
31                                 label = "u-boot";
32                                 read-only;
33                         };
34
35                         factory: partition@30000 {
36                                 reg = <0x30000 0x10000>;
37                                 label = "factory";
38                                 read-only;
39                         };
40
41                         partition@40000 {
42                                 compatible = "lzma";
43                                 reg = <0x40000 0x3c0000>;
44                                 label = "firmware";
45                         };
46                 };
47         };
48
49         leds {
50                 compatible = "gpio-leds";
51
52                 led_power: power {
53                         label = "ar670w:green:power";
54                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
55                 };
56
57                 wpsblue {
58                         label = "ar670w:blue:wps";
59                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
60                 };
61         };
62
63         keys {
64                 compatible = "gpio-keys-polled";
65                 poll-interval = <100>;
66
67                 wps {
68                         label = "wps";
69                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
70                         linux,code = <KEY_WPS_BUTTON>;
71                 };
72
73                 reset {
74                         label = "reset";
75                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
76                         linux,code = <KEY_RESTART>;
77                 };
78         };
79 };
80
81 &gpio0 {
82         status = "okay";
83 };
84
85 &pinctrl {
86         state_default: pinctrl0 {
87                 gpio {
88                         ralink,group = "i2c", "spi", "uartlite";
89                         ralink,function = "gpio";
90                 };
91         };
92 };
93
94 &ethernet {
95         status = "okay";
96         mtd-mac-address = <&factory 0x2004>;
97
98         port@0 {
99                 phy-handle = <&phy0>;
100                 phy-mode = "mii";
101         };
102
103         mdio-bus {
104                 status = "okay";
105
106                 phy0: ethernet-phy@0 {
107                         phy-mode = "mii";
108                         reg = <0>;
109                 };
110         };
111 };
112
113 &wmac {
114         status = "okay";
115         ralink,mtd-eeprom = <&factory 0x2000>;
116 };