02987737cd8b4b66c3287dc193dd819fb1e30cc6
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_d-team_pbr-m1.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "d-team,pbr-m1", "mediatek,mt7621-soc";
9 model = "PBR-M1";
10
11 aliases {
12 led-boot = &led_sys;
13 led-failsafe = &led_sys;
14 led-running = &led_sys;
15 led-upgrade = &led_sys;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 power {
26 function = LED_FUNCTION_POWER;
27 color = <LED_COLOR_ID_BLUE>;
28 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
29 default-state = "on";
30 };
31
32 led_sys: sys {
33 label = "blue:sys";
34 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
35 };
36
37 internet {
38 label = "blue:internet";
39 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
40 };
41
42 wlan2g {
43 label = "blue:wlan2g";
44 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
45 };
46
47 wlan5g {
48 label = "blue:wlan5g";
49 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 keys {
54 compatible = "gpio-keys";
55
56 reset {
57 label = "reset";
58 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61 };
62
63 gpio_export {
64 compatible = "gpio-export";
65 #size-cells = <0>;
66
67 power_usb2 {
68 gpio-export,name = "power_usb2";
69 gpio-export,output = <1>;
70 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
71 };
72
73 power_usb3 {
74 gpio-export,name = "power_usb3";
75 gpio-export,output = <1>;
76 gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
77 };
78
79 power_sata {
80 gpio-export,name = "power_sata";
81 gpio-export,output = <1>;
82 gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
83 };
84 };
85
86 beeper: beeper {
87 compatible = "gpio-beeper";
88 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
89 };
90 };
91
92 &i2c {
93 status = "okay";
94
95 rtc@51 {
96 status = "okay";
97 compatible = "nxp,pcf8563";
98 reg = <0x51>;
99 };
100 };
101
102 &sdhci {
103 status = "okay";
104 };
105
106 &spi0 {
107 status = "okay";
108
109 flash@0 {
110 compatible = "jedec,spi-nor";
111 reg = <0>;
112 spi-max-frequency = <50000000>;
113 m25p,fast-read;
114 broken-flash-reset;
115
116 partitions {
117 compatible = "fixed-partitions";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 partition@0 {
122 label = "u-boot";
123 reg = <0x0 0x30000>;
124 read-only;
125 };
126
127 partition@30000 {
128 label = "u-boot-env";
129 reg = <0x30000 0x10000>;
130 read-only;
131 };
132
133 factory: partition@40000 {
134 label = "factory";
135 reg = <0x40000 0x10000>;
136 read-only;
137
138 nvmem-layout {
139 compatible = "fixed-layout";
140 #address-cells = <1>;
141 #size-cells = <1>;
142
143 eeprom_factory_0: eeprom@0 {
144 reg = <0x0 0x400>;
145 };
146
147 eeprom_factory_8000: eeprom@8000 {
148 reg = <0x8000 0x200>;
149 };
150
151 macaddr_factory_e000: macaddr@e000 {
152 reg = <0xe000 0x6>;
153 };
154
155 macaddr_factory_e006: macaddr@e006 {
156 reg = <0xe006 0x6>;
157 };
158 };
159 };
160
161 partition@50000 {
162 compatible = "denx,uimage";
163 label = "firmware";
164 reg = <0x50000 0x1fb0000>;
165 };
166 };
167 };
168 };
169
170 &pinctrl {
171 uart3_gpio: uart3-gpio {
172 uart3 {
173 groups = "uart3";
174 function = "gpio";
175 };
176 };
177 };
178
179 &pcie {
180 status = "okay";
181 pinctrl-0 = <&pcie_pins>, <&uart3_gpio>;
182 reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
183 <&gpio 7 GPIO_ACTIVE_LOW>;
184 };
185
186 &pcie0 {
187 mt76@0,0 {
188 reg = <0x0000 0 0 0 0>;
189 nvmem-cells = <&eeprom_factory_8000>;
190 nvmem-cell-names = "eeprom";
191 ieee80211-freq-limit = <5000000 6000000>;
192 };
193 };
194
195 &pcie1 {
196 mt76@0,0 {
197 reg = <0x0000 0 0 0 0>;
198 nvmem-cells = <&eeprom_factory_0>;
199 nvmem-cell-names = "eeprom";
200 };
201 };
202
203 &ethernet {
204 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
205 };
206
207 &gmac0 {
208 nvmem-cells = <&macaddr_factory_e000>;
209 nvmem-cell-names = "mac-address";
210 };
211
212 &switch0 {
213 ports {
214 port@0 {
215 status = "okay";
216 label = "lan1";
217 };
218
219 port@1 {
220 status = "okay";
221 label = "lan2";
222 };
223
224 port@2 {
225 status = "okay";
226 label = "lan3";
227 };
228
229 port@3 {
230 status = "okay";
231 label = "lan4";
232 };
233
234 port@4 {
235 status = "okay";
236 label = "wan";
237 nvmem-cells = <&macaddr_factory_e006>;
238 nvmem-cell-names = "mac-address";
239 };
240 };
241 };
242
243 &state_default {
244 gpio {
245 groups = "wdt", "rgmii2", "jtag";
246 function = "gpio";
247 };
248 };