b0f6c3695a229b453d1be392d8814d6584503f83
[openwrt/staging/rmilecki.git] / target / linux / ath79 / dts / ar7241_tplink_tl-wr842n-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7241.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,tl-wr842n-v1", "qca,ar7241";
10 model = "TP-Link TL-WR842N/ND v1";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 label-mac-device = &ath9k;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 rfkill {
24 label = "rfkill";
25 linux,code = <KEY_RFKILL>;
26 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 };
29
30 reset {
31 label = "reset";
32 linux,code = <KEY_RESTART>;
33 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
34 debounce-interval = <60>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 led_system: system {
42 label = "green:system";
43 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
44 };
45
46 qss {
47 label = "green:qss";
48 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
49 };
50
51 led3g {
52 label = "green:3g";
53 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
54 trigger-sources = <&hub_port>;
55 linux,default-trigger = "usbport";
56 };
57 };
58
59 ath9k-leds {
60 compatible = "gpio-leds";
61
62 wlan {
63 label = "green:wlan";
64 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
65 linux,default-trigger = "phy0tpt";
66 };
67 };
68
69 gpio-export {
70 compatible = "gpio-export";
71
72 gpio_usb_power {
73 gpio-export,name = "tp-link:power:usb";
74 gpio-export,output = <1>;
75 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
76 };
77 };
78 };
79
80 &usb {
81 #address-cells = <1>;
82 #size-cells = <0>;
83 status = "okay";
84
85 hub_port: port@1 {
86 reg = <1>;
87 #trigger-source-cells = <0>;
88 };
89 };
90
91 &usb_phy {
92 status = "okay";
93 };
94
95 &spi {
96 status = "okay";
97
98 num-cs = <1>;
99
100 flash@0 {
101 compatible = "jedec,spi-nor";
102 reg = <0>;
103 spi-max-frequency = <25000000>;
104
105 partitions {
106 compatible = "fixed-partitions";
107 #address-cells = <1>;
108 #size-cells = <1>;
109
110 uboot: partition@0 {
111 reg = <0x0 0x20000>;
112 label = "u-boot";
113 read-only;
114 };
115
116 partition@20000 {
117 compatible = "tplink,firmware";
118 reg = <0x20000 0x7d0000>;
119 label = "firmware";
120 };
121
122 partition@7f0000 {
123 reg = <0x7f0000 0x10000>;
124 label = "art";
125 read-only;
126 };
127 };
128 };
129 };
130
131 &pcie {
132 status = "okay";
133
134 ath9k: wifi@0,0 {
135 compatible = "pci168c,002e";
136 reg = <0x0000 0 0 0 0>;
137 #gpio-cells = <2>;
138 gpio-controller;
139 qca,no-eeprom;
140 mtd-mac-address = <&uboot 0x1fc00>;
141 };
142 };
143
144 &eth0 {
145 status = "okay";
146
147 mtd-mac-address = <&uboot 0x1fc00>;
148 mtd-mac-address-increment = <(-1)>;
149 };
150
151 &eth1 {
152 mtd-mac-address = <&uboot 0x1fc00>;
153 mtd-mac-address-increment = <1>;
154 };
155
156 &uart {
157 status = "okay";
158 };