generic: 6.1, 6.6: remove patch which breaks WAN on MT7621
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9561_xiaomi_mi-router-4q.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca956x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "xiaomi,mi-router-4q", "qca,qca9560";
10 model = "Xiaomi Mi Router 4Q";
11
12 aliases {
13 led-boot = &led_yellow;
14 led-failsafe = &led_red;
15 led-running = &led_blue;
16 led-upgrade = &led_red;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "Reset button";
24 linux,code = <KEY_RESTART>;
25 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
26 };
27
28 wps {
29 label = "WPS/MI button";
30 linux,code = <KEY_WPS_BUTTON>;
31 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 led_red: led_red {
39 label = "red:led";
40 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
41 };
42
43 led_yellow: led_yellow {
44 label = "yellow:led";
45 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
46 };
47
48 led_blue: led_blue {
49 label = "blue:led";
50 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
51 };
52 };
53 };
54
55 &spi {
56 status = "okay";
57
58 flash@0 {
59 compatible = "jedec,spi-nor";
60 reg = <0>;
61 spi-max-frequency = <25000000>;
62
63 partitions {
64 compatible = "fixed-partitions";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 partition@0 {
69 label = "u-boot";
70 reg = <0x000000 0x30000>;
71 read-only;
72 };
73
74 partition@30000 {
75 label = "nvram";
76 reg = <0x030000 0x10000>;
77 read-only;
78 };
79
80 partition@40000 {
81 label = "boarddata";
82 reg = <0x40000 0x10000>;
83 read-only;
84 };
85
86 partition@50000 {
87 label = "crash";
88 reg = <0x50000 0x10000>;
89 read-only;
90 };
91
92 art: partition@60000 {
93 label = "art";
94 reg = <0x60000 0x10000>;
95 read-only;
96
97 nvmem-layout {
98 compatible = "fixed-layout";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 macaddr_art_0: macaddr@0 {
103 compatible = "mac-base";
104 reg = <0x0 0x6>;
105 #nvmem-cell-cells = <1>;
106 };
107
108 macaddr_art_6: macaddr@6 {
109 reg = <0x6 0x6>;
110 };
111 };
112 };
113
114 partition@70000 {
115 label = "cfg_bak";
116 reg = <0x70000 0x20000>;
117 read-only;
118 };
119
120 partition@90000 {
121 label = "overlay";
122 reg = <0x90000 0x170000>;
123 read-only;
124 };
125
126 partition@200000 {
127 compatible = "denx,uimage";
128 label = "firmware";
129 reg = <0x200000 0xe00000>;
130 };
131 };
132 };
133 };
134
135 &eth0 {
136 status = "okay";
137
138 phy-handle = <&swphy4>;
139 nvmem-cells = <&macaddr_art_0 0>;
140 nvmem-cell-names = "mac-address";
141 };
142
143 &eth1 {
144 status = "okay";
145
146 nvmem-cells = <&macaddr_art_6>;
147 nvmem-cell-names = "mac-address";
148 };
149
150 &wmac {
151 status = "okay";
152
153 mtd-cal-data = <&art 0x1000>;
154 nvmem-cells = <&macaddr_art_0 1>;
155 nvmem-cell-names = "mac-address";
156 };