ath79: DTS file style update and harmonization
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_archer-x6-v2.dtsi
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         chosen {
11                 bootargs = "console=ttyS0,115200n8";
12         };
13
14         aliases {
15                 led-boot = &led_power;
16                 led-failsafe = &led_power;
17                 led-running = &led_power;
18                 led-upgrade = &led_power;
19                 label-mac-device = &eth0;
20         };
21
22         leds {
23                 compatible = "gpio-leds";
24
25                 led_power: power {
26                         label = "tp-link:green:power";
27                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
28                         default-state = "on";
29                 };
30
31                 wlan2g {
32                         label = "tp-link:green:wlan2g";
33                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
34                         linux,default-trigger = "phy1tpt";
35                 };
36
37                 wlan5g {
38                         label = "tp-link:green:wlan5g";
39                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
40                         linux,default-trigger = "phy0tpt";
41                 };
42
43                 lan {
44                         label = "tp-link:green:lan";
45                         gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
46                 };
47
48                 wan {
49                         label = "tp-link:green:wan";
50                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
51                 };
52
53                 wan_fail {
54                         label = "tp-link:amber:wan";
55                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
56                 };
57
58                 wps {
59                         label = "tp-link:green:wps";
60                         gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
61                 };
62         };
63
64         keys {
65                 compatible = "gpio-keys";
66
67                 reset {
68                         label = "Reset button";
69                         linux,code = <KEY_RESTART>;
70                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
71                         debounce-interval = <60>;
72                 };
73
74                 wps {
75                         label = "WPS button";
76                         linux,code = <KEY_WPS_BUTTON>;
77                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
78                         debounce-interval = <60>;
79                 };
80         };
81 };
82
83 &pcie {
84         status = "okay";
85 };
86
87 &uart {
88         status = "okay";
89 };
90
91 &gpio {
92         status = "okay";
93 };
94
95 &spi {
96         status = "okay";
97
98         num-cs = <1>;
99
100         flash@0 {
101                 compatible = "jedec,spi-nor";
102                 reg = <0>;
103                 spi-max-frequency = <25000000>;
104
105                 partitions {
106                         compatible = "fixed-partitions";
107                         #address-cells = <1>;
108                         #size-cells = <1>;
109
110                         partition@0 {
111                                 label = "u-boot";
112                                 reg = <0x000000 0x020000>;
113                                 read-only;
114                         };
115
116                         mac: partition@20000 {
117                                 label = "mac";
118                                 reg = <0x020000 0x010000>;
119                                 read-only;
120                         };
121
122                         partition@30000 {
123                                 compatible = "denx,uimage";
124                                 label = "firmware";
125                                 reg = <0x030000 0x7a0000>;
126                         };
127
128                         partition@7d0000 {
129                                 label = "tplink";
130                                 reg = <0x7d0000 0x020000>;
131                                 read-only;
132                         };
133
134                         art: partition@7f0000 {
135                                 label = "art";
136                                 reg = <0x7f0000 0x010000>;
137                                 read-only;
138                         };
139                 };
140         };
141 };
142
143 &mdio0 {
144         status = "okay";
145
146         phy-mask = <0>;
147
148         phy0: ethernet-phy@0 {
149                 reg = <0>;
150                 phy-mode = "sgmii";
151                 qca,mib-poll-interval = <500>;
152
153                 qca,ar8327-initvals = <
154                         0x04 0x00080080 /* PORT0 PAD MODE CTRL */
155                         0x7c 0x0000007e /* PORT0_STATUS */
156                         >;
157         };
158 };
159
160 &eth0 {
161         status = "okay";
162
163         phy-mode = "sgmii";
164         mtd-mac-address = <&mac 0x8>;
165         phy-handle = <&phy0>;
166 };
167
168 &wmac {
169         status = "okay";
170
171         mtd-cal-data = <&art 0x1000>;
172         mtd-mac-address = <&mac 0x8>;
173 };