ramips: cleanup SPI flash device tree properties usage
[openwrt/openwrt.git] / target / linux / ramips / dts / WHR-1166D.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8 compatible = "ralink,mt7620a-soc";
9 model = "Buffalo WHR-1166D";
10
11 gpio-leds {
12 compatible = "gpio-leds";
13
14 power {
15 label = "whr-1166d:red:power";
16 gpios = <&gpio0 7 1>;
17 };
18
19 wifi {
20 label = "whr-1166d:green:wifi";
21 gpios = <&gpio0 8 1>;
22 };
23
24 power2 {
25 label = "whr-1166d:green:power";
26 gpios = <&gpio0 9 1>;
27 };
28
29 wifi2 {
30 label = "whr-1166d:orange:wifi";
31 gpios = <&gpio0 10 1>;
32 };
33
34 internet {
35 label = "whr-1166d:green:internet";
36 gpios = <&gpio2 17 1>;
37 };
38
39 router {
40 label = "whr-1166d:orange:router";
41 gpios = <&gpio2 18 1>;
42 };
43
44 router2 {
45 label = "whr-1166d:green:router";
46 gpios = <&gpio2 19 1>;
47 };
48 };
49
50 gpio-keys-polled {
51 compatible = "gpio-keys-polled";
52 #address-cells = <1>;
53 #size-cells = <0>;
54 poll-interval = <20>;
55
56 reset {
57 label = "reset";
58 gpios = <&gpio2 12 1>;
59 linux,code = <KEY_RESTART>;
60 };
61
62 aoss {
63 label = "aoss";
64 gpios = <&gpio2 13 1>;
65 linux,code = <KEY_WPS_BUTTON>;
66 };
67
68 ap {
69 label = "ap";
70 gpios = <&gpio2 14 1>;
71 linux,code = <BTN_0>;
72 linux,input-type = <EV_SW>;
73 };
74
75 bridge {
76 label = "bridge";
77 gpios = <&gpio2 15 1>;
78 linux,code = <BTN_0>;
79 linux,input-type = <EV_SW>;
80 };
81 };
82 };
83
84 &gpio2 {
85 status = "okay";
86 };
87
88 &spi0 {
89 status = "okay";
90
91 m25p80@0 {
92 #address-cells = <1>;
93 #size-cells = <1>;
94 compatible = "jedec,spi-nor";
95 reg = <0>;
96 spi-max-frequency = <10000000>;
97
98 partition@0 {
99 label = "u-boot";
100 reg = <0x0 0x30000>;
101 read-only;
102 };
103
104 partition@30000 {
105 label = "u-boot-env";
106 reg = <0x30000 0x10000>;
107 read-only;
108 };
109
110 factory: partition@40000 {
111 label = "factory";
112 reg = <0x40000 0x10000>;
113 read-only;
114 };
115
116 partition@50000 {
117 label = "firmware";
118 reg = <0x50000 0xfb0000>;
119 };
120 };
121 };
122
123 &pinctrl {
124 state_default: pinctrl0 {
125 gpio {
126 ralink,group = "i2c", "uartf", "wled", "nd_sd";
127 ralink,function = "gpio";
128 };
129 };
130 };
131
132 &ethernet {
133 pinctrl-names = "default";
134 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
135
136 port@5 {
137 status = "okay";
138 phy-handle = <&phy5>;
139 phy-mode = "rgmii";
140 };
141
142 mdio-bus {
143 status = "okay";
144
145 phy5: ethernet-phy@5 {
146 reg = <5>;
147 phy-mode = "rgmii";
148 };
149 };
150 };
151
152 &gsw {
153 mediatek,port4 = "ephy";
154 };
155
156 &wmac {
157 ralink,mtd-eeprom = <&factory 0>;
158 };
159
160 &pcie {
161 status = "okay";
162
163 pcie-bridge {
164 wifi@0,0 {
165 compatible = "pci0,0";
166 reg = <0x0000 0 0 0 0>;
167 mediatek,mtd-eeprom = <&factory 0x8000>;
168 ieee80211-freq-limit = <5000000 6000000>;
169 };
170 };
171 };