ath79: add support for COMFAST CF-E380AC v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_comfast_cf-e380ac-v2.dts
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 compatible = "comfast,cf-e380ac-v2", "qca,qca9558";
10 model = "COMFAST CF-E380AC";
11
12 aliases {
13 serial0 = &uart;
14 label-mac-device = &eth1;
15 led-boot = &led_lan;
16 led-failsafe = &led_lan;
17 led-upgrade = &led_lan;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 pinctrl-names = "default";
35 pinctrl-0 = <&jtag_disable_pins>;
36
37 led_lan: lan {
38 label = "green:lan";
39 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
40 };
41
42 wlan2g {
43 label = "blue:wlan2g";
44 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
45 linux,default-trigger = "phy1tpt";
46 };
47
48 wlan5g {
49 label = "red:wlan5g";
50 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy0tpt";
52 };
53 };
54
55 watchdog {
56 compatible = "linux,wdt-gpio";
57
58 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
59 hw_algo = "toggle";
60 hw_margin_ms = <1200>;
61 always-running;
62 };
63 };
64
65 &eth0 {
66 status = "okay";
67 mtd-mac-address = <&art 0x0>;
68 };
69
70
71 &spi {
72 status = "okay";
73
74 flash@0 {
75 compatible = "jedec,spi-nor";
76 reg = <0>;
77 spi-max-frequency = <50000000>;
78
79 partitions {
80 compatible = "fixed-partitions";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 partition@0 {
85 label = "u-boot";
86 reg = <0x000000 0x040000>;
87 read-only;
88 };
89
90 art: partition@40000 {
91 label = "art";
92 reg = <0x040000 0x010000>;
93 read-only;
94 };
95
96 partition@50000 {
97 compatible = "denx,uimage";
98 label = "firmware";
99 reg = <0x050000 0x0fa0000>;
100 };
101
102 partition@ff0000 {
103 label = "art-backup";
104 reg = <0xff0000 0x010000>;
105 read-only;
106 };
107 };
108 };
109 };
110
111 &eth0 {
112 status = "okay";
113
114 nvmem-cells = <&macaddr_art_0>;
115 nvmem-cell-names = "mac-address";
116
117 pll-data = <0xbe000000 0xb0000101 0xb0001313>;
118
119 fixed-link {
120 speed = <1000>;
121 full-duplex;
122 };
123 };
124
125 &pcie0 {
126 status = "okay";
127 };
128
129 &wdt {
130 status = "okay";
131 };
132
133 &wmac {
134 status = "okay";
135
136 mtd-cal-data = <&art 0x1000>;
137 nvmem-cells = <&macaddr_art_0>;
138 nvmem-cell-names = "mac-address";
139 mac-address-increment = <10>;
140 };
141
142 &art {
143 compatible = "nvmem-cells";
144 #address-cells = <1>;
145 #size-cells = <1>;
146
147 macaddr_art_0: macaddr@0 {
148 reg = <0x0 0x6>;
149 };
150 };