ath79: add support for TP-Link Archer A7
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9331_etactica_eg200.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 "ar9331.dtsi"
8
9 / {
10         model = "eTactica EG200";
11         compatible = "etactica,eg200", "qca,ar9331";
12
13         aliases {
14                 serial0 = &uart;
15         };
16
17         keys {
18                 compatible = "gpio-keys-polled";
19                 poll-interval = <50>;
20
21                 restore {
22                         linux,code = <KEY_WPS_BUTTON>;
23                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
24                 };
25         };
26
27         leds {
28                 compatible = "gpio-leds";
29
30                 modbus {
31                         label = "eg200:red:modbus";
32                         gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
33                         default-state = "off";
34                 };
35
36                 etactica {
37                         label = "eg200:red:etactica";
38                         gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
39                         default-state = "off";
40                 };
41
42                 eth0 {
43                         label = "eg200:red:eth0";
44                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
45                         default-state = "off";
46                 };
47
48                 wlan {
49                         label = "eg200:red:wlan";
50                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
51                         default-state = "off";
52                         linux,default-trigger = "phy0tpt";
53                 };
54         };
55 };
56
57 &uart {
58         status = "okay";
59 };
60
61 &gpio {
62         status = "okay";
63 };
64
65 &usb {
66         dr_mode = "host";
67         status = "okay";
68 };
69
70 &usb_phy {
71         status = "okay";
72 };
73
74 &eth0 {
75         status = "okay";
76         mtd-mac-address = <&art 0x0>;
77
78         gmac-config {
79                 device = <&gmac>;
80                 switch-phy-addr-swap = <1>;
81                 switch-phy-swap = <1>;
82         };
83 };
84
85 &eth1 {
86         status = "okay";
87         compatible = "syscon", "simple-mfd";
88 };
89
90 &spi {
91         num-chipselects = <1>;
92         status = "okay";
93
94         flash@0 {
95                 compatible = "jedec,spi-nor";
96                 spi-max-frequency = <50000000>;
97                 reg = <0>;
98
99                 partitions {
100                         compatible = "fixed-partitions";
101                         #address-cells = <1>;
102                         #size-cells = <1>;
103
104                         uboot@0 {
105                                 reg = <0x0 0x40000>;
106                                 read-only;
107                         };
108
109                         uboot-env@40000 {
110                                 reg = <0x40000 0x10000>;
111                                 read-only;
112                         };
113
114                         firmware@50000 {
115                                 compatible = "denx,uimage";
116                                 reg = <0x50000 0xfa0000>;
117                         };
118
119                         art: art@ff0000 {
120                                 reg = <0xff0000 0x10000>;
121                                 read-only;
122                         };
123                 };
124         };
125 };
126
127 &wmac {
128         status = "okay";
129         mtd-cal-data = <&art 0x1000>;
130         mtd-mac-address = <&art 0x1002>;
131 };