ath79: add support for TP-Link CPE710-v1
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_cpe710-v1.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 model = "TP-Link CPE710 v1";
10 compatible = "tplink,cpe710-v1", "qca,qca9563";
11
12 aliases {
13 label-mac-device = &eth0;
14 led-boot = &led_lan;
15 led-failsafe = &led_lan;
16 led-upgrade = &led_lan;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_lan: lan {
23 label = "blue:lan";
24 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
25 };
26
27 wlan5g {
28 label = "blue:wlan5g";
29 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
30 linux,default-trigger = "phy0tpt";
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys";
36
37 reset {
38 label = "Reset button";
39 linux,code = <KEY_RESTART>;
40 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
41 debounce-interval = <60>;
42 };
43 };
44 };
45
46 &pcie {
47 status = "okay";
48 };
49
50 &spi {
51 status = "okay";
52
53 flash@0 {
54 compatible = "jedec,spi-nor";
55 reg = <0>;
56 spi-max-frequency = <40000000>;
57
58 partitions {
59 compatible = "fixed-partitions";
60 #address-cells = <1>;
61 #size-cells = <1>;
62
63 partition@0 {
64 label = "u-boot";
65 reg = <0x000000 0x040000>;
66 read-only;
67 };
68
69 partition@40000 {
70 label = "u-boot-env";
71 reg = <0x040000 0x010000>;
72 };
73
74 partition@50000 {
75 label = "partition-table";
76 reg = <0x050000 0x010000>;
77 read-only;
78 };
79
80 info: partition@60000 {
81 label = "info";
82 reg = <0x060000 0x010000>;
83 read-only;
84 };
85
86 partition@70000 {
87 compatible = "denx,uimage";
88 label = "firmware";
89 reg = <0x070000 0xf50000>;
90 };
91
92 partition@fc0000 {
93 label = "config";
94 reg = <0xfc0000 0x030000>;
95 read-only;
96 };
97
98 art: partition@ff0000 {
99 label = "art";
100 reg = <0xff0000 0x010000>;
101 read-only;
102 };
103 };
104 };
105 };
106
107 &pinmux {
108 mdio_pins: mdio_pins {
109 /* GPIO 10 as MDIO(0x20), GPIO 8 as MDC(0x21) */
110 pinctrl-single,bits = <0x8 0x00200021 0x00ff00ff>;
111 };
112 };
113
114 &mdio0 {
115 status = "okay";
116
117 pinctrl-names = "default";
118 pinctrl-0 = <&mdio_pins>;
119
120 phy-mask = <0x10>;
121
122 phy4: ethernet-phy@4 {
123 reg = <4>;
124 reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
125 };
126 };
127
128 &eth0 {
129 status = "okay";
130
131 phy-handle = <&phy4>;
132 phy-mode = "sgmii";
133
134 nvmem-cells = <&macaddr_info_8>;
135 nvmem-cell-names = "mac-address";
136
137 qca956x-serdes-fixup;
138
139 gmac-config {
140 device = <&gmac>;
141 };
142 };
143
144 &info {
145 compatible = "nvmem-cells";
146 #address-cells = <1>;
147 #size-cells = <1>;
148
149 macaddr_info_8: macaddr@8 {
150 reg = <0x8 0x6>;
151 };
152 };