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