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