ramips: Add support for Cudy WR1300 v3
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_h3c_tx180x.dtsi
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 aliases {
11 led-boot = &led_status_amber;
12 led-failsafe = &led_status_green;
13 led-running = &led_status_green;
14 led-upgrade = &led_status_amber;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 bootargs-override = "console=ttyS0,115200";
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_RESTART>;
29 };
30
31 wps {
32 label = "wps";
33 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_WPS_BUTTON>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 led_status_amber: led-0 {
42 label = "amber:status";
43 color = <LED_COLOR_ID_AMBER>;
44 function = LED_FUNCTION_STATUS;
45 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
46 };
47
48 led_status_green: led-1 {
49 label = "green:status";
50 color = <LED_COLOR_ID_GREEN>;
51 function = LED_FUNCTION_STATUS;
52 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
53 };
54 };
55 };
56
57 &gmac1 {
58 status = "okay";
59 label = "wan";
60 phy-handle = <&ethphy4>;
61 };
62
63 &mdio {
64 ethphy4: ethernet-phy@4 {
65 reg = <4>;
66 };
67 };
68
69 &nand {
70 status = "okay";
71
72 mediatek,nmbm;
73 mediatek,bmt-max-ratio = <1>;
74 mediatek,bmt-max-reserved-blocks = <64>;
75 mediatek,bmt-remap-range = <0x0000000 0x0a00000>;
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 = <0x0000000 0x0080000>;
85 read-only;
86 };
87
88 partition@80000 {
89 label = "u-boot-env";
90 reg = <0x0080000 0x0080000>;
91 };
92
93 partition@100000 {
94 label = "exp";
95 reg = <0x0100000 0x0080000>;
96 read-only;
97 };
98
99 factory: partition@180000 {
100 compatible = "nvmem-cells";
101 label = "factory";
102 reg = <0x0180000 0x0080000>;
103 #address-cells = <1>;
104 #size-cells = <1>;
105 read-only;
106
107 eeprom_factory_0: eeprom@0 {
108 reg = <0x0 0xe00>;
109 };
110 };
111
112 partition@200000 {
113 label = "firmware";
114 reg = <0x0200000 0x7600000>;
115
116 compatible = "fixed-partitions";
117 #address-cells = <1>;
118 #size-cells = <1>;
119
120 partition@0 {
121 label = "kernel";
122 reg = <0x0000000 0x0800000>;
123 };
124
125 partition@800000 {
126 label = "ubi";
127 reg = <0x0800000 0x6e00000>;
128 };
129 };
130
131 /* last 8 MiB is reserved for NMBM bad block table */
132 };
133 };
134
135 &pcie {
136 status = "okay";
137 };
138
139 &pcie1 {
140 wifi@0,0 {
141 compatible = "mediatek,mt76";
142 reg = <0x0000 0 0 0 0>;
143 nvmem-cells = <&eeprom_factory_0>;
144 nvmem-cell-names = "eeprom";
145 mediatek,disable-radar-background;
146 };
147 };
148
149 &state_default {
150 gpio {
151 groups = "jtag";
152 function = "gpio";
153 };
154 };
155
156 &switch0 {
157 ports {
158 port@1 {
159 status = "okay";
160 label = "lan1";
161 };
162
163 port@2 {
164 status = "okay";
165 label = "lan2";
166 };
167
168 port@3 {
169 status = "okay";
170 label = "lan3";
171 };
172 };
173 };
174
175 &xhci {
176 status = "disabled";
177 };