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