5622855f487cba95c1b4213cd55a5f7eabc5c39e
[openwrt/staging/mkresin.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 mtd-mac-address = <&factory 0xe000>;
153 };
154
155 &switch0 {
156 ports {
157 port@0 {
158 status = "okay";
159 label = "lan4";
160 };
161
162 port@1 {
163 status = "okay";
164 label = "lan3";
165 };
166
167 port@2 {
168 status = "okay";
169 label = "lan2";
170 };
171
172 port@3 {
173 status = "okay";
174 label = "lan1";
175 };
176
177 port@4 {
178 status = "okay";
179 label = "wan";
180 mtd-mac-address = <&factory 0xe006>;
181 };
182 };
183 };
184
185 &state_default {
186 gpio {
187 groups = "i2c", "jtag", "uart2", "uart3";
188 function = "gpio";
189 };
190 };