ramips: mt7621: pbr-m1: fix firmware size
[openwrt/staging/yousong.git] / target / linux / ramips / dts / mt7621_d-team_pbr-m1.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 = "d-team,pbr-m1", "mediatek,mt7621-soc";
10 model = "PBR-M1";
11
12 aliases {
13 led-boot = &led_sys;
14 led-failsafe = &led_sys;
15 led-running = &led_sys;
16 led-upgrade = &led_sys;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 power {
27 label = "pbr-m1:blue:power";
28 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
29 default-state = "on";
30 };
31
32 led_sys: sys {
33 label = "pbr-m1:blue:sys";
34 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
35 };
36
37 internet {
38 label = "pbr-m1:blue:internet";
39 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
40 };
41
42 wlan2g {
43 label = "pbr-m1:blue:wlan2g";
44 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
45 };
46
47 wlan5g {
48 label = "pbr-m1: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
139 partition@50000 {
140 compatible = "denx,uimage";
141 label = "firmware";
142 reg = <0x50000 0x1fb0000>;
143 };
144 };
145 };
146 };
147
148 &pinctrl {
149 uart3_gpio: uart3-gpio {
150 uart3 {
151 groups = "uart3";
152 function = "gpio";
153 };
154 };
155 };
156
157 &pcie {
158 status = "okay";
159 pinctrl-0 = <&pcie_pins>, <&uart3_gpio>;
160 reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
161 <&gpio 7 GPIO_ACTIVE_LOW>;
162 };
163
164 &pcie0 {
165 mt76@0,0 {
166 reg = <0x0000 0 0 0 0>;
167 mediatek,mtd-eeprom = <&factory 0x8000>;
168 ieee80211-freq-limit = <5000000 6000000>;
169 };
170 };
171
172 &pcie1 {
173 mt76@0,0 {
174 reg = <0x0000 0 0 0 0>;
175 mediatek,mtd-eeprom = <&factory 0x0000>;
176 };
177 };
178
179 &gmac0 {
180 mtd-mac-address = <&factory 0xe000>;
181 };
182
183 &switch0 {
184 ports {
185 port@0 {
186 status = "okay";
187 label = "lan1";
188 };
189
190 port@1 {
191 status = "okay";
192 label = "lan2";
193 };
194
195 port@2 {
196 status = "okay";
197 label = "lan3";
198 };
199
200 port@3 {
201 status = "okay";
202 label = "lan4";
203 };
204
205 port@4 {
206 status = "okay";
207 label = "wan";
208 mtd-mac-address = <&factory 0xe006>;
209 };
210 };
211 };
212
213 &state_default {
214 gpio {
215 groups = "wdt", "rgmii2", "jtag";
216 function = "gpio";
217 };
218 };