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