ath79: fix dts warnings
[openwrt/staging/mkresin.git] / target / linux / ath79 / dts / ar7240_tplink_tl-wr740n-v2.dts
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 "ar7240.dtsi"
8
9 / {
10 compatible = "tplink,tl-wr740n-v2", "qca,ar7240";
11 model = "TP-Link TL-WR740N v2";
12
13 aliases {
14 led-status = &led_system;
15 };
16
17 gpio-keys-polled {
18 compatible = "gpio-keys-polled";
19 poll-interval = <20>;
20
21 reset {
22 label = "reset";
23 linux,code = <KEY_RESTART>;
24 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
25 debounce-interval = <60>;
26 };
27
28 wps {
29 label = "wps";
30 linux,code = <KEY_WPS_BUTTON>;
31 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
32 debounce-interval = <60>;
33 };
34 };
35
36 gpio-leds {
37 compatible = "gpio-leds";
38 pinctrl-names = "default";
39 pinctrl-0 = <&switch_led_pins>;
40
41 led_system: system {
42 label = "tl-wr740n-v2:green:system";
43 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
44 };
45
46 lan1 {
47 label = "tl-wr740n-v2:green:lan1";
48 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
49 };
50
51 lan2 {
52 label = "tl-wr740n-v2:green:lan2";
53 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
54 };
55
56 lan3 {
57 label = "tl-wr740n-v2:green:lan3";
58 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
59 };
60
61 lan4 {
62 label = "tl-wr740n-v2:green:lan4";
63 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
64 };
65
66 wan {
67 label = "tl-wr740n-v2:green:wan";
68 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
69 };
70
71 wlan {
72 label = "tl-wr740n-v2:green:wlan";
73 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
74 default-state = "off";
75 linux,default-trigger = "phy0tpt";
76 };
77
78 wps {
79 label = "tl-wr740n-v2:green:wps";
80 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
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 };