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