rockchip: add Radxa CM3 IO board support
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_wavlink_wl-wn576a2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
7 #include <dt-bindings/gpio/gpio.h>
8
9 / {
10 compatible = "wavlink,wl-wn576a2", "mediatek,mt7628an-soc";
11 model = "Wavlink WL-WN576A2";
12
13 aliases {
14 led-boot = &led_wps;
15 led-failsafe = &led_wps;
16 led-running = &led_wps;
17 led-upgrade = &led_wps;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_RESTART>;
27 };
28
29 wps {
30 label = "wps";
31 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WPS_BUTTON>;
33 };
34
35 ap {
36 label = "ap";
37 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
38 linux,code = <BTN_0>;
39 linux,input-type = <EV_SW>;
40 };
41
42 repeater {
43 label = "repeater";
44 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
45 linux,code = <BTN_1>;
46 linux,input-type = <EV_SW>;
47 };
48 };
49
50 leds {
51 compatible = "gpio-leds";
52
53 wifi-high {
54 label = "blue:wifi-high";
55 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
56 };
57
58 wifi-mediumhigh {
59 label = "blue:wifi-mediumhigh";
60 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
61 };
62
63 wifi-medium {
64 label = "blue:wifi-medium";
65 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
66 };
67
68 wifi-mediumlow {
69 label = "blue:wifi-mediumlow";
70 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
71 };
72
73 wifi-low {
74 label = "blue:wifi-low";
75 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
76 };
77
78 lan {
79 function = LED_FUNCTION_LAN;
80 color = <LED_COLOR_ID_BLUE>;
81 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
82 };
83
84 led_wps: wps {
85 function = LED_FUNCTION_WPS;
86 color = <LED_COLOR_ID_BLUE>;
87 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
88 };
89 };
90 };
91
92 &state_default {
93 gpio {
94 groups = "i2c", "i2s", "wdt", "wled_an", "p0led_an", "p1led_an",
95 "p2led_an", "p3led_an", "p4led_an", "refclk", "gpio";
96 function = "gpio";
97 };
98 };
99
100 &pcie {
101 status = "okay";
102 };
103
104 &pcie0 {
105 wifi@0,0 {
106 reg = <0x0000 0 0 0 0>;
107 nvmem-cells = <&eeprom_factory_8000>;
108 nvmem-cell-names = "eeprom";
109 ieee80211-freq-limit = <5000000 6000000>;
110 };
111 };
112
113 &spi0 {
114 status = "okay";
115
116 flash@0 {
117 compatible = "jedec,spi-nor";
118 reg = <0>;
119 spi-max-frequency = <40000000>;
120
121 partitions {
122 compatible = "fixed-partitions";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 partition@0 {
127 label = "u-boot";
128 reg = <0x0 0x30000>;
129 read-only;
130 };
131
132 partition@30000 {
133 label = "u-boot-env";
134 reg = <0x30000 0x10000>;
135 read-only;
136 };
137
138 factory: partition@40000 {
139 label = "factory";
140 reg = <0x40000 0x10000>;
141 read-only;
142
143 nvmem-layout {
144 compatible = "fixed-layout";
145 #address-cells = <1>;
146 #size-cells = <1>;
147
148 eeprom_factory_0: eeprom@0 {
149 reg = <0x0 0x400>;
150 };
151
152 eeprom_factory_8000: eeprom@8000 {
153 reg = <0x8000 0x200>;
154 };
155
156 macaddr_factory_28: macaddr@28 {
157 reg = <0x28 0x6>;
158 };
159 };
160 };
161
162 partition@50000 {
163 compatible = "denx,uimage";
164 label = "firmware";
165 reg = <0x50000 0x7b0000>;
166 };
167 };
168 };
169 };
170
171 &wmac {
172 status = "okay";
173
174 nvmem-cells = <&eeprom_factory_0>;
175 nvmem-cell-names = "eeprom";
176 };
177
178 &ethernet {
179 nvmem-cells = <&macaddr_factory_28>;
180 nvmem-cells-names = "max-address";
181 };
182
183 &esw {
184 mediatek,portmap = <0x3f>;
185 };
186
187 &usbphy {
188 status = "disabled";
189 };
190
191 &ehci {
192 status = "disabled";
193 };
194
195 &ohci {
196 status = "disabled";
197 };