ramips: fix pci/pcie related dtc warnings
[openwrt/staging/wigyori.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 #address-cells = <1>;
72 #size-cells = <0>;
73 poll-interval = <20>;
74
75 power {
76 label = "power";
77 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
78 linux,code = <KEY_POWER>;
79 };
80
81 reset {
82 label = "reset";
83 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
84 linux,code = <KEY_RESTART>;
85 };
86
87 aoss {
88 label = "aoss";
89 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
90 linux,code = <KEY_WPS_BUTTON>;
91 };
92
93 auto {
94 label = "mode";
95 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
96 linux,code = <BTN_0>;
97 linux,input-type = <EV_SW>;
98 };
99
100 ap {
101 label = "ap";
102 gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
103 linux,code = <BTN_0>;
104 linux,input-type = <EV_SW>;
105 };
106
107 router {
108 label = "router";
109 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
110 linux,code = <BTN_0>;
111 linux,input-type = <EV_SW>;
112 };
113 };
114
115 gpio_poweroff {
116 compatible = "gpio-poweroff";
117 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
118 };
119 };
120
121 &spi0 {
122 status = "okay";
123
124 m25p80@0 {
125 #address-cells = <1>;
126 #size-cells = <1>;
127 compatible = "jedec,spi-nor";
128 reg = <0>;
129 spi-max-frequency = <10000000>;
130 m25p,chunked-io = <32>;
131
132 partition@0 {
133 label = "u-boot";
134 reg = <0x0 0x30000>;
135 read-only;
136 };
137
138 partition@30000 {
139 label = "u-boot-env";
140 reg = <0x30000 0x10000>;
141 read-only;
142 };
143
144 factory: partition@40000 {
145 label = "factory";
146 reg = <0x40000 0x10000>;
147 read-only;
148 };
149
150 partition@50000 {
151 label = "firmware";
152 reg = <0x50000 0xf90000>;
153 };
154
155 partition@fe0000 {
156 label = "board_data";
157 reg = <0xfe0000 0x20000>;
158 };
159 };
160 };
161
162 &pinctrl {
163 state_default: pinctrl0 {
164 gpio {
165 ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
166 ralink,function = "gpio";
167 };
168 };
169 };
170
171 &pcie {
172 status = "okay";
173 };
174
175 &pcie0 {
176 mt76@0,0 {
177 reg = <0x0000 0 0 0 0>;
178 mediatek,mtd-eeprom = <&factory 0x8000>;
179 ieee80211-freq-limit = <5000000 6000000>;
180 };
181 };
182
183 &pcie1 {
184 mt76@0,0 {
185 reg = <0x0000 0 0 0 0>;
186 mediatek,mtd-eeprom = <&factory 0x0000>;
187 };
188 };
189
190 &xhci {
191 status = "disabled";
192 };