1f3226572SJagan Teki/*
2f3226572SJagan Teki * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
3f3226572SJagan Teki *
4f3226572SJagan Teki * This file is dual-licensed: you can use it either under the terms
5f3226572SJagan Teki * of the GPL or the X11 license, at your option. Note that this dual
6f3226572SJagan Teki * licensing only applies to this file, and not this project as a
7f3226572SJagan Teki * whole.
8f3226572SJagan Teki *
9f3226572SJagan Teki *  a) This library is free software; you can redistribute it and/or
10f3226572SJagan Teki *     modify it under the terms of the GNU General Public License as
11f3226572SJagan Teki *     published by the Free Software Foundation; either version 2 of the
12f3226572SJagan Teki *     License, or (at your option) any later version.
13f3226572SJagan Teki *
14f3226572SJagan Teki *     This library is distributed in the hope that it will be useful,
15f3226572SJagan Teki *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16f3226572SJagan Teki *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17f3226572SJagan Teki *     GNU General Public License for more details.
18f3226572SJagan Teki *
19f3226572SJagan Teki * Or, alternatively,
20f3226572SJagan Teki *
21f3226572SJagan Teki *  b) Permission is hereby granted, free of charge, to any person
22f3226572SJagan Teki *     obtaining a copy of this software and associated documentation
23f3226572SJagan Teki *     files (the "Software"), to deal in the Software without
24f3226572SJagan Teki *     restriction, including without limitation the rights to use,
25f3226572SJagan Teki *     copy, modify, merge, publish, distribute, sublicense, and/or
26f3226572SJagan Teki *     sell copies of the Software, and to permit persons to whom the
27f3226572SJagan Teki *     Software is furnished to do so, subject to the following
28f3226572SJagan Teki *     conditions:
29f3226572SJagan Teki *
30f3226572SJagan Teki *     The above copyright notice and this permission notice shall be
31f3226572SJagan Teki *     included in all copies or substantial portions of the Software.
32f3226572SJagan Teki *
33f3226572SJagan Teki *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34f3226572SJagan Teki *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35f3226572SJagan Teki *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36f3226572SJagan Teki *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37f3226572SJagan Teki *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38f3226572SJagan Teki *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39f3226572SJagan Teki *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40f3226572SJagan Teki *     OTHER DEALINGS IN THE SOFTWARE.
41f3226572SJagan Teki */
42f3226572SJagan Teki
43f3226572SJagan Teki/dts-v1/;
44f3226572SJagan Teki
45f3226572SJagan Teki#include "sun50i-a64.dtsi"
46f3226572SJagan Teki
47f3226572SJagan Teki#include <dt-bindings/gpio/gpio.h>
48f3226572SJagan Teki
49f3226572SJagan Teki/ {
50f3226572SJagan Teki	model = "FriendlyARM NanoPi A64";
51f3226572SJagan Teki	compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64";
52f3226572SJagan Teki
53f3226572SJagan Teki	aliases {
54f3226572SJagan Teki		serial0 = &uart0;
55f3226572SJagan Teki	};
56f3226572SJagan Teki
57f3226572SJagan Teki	chosen {
58f3226572SJagan Teki		stdout-path = "serial0:115200n8";
59f3226572SJagan Teki	};
60f3226572SJagan Teki};
61f3226572SJagan Teki
62f3226572SJagan Teki&ehci0 {
63f3226572SJagan Teki	status = "okay";
64f3226572SJagan Teki};
65f3226572SJagan Teki
66f3226572SJagan Teki&ehci1 {
67f3226572SJagan Teki	status = "okay";
68f3226572SJagan Teki};
69f3226572SJagan Teki
70f3226572SJagan Teki/* i2c1 connected with gpio headers like pine64, bananapi */
71f3226572SJagan Teki&i2c1 {
72f3226572SJagan Teki	pinctrl-names = "default";
73f3226572SJagan Teki	pinctrl-0 = <&i2c1_pins>;
74f3226572SJagan Teki	status = "disabled";
75f3226572SJagan Teki};
76f3226572SJagan Teki
77f3226572SJagan Teki&i2c1_pins {
78f3226572SJagan Teki	bias-pull-up;
79f3226572SJagan Teki};
80f3226572SJagan Teki
81f3226572SJagan Teki&mmc0 {
82f3226572SJagan Teki	pinctrl-names = "default";
83f3226572SJagan Teki	pinctrl-0 = <&mmc0_pins>;
84*68dd17c3SAndre Przywara	vmmc-supply = <&reg_dcdc1>;
85*68dd17c3SAndre Przywara	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
86f3226572SJagan Teki	disable-wp;
87f3226572SJagan Teki	bus-width = <4>;
88f3226572SJagan Teki	status = "okay";
89f3226572SJagan Teki};
90f3226572SJagan Teki
91f3226572SJagan Teki&ohci0 {
92f3226572SJagan Teki	status = "okay";
93f3226572SJagan Teki};
94f3226572SJagan Teki
95f3226572SJagan Teki&ohci1 {
96f3226572SJagan Teki	status = "okay";
97f3226572SJagan Teki};
98f3226572SJagan Teki
99*68dd17c3SAndre Przywara&r_rsb {
100*68dd17c3SAndre Przywara	status = "okay";
101*68dd17c3SAndre Przywara
102*68dd17c3SAndre Przywara	axp803: pmic@3a3 {
103*68dd17c3SAndre Przywara		compatible = "x-powers,axp803";
104*68dd17c3SAndre Przywara		reg = <0x3a3>;
105*68dd17c3SAndre Przywara		interrupt-parent = <&r_intc>;
106*68dd17c3SAndre Przywara		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
107*68dd17c3SAndre Przywara	};
108*68dd17c3SAndre Przywara};
109*68dd17c3SAndre Przywara
110*68dd17c3SAndre Przywara#include "axp803.dtsi"
111*68dd17c3SAndre Przywara
112*68dd17c3SAndre Przywara&reg_aldo2 {
113*68dd17c3SAndre Przywara	regulator-always-on;
114*68dd17c3SAndre Przywara	regulator-min-microvolt = <1800000>;
115*68dd17c3SAndre Przywara	regulator-max-microvolt = <3300000>;
116*68dd17c3SAndre Przywara	regulator-name = "vcc-pl";
117*68dd17c3SAndre Przywara};
118*68dd17c3SAndre Przywara
119*68dd17c3SAndre Przywara&reg_aldo3 {
120*68dd17c3SAndre Przywara	regulator-always-on;
121*68dd17c3SAndre Przywara	regulator-min-microvolt = <3000000>;
122*68dd17c3SAndre Przywara	regulator-max-microvolt = <3000000>;
123*68dd17c3SAndre Przywara	regulator-name = "vcc-pll-avcc";
124*68dd17c3SAndre Przywara};
125*68dd17c3SAndre Przywara
126*68dd17c3SAndre Przywara&reg_dcdc1 {
127*68dd17c3SAndre Przywara	regulator-always-on;
128*68dd17c3SAndre Przywara	regulator-min-microvolt = <3000000>;
129*68dd17c3SAndre Przywara	regulator-max-microvolt = <3000000>;
130*68dd17c3SAndre Przywara	regulator-name = "vcc-3v";
131*68dd17c3SAndre Przywara};
132*68dd17c3SAndre Przywara
133*68dd17c3SAndre Przywara&reg_dcdc2 {
134*68dd17c3SAndre Przywara	regulator-always-on;
135*68dd17c3SAndre Przywara	regulator-min-microvolt = <1040000>;
136*68dd17c3SAndre Przywara	regulator-max-microvolt = <1300000>;
137*68dd17c3SAndre Przywara	regulator-name = "vdd-cpux";
138*68dd17c3SAndre Przywara};
139*68dd17c3SAndre Przywara
140*68dd17c3SAndre Przywara/* DCDC3 is polyphased with DCDC2 */
141*68dd17c3SAndre Przywara
142*68dd17c3SAndre Przywara&reg_dcdc5 {
143*68dd17c3SAndre Przywara	regulator-always-on;
144*68dd17c3SAndre Przywara	regulator-min-microvolt = <1500000>;
145*68dd17c3SAndre Przywara	regulator-max-microvolt = <1500000>;
146*68dd17c3SAndre Przywara	regulator-name = "vcc-dram";
147*68dd17c3SAndre Przywara};
148*68dd17c3SAndre Przywara
149*68dd17c3SAndre Przywara&reg_dcdc6 {
150*68dd17c3SAndre Przywara	regulator-always-on;
151*68dd17c3SAndre Przywara	regulator-min-microvolt = <1100000>;
152*68dd17c3SAndre Przywara	regulator-max-microvolt = <1100000>;
153*68dd17c3SAndre Przywara	regulator-name = "vdd-sys";
154*68dd17c3SAndre Przywara};
155*68dd17c3SAndre Przywara
156*68dd17c3SAndre Przywara&reg_dldo1 {
157*68dd17c3SAndre Przywara	regulator-always-on;
158*68dd17c3SAndre Przywara	regulator-min-microvolt = <3300000>;
159*68dd17c3SAndre Przywara	regulator-max-microvolt = <3300000>;
160*68dd17c3SAndre Przywara	regulator-name = "vcc-hdmi-dsi";
161*68dd17c3SAndre Przywara};
162*68dd17c3SAndre Przywara
163*68dd17c3SAndre Przywara&reg_dldo4 {
164*68dd17c3SAndre Przywara	regulator-always-on;
165*68dd17c3SAndre Przywara	regulator-min-microvolt = <3000000>;
166*68dd17c3SAndre Przywara	regulator-max-microvolt = <3000000>;
167*68dd17c3SAndre Przywara	regulator-name = "vcc-pg-wifi-io";
168*68dd17c3SAndre Przywara};
169*68dd17c3SAndre Przywara
170*68dd17c3SAndre Przywara&reg_eldo1 {
171*68dd17c3SAndre Przywara	regulator-min-microvolt = <1800000>;
172*68dd17c3SAndre Przywara	regulator-max-microvolt = <1800000>;
173*68dd17c3SAndre Przywara	regulator-name = "cpvdd";
174*68dd17c3SAndre Przywara};
175*68dd17c3SAndre Przywara
176*68dd17c3SAndre Przywara&reg_fldo1 {
177*68dd17c3SAndre Przywara	regulator-min-microvolt = <1200000>;
178*68dd17c3SAndre Przywara	regulator-max-microvolt = <1200000>;
179*68dd17c3SAndre Przywara	regulator-name = "vcc-1v2-hsic";
180*68dd17c3SAndre Przywara};
181*68dd17c3SAndre Przywara
182*68dd17c3SAndre Przywara/*
183*68dd17c3SAndre Przywara * The A64 chip cannot work without this regulator off, although
184*68dd17c3SAndre Przywara * it seems to be only driving the AR100 core.
185*68dd17c3SAndre Przywara * Maybe we don't still know well about CPUs domain.
186*68dd17c3SAndre Przywara */
187*68dd17c3SAndre Przywara&reg_fldo2 {
188*68dd17c3SAndre Przywara	regulator-always-on;
189*68dd17c3SAndre Przywara	regulator-min-microvolt = <1100000>;
190*68dd17c3SAndre Przywara	regulator-max-microvolt = <1100000>;
191*68dd17c3SAndre Przywara	regulator-name = "vdd-cpus";
192*68dd17c3SAndre Przywara};
193*68dd17c3SAndre Przywara
194*68dd17c3SAndre Przywara&reg_rtc_ldo {
195*68dd17c3SAndre Przywara	regulator-name = "vcc-rtc";
196*68dd17c3SAndre Przywara};
197*68dd17c3SAndre Przywara
198f3226572SJagan Teki&uart0 {
199f3226572SJagan Teki	pinctrl-names = "default";
200f3226572SJagan Teki	pinctrl-0 = <&uart0_pins_a>;
201f3226572SJagan Teki	status = "okay";
202f3226572SJagan Teki};
203f3226572SJagan Teki
204f3226572SJagan Teki&usbphy {
205f3226572SJagan Teki	status = "okay";
206f3226572SJagan Teki};
207