ath79: add etactica-eg200 support
[openwrt/staging/chunkeey.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 };
60 };
61 };
62
63 &uart {
64 status = "okay";
65 };
66
67 &gpio {
68 status = "okay";
69 };
70
71 &usb {
72 dr_mode = "host";
73 status = "okay";
74 };
75
76 &usb_phy {
77 status = "okay";
78 };
79
80 &mdio0 {
81 status = "okay";
82 phy4: ethernet-phy@4 {
83 reg = <4>;
84 phy-mode = "mii";
85 };
86 };
87
88 &eth0 {
89 status = "okay";
90 mtd-mac-address = <&art 0x0>;
91 phy-handle = <&phy4>;
92
93 gmac-config {
94 device = <&gmac>;
95 switch-phy-addr-swap = <1>;
96 switch-phy-swap = <1>;
97 };
98 };
99
100 &spi {
101 num-chipselects = <1>;
102 status = "okay";
103
104 flash@0 {
105 #address-cells = <1>;
106 #size-cells = <1>;
107 compatible = "jedec,spi-nor";
108 spi-max-frequency = <50000000>;
109 reg = <0>;
110
111 partitions {
112 compatible = "fixed-partitions";
113 #address-cells = <1>;
114 #size-cells = <1>;
115
116 uboot@0 {
117 reg = <0x0 0x40000>;
118 read-only;
119 };
120
121 uboot-env@40000 {
122 reg = <0x40000 0x10000>;
123 read-only;
124 };
125
126 firmware@50000 {
127 reg = <0x50000 0xfa0000>;
128 };
129
130 art: art@ff0000 {
131 reg = <0xff0000 0x10000>;
132 read-only;
133 };
134 };
135 };
136 };
137
138 &wmac {
139 status = "okay";
140 mtd-cal-data = <&art 0x1000>;
141 mtd-mac-address = <&art 0x1002>;
142 };