ramips: add support for SIM SIMAX1800T and Haier HAR-20S2U1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_haier-sim_wr1800k.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 label-mac-device = &gmac1;
12 led-boot = &led_status_red;
13 led-failsafe = &led_status_blue;
14 led-running = &led_status_green;
15 led-upgrade = &led_status_blue;
16 };
17
18 chosen {
19 bootargs-override = "console=ttyS0,115200";
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_RESTART>;
29 };
30
31 wps {
32 label = "wps";
33 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_WPS_BUTTON>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 led_status_blue: led-0 {
42 label = "blue:status";
43 color = <LED_COLOR_ID_BLUE>;
44 function = LED_FUNCTION_STATUS;
45 gpios = <&gpio 6 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 8 GPIO_ACTIVE_LOW>;
53 };
54
55 led_status_red: led-2 {
56 label = "red:status";
57 color = <LED_COLOR_ID_RED>;
58 function = LED_FUNCTION_STATUS;
59 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
60 };
61 };
62 };
63
64 &gmac0 {
65 nvmem-cells = <&macaddr_factory_8004>;
66 nvmem-cell-names = "mac-address";
67 };
68
69 &gmac1 {
70 status = "okay";
71 label = "wan";
72 phy-handle = <&ethphy4>;
73
74 nvmem-cells = <&macaddr_factory_8004>;
75 nvmem-cell-names = "mac-address";
76 mac-address-increment = <(-3)>;
77 };
78
79 &mdio {
80 ethphy4: ethernet-phy@4 {
81 reg = <4>;
82 };
83 };
84
85 &nand {
86 status = "okay";
87
88 partitions {
89 compatible = "fixed-partitions";
90 #address-cells = <1>;
91 #size-cells = <1>;
92
93 partition@0 {
94 label = "u-boot";
95 reg = <0x0000000 0x0080000>;
96 read-only;
97 };
98
99 partition@80000 {
100 label = "u-boot-env";
101 reg = <0x0080000 0x0080000>;
102 };
103
104 factory: partition@100000 {
105 label = "factory";
106 reg = <0x0100000 0x0080000>;
107 read-only;
108
109 compatible = "nvmem-cells";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 macaddr_factory_8004: macaddr@8004 {
114 reg = <0x8004 0x6>;
115 };
116 };
117
118 partition@180000 {
119 label = "firmware";
120 reg = <0x0180000 0x7a80000>;
121
122 compatible = "fixed-partitions";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 partition@0 {
127 label = "kernel";
128 reg = <0x0000000 0x0400000>;
129 };
130
131 partition@400000 {
132 label = "ubi";
133 reg = <0x0400000 0x7680000>;
134 };
135 };
136
137 /* last 128KiB *32 is reserved for bad blocks management */
138 };
139 };
140
141 &pcie {
142 status = "okay";
143 };
144
145 &pcie1 {
146 wifi@0,0 {
147 compatible = "mediatek,mt76";
148 reg = <0x0000 0 0 0 0>;
149 mediatek,mtd-eeprom = <&factory 0x0>;
150 mediatek,disable-radar-background;
151 };
152 };
153
154 &pcie2 {
155 status = "disabled";
156 };
157
158 &state_default {
159 gpio {
160 groups = "i2c", "uart3", "wdt";
161 function = "gpio";
162 };
163 };
164
165 &switch0 {
166 ports {
167 port@1 {
168 status = "okay";
169 label = "lan3";
170 };
171
172 port@2 {
173 status = "okay";
174 label = "lan2";
175 };
176
177 port@3 {
178 status = "okay";
179 label = "lan1";
180 };
181 };
182 };
183
184 &xhci {
185 status = "disabled";
186 };