74daba3f9348591d6470b169c569b29b6811d132
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9533_openmesh_om2p-v4.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 chosen {
10 /delete-property/ bootargs;
11 };
12
13 aliases {
14 led-boot = &led_power_blue;
15 led-failsafe = &led_power_blue;
16 led-running = &led_power_blue;
17 led-upgrade = &led_power_blue;
18 label-mac-device = &eth0;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 pinctrl-names = "default";
25 pinctrl-0 = <&jtag_disable_pins>;
26
27 reset {
28 label = "reset";
29 linux,code = <KEY_RESTART>;
30 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 led_power_blue: power_blue {
38 label = "blue:power";
39 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
40 default-state = "on";
41 };
42
43 wifi_green {
44 label = "green:wifi";
45 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
46 linux,default-trigger = "phy0tpt";
47 };
48
49 wifi_yellow {
50 label = "yellow:wifi";
51 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
52 };
53
54 wifi_red {
55 label = "red:wifi";
56 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
57 };
58
59 wan_blue {
60 label = "blue:wan";
61 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
62 };
63
64 lan_blue {
65 label = "blue:lan";
66 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
67 };
68 };
69
70 watchdog {
71 compatible = "linux,wdt-gpio";
72 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
73 hw_algo = "toggle";
74 /* hw_margin_ms is actually 300s but driver limits it to 60s */
75 hw_margin_ms = <60000>;
76 always-running;
77 };
78 };
79
80 &uart {
81 status = "okay";
82 };
83
84 &spi {
85 status = "okay";
86
87 flash@0 {
88 compatible = "jedec,spi-nor";
89 reg = <0>;
90 spi-max-frequency = <25000000>;
91
92 /* partitions are passed via bootloader */
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "u-boot";
100 reg = <0x000000 0x040000>;
101 read-only;
102 };
103
104 partition@40000 {
105 label = "u-boot-env";
106 reg = <0x040000 0x040000>;
107 };
108
109 partition@80000 {
110 label = "custom";
111 reg = <0x080000 0x140000>;
112 read-only;
113 };
114
115 partition@1c0000 {
116 label = "inactive";
117 reg = <0x1c0000 0x700000>;
118 };
119
120 partition@8c0000 {
121 label = "inactive2";
122 reg = <0x8c0000 0x700000>;
123 };
124
125 art: partition@fc0000 {
126 label = "ART";
127 reg = <0xfc0000 0x040000>;
128 read-only;
129 };
130 };
131 };
132 };
133
134 &eth0 {
135 status = "okay";
136
137 phy-handle = <&swphy4>;
138
139 mtd-mac-address = <&art 0x0>;
140 };
141
142 &eth1 {
143 /* Workaround: keep the Ethernet interfaces order/mapping correct
144 * (GMAC0 -> eth0, GMAC1 -> eth1, same as in old ar71xx target)
145 */
146 compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
147
148 mtd-mac-address = <&art 0x6>;
149 };
150
151 &wmac {
152 status = "okay";
153
154 mtd-cal-data = <&art 0x1000>;
155 mtd-mac-address = <&art 0x0>;
156 mtd-mac-address-increment = <2>;
157 };