ath79: improve support for D-Link DIR-8x9 A1 series
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_etactica_eg200.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "eTactica EG200";
10 compatible = "etactica,eg200", "qca,ar9331";
11
12 aliases {
13 led-boot = &led_etactica;
14 led-failsafe = &led_etactica;
15 led-upgrade = &led_etactica;
16 };
17
18 keys {
19 compatible = "gpio-keys";
20
21 restore {
22 linux,code = <KEY_RESTART>;
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 = "red:modbus";
34 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
35 };
36
37 led_etactica: etactica {
38 label = "red:etactica";
39 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
40 };
41
42 eth0 {
43 label = "red:eth0";
44 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
45 };
46
47 wlan {
48 label = "red:wlan";
49 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
50 linux,default-trigger = "phy0tpt";
51 };
52 };
53 };
54
55 &usb {
56 dr_mode = "host";
57 status = "okay";
58 };
59
60 &usb_phy {
61 status = "okay";
62 };
63
64 &eth0 {
65 status = "okay";
66 nvmem-cells = <&macaddr_art_0>;
67 nvmem-cell-names = "mac-address";
68
69 gmac-config {
70 device = <&gmac>;
71 switch-phy-addr-swap = <1>;
72 switch-phy-swap = <1>;
73 };
74 };
75
76 &eth1 {
77 status = "okay";
78 compatible = "syscon", "simple-mfd";
79 };
80
81 &spi {
82 status = "okay";
83
84 flash@0 {
85 compatible = "jedec,spi-nor";
86 spi-max-frequency = <50000000>;
87 reg = <0>;
88
89 partitions {
90 compatible = "fixed-partitions";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 uboot@0 {
95 reg = <0x0 0x40000>;
96 read-only;
97 };
98
99 uboot-env@40000 {
100 reg = <0x40000 0x10000>;
101 read-only;
102 };
103
104 firmware@50000 {
105 compatible = "denx,uimage";
106 reg = <0x50000 0xfa0000>;
107 };
108
109 art: art@ff0000 {
110 reg = <0xff0000 0x10000>;
111 read-only;
112 };
113 };
114 };
115 };
116
117 &wmac {
118 status = "okay";
119 mtd-cal-data = <&art 0x1000>;
120 };
121
122 &art {
123 compatible = "nvmem-cells";
124 #address-cells = <1>;
125 #size-cells = <1>;
126
127 macaddr_art_0: macaddr@0 {
128 reg = <0x0 0x6>;
129 };
130 };