1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.xyz>
4 *
5 * Based on sun50i-a64-pine64.dts, which is:
6 *   Copyright (c) 2016 ARM Ltd.
7 */
8
9/dts-v1/;
10
11#include "sun50i-a64-sopine.dtsi"
12
13/ {
14	model = "SoPine with baseboard";
15	compatible = "pine64,sopine-baseboard", "pine64,sopine",
16		     "allwinner,sun50i-a64";
17
18	aliases {
19		ethernet0 = &emac;
20		serial0 = &uart0;
21		serial1 = &uart1;
22		serial2 = &uart2;
23		serial3 = &uart3;
24		serial4 = &uart4;
25	};
26
27	chosen {
28		stdout-path = "serial0:115200n8";
29	};
30
31	hdmi-connector {
32		compatible = "hdmi-connector";
33		type = "a";
34
35		port {
36			hdmi_con_in: endpoint {
37				remote-endpoint = <&hdmi_out_con>;
38			};
39		};
40	};
41
42	reg_vcc1v8: vcc1v8 {
43		compatible = "regulator-fixed";
44		regulator-name = "vcc1v8";
45		regulator-min-microvolt = <1800000>;
46		regulator-max-microvolt = <1800000>;
47	};
48};
49
50&ac_power_supply {
51	status = "okay";
52};
53
54&battery_power_supply {
55	status = "okay";
56};
57
58&codec {
59	status = "okay";
60};
61
62&codec_analog {
63	status = "okay";
64};
65
66&dai {
67	status = "okay";
68};
69
70&de {
71	status = "okay";
72};
73
74&ehci0 {
75	status = "okay";
76};
77
78&ehci1 {
79	status = "okay";
80};
81
82&emac {
83	pinctrl-names = "default";
84	pinctrl-0 = <&rgmii_pins>;
85	phy-mode = "rgmii";
86	phy-handle = <&ext_rgmii_phy>;
87	phy-supply = <&reg_dc1sw>;
88	status = "okay";
89};
90
91&hdmi {
92	hvcc-supply = <&reg_dldo1>;
93	status = "okay";
94};
95
96&hdmi_out {
97	hdmi_out_con: endpoint {
98		remote-endpoint = <&hdmi_con_in>;
99	};
100};
101
102&mdio {
103	ext_rgmii_phy: ethernet-phy@1 {
104		compatible = "ethernet-phy-ieee802.3-c22";
105		reg = <1>;
106	};
107};
108
109&mmc2 {
110	pinctrl-names = "default";
111	pinctrl-0 = <&mmc2_pins>;
112	vmmc-supply = <&reg_dcdc1>;
113	vqmmc-supply = <&reg_vcc1v8>;
114	bus-width = <8>;
115	non-removable;
116	cap-mmc-hw-reset;
117	status = "okay";
118};
119
120&ohci0 {
121	status = "okay";
122};
123
124&ohci1 {
125	status = "okay";
126};
127
128&reg_dc1sw {
129	/*
130	 * Ethernet PHY needs 30ms to properly power up and some more
131	 * to initialize. 100ms should be plenty of time to finish
132	 * whole process.
133	 */
134	regulator-enable-ramp-delay = <100000>;
135	regulator-name = "vcc-phy";
136};
137
138&reg_dldo1 {
139	regulator-min-microvolt = <3300000>;
140	regulator-max-microvolt = <3300000>;
141	regulator-name = "vcc-hdmi";
142};
143
144&reg_dldo2 {
145	regulator-min-microvolt = <3300000>;
146	regulator-max-microvolt = <3300000>;
147	regulator-name = "vcc-mipi";
148};
149
150&reg_dldo4 {
151	regulator-min-microvolt = <3300000>;
152	regulator-max-microvolt = <3300000>;
153	regulator-name = "vcc-wifi";
154};
155
156&simplefb_hdmi {
157	vcc-hdmi-supply = <&reg_dldo1>;
158};
159
160&sound {
161	simple-audio-card,aux-devs = <&codec_analog>;
162	simple-audio-card,widgets = "Microphone", "Microphone Jack",
163				    "Headphone", "Headphone Jack";
164	simple-audio-card,routing =
165			"Left DAC", "AIF1 Slot 0 Left",
166			"Right DAC", "AIF1 Slot 0 Right",
167			"Headphone Jack", "HP",
168			"AIF1 Slot 0 Left ADC", "Left ADC",
169			"AIF1 Slot 0 Right ADC", "Right ADC",
170			"MIC2", "Microphone Jack";
171	status = "okay";
172};
173
174&uart0 {
175	pinctrl-names = "default";
176	pinctrl-0 = <&uart0_pb_pins>;
177	status = "okay";
178};
179
180/* On Pi-2 connector */
181&uart2 {
182	pinctrl-names = "default";
183	pinctrl-0 = <&uart2_pins>;
184	status = "disabled";
185};
186
187/* On Euler connector */
188&uart3 {
189	pinctrl-names = "default";
190	pinctrl-0 = <&uart3_pins>;
191	status = "disabled";
192};
193
194/* On Euler connector, RTS/CTS optional */
195&uart4 {
196	pinctrl-names = "default";
197	pinctrl-0 = <&uart4_pins>;
198	status = "disabled";
199};
200
201&usb_otg {
202	dr_mode = "host";
203	status = "okay";
204};
205
206&usbphy {
207	status = "okay";
208};
209