1/*
2 * Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.xyz>
3 *
4 * Based on sun50i-a64-pine64.dts, which is:
5 *   Copyright (c) 2016 ARM Ltd.
6 *
7 * This file is dual-licensed: you can use it either under the terms
8 * of the GPL or the X11 license, at your option. Note that this dual
9 * licensing only applies to this file, and not this project as a
10 * whole.
11 *
12 *  a) This library is free software; you can redistribute it and/or
13 *     modify it under the terms of the GNU General Public License as
14 *     published by the Free Software Foundation; either version 2 of the
15 *     License, or (at your option) any later version.
16 *
17 *     This library is distributed in the hope that it will be useful,
18 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
19 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 *     GNU General Public License for more details.
21 *
22 * Or, alternatively,
23 *
24 *  b) Permission is hereby granted, free of charge, to any person
25 *     obtaining a copy of this software and associated documentation
26 *     files (the "Software"), to deal in the Software without
27 *     restriction, including without limitation the rights to use,
28 *     copy, modify, merge, publish, distribute, sublicense, and/or
29 *     sell copies of the Software, and to permit persons to whom the
30 *     Software is furnished to do so, subject to the following
31 *     conditions:
32 *
33 *     The above copyright notice and this permission notice shall be
34 *     included in all copies or substantial portions of the Software.
35 *
36 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43 *     OTHER DEALINGS IN THE SOFTWARE.
44 */
45
46/dts-v1/;
47
48#include "sun50i-a64-sopine.dtsi"
49
50/ {
51	model = "SoPine with baseboard";
52	compatible = "pine64,sopine-baseboard", "pine64,sopine",
53		     "allwinner,sun50i-a64";
54
55	aliases {
56		ethernet0 = &emac;
57		serial0 = &uart0;
58	};
59
60	chosen {
61		stdout-path = "serial0:115200n8";
62	};
63
64	hdmi-connector {
65		compatible = "hdmi-connector";
66		type = "a";
67
68		port {
69			hdmi_con_in: endpoint {
70				remote-endpoint = <&hdmi_out_con>;
71			};
72		};
73	};
74
75	reg_vcc1v8: vcc1v8 {
76		compatible = "regulator-fixed";
77		regulator-name = "vcc1v8";
78		regulator-min-microvolt = <1800000>;
79		regulator-max-microvolt = <1800000>;
80	};
81};
82
83&codec {
84	status = "okay";
85};
86
87&codec_analog {
88	status = "okay";
89};
90
91&dai {
92	status = "okay";
93};
94
95&de {
96	status = "okay";
97};
98
99&ehci0 {
100	status = "okay";
101};
102
103&ehci1 {
104	status = "okay";
105};
106
107&emac {
108	pinctrl-names = "default";
109	pinctrl-0 = <&rgmii_pins>;
110	phy-mode = "rgmii";
111	phy-handle = <&ext_rgmii_phy>;
112	phy-supply = <&reg_dc1sw>;
113	status = "okay";
114};
115
116&hdmi {
117	hvcc-supply = <&reg_dldo1>;
118	status = "okay";
119};
120
121&hdmi_out {
122	hdmi_out_con: endpoint {
123		remote-endpoint = <&hdmi_con_in>;
124	};
125};
126
127&mdio {
128	ext_rgmii_phy: ethernet-phy@1 {
129		compatible = "ethernet-phy-ieee802.3-c22";
130		reg = <1>;
131	};
132};
133
134&mmc2 {
135	pinctrl-names = "default";
136	pinctrl-0 = <&mmc2_pins>;
137	vmmc-supply = <&reg_dcdc1>;
138	vqmmc-supply = <&reg_vcc1v8>;
139	bus-width = <8>;
140	non-removable;
141	cap-mmc-hw-reset;
142	status = "okay";
143};
144
145&ohci0 {
146	status = "okay";
147};
148
149&ohci1 {
150	status = "okay";
151};
152
153&reg_dc1sw {
154	regulator-name = "vcc-phy";
155};
156
157&reg_dldo1 {
158	regulator-min-microvolt = <3300000>;
159	regulator-max-microvolt = <3300000>;
160	regulator-name = "vcc-hdmi";
161};
162
163&reg_dldo2 {
164	regulator-min-microvolt = <3300000>;
165	regulator-max-microvolt = <3300000>;
166	regulator-name = "vcc-mipi";
167};
168
169&reg_dldo4 {
170	regulator-min-microvolt = <3300000>;
171	regulator-max-microvolt = <3300000>;
172	regulator-name = "vcc-wifi";
173};
174
175&simplefb_hdmi {
176	vcc-hdmi-supply = <&reg_dldo1>;
177};
178
179&sound {
180	simple-audio-card,aux-devs = <&codec_analog>;
181	simple-audio-card,widgets = "Microphone", "Microphone Jack",
182				    "Headphone", "Headphone Jack";
183	simple-audio-card,routing =
184			"Left DAC", "AIF1 Slot 0 Left",
185			"Right DAC", "AIF1 Slot 0 Right",
186			"Headphone Jack", "HP",
187			"AIF1 Slot 0 Left ADC", "Left ADC",
188			"AIF1 Slot 0 Right ADC", "Right ADC",
189			"MIC2", "Microphone Jack";
190	status = "okay";
191};
192
193&uart0 {
194	pinctrl-names = "default";
195	pinctrl-0 = <&uart0_pb_pins>;
196	status = "okay";
197};
198
199&usb_otg {
200	dr_mode = "host";
201	status = "okay";
202};
203
204&usbphy {
205	status = "okay";
206};
207