ath79: add support for Dell SonicPoint ACe APL26-0AE
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_elecom_wrc-1167ghbk2-s.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 = "elecom,wrc-1167ghbk2-s", "mediatek,mt7621-soc";
9 model = "ELECOM WRC-1167GHBK2-S";
10
11 aliases {
12 led-boot = &led_power_green;
13 led-failsafe = &led_power_green;
14 led-running = &led_power_green;
15 led-upgrade = &led_power_green;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 wlan2g {
22 label = "white:wlan2g";
23 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
24 linux,default-trigger = "phy0radio";
25 };
26
27 wlan5g {
28 label = "white:wlan5g";
29 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
30 };
31
32 led_power_green: power_green {
33 function = LED_FUNCTION_POWER;
34 color = <LED_COLOR_ID_GREEN>;
35 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
36 };
37
38 power_blue {
39 function = LED_FUNCTION_POWER;
40 color = <LED_COLOR_ID_BLUE>;
41 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
42 };
43
44 wps {
45 function = LED_FUNCTION_WPS;
46 color = <LED_COLOR_ID_RED>;
47 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
48 };
49
50 power_red {
51 function = LED_FUNCTION_POWER;
52 color = <LED_COLOR_ID_RED>;
53 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
54 };
55 };
56
57 keys {
58 compatible = "gpio-keys";
59
60 reset {
61 label = "reset";
62 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
63 linux,code = <KEY_RESTART>;
64 };
65
66 wps {
67 label = "wps";
68 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
69 linux,code = <KEY_WPS_BUTTON>;
70 };
71 };
72 };
73
74 &gmac0 {
75 nvmem-cells = <&macaddr_factory_e000 0>;
76 nvmem-cell-names = "mac-address";
77 };
78
79 &gmac1 {
80 status = "okay";
81 label = "wan";
82 phy-handle = <&ethphy0>;
83
84 nvmem-cells = <&macaddr_factory_e006>;
85 nvmem-cell-names = "mac-address";
86 };
87
88 &ethphy0 {
89 /delete-property/ interrupts;
90 };
91
92 &switch0 {
93 ports {
94 port@1 {
95 status = "okay";
96 label = "lan4";
97 };
98
99 port@2 {
100 status = "okay";
101 label = "lan3";
102 };
103
104 port@3 {
105 status = "okay";
106 label = "lan2";
107 };
108
109 port@4 {
110 status = "okay";
111 label = "lan1";
112 };
113 };
114 };
115
116 &spi0 {
117 status = "okay";
118
119 flash@0 {
120 compatible = "jedec,spi-nor";
121 reg = <0>;
122 spi-max-frequency = <10000000>;
123
124 partitions {
125 compatible = "fixed-partitions";
126 #address-cells = <1>;
127 #size-cells = <1>;
128
129 partition@0 {
130 label = "u-boot";
131 reg = <0x0 0x30000>;
132 read-only;
133 };
134
135 partition@30000 {
136 label = "u-boot-env";
137 reg = <0x30000 0x10000>;
138 read-only;
139 };
140
141 partition@40000 {
142 label = "factory";
143 reg = <0x40000 0x10000>;
144 read-only;
145
146 nvmem-layout {
147 compatible = "fixed-layout";
148 #address-cells = <1>;
149 #size-cells = <1>;
150
151 eeprom_factory_0: eeprom@0 {
152 reg = <0x0 0x4da8>;
153 };
154
155 macaddr_factory_e000: macaddr@e000 {
156 compatible = "mac-base";
157 reg = <0xe000 0x6>;
158 #nvmem-cell-cells = <1>;
159 };
160
161 macaddr_factory_e006: macaddr@e006 {
162 reg = <0xe006 0x6>;
163 };
164 };
165 };
166
167 partition@50000 {
168 compatible = "denx,uimage";
169 label = "firmware";
170 reg = <0x50000 0xf20000>;
171 };
172
173 partition@f70000 {
174 label = "user_data";
175 reg = <0xf70000 0x80000>;
176 read-only;
177 };
178
179 partition@ff0000 {
180 label = "NVRAM";
181 reg = <0xff0000 0x10000>;
182 read-only;
183 };
184 };
185 };
186 };
187
188 &state_default {
189 gpio {
190 groups = "i2c", "uart3", "jtag", "wdt";
191 function = "gpio";
192 };
193 };
194
195 &pcie {
196 status = "okay";
197 };
198
199 &pcie0 {
200 wifi@0,0 {
201 compatible = "mediatek,mt76";
202 reg = <0x0000 0 0 0 0>;
203 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 1>;
204 nvmem-cell-names = "eeprom", "mac-address";
205 };
206 };
207
208 &xhci {
209 status = "disabled";
210 };