mediatek: fix wps button for nokia ea0326gmp
[openwrt/staging/pepe2k.git] / target / linux / mediatek / dts / mt7981b-cudy-tr3000-v1.dts
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2
3 /dts-v1/;
4
5 #include <dt-bindings/leds/common.h>
6
7 #include "mt7981.dtsi"
8
9 / {
10 model = "Cudy TR3000 v1";
11 compatible = "cudy,tr3000-v1", "mediatek,mt7981-spim-snand-rfb";
12
13 aliases {
14 label-mac-device = &gmac1;
15 led-boot = &led_status;
16 led-failsafe = &led_status;
17 led-running = &led_status;
18 led-upgrade = &led_status;
19 serial0 = &uart0;
20 };
21
22 chosen {
23 stdout-path = "serial0:115200n8";
24 };
25
26 gpio-keys {
27 compatible = "gpio-keys";
28
29 reset {
30 label = "reset";
31 linux,code = <KEY_RESTART>;
32 gpios = <&pio 1 GPIO_ACTIVE_LOW>;
33 };
34
35 mode {
36 label = "mode";
37 linux,input-type = <EV_SW>;
38 linux,code = <BTN_0>;
39 gpios = <&pio 0 GPIO_ACTIVE_LOW>;
40 debounce-interval = <60>;
41 };
42 };
43
44 leds {
45 compatible = "gpio-leds";
46
47 led_status: led_0 {
48 function = LED_FUNCTION_POWER;
49 color = <LED_COLOR_ID_RED>;
50 gpios = <&pio 11 GPIO_ACTIVE_LOW>;
51 };
52
53 led_1 {
54 function = LED_FUNCTION_STATUS;
55 color = <LED_COLOR_ID_WHITE>;
56 gpios = <&pio 10 GPIO_ACTIVE_LOW>;
57 };
58
59 };
60
61 usb_vbus: regulator-usb {
62 compatible = "regulator-fixed";
63
64 regulator-name = "usb-vbus";
65 regulator-min-microvolt = <5000000>;
66 regulator-max-microvolt = <5000000>;
67
68 gpio = <&pio 9 GPIO_ACTIVE_LOW>;
69 regulator-boot-on;
70 };
71 };
72
73 &uart0 {
74 status = "okay";
75 };
76
77 &watchdog {
78 status = "okay";
79 };
80
81 &eth {
82 pinctrl-names = "default";
83 pinctrl-0 = <&mdio_pins>;
84
85 status = "okay";
86
87 gmac0: mac@0 {
88 compatible = "mediatek,eth-mac";
89 reg = <0>;
90 phy-mode = "2500base-x";
91 phy-handle = <&phy1>;
92 nvmem-cell-names = "mac-address";
93 nvmem-cells = <&macaddr_bdinfo_de00 1>;
94 };
95
96 gmac1: mac@1 {
97 compatible = "mediatek,eth-mac";
98 reg = <1>;
99 phy-mode = "gmii";
100 phy-handle = <&int_gbe_phy>;
101 nvmem-cell-names = "mac-address";
102 nvmem-cells = <&macaddr_bdinfo_de00 0>;
103 };
104 };
105
106 &mdio_bus {
107 phy1: phy@1 {
108 reg = <1>;
109 compatible = "ethernet-phy-ieee802.3-c45";
110 phy-mode = "2500base-x";
111 reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
112 interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
113 reset-assert-us = <100000>;
114 reset-deassert-us = <100000>;
115 realtek,aldps-enable;
116 };
117 };
118
119 &spi0 {
120 pinctrl-names = "default";
121 pinctrl-0 = <&spi0_flash_pins>;
122 status = "okay";
123
124 spi_nand: flash@0 {
125 #address-cells = <1>;
126 #size-cells = <1>;
127 compatible = "spi-nand";
128 reg = <0>;
129 spi-max-frequency = <52000000>;
130
131 spi-cal-enable;
132 spi-cal-mode = "read-data";
133 spi-cal-datalen = <7>;
134 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
135 spi-cal-addrlen = <5>;
136 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
137
138 spi-tx-bus-width = <4>;
139 spi-rx-bus-width = <4>;
140 mediatek,nmbm;
141 mediatek,bmt-max-ratio = <1>;
142 mediatek,bmt-max-reserved-blocks = <64>;
143
144 partitions {
145 compatible = "fixed-partitions";
146 #address-cells = <1>;
147 #size-cells = <1>;
148
149 partition@0 {
150 label = "BL2";
151 reg = <0x00000 0x0100000>;
152 read-only;
153 };
154
155 partition@100000 {
156 label = "u-boot-env";
157 reg = <0x0100000 0x0080000>;
158 read-only;
159 };
160
161 factory: partition@180000 {
162 label = "Factory";
163 reg = <0x180000 0x0200000>;
164 read-only;
165 nvmem-layout {
166 compatible = "fixed-layout";
167 #address-cells = <1>;
168 #size-cells = <1>;
169
170 eeprom_factory_0: eeprom@0 {
171 reg = <0x0 0x1000>;
172 };
173 };
174 };
175
176 partition@380000 {
177 label = "bdinfo";
178 reg = <0x380000 0x0040000>;
179 read-only;
180 nvmem-layout {
181 compatible = "fixed-layout";
182 #address-cells = <1>;
183 #size-cells = <1>;
184
185 macaddr_bdinfo_de00: macaddr@de00 {
186 compatible = "mac-base";
187 reg = <0xde00 0x6>;
188 #nvmem-cell-cells = <1>;
189 };
190 };
191
192 };
193
194 partition@3C0000 {
195 label = "FIP";
196 reg = <0x3C0000 0x0200000>;
197 read-only;
198 };
199
200 partition@580000 {
201 label = "ubi";
202 reg = <0x5C0000 0x4000000>;
203 compatible = "linux,ubi";
204 };
205 };
206 };
207 };
208
209
210 &pio {
211 spi0_flash_pins: spi0-pins {
212 mux {
213 function = "spi";
214 groups = "spi0", "spi0_wp_hold";
215 };
216 };
217 };
218
219 &usb_phy {
220 status = "okay";
221 };
222
223 &xhci {
224 status = "okay";
225 vbus-supply = <&usb_vbus>;
226 };
227
228 &wifi {
229 status = "okay";
230 nvmem-cells = <&eeprom_factory_0>;
231 nvmem-cell-names = "eeprom";
232 };