ath79: Make upstream ag71xx driver work
[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                 led-boot = &led_etactica;
15                 led-failsafe = &led_etactica;
16                 led-upgrade = &led_etactica;
17                 serial0 = &uart;
18         };
19
20         keys {
21                 compatible = "gpio-keys";
22
23                 restore {
24                         linux,code = <KEY_RESTART>;
25                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
26                 };
27         };
28
29         leds {
30                 compatible = "gpio-leds";
31                 pinctrl-names = "default";
32                 pinctrl-0 = <&switch_led_disable_pins>;
33
34                 modbus {
35                         label = "eg200:red:modbus";
36                         gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
37                 };
38
39                 led_etactica: etactica {
40                         label = "eg200:red:etactica";
41                         gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
42                 };
43
44                 eth0 {
45                         label = "eg200:red:eth0";
46                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
47                 };
48
49                 wlan {
50                         label = "eg200:red:wlan";
51                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
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 };