ath79: ZTE MF286[,A,R]: use GPIO19 as ath9k LED
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / dts / qca9563_zte_mf286.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 // Copyright (c) 2021 Cezary Jackiewicz
3 // Copyright (c) 2021, 2022 Lech Perczak
4 #include "qca956x.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8 #include <dt-bindings/leds/common.h>
9
10 / {
11 aliases {
12 led-boot = &led_debug;
13 led-failsafe = &led_debug;
14 led-running = &led_debug;
15 led-upgrade = &led_debug;
16 label-mac-device = &eth0;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21 pinctrl-names = "default";
22 pinctrl-0 = <&enable_wlan_led_gpio>;
23
24 /* Hidden SMD LED below signal strength LEDs.
25 * Visible through slits underside of the case,
26 * and slightly through the case below signal state LEDs
27 */
28 led_debug: led-0 {
29 function = LED_FUNCTION_DEBUG;
30 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
31 default-state = "on";
32 };
33
34 led-1 {
35 function = LED_FUNCTION_WLAN;
36 color = <LED_COLOR_ID_BLUE>;
37 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
38 linux,default-trigger = "phy1tpt";
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 linux,code = <KEY_RESTART>;
48 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
49 debounce-interval = <60>;
50 };
51
52 wps {
53 label = "wps";
54 linux,code = <KEY_WPS_BUTTON>;
55 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
56 debounce-interval = <60>;
57 };
58
59 wifi {
60 label = "wifi";
61 linux,code = <KEY_RFKILL>;
62 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
63 debounce-interval = <60>;
64 };
65 };
66
67 /* This GPIO is used to reset whole board _including_ the modem */
68 gpio-restart {
69 compatible = "gpio-restart";
70 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
71 active-delay = <3000>;
72 inactive-delay = <1000>;
73 };
74 };
75
76 &spi {
77 status = "okay";
78
79 boot_flash: flash@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <25000000>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88 };
89 };
90
91 system_flash: flash@1 {
92 compatible = "spi-nand";
93 reg = <1>;
94 spi-max-frequency = <25000000>;
95
96 partitions {
97 compatible = "fixed-partitions";
98 #address-cells = <1>;
99 #size-cells = <1>;
100 };
101 };
102 };
103
104 &mdio0 {
105 status = "okay";
106
107 phy-mask = <0>;
108 phy0: ethernet-phy@0 {
109 reg = <0>;
110 phy-mode = "sgmii";
111
112 qca,ar8327-initvals = <
113 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
114 0x7c 0x0000007e /* PORT0_STATUS */
115 >;
116 };
117 };
118
119 &eth0 {
120 status = "okay";
121
122 phy-mode = "sgmii";
123 phy-handle = <&phy0>;
124 };
125
126 &pcie {
127 status = "okay";
128
129 wifi_ath10k: wifi@0,0 {
130 compatible = "qcom,ath10k";
131 reg = <0x0 0 0 0 0>;
132 };
133 };
134
135 &pinmux {
136 enable_wlan_led_gpio: pinmux_wlan_led_gpio {
137 pinctrl-single,bits = <0x10 0x0 0xff000000>;
138 };
139 };
140
141 &wmac {
142 status = "okay";
143 };
144
145 &usb_phy0 {
146 status = "okay";
147 };
148
149 &usb0 {
150 status = "okay";
151 };
152
153 &usb_phy1 {
154 status = "okay";
155 };
156
157 &usb1 {
158 status = "okay";
159 };