ath79: add WNDR3700 and WNDR3700v2
[oweals/openwrt.git] / target / linux / ath79 / dts / ar7241_tplink.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 "ar7241.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                 qss {
25                         label = "qss";
26                         linux,code = <KEY_WPS_BUTTON>;
27                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
28                         debounce-interval = <60>;
29                 };
30         };
31
32         gpio_leds: gpio-leds {
33                 compatible = "gpio-leds";
34
35                 led_system: system {
36                         label = "tp-link:green:system";
37                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
38                 };
39
40                 qss {
41                         label = "tp-link:green:qss";
42                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
43                 };
44         };
45 };
46
47 &spi {
48         status = "okay";
49         num-cs = <1>;
50
51         flash@0 {
52                 compatible = "jedec,spi-nor";
53                 reg = <0>;
54                 spi-max-frequency = <25000000>;
55
56                 partitions {
57                         compatible = "fixed-partitions";
58                         #address-cells = <1>;
59                         #size-cells = <1>;
60
61                         uboot: partition@0 {
62                                 reg = <0x0 0x20000>;
63                                 label = "u-boot";
64                                 read-only;
65                         };
66
67                         partition@20000 {
68                                 reg = <0x20000 0x3d0000>;
69                                 label = "firmware";
70                         };
71
72                         partition@3f0000 {
73                                 reg = <0x3f0000 0x10000>;
74                                 label = "art";
75                                 read-only;
76                         };
77                 };
78         };
79 };
80
81 &pcie {
82         status = "okay";
83
84         ath9k: wifi@0,0 {
85                 reg = <0x0000 0 0 0 0>;
86                 #gpio-cells = <2>;
87                 gpio-controller;
88                 qca,no-eeprom;
89                 mtd-mac-address = <&uboot 0x1fc00>;
90         };
91 };
92
93 &eth0 {
94         status = "okay";
95
96         mtd-mac-address = <&uboot 0x1fc00>;
97         mtd-mac-address-increment = <(-1)>;
98 };
99
100 &eth1 {
101         status = "okay";
102
103         mtd-mac-address = <&uboot 0x1fc00>;
104         mtd-mac-address-increment = <1>;
105 };
106
107 &gpio {
108         status = "okay";
109 };
110
111 &uart {
112         status = "okay";
113 };