ath79: fix pinmux for ar933x devices
[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                 pinctrl-names = "default";
30                 pinctrl-0 = <&switch_led_disable_pins>;
31
32                 modbus {
33                         label = "eg200:red:modbus";
34                         gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
35                 };
36
37                 etactica {
38                         label = "eg200:red:etactica";
39                         gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
40                 };
41
42                 eth0 {
43                         label = "eg200:red:eth0";
44                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
45                 };
46
47                 wlan {
48                         label = "eg200:red:wlan";
49                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
50                         linux,default-trigger = "phy0tpt";
51                 };
52         };
53 };
54
55 &uart {
56         status = "okay";
57 };
58
59 &gpio {
60         status = "okay";
61 };
62
63 &usb {
64         dr_mode = "host";
65         status = "okay";
66 };
67
68 &usb_phy {
69         status = "okay";
70 };
71
72 &eth0 {
73         status = "okay";
74         mtd-mac-address = <&art 0x0>;
75
76         gmac-config {
77                 device = <&gmac>;
78                 switch-phy-addr-swap = <1>;
79                 switch-phy-swap = <1>;
80         };
81 };
82
83 &eth1 {
84         status = "okay";
85         compatible = "syscon", "simple-mfd";
86 };
87
88 &spi {
89         num-chipselects = <1>;
90         status = "okay";
91
92         flash@0 {
93                 compatible = "jedec,spi-nor";
94                 spi-max-frequency = <50000000>;
95                 reg = <0>;
96
97                 partitions {
98                         compatible = "fixed-partitions";
99                         #address-cells = <1>;
100                         #size-cells = <1>;
101
102                         uboot@0 {
103                                 reg = <0x0 0x40000>;
104                                 read-only;
105                         };
106
107                         uboot-env@40000 {
108                                 reg = <0x40000 0x10000>;
109                                 read-only;
110                         };
111
112                         firmware@50000 {
113                                 compatible = "denx,uimage";
114                                 reg = <0x50000 0xfa0000>;
115                         };
116
117                         art: art@ff0000 {
118                                 reg = <0xff0000 0x10000>;
119                                 read-only;
120                         };
121                 };
122         };
123 };
124
125 &wmac {
126         status = "okay";
127         mtd-cal-data = <&art 0x1000>;
128         mtd-mac-address = <&art 0x1002>;
129 };