ath79: add Embedded Wireless Balin Platform
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_openmesh_om5p.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "openmesh,om5p", "qca,ar9344";
10 model = "OpenMesh OM5P";
11
12 chosen {
13 /delete-property/ bootargs;
14 };
15
16 aliases {
17 led-boot = &led_power_blue;
18 led-failsafe = &led_power_blue;
19 led-running = &led_power_blue;
20 led-upgrade = &led_power_blue;
21 label-mac-device = &eth1;
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 linux,code = <KEY_RESTART>;
30 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 pinctrl-names = "default";
38 pinctrl-0 = <&led_lan_wan_blue_pin>;
39
40 led_power_blue: power_blue {
41 label = "blue:power";
42 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
43 default-state = "on";
44 };
45
46 wan_blue {
47 label = "blue:wan";
48 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
49 };
50
51 lan_blue {
52 label = "blue:lan";
53 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
54 };
55
56 wifi_green {
57 label = "green:wifi";
58 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
59 linux,default-trigger = "phy0tpt";
60 };
61
62 wifi_yellow {
63 label = "yellow:wifi";
64 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
65 };
66
67 wifi_red {
68 label = "red:wifi";
69 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
70 };
71 };
72
73 watchdog {
74 compatible = "linux,wdt-gpio";
75 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
76 hw_algo = "toggle";
77 /* hw_margin_ms is actually 300s but driver limits it to 60s */
78 hw_margin_ms = <60000>;
79 always-running;
80 };
81 };
82
83 &ref {
84 clock-frequency = <40000000>;
85 };
86
87 &pinmux {
88 led_lan_wan_blue_pin: pinmux_lan_wan_blue_pin {
89 pinctrl-single,bits = <0xc 0x0 0xffff0000>;
90 };
91 };
92
93 &spi {
94 status = "okay";
95
96 flash@0 {
97 compatible = "jedec,spi-nor";
98 reg = <0>;
99 spi-max-frequency = <40000000>;
100
101 /* partitions are passed via bootloader */
102 partitions {
103 compatible = "fixed-partitions";
104 #address-cells = <1>;
105 #size-cells = <1>;
106
107 partition@0 {
108 label = "u-boot";
109 reg = <0x000000 0x040000>;
110 read-only;
111 };
112
113 partition@40000 {
114 label = "u-boot-env";
115 reg = <0x040000 0x010000>;
116 };
117
118 partition@50000 {
119 label = "custom";
120 reg = <0x050000 0x060000>;
121 read-only;
122 };
123
124 partition@b0000 {
125 label = "inactive";
126 reg = <0x0b0000 0x7a0000>;
127 };
128
129 partition@850000 {
130 label = "inactive2";
131 reg = <0x850000 0x7a0000>;
132 };
133
134 art: partition@ff0000 {
135 label = "ART";
136 reg = <0xff0000 0x010000>;
137 read-only;
138 };
139 };
140 };
141 };
142
143 &eth0 {
144 status = "okay";
145
146 phy-handle = <&swphy4>;
147
148 nvmem-cells = <&macaddr_art_6>;
149 nvmem-cell-names = "mac-address";
150 };
151
152 &eth1 {
153 status = "okay";
154
155 nvmem-cells = <&macaddr_art_0>;
156 nvmem-cell-names = "mac-address";
157 };
158
159 &wmac {
160 status = "okay";
161
162 mtd-cal-data = <&art 0x1000>;
163 };
164
165 &art {
166 compatible = "nvmem-cells";
167 #address-cells = <1>;
168 #size-cells = <1>;
169
170 macaddr_art_0: macaddr@0 {
171 reg = <0x0 0x6>;
172 };
173
174 macaddr_art_6: macaddr@6 {
175 reg = <0x6 0x6>;
176 };
177 };