ath79: Add support for OpenMesh OM2P v1
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar7240_openmesh_om2p-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7240.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "openmesh,om2p-v1", "qca,ar7240";
10 model = "OpenMesh OM2P v1";
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 = &eth0;
22 };
23
24 keys {
25 compatible = "gpio-keys";
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 pinctrl-names = "default";
38 pinctrl-0 = <&switch_led_disable_pins>;
39
40 led_power_blue: power_blue {
41 label = "blue:power";
42 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
43 default-state = "on";
44 };
45
46 wifi_green {
47 label = "green:wifi";
48 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
49 linux,default-trigger = "phy0tpt";
50 };
51
52 wifi_red {
53 label = "red:wifi";
54 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
55 };
56
57 wifi_yellow {
58 label = "yellow:wifi";
59 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
60 };
61
62 lan_blue {
63 label = "blue:lan";
64 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
65 };
66
67 wan_blue {
68 label = "blue:wan";
69 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
70 };
71 };
72
73 watchdog {
74 compatible = "linux,wdt-gpio";
75 gpios = <&gpio 12 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 &spi {
84 status = "okay";
85
86 flash@0 {
87 compatible = "jedec,spi-nor";
88 reg = <0>;
89 spi-max-frequency = <40000000>;
90 linux,mtd-name = "ar7240-nor0";
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 nvmem-cells = <&macaddr_art_0>;
136 nvmem-cell-names = "mac-address";
137 };
138
139 &eth1 {
140 status = "okay";
141
142 nvmem-cells = <&macaddr_art_6>;
143 nvmem-cell-names = "mac-address";
144 };
145
146 &pcie {
147 status = "okay";
148
149 wifi@0,0 {
150 compatible = "pci168c,002a";
151 reg = <0x0000 0 0 0 0>;
152 qca,no-eeprom;
153 #gpio-cells = <2>;
154 gpio-controller;
155 };
156 };
157
158 &art {
159 compatible = "nvmem-cells";
160 #address-cells = <1>;
161 #size-cells = <1>;
162
163 macaddr_art_0: macaddr@0 {
164 reg = <0x0 0x6>;
165 };
166
167 macaddr_art_6: macaddr@6 {
168 reg = <0x6 0x6>;
169 };
170 };