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