ramips: enable broken-flash-reset for some 32M flash boards
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_d-team_newifi-d2.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,newifi-d2", "mediatek,mt7621-soc";
10 model = "Newifi-D2";
11
12 aliases {
13 led-boot = &led_power_blue;
14 led-failsafe = &led_power_blue;
15 led-running = &led_power_blue;
16 led-upgrade = &led_power_blue;
17 label-mac-device = &gmac0;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 power-amber {
28 label = "newifi-d2:amber:power";
29 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
30 };
31
32 led_power_blue: power-blue {
33 label = "newifi-d2:blue:power";
34 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
35 };
36
37 internet-amber {
38 label = "newifi-d2:amber:internet";
39 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
40 };
41
42 internet-blue {
43 label = "newifi-d2:blue:internet";
44 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
45 };
46
47 wlan2g {
48 label = "newifi-d2:blue:wlan2g";
49 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
50 };
51
52 wlan5g {
53 label = "newifi-d2:blue:wlan5g";
54 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
55 };
56
57 usb {
58 label = "newifi-d2:blue:usb";
59 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
60 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
61 linux,default-trigger = "usbport";
62 };
63 };
64
65 keys {
66 compatible = "gpio-keys";
67
68 reset {
69 label = "reset";
70 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
71 linux,code = <KEY_RESTART>;
72 };
73
74 wps {
75 label = "wps";
76 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_WPS_BUTTON>;
78 };
79 };
80
81 gpio_export {
82 compatible = "gpio-export";
83 #size-cells = <0>;
84
85 power_usb3 {
86 gpio-export,name = "power_usb3";
87 gpio-export,output = <1>;
88 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
89 };
90 };
91 };
92
93 &spi0 {
94 status = "okay";
95
96 m25p80@0 {
97 compatible = "jedec,spi-nor";
98 reg = <0>;
99 spi-max-frequency = <10000000>;
100 broken-flash-reset;
101
102 partitions {
103 compatible = "fixed-partitions";
104 #address-cells = <1>;
105 #size-cells = <1>;
106
107 partition@0 {
108 label = "u-boot";
109 reg = <0x0 0x30000>;
110 read-only;
111 };
112
113 partition@30000 {
114 label = "u-boot-env";
115 reg = <0x30000 0x10000>;
116 read-only;
117 };
118
119 factory: partition@40000 {
120 label = "factory";
121 reg = <0x40000 0x10000>;
122 read-only;
123 };
124
125 partition@50000 {
126 compatible = "denx,uimage";
127 label = "firmware";
128 reg = <0x50000 0x1fb0000>;
129 };
130 };
131 };
132 };
133
134 &pcie {
135 status = "okay";
136 };
137
138 &pcie0 {
139 mt76@0,0 {
140 reg = <0x0000 0 0 0 0>;
141 mediatek,mtd-eeprom = <&factory 0x8000>;
142 ieee80211-freq-limit = <5000000 6000000>;
143 };
144 };
145
146 &pcie1 {
147 mt76@0,0 {
148 reg = <0x0000 0 0 0 0>;
149 mediatek,mtd-eeprom = <&factory 0x0000>;
150 };
151 };
152
153 &gmac0 {
154 mtd-mac-address = <&factory 0xe000>;
155 };
156
157 &switch0 {
158 ports {
159 port@0 {
160 status = "okay";
161 label = "lan4";
162 };
163
164 port@1 {
165 status = "okay";
166 label = "lan3";
167 };
168
169 port@2 {
170 status = "okay";
171 label = "lan2";
172 };
173
174 port@3 {
175 status = "okay";
176 label = "lan1";
177 };
178
179 port@4 {
180 status = "okay";
181 label = "wan";
182 mtd-mac-address = <&factory 0xe006>;
183 };
184 };
185 };
186
187 &state_default {
188 gpio {
189 groups = "i2c", "jtag", "uart2", "uart3";
190 function = "gpio";
191 };
192 };