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