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