907e90b77b83360bb3023ccdc95818b2598a970c
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_zyxel_wap6805.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "zyxel,wap6805", "mediatek,mt7621-soc";
11 model = "ZyXEL WAP6805";
12
13 aliases {
14 led-boot = &led_status_green;
15 led-failsafe = &led_status_red;
16 led-running = &led_status_green;
17 led-upgrade = &led_status_green;
18 label-mac-device = &gmac0;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_status_red: status_red {
25 function = LED_FUNCTION_STATUS;
26 color = <LED_COLOR_ID_RED>;
27 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
28 };
29
30 status_blink {
31 label = "blink:status";
32 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
33 };
34
35 led_status_green: status_green {
36 function = LED_FUNCTION_STATUS;
37 color = <LED_COLOR_ID_GREEN>;
38 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 wps {
46 label = "wps";
47 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_WPS_BUTTON>;
49 };
50
51 reset {
52 label = "reset";
53 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART>;
55 };
56 };
57 };
58
59 &nand {
60 status = "okay";
61
62 partitions {
63 compatible = "fixed-partitions";
64 #address-cells = <1>;
65 #size-cells = <1>;
66
67 partition@0 {
68 label = "Bootloader";
69 reg = <0x0 0x100000>;
70 read-only;
71 };
72
73 partition@100000 {
74 label = "MRD";
75 reg = <0x100000 0x100000>;
76 read-only;
77 };
78
79 factory: partition@200000 {
80 label = "Factory";
81 reg = <0x200000 0x100000>;
82 read-only;
83
84 nvmem-layout {
85 compatible = "fixed-layout";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 eeprom_factory_0: eeprom@0 {
90 reg = <0x0 0x400>;
91 };
92
93 macaddr_factory_e000: macaddr@e000 {
94 reg = <0xe000 0x6>;
95 };
96 };
97 };
98
99 partition@300000 {
100 label = "Config";
101 reg = <0x300000 0x100000>;
102 };
103
104 partition@400000 {
105 label = "Kernel";
106 reg = <0x400000 0x2000000>;
107 };
108
109 partition@800000 {
110 label = "ubi";
111 reg = <0x800000 0x1c00000>;
112 };
113
114 partition@2400000 {
115 label = "Kernel2";
116 reg = <0x2400000 0x2000000>;
117 };
118
119 partition@4400000 {
120 label = "Private";
121 reg = <0x4400000 0x100000>;
122 };
123
124 partition@4500000 {
125 label = "Log";
126 reg = <0x4500000 0x1000000>;
127 };
128
129 partition@5500000 {
130 label = "App";
131 reg = <0x5500000 0x2b00000>;
132 };
133 };
134 };
135
136 &pcie {
137 status = "okay";
138 };
139
140 &pcie0 {
141 mt76@0,0 {
142 reg = <0x0000 0 0 0 0>;
143 nvmem-cells = <&eeprom_factory_0>;
144 nvmem-cell-names = "eeprom";
145 };
146 };
147
148 &gmac0 {
149 nvmem-cells = <&macaddr_factory_e000>;
150 nvmem-cell-names = "mac-address";
151 };
152
153 &gmac1 {
154 status = "okay";
155
156 fixed-link {
157 speed = <1000>;
158 full-duplex;
159 };
160 };
161
162 &switch0 {
163 ports {
164 port@0 {
165 status = "okay";
166 label = "lan4";
167 };
168 port@1 {
169 status = "okay";
170 label = "lan3";
171 };
172 port@2 {
173 status = "okay";
174 label = "lan2";
175 };
176 port@3 {
177 status = "okay";
178 label = "lan1";
179 };
180 };
181 };
182
183 &xhci {
184 status = "disabled";
185 };
186
187 &state_default {
188 gpio {
189 groups = "i2c", "uart3", "jtag", "wdt";
190 function = "gpio";
191 };
192 };