6a5aca0541173d2a832a8c4259fc087d5820ff53
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_arduino_yun.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 = "Arduino Yun";
10 compatible = "arduino,yun", "qca,ar9331";
11
12 aliases {
13 serial0 = &uart;
14 };
15
16 chosen {
17 bootargs = "console=ttyATH0,250000";
18 };
19
20 ahb {
21 apb {
22 pinmux_extended: pinmux@18040030 {
23 compatible = "pinctrl-single";
24 reg = <0x18040030 0x4>;
25
26 pinctrl-single,bit-per-mux;
27 pinctrl-single,register-width = <32>;
28 pinctrl-single,function-mask = <0x1>;
29 #pinctrl-cells = <2>;
30
31 enable_gpio11: pinmux_enable_gpio11 {
32 pinctrl-single,bits = <0x0 0x200 0x200>;
33 };
34 };
35
36 pinmux_bootstrap: pinmux@180600ac {
37 compatible = "pinctrl-single";
38 reg = <0x180600ac 0x4>;
39
40 pinctrl-single,bit-per-mux;
41 pinctrl-single,register-width = <32>;
42 pinctrl-single,function-mask = <0x1>;
43 #pinctrl-cells = <2>;
44
45 enable_gpio26_gpio27: pinmux_enable_gpio26_gpio27 {
46 pinctrl-single,bits = <0x0 0x40000 0x40000>;
47 };
48 };
49 };
50 };
51
52 leds {
53 compatible = "gpio-leds";
54
55 wlan {
56 label = "blue:wlan";
57 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
58 linux,default-trigger = "phy0tpt";
59 };
60
61 usb {
62 label = "white:usb";
63 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
64 trigger-sources = <&hub_port1>;
65 linux,default-trigger = "usbport";
66 };
67 };
68
69 keys {
70 compatible = "gpio-keys";
71
72 config {
73 label = "config";
74 linux,code = <BTN_0>;
75 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
76 };
77 };
78
79 gpio-export {
80 compatible = "gpio-export";
81
82 gpio_spi_enable {
83 gpio-export,name = "yun:oe:spi";
84 gpio-export,output = <0>;
85 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
86 };
87
88 gpio_handshake_enable {
89 gpio-export,name = "yun:oe:hs";
90 gpio-export,output = <0>;
91 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
92 };
93
94 gpio_uart_enable {
95 gpio-export,name = "yun:oe:uart";
96 gpio-export,output = <0>;
97 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
98 };
99 };
100
101 reg_usb_vbus: reg_usb_vbus {
102 compatible = "regulator-fixed";
103 regulator-name = "usb_vbus";
104 regulator-min-microvolt = <5000000>;
105 regulator-max-microvolt = <5000000>;
106 enable-active-high;
107 };
108 };
109
110 &uart {
111 status = "okay";
112 };
113
114 &gpio {
115 status = "okay";
116 };
117
118 &pinmux {
119 pinctrl-names = "default";
120 pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins>;
121 };
122
123 &switch_led_disable_pins {
124 pinctrl-single,bits = <0x0 0x80 0xf8>;
125 };
126
127 &pinmux_extended {
128 pinctrl-names = "default";
129 pinctrl-0 = <&enable_gpio11>;
130 };
131
132 &pinmux_bootstrap {
133 pinctrl-names = "default";
134 pinctrl-0 = <&enable_gpio26_gpio27>;
135 };
136
137 &usb {
138 status = "okay";
139
140 #address-cells = <1>;
141 #size-cells = <0>;
142 dr_mode = "host";
143 vbus-supply = <&reg_usb_vbus>;
144
145 port@1 {
146 #address-cells = <1>;
147 #size-cells = <0>;
148 reg = <1>;
149 #trigger-source-cells = <0>;
150
151 hub_port1: port@1 {
152 reg = <1>;
153 #trigger-source-cells = <0>;
154 };
155 };
156 };
157
158 &usb_phy {
159 status = "okay";
160 };
161
162 &spi {
163 status = "okay";
164
165 flash@0 {
166 compatible = "jedec,spi-nor";
167 reg = <0>;
168 spi-max-frequency = <50000000>;
169
170 partitions {
171 compatible = "fixed-partitions";
172 #address-cells = <1>;
173 #size-cells = <1>;
174
175 partition@0 {
176 label = "u-boot";
177 reg = <0x0 0x40000>;
178 read-only;
179 };
180
181 partition@40000 {
182 label = "u-boot-env";
183 reg = <0x40000 0x10000>;
184 };
185
186 partition@50000 {
187 compatible = "denx,uimage";
188 label = "firmware";
189 reg = <0x50000 0xf90000>;
190 };
191
192 partition@fe0000 {
193 label = "nvram";
194 reg = <0xfe0000 0x10000>;
195 };
196
197 art: partition@ff0000 {
198 label = "art";
199 reg = <0xff0000 0x10000>;
200 read-only;
201 };
202 };
203 };
204 };
205
206 &eth0 {
207 status = "okay";
208 };
209
210 &eth1 {
211 status = "okay";
212
213 compatible = "syscon", "simple-mfd";
214 };
215
216 &wmac {
217 status = "okay";
218
219 mtd-cal-data = <&art 0x1000>;
220 };