ath79: add tl-wr1043nd-v4 support everything is working
[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", "rme-eg200";
12
13         aliases {
14                 serial0 = &uart;
15         };
16
17         memory@0 {
18                 device_type = "memory";
19                 reg = <0x0 0x4000000>;
20         };
21
22         keys {
23                 compatible = "gpio-keys-polled";
24                 #address-cells = <1>;
25                 #size-cells = <0>;
26                 poll-interval = <50>;
27
28                 restore {
29                         linux,code = <KEY_WPS_BUTTON>;
30                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
31                 };
32         };
33
34         leds {
35                 compatible = "gpio-leds";
36
37                 modbus {
38                         label = "eg200:red:modbus";
39                         gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
40                         default-state = "off";
41                 };
42
43                 etactica {
44                         label = "eg200:red:etactica";
45                         gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
46                         default-state = "off";
47                 };
48
49                 eth0 {
50                         label = "eg200:red:eth0";
51                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
52                         default-state = "off";
53                 };
54
55                 wlan {
56                         label = "eg200:red:wlan";
57                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
58                         default-state = "off";
59                         linux,default-trigger = "phy0tpt";
60                 };
61         };
62 };
63
64 &uart {
65         status = "okay";
66 };
67
68 &gpio {
69         status = "okay";
70 };
71
72 &usb {
73         dr_mode = "host";
74         status = "okay";
75 };
76
77 &usb_phy {
78         status = "okay";
79 };
80
81 &mdio0 {
82         status = "okay";
83         phy4: ethernet-phy@4 {
84                 reg = <4>;
85                 phy-mode = "mii";
86         };
87 };
88
89 &eth0 {
90         status = "okay";
91         mtd-mac-address = <&art 0x0>;
92         phy-handle = <&phy4>;
93
94         gmac-config {
95                 device = <&gmac>;
96                 switch-phy-addr-swap = <1>;
97                 switch-phy-swap = <1>;
98         };
99 };
100
101 &spi {
102         num-chipselects = <1>;
103         status = "okay";
104
105         flash@0 {
106                 #address-cells = <1>;
107                 #size-cells = <1>;
108                 compatible = "jedec,spi-nor";
109                 spi-max-frequency = <50000000>;
110                 reg = <0>;
111
112                 partitions {
113                         compatible = "fixed-partitions";
114                         #address-cells = <1>;
115                         #size-cells = <1>;
116
117                         uboot@0 {
118                                 reg = <0x0 0x40000>;
119                                 read-only;
120                         };
121
122                         uboot-env@40000 {
123                                 reg = <0x40000 0x10000>;
124                                 read-only;
125                         };
126
127                         firmware@50000 {
128                                 reg = <0x50000 0xfa0000>;
129                         };
130
131                         art: art@ff0000 {
132                                 reg = <0xff0000 0x10000>;
133                                 read-only;
134                         };
135                 };
136         };
137 };
138
139 &wmac {
140         status = "okay";
141         mtd-cal-data = <&art 0x1000>;
142         mtd-mac-address = <&art 0x1002>;
143 };