ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_buffalo_wsr-1166dhp.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "buffalo,wsr-1166dhp", "mediatek,mt7621-soc";
10         model = "Buffalo WSR-1166DHP";
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         chosen {
20                 bootargs = "console=ttyS0,57600";
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 internet_g {
27                         label = "wsr-1166:green:internet";
28                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
29                 };
30
31                 router_g {
32                         label = "wsr-1166:green:router";
33                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
34                 };
35
36                 router_o {
37                         label = "wsr-1166:orange:router";
38                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
39                 };
40
41                 internet_o {
42                         label = "wsr-1166:orange:internet";
43                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
44                 };
45
46                 wifi_o {
47                         label = "wsr-1166:orange:wifi";
48                         gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
49                 };
50
51                 led_power: power {
52                         label = "wsr-1166:green:power";
53                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
54                 };
55
56                 diag {
57                         label = "wsr-1166:orange:diag";
58                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
59                 };
60
61                 wifi_g {
62                         label = "wsr-1166:green:wifi";
63                         gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
64                 };
65         };
66
67         keys {
68                 compatible = "gpio-keys";
69
70                 power {
71                         label = "power";
72                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
73                         linux,code = <KEY_POWER>;
74                 };
75
76                 reset {
77                         label = "reset";
78                         gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
79                         linux,code = <KEY_RESTART>;
80                 };
81
82                 aoss {
83                         label = "aoss";
84                         gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
85                         linux,code = <KEY_WPS_BUTTON>;
86                 };
87
88                 auto {
89                         label = "mode";
90                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
91                         linux,code = <BTN_0>;
92                         linux,input-type = <EV_SW>;
93                 };
94
95                 ap {
96                         label = "ap";
97                         gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
98                         linux,code = <BTN_0>;
99                         linux,input-type = <EV_SW>;
100                 };
101
102                 router {
103                         label = "router";
104                         gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
105                         linux,code = <BTN_0>;
106                         linux,input-type = <EV_SW>;
107                 };
108         };
109
110         gpio_poweroff {
111                 compatible = "gpio-poweroff";
112                 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
113         };
114 };
115
116 &spi0 {
117         status = "okay";
118
119         m25p80@0 {
120                 compatible = "jedec,spi-nor";
121                 reg = <0>;
122                 spi-max-frequency = <10000000>;
123
124                 partitions {
125                         compatible = "fixed-partitions";
126                         #address-cells = <1>;
127                         #size-cells = <1>;
128
129                         partition@0 {
130                                 label = "u-boot";
131                                 reg = <0x0 0x30000>;
132                                 read-only;
133                         };
134
135                         partition@30000 {
136                                 label = "u-boot-env";
137                                 reg = <0x30000 0x10000>;
138                                 read-only;
139                         };
140
141                         factory: partition@40000 {
142                                 label = "factory";
143                                 reg = <0x40000 0x10000>;
144                                 read-only;
145                         };
146
147                         partition@50000 {
148                                 compatible = "openwrt,trx";
149                                 label = "firmware";
150                                 reg = <0x50000 0xf90000>;
151                         };
152
153                         partition@fe0000 {
154                                 label = "board_data";
155                                 reg = <0xfe0000 0x20000>;
156                         };
157                 };
158         };
159 };
160
161 &pinctrl {
162         state_default: pinctrl0 {
163                 gpio {
164                         ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
165                         ralink,function = "gpio";
166                 };
167         };
168 };
169
170 &pcie {
171         status = "okay";
172 };
173
174 &pcie0 {
175         mt76@0,0 {
176                 reg = <0x0000 0 0 0 0>;
177                 mediatek,mtd-eeprom = <&factory 0x8000>;
178                 ieee80211-freq-limit = <5000000 6000000>;
179         };
180 };
181
182 &pcie1 {
183         mt76@0,0 {
184                 reg = <0x0000 0 0 0 0>;
185                 mediatek,mtd-eeprom = <&factory 0x0000>;
186         };
187 };
188
189 &xhci {
190         status = "disabled";
191 };