7aa89a4cce5c111138b3d7a2cc7a8c3242e272ae
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9341_engenius_eap300-v2.dts
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 #include <dt-bindings/mtd/partitions/uimage.h>
8
9 / {
10 model = "Engenius EAP300 v2";
11 compatible = "engenius,eap300-v2", "qca,ar9341";
12
13 aliases {
14 serial0 = &uart;
15 led-boot = &led_power;
16 led-failsafe = &led_power;
17 led-running = &led_power;
18 led-upgrade = &led_power;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 linux,code = <KEY_RESTART>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 led_power: power {
36 label = "blue:power";
37 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
38 default-state = "on";
39 };
40
41 wlan {
42 label = "blue:wlan";
43 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
44 linux,default-trigger = "phy0tpt";
45 };
46
47 lan {
48 label = "blue:lan";
49 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 virtual_flash {
54 compatible = "mtd-concat";
55
56 devices = <&fwconcat0 &fwconcat1>;
57
58 partitions {
59 compatible = "fixed-partitions";
60 #address-cells = <1>;
61 #size-cells = <1>;
62
63 partition@0 {
64 compatible = "openwrt,uimage", "denx,uimage";
65 openwrt,ih-magic = <IH_MAGIC_OKLI>;
66 label = "firmware";
67 reg = <0x0 0x0>;
68 };
69 };
70 };
71 };
72
73 &ref {
74 clock-frequency = <40000000>;
75 };
76
77 &uart {
78 status = "okay";
79 };
80
81 &spi {
82 status = "okay";
83
84 flash@0 {
85 compatible = "jedec,spi-nor";
86 reg = <0>;
87 spi-max-frequency = <20000000>;
88
89 partitions {
90 compatible = "fixed-partitions";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 partition@0 {
95 label = "u-boot";
96 reg = <0x000000 0x040000>;
97 read-only;
98 };
99
100 partition@40000 {
101 label = "u-boot-env";
102 reg = <0x040000 0x010000>;
103 };
104
105 partition@50000 {
106 label = "custom";
107 reg = <0x050000 0x050000>;
108 read-only;
109 };
110
111 partition@a0000 {
112 label = "loader";
113 reg = <0x0a0000 0x010000>;
114 read-only;
115 };
116
117 fwconcat1: partition@b0000 {
118 label = "fwconcat1";
119 reg = <0x0b0000 0x170000>;
120 };
121
122 partition@220000 {
123 label = "fakeroot";
124 reg = <0x220000 0x010000>;
125 read-only;
126 };
127
128 fwconcat0: partition@230000 {
129 label = "fwconcat0";
130 reg = <0x230000 0xbc0000>;
131 };
132
133 partition@df0000 {
134 label = "failsafe";
135 reg = <0xdf0000 0x200000>;
136 read-only;
137 };
138
139 art: partition@ff0000 {
140 label = "art";
141 reg = <0xff0000 0x010000>;
142 read-only;
143 };
144 };
145 };
146 };
147
148 &eth0 {
149 status = "okay";
150
151 mtd-mac-address = <&art 0x0>;
152
153 phy-handle = <&swphy0>;
154
155 gmac-config {
156 device = <&gmac>;
157 switch-phy-swap = <1>;
158 };
159 };
160
161 &eth1 {
162 compatible = "syscon", "simple-mfd";
163 };
164
165 &wmac {
166 status = "okay";
167
168 mtd-cal-data = <&art 0x1000>;
169 };