6c894a314ea140c5337454ac704843a79dc98107
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_re450.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "qca956x.dtsi"
7
8 / {
9         chosen {
10                 bootargs = "console=ttyS0,115200n8";
11         };
12
13         aliases {
14                 label-mac-device = &eth0;
15                 led-boot = &led_power;
16                 led-failsafe = &led_power;
17                 led-running = &led_power;
18                 led-upgrade = &led_power;
19                 mdio-gpio0 = &mdio2;
20         };
21
22         leds {
23                 compatible = "gpio-leds";
24
25                 led_power: power {
26                         label = "tp-link:blue:power";
27                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
28                 };
29
30                 wlan2g {
31                         label = "tp-link:blue:wlan2g";
32                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
33                         linux,default-trigger = "phy1tpt";
34                 };
35
36                 wlan5g {
37                         label = "tp-link:blue:wlan5g";
38                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
39                         linux,default-trigger = "phy0tpt";
40                 };
41
42                 lan_link {
43                         label = "tp-link:green:lan_link";
44                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
45                 };
46
47                 lan_data {
48                         label = "tp-link:green:lan_data";
49                         gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
50                 };
51
52                 wps_blue {
53                         label = "tp-link:blue:wps";
54                         gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
55                 };
56
57                 wps_red {
58                         label = "tp-link:red:wps";
59                         gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
60                 };
61         };
62
63         keys {
64                 compatible = "gpio-keys";
65
66                 reset {
67                         label = "Reset button";
68                         linux,code = <KEY_RESTART>;
69                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
70                         debounce-interval = <60>;
71                 };
72
73                 power {
74                         label = "Power button";
75                         linux,code = <KEY_POWER>;
76                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
77                         debounce-interval = <60>;
78                 };
79
80                 leds {
81                         label = "LED control button";
82                         linux,code = <BTN_0>;
83                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
84                         debounce-interval = <60>;
85                 };
86
87                 wps {
88                         label = "WPS button";
89                         linux,code = <KEY_WPS_BUTTON>;
90                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
91                         debounce-interval = <60>;
92                 };
93         };
94
95         mdio2: mdio {
96                 compatible = "virtual,mdio-gpio";
97
98                 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>, /* MDC */
99                         <&gpio 4 GPIO_ACTIVE_HIGH>; /* MDIO */
100                 #address-cells = <1>;
101                 #size-cells = <0>;
102
103                 phy4: ethernet-phy@4 {
104                         reg = <4>;
105                         device_type = "ethernet-phy";
106                         reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
107                 };
108         };
109 };
110
111 &pcie {
112         status = "okay";
113 };
114
115 &uart {
116         status = "okay";
117 };
118
119 &gpio {
120         status = "okay";
121 };
122
123 &spi {
124         status = "okay";
125
126         num-cs = <1>;
127
128         flash@0 {
129                 compatible = "jedec,spi-nor";
130                 reg = <0>;
131                 spi-max-frequency = <25000000>;
132
133                 partitions: partitions {
134                         compatible = "fixed-partitions";
135                         #address-cells = <1>;
136                         #size-cells = <1>;
137                 };
138         };
139 };
140
141 &eth0 {
142         status = "okay";
143
144         phy-mode = "sgmii";
145         phy-handle = <&phy4>;
146
147         mtd-mac-address = <&info 0x8>;
148 };
149
150 &wmac {
151         status = "okay";
152
153         mtd-cal-data = <&art 0x1000>;
154         mtd-mac-address = <&info 0x8>;
155 };