b0f5c8de43b448eacbef763bd32c51a272c5a62e
[openwrt/staging/hauke.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 reg = <0x0 0x6>;
104 };
105
106 macaddr_art_6: macaddr@6 {
107 reg = <0x6 0x6>;
108 };
109 };
110 };
111
112 partition@70000 {
113 label = "cfg_bak";
114 reg = <0x70000 0x20000>;
115 read-only;
116 };
117
118 partition@90000 {
119 label = "overlay";
120 reg = <0x90000 0x170000>;
121 read-only;
122 };
123
124 partition@200000 {
125 compatible = "denx,uimage";
126 label = "firmware";
127 reg = <0x200000 0xe00000>;
128 };
129 };
130 };
131 };
132
133 &eth0 {
134 status = "okay";
135
136 phy-handle = <&swphy4>;
137 nvmem-cells = <&macaddr_art_0>;
138 nvmem-cell-names = "mac-address";
139 };
140
141 &eth1 {
142 status = "okay";
143
144 nvmem-cells = <&macaddr_art_6>;
145 nvmem-cell-names = "mac-address";
146 };
147
148 &wmac {
149 status = "okay";
150
151 mtd-cal-data = <&art 0x1000>;
152 nvmem-cells = <&macaddr_art_0>;
153 nvmem-cell-names = "mac-address";
154 mac-address-increment = <1>;
155 };