xref: /freebsd-src/sys/contrib/device-tree/src/arm/allwinner/sun7i-a20-wits-pro-a20-dkt.dts (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
1f126890aSEmmanuel Vadot/*
2f126890aSEmmanuel Vadot * Copyright 2015 Jelle de Jong <jelledejong@powercraft.nl>
3f126890aSEmmanuel Vadot *
4f126890aSEmmanuel Vadot * This file is dual-licensed: you can use it either under the terms
5f126890aSEmmanuel Vadot * of the GPL or the X11 license, at your option. Note that this dual
6f126890aSEmmanuel Vadot * licensing only applies to this file, and not this project as a
7f126890aSEmmanuel Vadot * whole.
8f126890aSEmmanuel Vadot *
9f126890aSEmmanuel Vadot *  a) This file is free software; you can redistribute it and/or
10f126890aSEmmanuel Vadot *     modify it under the terms of the GNU General Public License as
11f126890aSEmmanuel Vadot *     published by the Free Software Foundation; either version 2 of the
12f126890aSEmmanuel Vadot *     License, or (at your option) any later version.
13f126890aSEmmanuel Vadot *
14f126890aSEmmanuel Vadot *     This file is distributed in the hope that it will be useful,
15f126890aSEmmanuel Vadot *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16f126890aSEmmanuel Vadot *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17f126890aSEmmanuel Vadot *     GNU General Public License for more details.
18f126890aSEmmanuel Vadot *
19f126890aSEmmanuel Vadot * Or, alternatively,
20f126890aSEmmanuel Vadot *
21f126890aSEmmanuel Vadot *  b) Permission is hereby granted, free of charge, to any person
22f126890aSEmmanuel Vadot *     obtaining a copy of this software and associated documentation
23f126890aSEmmanuel Vadot *     files (the "Software"), to deal in the Software without
24f126890aSEmmanuel Vadot *     restriction, including without limitation the rights to use,
25f126890aSEmmanuel Vadot *     copy, modify, merge, publish, distribute, sublicense, and/or
26f126890aSEmmanuel Vadot *     sell copies of the Software, and to permit persons to whom the
27f126890aSEmmanuel Vadot *     Software is furnished to do so, subject to the following
28f126890aSEmmanuel Vadot *     conditions:
29f126890aSEmmanuel Vadot *
30f126890aSEmmanuel Vadot *     The above copyright notice and this permission notice shall be
31f126890aSEmmanuel Vadot *     included in all copies or substantial portions of the Software.
32f126890aSEmmanuel Vadot *
33f126890aSEmmanuel Vadot *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34f126890aSEmmanuel Vadot *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35f126890aSEmmanuel Vadot *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36f126890aSEmmanuel Vadot *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37f126890aSEmmanuel Vadot *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38f126890aSEmmanuel Vadot *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39f126890aSEmmanuel Vadot *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40f126890aSEmmanuel Vadot *     OTHER DEALINGS IN THE SOFTWARE.
41f126890aSEmmanuel Vadot */
42f126890aSEmmanuel Vadot
43f126890aSEmmanuel Vadot/dts-v1/;
44f126890aSEmmanuel Vadot#include "sun7i-a20.dtsi"
45f126890aSEmmanuel Vadot#include "sunxi-common-regulators.dtsi"
46f126890aSEmmanuel Vadot
47f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
48f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
49f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
50f126890aSEmmanuel Vadot
51f126890aSEmmanuel Vadot/ {
52f126890aSEmmanuel Vadot	model = "Wits Pro A20 DKT";
53f126890aSEmmanuel Vadot	compatible = "wits,pro-a20-dkt", "allwinner,sun7i-a20";
54f126890aSEmmanuel Vadot
55f126890aSEmmanuel Vadot	aliases {
56f126890aSEmmanuel Vadot		serial0 = &uart0;
57f126890aSEmmanuel Vadot	};
58f126890aSEmmanuel Vadot
59f126890aSEmmanuel Vadot	chosen {
60f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
61f126890aSEmmanuel Vadot	};
62f126890aSEmmanuel Vadot
63*7d0873ebSEmmanuel Vadot	mmc3_pwrseq: pwrseq {
64f126890aSEmmanuel Vadot		compatible = "mmc-pwrseq-simple";
65f126890aSEmmanuel Vadot		reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
66f126890aSEmmanuel Vadot	};
67f126890aSEmmanuel Vadot};
68f126890aSEmmanuel Vadot
69f126890aSEmmanuel Vadot&cpu0 {
70f126890aSEmmanuel Vadot	cpu-supply = <&reg_dcdc2>;
71f126890aSEmmanuel Vadot};
72f126890aSEmmanuel Vadot
73f126890aSEmmanuel Vadot&ehci0 {
74f126890aSEmmanuel Vadot	status = "okay";
75f126890aSEmmanuel Vadot};
76f126890aSEmmanuel Vadot
77f126890aSEmmanuel Vadot&ehci1 {
78f126890aSEmmanuel Vadot	status = "okay";
79f126890aSEmmanuel Vadot};
80f126890aSEmmanuel Vadot
81f126890aSEmmanuel Vadot&gmac {
82f126890aSEmmanuel Vadot	pinctrl-names = "default";
83f126890aSEmmanuel Vadot	pinctrl-0 = <&gmac_rgmii_pins>;
84f126890aSEmmanuel Vadot	phy-handle = <&phy1>;
85f126890aSEmmanuel Vadot	phy-mode = "rgmii";
86f126890aSEmmanuel Vadot	status = "okay";
87f126890aSEmmanuel Vadot};
88f126890aSEmmanuel Vadot
89f126890aSEmmanuel Vadot&i2c0 {
90f126890aSEmmanuel Vadot	status = "okay";
91f126890aSEmmanuel Vadot
92f126890aSEmmanuel Vadot	axp209: pmic@34 {
93f126890aSEmmanuel Vadot		reg = <0x34>;
94f126890aSEmmanuel Vadot		interrupt-parent = <&nmi_intc>;
95f126890aSEmmanuel Vadot		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
96f126890aSEmmanuel Vadot	};
97f126890aSEmmanuel Vadot};
98f126890aSEmmanuel Vadot
99f126890aSEmmanuel Vadot&i2c1 {
100f126890aSEmmanuel Vadot	status = "okay";
101f126890aSEmmanuel Vadot};
102f126890aSEmmanuel Vadot
103f126890aSEmmanuel Vadot&i2c2 {
104f126890aSEmmanuel Vadot	status = "okay";
105f126890aSEmmanuel Vadot};
106f126890aSEmmanuel Vadot
107f126890aSEmmanuel Vadot#include "axp209.dtsi"
108f126890aSEmmanuel Vadot
109f126890aSEmmanuel Vadot&gmac_mdio {
110f126890aSEmmanuel Vadot	phy1: ethernet-phy@1 {
111f126890aSEmmanuel Vadot		reg = <1>;
112f126890aSEmmanuel Vadot	};
113f126890aSEmmanuel Vadot};
114f126890aSEmmanuel Vadot
115f126890aSEmmanuel Vadot&mmc0 {
116f126890aSEmmanuel Vadot	vmmc-supply = <&reg_vcc3v3>;
117f126890aSEmmanuel Vadot	bus-width = <4>;
118f126890aSEmmanuel Vadot	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
119f126890aSEmmanuel Vadot	status = "okay";
120f126890aSEmmanuel Vadot};
121f126890aSEmmanuel Vadot
122f126890aSEmmanuel Vadot&mmc3 {
123f126890aSEmmanuel Vadot	vmmc-supply = <&reg_vcc3v3>;
124f126890aSEmmanuel Vadot	mmc-pwrseq = <&mmc3_pwrseq>;
125f126890aSEmmanuel Vadot	bus-width = <4>;
126f126890aSEmmanuel Vadot	non-removable;
127f126890aSEmmanuel Vadot	status = "okay";
128f126890aSEmmanuel Vadot
129f126890aSEmmanuel Vadot	brcmf: wifi@1 {
130f126890aSEmmanuel Vadot		reg = <1>;
131f126890aSEmmanuel Vadot		compatible = "brcm,bcm4329-fmac";
132f126890aSEmmanuel Vadot		interrupt-parent = <&pio>;
133f126890aSEmmanuel Vadot		interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
134f126890aSEmmanuel Vadot		interrupt-names = "host-wake";
135f126890aSEmmanuel Vadot	};
136f126890aSEmmanuel Vadot};
137f126890aSEmmanuel Vadot
138f126890aSEmmanuel Vadot&ohci0 {
139f126890aSEmmanuel Vadot	status = "okay";
140f126890aSEmmanuel Vadot};
141f126890aSEmmanuel Vadot
142f126890aSEmmanuel Vadot&ohci1 {
143f126890aSEmmanuel Vadot	status = "okay";
144f126890aSEmmanuel Vadot};
145f126890aSEmmanuel Vadot
146f126890aSEmmanuel Vadot&otg_sram {
147f126890aSEmmanuel Vadot	status = "okay";
148f126890aSEmmanuel Vadot};
149f126890aSEmmanuel Vadot
150f126890aSEmmanuel Vadot&reg_dcdc2 {
151f126890aSEmmanuel Vadot	regulator-always-on;
152f126890aSEmmanuel Vadot	regulator-min-microvolt = <1000000>;
153f126890aSEmmanuel Vadot	regulator-max-microvolt = <1450000>;
154f126890aSEmmanuel Vadot	regulator-name = "vdd-cpu";
155f126890aSEmmanuel Vadot};
156f126890aSEmmanuel Vadot
157f126890aSEmmanuel Vadot&reg_dcdc3 {
158f126890aSEmmanuel Vadot	regulator-always-on;
159f126890aSEmmanuel Vadot	regulator-min-microvolt = <1000000>;
160f126890aSEmmanuel Vadot	regulator-max-microvolt = <1400000>;
161f126890aSEmmanuel Vadot	regulator-name = "vdd-int-dll";
162f126890aSEmmanuel Vadot};
163f126890aSEmmanuel Vadot
164f126890aSEmmanuel Vadot&reg_ldo1 {
165f126890aSEmmanuel Vadot	regulator-name = "vdd-rtc";
166f126890aSEmmanuel Vadot};
167f126890aSEmmanuel Vadot
168f126890aSEmmanuel Vadot&reg_ldo2 {
169f126890aSEmmanuel Vadot	regulator-always-on;
170f126890aSEmmanuel Vadot	regulator-min-microvolt = <3000000>;
171f126890aSEmmanuel Vadot	regulator-max-microvolt = <3000000>;
172f126890aSEmmanuel Vadot	regulator-name = "avcc";
173f126890aSEmmanuel Vadot};
174f126890aSEmmanuel Vadot
175f126890aSEmmanuel Vadot&reg_usb0_vbus {
176f126890aSEmmanuel Vadot	status = "okay";
177f126890aSEmmanuel Vadot};
178f126890aSEmmanuel Vadot
179f126890aSEmmanuel Vadot&reg_usb1_vbus {
180f126890aSEmmanuel Vadot	status = "okay";
181f126890aSEmmanuel Vadot};
182f126890aSEmmanuel Vadot
183f126890aSEmmanuel Vadot&reg_usb2_vbus {
184f126890aSEmmanuel Vadot	status = "okay";
185f126890aSEmmanuel Vadot};
186f126890aSEmmanuel Vadot
187f126890aSEmmanuel Vadot&uart0 {
188f126890aSEmmanuel Vadot	pinctrl-names = "default";
189f126890aSEmmanuel Vadot	pinctrl-0 = <&uart0_pb_pins>;
190f126890aSEmmanuel Vadot	status = "okay";
191f126890aSEmmanuel Vadot};
192f126890aSEmmanuel Vadot
193f126890aSEmmanuel Vadot&usb_otg {
194f126890aSEmmanuel Vadot	dr_mode = "otg";
195f126890aSEmmanuel Vadot	status = "okay";
196f126890aSEmmanuel Vadot};
197f126890aSEmmanuel Vadot
198f126890aSEmmanuel Vadot&usb_power_supply {
199f126890aSEmmanuel Vadot	status = "okay";
200f126890aSEmmanuel Vadot};
201f126890aSEmmanuel Vadot
202f126890aSEmmanuel Vadot&usbphy {
203f126890aSEmmanuel Vadot	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
204f126890aSEmmanuel Vadot	usb0_vbus_power-supply = <&usb_power_supply>;
205f126890aSEmmanuel Vadot	usb0_vbus-supply = <&reg_usb0_vbus>;
206f126890aSEmmanuel Vadot	usb1_vbus-supply = <&reg_usb1_vbus>;
207f126890aSEmmanuel Vadot	usb2_vbus-supply = <&reg_usb2_vbus>;
208f126890aSEmmanuel Vadot	status = "okay";
209f126890aSEmmanuel Vadot};
210