ath79: add support for Dell SonicPoint ACe APL26-0AE
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_cudy_wr1000.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.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 = "cudy,wr1000", "mediatek,mt7628an-soc";
11 model = "Cudy WR1000";
12
13 aliases {
14 led-boot = &led_wps;
15 led-failsafe = &led_wps;
16 led-upgrade = &led_wps;
17 label-mac-device = &wmac;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_RESTART>;
27 };
28
29 wps {
30 label = "rfkill";
31 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WPS_BUTTON>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 lan1 {
40 label = "blue:lan1";
41 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
42 };
43
44 lan2 {
45 label = "blue:lan2";
46 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
47 };
48
49 wan {
50 function = LED_FUNCTION_WAN;
51 color = <LED_COLOR_ID_BLUE>;
52 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
53 };
54
55 wlan2g {
56 label = "blue:wlan2g";
57 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
58 linux,default-trigger = "phy0tpt";
59 };
60
61 led_wps: wps {
62 function = LED_FUNCTION_WPS;
63 color = <LED_COLOR_ID_BLUE>;
64 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
65 };
66 };
67 };
68
69 &spi0 {
70 status = "okay";
71
72 flash@0 {
73 compatible = "jedec,spi-nor";
74 reg = <0>;
75 spi-max-frequency = <10000000>;
76
77 partitions {
78 compatible = "fixed-partitions";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 partition@0 {
83 label = "u-boot";
84 reg = <0x0 0x30000>;
85 read-only;
86 };
87
88 partition@30000 {
89 label = "u-boot-env";
90 reg = <0x30000 0x10000>;
91 read-only;
92 };
93
94 partition@40000 {
95 label = "factory";
96 reg = <0x40000 0x10000>;
97 read-only;
98
99 nvmem-layout {
100 compatible = "fixed-layout";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 eeprom_factory_0: eeprom@0 {
105 reg = <0x0 0x400>;
106 };
107
108 eeprom_factory_8000: eeprom@8000 {
109 reg = <0x8000 0x200>;
110 };
111
112 macaddr_factory_28: macaddr@28 {
113 reg = <0x28 0x6>;
114 };
115 };
116 };
117
118 partition@50000 {
119 compatible = "denx,uimage";
120 label = "firmware";
121 reg = <0x50000 0x7b0000>;
122 };
123 };
124 };
125 };
126
127 &state_default {
128 gpio {
129 groups = "i2s", "refclk", "wdt", "p4led_an",
130 "p3led_an", "p2led_an", "wled_an";
131 function = "gpio";
132 };
133 };
134
135 &pcie {
136 status = "okay";
137 };
138
139 &pcie0 {
140 wifi@0,0 {
141 compatible = "mediatek,mt76";
142 reg = <0x0000 0 0 0 0>;
143 nvmem-cells = <&eeprom_factory_8000>;
144 nvmem-cell-names = "eeprom";
145 ieee80211-freq-limit = <5000000 6000000>;
146
147 led {
148 led-sources = <2>;
149 led-active-low;
150 };
151 };
152 };
153
154 &wmac {
155 status = "okay";
156
157 nvmem-cells = <&eeprom_factory_0>;
158 nvmem-cell-names = "eeprom";
159 };
160
161 &ethernet {
162 nvmem-cells = <&macaddr_factory_28>;
163 nvmem-cell-names = "mac-address";
164 };
165
166 &esw {
167 mediatek,portmap = <0x2f>;
168 };