ath79: add support for COMFAST CF-E130N v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9531_comfast_cf-e130n-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "qca953x.dtsi"
8
9 / {
10 compatible = "comfast,cf-e130n-v2", "qca,qca9531";
11 model = "COMFAST CF-E130N v2";
12
13 aliases {
14 serial0 = &uart;
15 led-boot = &led_rssihigh;
16 led-failsafe = &led_rssihigh;
17 led-upgrade = &led_rssihigh;
18 label-mac-device = &eth1;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 pinctrl-names = "default";
25
26 wlan {
27 label = "cf-e130n-v2:green:wlan";
28 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
29 linux,default-trigger = "phy0tpt";
30 };
31
32 lan {
33 label = "cf-e130n-v2:green:lan";
34 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
35 };
36
37 unused {
38 label = "cf-e130n-v2:green:unused";
39 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
40 };
41
42 rssilow {
43 label = "cf-e130n-v2:red:rssilow";
44 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
45 };
46
47 rssimediumlow {
48 label = "cf-e130n-v2:red:rssimediumlow";
49 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
50 };
51
52 rssimediumhigh {
53 label = "cf-e130n-v2:green:rssimediumhigh";
54 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
55 };
56
57 led_rssihigh: rssihigh {
58 label = "cf-e130n-v2:green:rssihigh";
59 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
60 };
61 };
62
63 keys {
64 compatible = "gpio-keys";
65
66 reset {
67 label = "reset";
68 linux,code = <KEY_RESTART>;
69 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
70 debounce-interval = <60>;
71 };
72 };
73 };
74
75 &spi {
76 status = "okay";
77
78 num-cs = <1>;
79
80 flash@0 {
81 compatible = "jedec,spi-nor";
82 reg = <0>;
83 spi-max-frequency = <25000000>;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x000000 0x010000>;
93 read-only;
94 };
95
96 art: partition@10000 {
97 label = "art";
98 reg = <0x010000 0x010000>;
99 read-only;
100 };
101
102 partition@20000 {
103 compatible = "denx,uimage";
104 label = "firmware";
105 reg = <0x020000 0x7c0000>;
106 };
107
108 partition@7e0000 {
109 label = "configs";
110 reg = <0x7e0000 0x010000>;
111 read-only;
112 };
113
114 partition@7f0000 {
115 label = "nvram";
116 reg = <0x7f0000 0x010000>;
117 read-only;
118 };
119 };
120 };
121 };
122
123 &uart {
124 status = "okay";
125
126 };
127
128 &eth0 {
129 compatible = "syscon", "simple-mfd";
130 };
131
132 &eth1 {
133 status = "okay";
134
135 phy-handle = <&swphy0>;
136
137 mtd-mac-address = <&art 0x0>;
138
139 gmac-config {
140 device = <&gmac>;
141 switch-phy-swap = <1>;
142 };
143 };
144
145 &wmac {
146 status = "okay";
147
148 mtd-mac-address = <&art 0x0>;
149 mtd-cal-data = <&art 0x1000>;
150 };