ath79: move dts-v1 statement to ath79.dtsi
[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 = "mi-router-4q:red:led";
40 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
41 };
42
43 led_yellow: led_yellow {
44 label = "mi-router-4q:yellow:led";
45 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
46 };
47
48 led_blue: led_blue {
49 label = "mi-router-4q:blue:led";
50 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
51 };
52 };
53 };
54
55 &uart {
56 status = "okay";
57 };
58
59 &spi {
60 status = "okay";
61 num-cs = <1>;
62
63 flash@0 {
64 compatible = "jedec,spi-nor";
65 reg = <0>;
66 spi-max-frequency = <25000000>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x000000 0x30000>;
76 read-only;
77 };
78
79 partition@30000 {
80 label = "nvram";
81 reg = <0x030000 0x10000>;
82 read-only;
83 };
84
85 partition@40000 {
86 label = "boarddata";
87 reg = <0x40000 0x10000>;
88 read-only;
89 };
90
91 partition@50000 {
92 label = "crash";
93 reg = <0x50000 0x10000>;
94 read-only;
95 };
96
97 art: partition@60000 {
98 label = "art";
99 reg = <0x60000 0x10000>;
100 read-only;
101 };
102
103 partition@70000 {
104 label = "cfg_bak";
105 reg = <0x70000 0x20000>;
106 read-only;
107 };
108
109 partition@90000 {
110 label = "overlay";
111 reg = <0x90000 0x170000>;
112 read-only;
113 };
114
115 partition@200000 {
116 compatible = "denx,uimage";
117 label = "firmware";
118 reg = <0x200000 0xe00000>;
119 };
120 };
121 };
122 };
123
124 &eth0 {
125 status = "okay";
126
127 phy-handle = <&swphy4>;
128 mtd-mac-address = <&art 0x0>;
129 };
130
131 &eth1 {
132 status = "okay";
133
134 mtd-mac-address = <&art 0x6>;
135 };
136
137 &wmac {
138 status = "okay";
139
140 mtd-cal-data = <&art 0x1000>;
141 mtd-mac-address = <&art 0x0>;
142 mtd-mac-address-increment = <1>;
143 };