ath79: add support for COMFAST CF-E380AC v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_openmesh_a60.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.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_status_green;
16 led-failsafe = &led_status_green;
17 led-running = &led_status_green;
18 led-upgrade = &led_status_green;
19 label-mac-device = &eth0;
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 linux,code = <KEY_RESTART>;
28 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 status_blue {
36 label = "blue:status";
37 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
38 };
39
40 status_red {
41 label = "red:status";
42 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
43 };
44
45 led_status_green: status_green {
46 label = "green:status";
47 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
48 };
49 };
50
51 watchdog {
52 compatible = "linux,wdt-gpio";
53 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
54 hw_algo = "toggle";
55 /* hw_margin_ms is actually 300s but driver limits it to 60s */
56 hw_margin_ms = <60000>;
57 always-running;
58 };
59 };
60
61 &usb_phy1 {
62 status = "okay";
63 };
64
65 &usb1 {
66 status = "okay";
67 };
68
69 &spi {
70 status = "okay";
71
72 flash@0 {
73 compatible = "jedec,spi-nor";
74 reg = <0>;
75 spi-max-frequency = <40000000>;
76
77 /* partitions are passed via bootloader */
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x000000 0x040000>;
86 read-only;
87 };
88
89 partition@40000 {
90 label = "u-boot-env";
91 reg = <0x040000 0x010000>;
92 };
93
94 partition@50000 {
95 label = "custom";
96 reg = <0x050000 0x060000>;
97 read-only;
98 };
99
100 partition@b0000 {
101 label = "inactive";
102 reg = <0x0b0000 0x7a0000>;
103 };
104
105 partition@850000 {
106 label = "inactive2";
107 reg = <0x850000 0x7a0000>;
108 };
109
110 art: partition@ff0000 {
111 label = "ART";
112 reg = <0xff0000 0x010000>;
113 read-only;
114 };
115 };
116 };
117 };
118
119 &mdio0 {
120 status = "okay";
121
122 phy1: ethernet-phy@1 {
123 reg = <1>;
124 eee-broken-100tx;
125 eee-broken-1000t;
126 };
127
128 phy2: ethernet-phy@2 {
129 reg = <2>;
130 eee-broken-100tx;
131 eee-broken-1000t;
132 at803x-override-sgmii-link-check;
133 };
134 };
135
136 &eth0 {
137 status = "okay";
138
139 pll-data = <0x82000101 0x80000101 0x80001313>;
140
141 nvmem-cells = <&macaddr_art_0>;
142 nvmem-cell-names = "mac-address";
143
144 phy-mode = "rgmii-id";
145 phy-handle = <&phy1>;
146
147 gmac-config {
148 device = <&gmac>;
149 rgmii-enabled = <1>;
150 rxd-delay = <3>;
151 rxdv-delay = <3>;
152 txd-delay = <0>;
153 txen-delay = <0>;
154 };
155 };
156
157 &eth1 {
158 status = "okay";
159
160 pll-data = <0x03000101 0x80000101 0x80001313>;
161
162 nvmem-cells = <&macaddr_art_6>;
163 nvmem-cell-names = "mac-address";
164
165 qca955x-sgmii-fixup;
166
167 phy-handle = <&phy2>;
168 };
169
170 &wmac {
171 status = "okay";
172
173 mtd-cal-data = <&art 0x1000>;
174 nvmem-cells = <&macaddr_art_0>;
175 nvmem-cell-names = "mac-address";
176 mac-address-increment = <2>;
177 };
178
179 &pcie0 {
180 status = "okay";
181 };
182
183 &art {
184 compatible = "nvmem-cells";
185 #address-cells = <1>;
186 #size-cells = <1>;
187
188 macaddr_art_0: macaddr@0 {
189 reg = <0x0 0x6>;
190 };
191
192 macaddr_art_6: macaddr@6 {
193 reg = <0x6 0x6>;
194 };
195 };