d9ca2c0f72384854ec4146a015ded4b307761e6f
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9330_openmesh_om2p.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9330.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 reset {
26 label = "reset";
27 linux,code = <KEY_RESTART>;
28 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 pinctrl-names = "default";
36 pinctrl-0 = <&switch_led_disable_pins>;
37
38 wifi_yellow {
39 label = "yellow:wifi";
40 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
41 };
42
43 led_power_blue: power_blue {
44 label = "blue:power";
45 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
46 default-state = "on";
47 };
48
49 lan_blue {
50 label = "blue:lan";
51 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
52 };
53
54 wifi_green {
55 label = "green:wifi";
56 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
57 linux,default-trigger = "phy0tpt";
58 };
59
60 wifi_red {
61 label = "red:wifi";
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 26 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 &uart {
82 status = "okay";
83 };
84
85 &spi {
86 status = "okay";
87
88 flash@0 {
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <25000000>;
92
93 /* partitions are passed via bootloader */
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "u-boot";
101 reg = <0x000000 0x040000>;
102 read-only;
103 };
104
105 partition@40000 {
106 label = "u-boot-env";
107 reg = <0x040000 0x040000>;
108 };
109
110 partition@80000 {
111 label = "custom";
112 reg = <0x080000 0x140000>;
113 read-only;
114 };
115
116 partition@1c0000 {
117 label = "inactive";
118 reg = <0x1c0000 0x700000>;
119 };
120
121 partition@8c0000 {
122 label = "inactive2";
123 reg = <0x8c0000 0x700000>;
124 };
125
126 art: partition@fc0000 {
127 label = "ART";
128 reg = <0xfc0000 0x040000>;
129 read-only;
130 };
131 };
132 };
133 };
134
135 &eth0 {
136 status = "okay";
137
138 mtd-mac-address = <&art 0x6>;
139 };
140
141 &eth1 {
142 status = "okay";
143
144 mtd-mac-address = <&art 0x0>;
145 };
146
147 &wmac {
148 status = "okay";
149
150 mtd-cal-data = <&art 0x1000>;
151 };