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