ath79: add support for Comfast CF-EW71 v2
[openwrt/staging/stintel.git] / target / linux / ath79 / dts / qca9531_comfast_cf-ew71-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.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-ew71-v2", "qca,qca9531";
11 model = "COMFAST CF-EW71 v2";
12
13 aliases {
14 serial0 = &uart;
15 led-boot = &led_wan;
16 led-failsafe = &led_wan;
17 led-upgrade = &led_wan;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 pinctrl-names = "default";
24 pinctrl-0 = <&jtag_disable_pins>;
25
26 lan {
27 function = LED_FUNCTION_LAN;
28 color = <LED_COLOR_ID_BLUE>;
29 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
30 };
31
32 led_wan: wan {
33 function = LED_FUNCTION_WAN;
34 color = <LED_COLOR_ID_BLUE>;
35 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
36 };
37
38 wlan {
39 function = LED_FUNCTION_WLAN;
40 color = <LED_COLOR_ID_BLUE>;
41 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
42 linux,default-trigger = "phy0tpt";
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 reset {
50 label = "reset";
51 linux,code = <KEY_RESTART>;
52 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
53 debounce-interval = <60>;
54 };
55 };
56
57 watchdog {
58 compatible = "linux,wdt-gpio";
59
60 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
61 hw_algo = "toggle";
62 hw_margin_ms = <1200>;
63 always-running;
64 };
65 };
66
67 &pcie0 {
68 status = "okay";
69 };
70
71 &spi {
72 status = "okay";
73
74 flash@0 {
75 compatible = "winbond,w25q128", "jedec,spi-nor";
76 reg = <0>;
77 spi-max-frequency = <25000000>;
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 0x010000>;
87 read-only;
88 };
89
90 art: partition@10000 {
91 label = "art";
92 reg = <0x010000 0x010000>;
93 read-only;
94
95 nvmem-layout {
96 compatible = "fixed-layout";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 macaddr_art_0: macaddr@0 {
101 compatible = "mac-base";
102 reg = <0x0 0x6>;
103 #nvmem-cell-cells = <1>;
104 };
105 };
106 };
107
108 partition@20000 {
109 compatible = "denx,uimage";
110 label = "firmware";
111 reg = <0x020000 0xfd0000>;
112 };
113
114 partition@ff0000 {
115 label = "nvram";
116 reg = <0xff0000 0x010000>;
117 read-only;
118 };
119 };
120 };
121 };
122
123 &eth0 {
124 status = "okay";
125
126 phy-handle = <&swphy4>;
127
128 nvmem-cells = <&macaddr_art_0 1>;
129 nvmem-cell-names = "mac-address";
130 };
131
132 &eth1 {
133 nvmem-cells = <&macaddr_art_0 0>;
134 nvmem-cell-names = "mac-address";
135 };
136
137 &wmac {
138 status = "okay";
139
140 mtd-cal-data = <&art 0x1000>;
141 nvmem-cells = <&macaddr_art_0 3>;
142 nvmem-cell-names = "mac-address";
143 };