ath79: add support for Senao Engenius ECB600
[openwrt/staging/stintel.git] / target / linux / ath79 / dts / ar9344_engenius_ecb600.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 model = "EnGenius ECB600";
10 compatible = "engenius,ecb600", "qca,ar9344";
11
12 aliases {
13 label-mac-device = &eth0;
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 serial0 = &uart;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio 17 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 = "amber:power";
37 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
38 default-state = "on";
39 };
40
41 wifi5g {
42 label = "blue:wifi5g";
43 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
44 linux,default-trigger = "phy0tpt";
45 };
46 };
47
48 ath9k-leds {
49 compatible = "gpio-leds";
50
51 wifi2g {
52 label = "blue:wifi2g";
53 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
54 linux,default-trigger = "phy1tpt";
55 };
56 };
57
58 virtual_flash {
59 compatible = "mtd-concat";
60
61 devices = <&firmware1 &firmware2>;
62
63 partitions {
64 compatible = "fixed-partitions";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 partition@0 {
69 compatible = "openwrt,okli";
70 label = "firmware";
71 reg = <0x0 0x0>;
72 };
73 };
74 };
75 };
76
77 &ref {
78 clock-frequency = <40000000>;
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 = <40000000>;
92
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 0x010000>;
107 };
108
109 partition@50000 {
110 label = "custom";
111 reg = <0x050000 0x050000>;
112 read-only;
113 };
114
115 partition@a0000 {
116 label = "loader";
117 reg = <0x0a0000 0x010000>;
118 read-only;
119 };
120
121 firmware2: partition@b0000 {
122 label = "firmware2";
123 reg = <0x0b0000 0x170000>;
124 };
125
126 partition@220000 {
127 label = "fakeroot";
128 reg = <0x220000 0x010000>;
129 read-only;
130 };
131
132 firmware1: partition@230000 {
133 label = "firmware1";
134 reg = <0x230000 0xbc0000>;
135 };
136
137 partition@df0000 {
138 label = "failsafe";
139 reg = <0xdf0000 0x200000>;
140 read-only;
141 };
142
143 art: partition@ff0000 {
144 label = "art";
145 reg = <0xff0000 0x010000>;
146 read-only;
147 };
148 };
149 };
150 };
151
152 &mdio0 {
153 status = "okay";
154
155 phy0: ethernet-phy@0 {
156 reg = <0>;
157 eee-broken-100tx;
158 eee-broken-1000t;
159 };
160 };
161
162 &eth0 {
163 status = "okay";
164
165 mtd-mac-address = <&art 0x0>;
166
167 phy-handle = <&phy0>;
168 phy-mode = "rgmii-id";
169
170 pll-data = <0x02000000 0x00000101 0x00001313>;
171
172 gmac-config {
173 device = <&gmac>;
174 rgmii-gmac0 = <1>;
175 rxdv-delay = <3>;
176 rxd-delay = <3>;
177 };
178 };
179
180 &pcie {
181 status = "okay";
182
183 ath9k: wifi@0,0,0 {
184 compatible = "pci168c,0030";
185 reg = <0x0 0 0 0 0>;
186 qca,no-eeprom;
187 qca,disable-5ghz;
188 mtd-mac-address = <&art 0x0>;
189 mtd-mac-address-increment = <(-2)>;
190 #gpio-cells = <2>;
191 gpio-controller;
192 };
193 };
194
195 &wmac {
196 status = "okay";
197
198 qca,disable-2ghz;
199
200 mtd-cal-data = <&art 0x1000>;
201 mtd-mac-address = <&art 0x0>;
202 mtd-mac-address-increment = <(-1)>;
203 };