ath79: Fix led nodes for TL-WR740N v2 and add its clones
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7240_tplink_tl-wr74xn-v1.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 "ar7240.dtsi"
7
8 / {
9 aliases {
10 led-status = &led_system;
11 };
12
13 gpio-keys-polled {
14 compatible = "gpio-keys-polled";
15 poll-interval = <20>;
16
17 reset {
18 label = "reset";
19 linux,code = <KEY_RESTART>;
20 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
21 debounce-interval = <60>;
22 };
23
24 wps {
25 label = "wps";
26 linux,code = <KEY_WPS_BUTTON>;
27 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
28 debounce-interval = <60>;
29 };
30 };
31
32 gpio-leds {
33 compatible = "gpio-leds";
34 pinctrl-names = "default";
35 pinctrl-0 = <&switch_led_pins>;
36
37 led_system: system {
38 label = "tp-link:green:system";
39 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
40 };
41
42 qss {
43 label = "tp-link:green:qss";
44 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
45 };
46
47 lan1 {
48 label = "tp-link:green:lan1";
49 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
50 };
51
52 lan2 {
53 label = "tp-link:green:lan2";
54 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
55 };
56
57 lan3 {
58 label = "tp-link:green:lan3";
59 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
60 };
61
62 lan4 {
63 label = "tp-link:green:lan4";
64 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
65 };
66
67 wan {
68 label = "tp-link:green:wan";
69 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
70 };
71 };
72
73 ath9k-leds {
74 compatible = "gpio-leds";
75
76 wlan {
77 label = "tp-link:green:wlan";
78 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
79 default-state = "off";
80 linux,default-trigger = "phy0tpt";
81 };
82 };
83 };
84
85 &spi {
86 status = "okay";
87 num-cs = <1>;
88
89 flash@0 {
90 compatible = "jedec,spi-nor";
91 reg = <0>;
92 spi-max-frequency = <25000000>;
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 uboot: partition@0 {
100 reg = <0x0 0x20000>;
101 label = "u-boot";
102 read-only;
103 };
104
105 firmware: partition@20000 {
106 reg = <0x20000 0x3d0000>;
107 label = "firmware";
108 };
109
110 art: partition@3f0000 {
111 reg = <0x3f0000 0x10000>;
112 label = "art";
113 read-only;
114 };
115 };
116 };
117 };
118
119 &eth0 {
120 status = "okay";
121
122 mtd-mac-address = <&uboot 0x1fc00>;
123 mtd-mac-address-increment = <(-1)>;
124 };
125
126 &eth1 {
127 status = "okay";
128
129 mtd-mac-address = <&uboot 0x1fc00>;
130 mtd-mac-address-increment = <1>;
131 };
132
133 &pcie {
134 status = "okay";
135
136 ath9k: wifi@0,0 {
137 compatible = "pci168c,002b";
138 reg = <0x0000 0 0 0 0>;
139 qca,no-eeprom;
140 mtd-mac-address = <&uboot 0x1fc00>;
141 #gpio-cells = <2>;
142 gpio-controller;
143 };
144 };
145
146 &pinmux {
147 switch_led_pins: pinmux_switch_led_pins {
148 pinctrl-single,bits = <0x0 0x0 0xf8>;
149 };
150 };
151
152 &uart {
153 status = "okay";
154 };