ath79: add support for TP-Link EAP245-v3
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_eap245-v3.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 "qca956x.dtsi"
8
9 / {
10 compatible = "tplink,eap245-v3", "qca,qca9563";
11 model = "TP-Link EAP245 v3";
12
13 aliases {
14 led-boot = &led_status_green;
15 led-failsafe = &led_status_amber;
16 led-running = &led_status_green;
17 led-upgrade = &led_status_amber;
18 label-mac-device = &eth0;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_status_green: status_green {
25 label = "tp-link:green:status";
26 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
27 default-state = "on";
28 };
29
30 led_status_amber: status_amber {
31 label = "tp-link:amber:status";
32 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "Reset button";
41 linux,code = <KEY_RESTART>;
42 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
43 debounce-interval = <60>;
44 };
45 };
46 };
47
48 &pcie {
49 status = "okay";
50 };
51
52 &uart {
53 status = "okay";
54 };
55
56 &spi {
57 status = "okay";
58 num-cs = <1>;
59
60 flash@0 {
61 compatible = "jedec,spi-nor";
62 reg = <0>;
63 spi-max-frequency = <25000000>;
64
65 partitions {
66 compatible = "fixed-partitions";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 partition@0 {
71 label = "factory-boot";
72 reg = <0x000000 0x040000>;
73 read-only;
74 };
75
76 partition@40000 {
77 label = "u-boot";
78 reg = <0x040000 0x040000>;
79 read-only;
80 };
81
82 partition@80000 {
83 label = "partition-table";
84 reg = <0x080000 0x010000>;
85 read-only;
86 };
87
88 info: partition@90000 {
89 label = "info";
90 reg = <0x090000 0x010000>;
91 read-only;
92 };
93
94 art: partition@a0000 {
95 label = "art";
96 reg = <0x0a0000 0x010000>;
97 read-only;
98 };
99
100 partition@b0000 {
101 label = "extra-para";
102 reg = <0x0b0000 0x010000>;
103 read-only;
104 };
105
106 partition@c0000 {
107 compatible = "openwrt,elf";
108 label = "firmware";
109 reg = <0x0c0000 0xe40000>;
110 };
111
112 partition@f00000 {
113 label = "config";
114 reg = <0xf00000 0x030000>;
115 read-only;
116 };
117
118 partition@f30000 {
119 label = "mutil-log";
120 reg = <0xf30000 0x080000>;
121 read-only;
122 };
123
124 partition@fb0000 {
125 label = "oops";
126 reg = <0xfb0000 0x040000>;
127 read-only;
128 };
129 };
130 };
131 };
132
133 &mdio0 {
134 status = "okay";
135
136 phy-mask = <0x1>;
137
138 phy0: ethernet-phy@0 {
139 reg = <0>;
140 phy-mode = "sgmii";
141 qca,ar8327-initvals = <
142 0x04 0x00080080 /* PAD0 */
143 0x7c 0x0000007e /* PORT0_STATUS */
144 0xe0 0xc74164de /* SGMII_CTRL */
145 >;
146 };
147 };
148
149 &eth0 {
150 status = "okay";
151
152 phy-handle = <&phy0>;
153 phy-mode = "sgmii";
154
155 mtd-mac-address = <&info 0x8>;
156 };
157
158 &wmac {
159 status = "okay";
160
161 mtd-cal-data = <&art 0x1000>;
162 mtd-mac-address = <&info 0x8>;
163 };