196219b00SIcenowy Zheng/*
296219b00SIcenowy Zheng * Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.xyz>
396219b00SIcenowy Zheng *
496219b00SIcenowy Zheng * Based on sun50i-a64-pine64.dts, which is:
596219b00SIcenowy Zheng *   Copyright (c) 2016 ARM Ltd.
696219b00SIcenowy Zheng *
796219b00SIcenowy Zheng * This file is dual-licensed: you can use it either under the terms
896219b00SIcenowy Zheng * of the GPL or the X11 license, at your option. Note that this dual
996219b00SIcenowy Zheng * licensing only applies to this file, and not this project as a
1096219b00SIcenowy Zheng * whole.
1196219b00SIcenowy Zheng *
1296219b00SIcenowy Zheng *  a) This library is free software; you can redistribute it and/or
1396219b00SIcenowy Zheng *     modify it under the terms of the GNU General Public License as
1496219b00SIcenowy Zheng *     published by the Free Software Foundation; either version 2 of the
1596219b00SIcenowy Zheng *     License, or (at your option) any later version.
1696219b00SIcenowy Zheng *
1796219b00SIcenowy Zheng *     This library is distributed in the hope that it will be useful,
1896219b00SIcenowy Zheng *     but WITHOUT ANY WARRANTY; without even the implied warranty of
1996219b00SIcenowy Zheng *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2096219b00SIcenowy Zheng *     GNU General Public License for more details.
2196219b00SIcenowy Zheng *
2296219b00SIcenowy Zheng * Or, alternatively,
2396219b00SIcenowy Zheng *
2496219b00SIcenowy Zheng *  b) Permission is hereby granted, free of charge, to any person
2596219b00SIcenowy Zheng *     obtaining a copy of this software and associated documentation
2696219b00SIcenowy Zheng *     files (the "Software"), to deal in the Software without
2796219b00SIcenowy Zheng *     restriction, including without limitation the rights to use,
2896219b00SIcenowy Zheng *     copy, modify, merge, publish, distribute, sublicense, and/or
2996219b00SIcenowy Zheng *     sell copies of the Software, and to permit persons to whom the
3096219b00SIcenowy Zheng *     Software is furnished to do so, subject to the following
3196219b00SIcenowy Zheng *     conditions:
3296219b00SIcenowy Zheng *
3396219b00SIcenowy Zheng *     The above copyright notice and this permission notice shall be
3496219b00SIcenowy Zheng *     included in all copies or substantial portions of the Software.
3596219b00SIcenowy Zheng *
3696219b00SIcenowy Zheng *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3796219b00SIcenowy Zheng *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3896219b00SIcenowy Zheng *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3996219b00SIcenowy Zheng *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
4096219b00SIcenowy Zheng *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
4196219b00SIcenowy Zheng *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4296219b00SIcenowy Zheng *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4396219b00SIcenowy Zheng *     OTHER DEALINGS IN THE SOFTWARE.
4496219b00SIcenowy Zheng */
4596219b00SIcenowy Zheng
4696219b00SIcenowy Zheng/dts-v1/;
4796219b00SIcenowy Zheng
4896219b00SIcenowy Zheng#include "sun50i-a64-sopine.dtsi"
4996219b00SIcenowy Zheng
5096219b00SIcenowy Zheng/ {
5196219b00SIcenowy Zheng	model = "SoPine with baseboard";
5296219b00SIcenowy Zheng	compatible = "pine64,sopine-baseboard", "pine64,sopine",
5396219b00SIcenowy Zheng		     "allwinner,sun50i-a64";
5496219b00SIcenowy Zheng
5596219b00SIcenowy Zheng	aliases {
5694f44288SCorentin Labbe		ethernet0 = &emac;
5796219b00SIcenowy Zheng		serial0 = &uart0;
5896219b00SIcenowy Zheng	};
5996219b00SIcenowy Zheng
6096219b00SIcenowy Zheng	chosen {
6196219b00SIcenowy Zheng		stdout-path = "serial0:115200n8";
6296219b00SIcenowy Zheng	};
6396219b00SIcenowy Zheng
64f4e4453aSJagan Teki	hdmi-connector {
65f4e4453aSJagan Teki		compatible = "hdmi-connector";
66f4e4453aSJagan Teki		type = "a";
67f4e4453aSJagan Teki
68f4e4453aSJagan Teki		port {
69f4e4453aSJagan Teki			hdmi_con_in: endpoint {
70f4e4453aSJagan Teki				remote-endpoint = <&hdmi_out_con>;
71f4e4453aSJagan Teki			};
72f4e4453aSJagan Teki		};
73f4e4453aSJagan Teki	};
74f4e4453aSJagan Teki
7596219b00SIcenowy Zheng	reg_vcc1v8: vcc1v8 {
7696219b00SIcenowy Zheng		compatible = "regulator-fixed";
7796219b00SIcenowy Zheng		regulator-name = "vcc1v8";
7896219b00SIcenowy Zheng		regulator-min-microvolt = <1800000>;
7996219b00SIcenowy Zheng		regulator-max-microvolt = <1800000>;
8096219b00SIcenowy Zheng	};
8196219b00SIcenowy Zheng};
8296219b00SIcenowy Zheng
83498c21f2SVasily Khoruzhick&codec {
84498c21f2SVasily Khoruzhick	status = "okay";
85498c21f2SVasily Khoruzhick};
86498c21f2SVasily Khoruzhick
87498c21f2SVasily Khoruzhick&codec_analog {
88498c21f2SVasily Khoruzhick	status = "okay";
89498c21f2SVasily Khoruzhick};
90498c21f2SVasily Khoruzhick
91498c21f2SVasily Khoruzhick&dai {
92498c21f2SVasily Khoruzhick	status = "okay";
93498c21f2SVasily Khoruzhick};
94498c21f2SVasily Khoruzhick
95f4e4453aSJagan Teki&de {
96f4e4453aSJagan Teki	status = "okay";
97f4e4453aSJagan Teki};
98f4e4453aSJagan Teki
9996219b00SIcenowy Zheng&ehci0 {
10096219b00SIcenowy Zheng	status = "okay";
10196219b00SIcenowy Zheng};
10296219b00SIcenowy Zheng
10396219b00SIcenowy Zheng&ehci1 {
10496219b00SIcenowy Zheng	status = "okay";
10596219b00SIcenowy Zheng};
10696219b00SIcenowy Zheng
10794f44288SCorentin Labbe&emac {
10894f44288SCorentin Labbe	pinctrl-names = "default";
10994f44288SCorentin Labbe	pinctrl-0 = <&rgmii_pins>;
11094f44288SCorentin Labbe	phy-mode = "rgmii";
11194f44288SCorentin Labbe	phy-handle = <&ext_rgmii_phy>;
112bdfe4cebSIcenowy Zheng	phy-supply = <&reg_dc1sw>;
11394f44288SCorentin Labbe	status = "okay";
11494f44288SCorentin Labbe};
11594f44288SCorentin Labbe
116f4e4453aSJagan Teki&hdmi {
117f4e4453aSJagan Teki	hvcc-supply = <&reg_dldo1>;
118f4e4453aSJagan Teki	status = "okay";
119f4e4453aSJagan Teki};
120f4e4453aSJagan Teki
121f4e4453aSJagan Teki&hdmi_out {
122f4e4453aSJagan Teki	hdmi_out_con: endpoint {
123f4e4453aSJagan Teki		remote-endpoint = <&hdmi_con_in>;
124f4e4453aSJagan Teki	};
125f4e4453aSJagan Teki};
126f4e4453aSJagan Teki
12794f44288SCorentin Labbe&mdio {
12894f44288SCorentin Labbe	ext_rgmii_phy: ethernet-phy@1 {
12994f44288SCorentin Labbe		compatible = "ethernet-phy-ieee802.3-c22";
13094f44288SCorentin Labbe		reg = <1>;
13194f44288SCorentin Labbe	};
13294f44288SCorentin Labbe};
13394f44288SCorentin Labbe
13496219b00SIcenowy Zheng&mmc2 {
13596219b00SIcenowy Zheng	pinctrl-names = "default";
13696219b00SIcenowy Zheng	pinctrl-0 = <&mmc2_pins>;
1377d556bfcSJagan Teki	vmmc-supply = <&reg_dcdc1>;
13896219b00SIcenowy Zheng	vqmmc-supply = <&reg_vcc1v8>;
13996219b00SIcenowy Zheng	bus-width = <8>;
14096219b00SIcenowy Zheng	non-removable;
14196219b00SIcenowy Zheng	cap-mmc-hw-reset;
14296219b00SIcenowy Zheng	status = "okay";
14396219b00SIcenowy Zheng};
14496219b00SIcenowy Zheng
14596219b00SIcenowy Zheng&ohci0 {
14696219b00SIcenowy Zheng	status = "okay";
14796219b00SIcenowy Zheng};
14896219b00SIcenowy Zheng
14996219b00SIcenowy Zheng&ohci1 {
15096219b00SIcenowy Zheng	status = "okay";
15196219b00SIcenowy Zheng};
15296219b00SIcenowy Zheng
15378c3cbc8SIcenowy Zheng&reg_dc1sw {
15478c3cbc8SIcenowy Zheng	regulator-name = "vcc-phy";
15578c3cbc8SIcenowy Zheng};
15678c3cbc8SIcenowy Zheng
15778c3cbc8SIcenowy Zheng&reg_dldo1 {
15878c3cbc8SIcenowy Zheng	regulator-min-microvolt = <3300000>;
15978c3cbc8SIcenowy Zheng	regulator-max-microvolt = <3300000>;
16078c3cbc8SIcenowy Zheng	regulator-name = "vcc-hdmi";
16178c3cbc8SIcenowy Zheng};
16278c3cbc8SIcenowy Zheng
16378c3cbc8SIcenowy Zheng&reg_dldo2 {
16478c3cbc8SIcenowy Zheng	regulator-min-microvolt = <3300000>;
16578c3cbc8SIcenowy Zheng	regulator-max-microvolt = <3300000>;
16678c3cbc8SIcenowy Zheng	regulator-name = "vcc-mipi";
16778c3cbc8SIcenowy Zheng};
16878c3cbc8SIcenowy Zheng
16978c3cbc8SIcenowy Zheng&reg_dldo4 {
17078c3cbc8SIcenowy Zheng	regulator-min-microvolt = <3300000>;
17178c3cbc8SIcenowy Zheng	regulator-max-microvolt = <3300000>;
17278c3cbc8SIcenowy Zheng	regulator-name = "vcc-wifi";
17378c3cbc8SIcenowy Zheng};
17478c3cbc8SIcenowy Zheng
1755cbef9f9SIcenowy Zheng&simplefb_hdmi {
1765cbef9f9SIcenowy Zheng	vcc-hdmi-supply = <&reg_dldo1>;
1775cbef9f9SIcenowy Zheng};
1785cbef9f9SIcenowy Zheng
179498c21f2SVasily Khoruzhick&sound {
180498c21f2SVasily Khoruzhick	simple-audio-card,aux-devs = <&codec_analog>;
181498c21f2SVasily Khoruzhick	simple-audio-card,widgets = "Microphone", "Microphone Jack",
182498c21f2SVasily Khoruzhick				    "Headphone", "Headphone Jack";
183498c21f2SVasily Khoruzhick	simple-audio-card,routing =
184498c21f2SVasily Khoruzhick			"Left DAC", "AIF1 Slot 0 Left",
185498c21f2SVasily Khoruzhick			"Right DAC", "AIF1 Slot 0 Right",
186498c21f2SVasily Khoruzhick			"Headphone Jack", "HP",
187498c21f2SVasily Khoruzhick			"AIF1 Slot 0 Left ADC", "Left ADC",
188498c21f2SVasily Khoruzhick			"AIF1 Slot 0 Right ADC", "Right ADC",
189498c21f2SVasily Khoruzhick			"MIC2", "Microphone Jack";
190498c21f2SVasily Khoruzhick	status = "okay";
191498c21f2SVasily Khoruzhick};
192498c21f2SVasily Khoruzhick
19396219b00SIcenowy Zheng&uart0 {
19496219b00SIcenowy Zheng	pinctrl-names = "default";
195d91ebb95SChen-Yu Tsai	pinctrl-0 = <&uart0_pb_pins>;
19696219b00SIcenowy Zheng	status = "okay";
19796219b00SIcenowy Zheng};
19896219b00SIcenowy Zheng
19996219b00SIcenowy Zheng&usb_otg {
20096219b00SIcenowy Zheng	dr_mode = "host";
20196219b00SIcenowy Zheng	status = "okay";
20296219b00SIcenowy Zheng};
20396219b00SIcenowy Zheng
20496219b00SIcenowy Zheng&usbphy {
20596219b00SIcenowy Zheng	status = "okay";
20696219b00SIcenowy Zheng};
207