ca488223afd361075a94b721e65ef4a220df55af
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7242_engenius_ecb350-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7242.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 compatible = "engenius,ecb350-v1", "qca,ar7242";
11 model = "EnGenius ECB350 v1";
12
13 aliases {
14 label-mac-device = &ath9k;
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 0 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 = "green:power";
37 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
38 default-state = "on";
39 };
40 };
41
42 ath9k-leds {
43 compatible = "gpio-leds";
44
45 wlan {
46 label = "green:wlan";
47 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
48 linux,default-trigger = "phy0tpt";
49 };
50 };
51
52 virtual_flash {
53 compatible = "mtd-concat";
54
55 devices = <&fwconcat0 &fwconcat1>;
56
57 partitions {
58 compatible = "fixed-partitions";
59 #address-cells = <1>;
60 #size-cells = <1>;
61
62 partition@0 {
63 compatible = "openwrt,uimage", "denx,uimage";
64 openwrt,ih-magic = <IH_MAGIC_OKLI>;
65 label = "firmware";
66 reg = <0x0 0x0>;
67 };
68 };
69 };
70 };
71
72 &spi {
73 status = "okay";
74
75 flash@0 {
76 compatible = "jedec,spi-nor";
77 reg = <0>;
78 spi-max-frequency = <20000000>;
79
80 partitions {
81 compatible = "fixed-partitions";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 partition@0 {
86 label = "u-boot";
87 reg = <0x0 0x40000>;
88 read-only;
89 };
90
91 partition@40000 {
92 label = "u-boot-env";
93 reg = <0x40000 0x10000>;
94 };
95
96 partition@50000 {
97 label = "custom";
98 reg = <0x50000 0x50000>;
99 read-only;
100 };
101
102 partition@a0000 {
103 label = "loader";
104 reg = <0xa0000 0x10000>;
105 read-only;
106 };
107
108 fwconcat1: partition@b0000 {
109 label = "fwconcat1";
110 reg = <0xb0000 0xf0000>;
111 };
112
113 partition@1a0000 {
114 label = "fakeroot";
115 reg = <0x1a0000 0x10000>;
116 read-only;
117 };
118
119 fwconcat0: partition@1b0000 {
120 label = "fwconcat0";
121 reg = <0x1b0000 0x4c0000>;
122 };
123
124 partition@670000 {
125 label = "failsafe";
126 reg = <0x670000 0x180000>;
127 read-only;
128 };
129
130 art: partition@7f0000 {
131 label = "art";
132 reg = <0x7f0000 0x10000>;
133 read-only;
134 };
135 };
136 };
137 };
138
139 &mdio0 {
140 status = "okay";
141
142 phy4: ethernet-phy@4 {
143 reg = <4>;
144 eee-broken-100tx;
145 eee-broken-1000t;
146 };
147 };
148
149 &eth0 {
150 status = "okay";
151
152 mtd-mac-address = <&art 0x0>;
153
154 phy-handle = <&phy4>;
155 phy-mode = "rgmii-id";
156
157 pll-data = <0x02000000 0x00000101 0x00001313>;
158 };
159
160 &pcie {
161 status = "okay";
162
163 ath9k: wifi@0,0,0 {
164 compatible = "pci168c,002a";
165 reg = <0x0 0 0 0 0>;
166 mtd-mac-address = <&art 0x0>;
167 mtd-mac-address-increment = <(-1)>;
168 qca,no-eeprom;
169 #gpio-cells = <2>;
170 gpio-controller;
171 };
172 };