ath79: enable UART in SoC DTSI files
[openwrt/staging/jow.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 flash@0 {
99 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <25000000>;
102
103 partitions {
104 compatible = "fixed-partitions";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 uboot: partition@0 {
109 reg = <0x0 0x20000>;
110 label = "u-boot";
111 read-only;
112 };
113
114 partition@20000 {
115 compatible = "tplink,firmware";
116 reg = <0x20000 0x7d0000>;
117 label = "firmware";
118 };
119
120 partition@7f0000 {
121 reg = <0x7f0000 0x10000>;
122 label = "art";
123 read-only;
124 };
125 };
126 };
127 };
128
129 &pcie {
130 status = "okay";
131
132 ath9k: wifi@0,0 {
133 compatible = "pci168c,002e";
134 reg = <0x0000 0 0 0 0>;
135 #gpio-cells = <2>;
136 gpio-controller;
137 qca,no-eeprom;
138 mtd-mac-address = <&uboot 0x1fc00>;
139 };
140 };
141
142 &eth0 {
143 status = "okay";
144
145 mtd-mac-address = <&uboot 0x1fc00>;
146 mtd-mac-address-increment = <(-1)>;
147 };
148
149 &eth1 {
150 mtd-mac-address = <&uboot 0x1fc00>;
151 mtd-mac-address-increment = <1>;
152 };