xref: /openbmc/linux/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi (revision edb24ffe14d3bc309cc0c9e20d3b928e1147f30d)
1c3904a26SIcenowy Zheng/*
2c3904a26SIcenowy Zheng * Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.xyz>
3c3904a26SIcenowy Zheng *
4c3904a26SIcenowy Zheng * Based on sun50i-a64-pine64.dts, which is:
5c3904a26SIcenowy Zheng *   Copyright (c) 2016 ARM Ltd.
6c3904a26SIcenowy Zheng *
7c3904a26SIcenowy Zheng * This file is dual-licensed: you can use it either under the terms
8c3904a26SIcenowy Zheng * of the GPL or the X11 license, at your option. Note that this dual
9c3904a26SIcenowy Zheng * licensing only applies to this file, and not this project as a
10c3904a26SIcenowy Zheng * whole.
11c3904a26SIcenowy Zheng *
12c3904a26SIcenowy Zheng *  a) This library is free software; you can redistribute it and/or
13c3904a26SIcenowy Zheng *     modify it under the terms of the GNU General Public License as
14c3904a26SIcenowy Zheng *     published by the Free Software Foundation; either version 2 of the
15c3904a26SIcenowy Zheng *     License, or (at your option) any later version.
16c3904a26SIcenowy Zheng *
17c3904a26SIcenowy Zheng *     This library is distributed in the hope that it will be useful,
18c3904a26SIcenowy Zheng *     but WITHOUT ANY WARRANTY; without even the implied warranty of
19c3904a26SIcenowy Zheng *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20c3904a26SIcenowy Zheng *     GNU General Public License for more details.
21c3904a26SIcenowy Zheng *
22c3904a26SIcenowy Zheng * Or, alternatively,
23c3904a26SIcenowy Zheng *
24c3904a26SIcenowy Zheng *  b) Permission is hereby granted, free of charge, to any person
25c3904a26SIcenowy Zheng *     obtaining a copy of this software and associated documentation
26c3904a26SIcenowy Zheng *     files (the "Software"), to deal in the Software without
27c3904a26SIcenowy Zheng *     restriction, including without limitation the rights to use,
28c3904a26SIcenowy Zheng *     copy, modify, merge, publish, distribute, sublicense, and/or
29c3904a26SIcenowy Zheng *     sell copies of the Software, and to permit persons to whom the
30c3904a26SIcenowy Zheng *     Software is furnished to do so, subject to the following
31c3904a26SIcenowy Zheng *     conditions:
32c3904a26SIcenowy Zheng *
33c3904a26SIcenowy Zheng *     The above copyright notice and this permission notice shall be
34c3904a26SIcenowy Zheng *     included in all copies or substantial portions of the Software.
35c3904a26SIcenowy Zheng *
36c3904a26SIcenowy Zheng *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37c3904a26SIcenowy Zheng *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38c3904a26SIcenowy Zheng *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39c3904a26SIcenowy Zheng *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40c3904a26SIcenowy Zheng *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41c3904a26SIcenowy Zheng *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42c3904a26SIcenowy Zheng *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43c3904a26SIcenowy Zheng *     OTHER DEALINGS IN THE SOFTWARE.
44c3904a26SIcenowy Zheng */
45c3904a26SIcenowy Zheng
46c3904a26SIcenowy Zheng#include "sun50i-a64.dtsi"
47c3904a26SIcenowy Zheng
48*edb24ffeSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
49*edb24ffeSEmmanuel Vadot
50c3904a26SIcenowy Zheng&mmc0 {
51c3904a26SIcenowy Zheng	pinctrl-names = "default";
52c3904a26SIcenowy Zheng	pinctrl-0 = <&mmc0_pins>;
537d556bfcSJagan Teki	vmmc-supply = <&reg_dcdc1>;
54c3904a26SIcenowy Zheng	non-removable;
55c3904a26SIcenowy Zheng	disable-wp;
56c3904a26SIcenowy Zheng	bus-width = <4>;
57*edb24ffeSEmmanuel Vadot	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
58c3904a26SIcenowy Zheng	status = "okay";
59c3904a26SIcenowy Zheng};
6078c3cbc8SIcenowy Zheng
6178c3cbc8SIcenowy Zheng&r_rsb {
6278c3cbc8SIcenowy Zheng	status = "okay";
6378c3cbc8SIcenowy Zheng
6478c3cbc8SIcenowy Zheng	axp803: pmic@3a3 {
6578c3cbc8SIcenowy Zheng		compatible = "x-powers,axp803";
6678c3cbc8SIcenowy Zheng		reg = <0x3a3>;
6778c3cbc8SIcenowy Zheng		interrupt-parent = <&r_intc>;
6878c3cbc8SIcenowy Zheng		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
6978c3cbc8SIcenowy Zheng	};
7078c3cbc8SIcenowy Zheng};
7178c3cbc8SIcenowy Zheng
724661c3afSEmmanuel Vadot&spi0  {
734661c3afSEmmanuel Vadot	status = "okay";
744661c3afSEmmanuel Vadot
754661c3afSEmmanuel Vadot	flash@0 {
764661c3afSEmmanuel Vadot		#address-cells = <1>;
774661c3afSEmmanuel Vadot		#size-cells = <1>;
784661c3afSEmmanuel Vadot		compatible = "jedec,spi-nor";
794661c3afSEmmanuel Vadot		reg = <0>;
804661c3afSEmmanuel Vadot		spi-max-frequency = <40000000>;
814661c3afSEmmanuel Vadot	};
824661c3afSEmmanuel Vadot};
834661c3afSEmmanuel Vadot
8478c3cbc8SIcenowy Zheng#include "axp803.dtsi"
8578c3cbc8SIcenowy Zheng
8678c3cbc8SIcenowy Zheng&reg_aldo2 {
8778c3cbc8SIcenowy Zheng	regulator-always-on;
8878c3cbc8SIcenowy Zheng	regulator-min-microvolt = <1800000>;
8978c3cbc8SIcenowy Zheng	regulator-max-microvolt = <3300000>;
9078c3cbc8SIcenowy Zheng	regulator-name = "vcc-pl";
9178c3cbc8SIcenowy Zheng};
9278c3cbc8SIcenowy Zheng
9378c3cbc8SIcenowy Zheng&reg_aldo3 {
9478c3cbc8SIcenowy Zheng	regulator-always-on;
9578c3cbc8SIcenowy Zheng	regulator-min-microvolt = <3000000>;
9678c3cbc8SIcenowy Zheng	regulator-max-microvolt = <3000000>;
9778c3cbc8SIcenowy Zheng	regulator-name = "vcc-pll-avcc";
9878c3cbc8SIcenowy Zheng};
9978c3cbc8SIcenowy Zheng
10078c3cbc8SIcenowy Zheng&reg_dcdc1 {
10178c3cbc8SIcenowy Zheng	regulator-always-on;
10278c3cbc8SIcenowy Zheng	regulator-min-microvolt = <3300000>;
10378c3cbc8SIcenowy Zheng	regulator-max-microvolt = <3300000>;
10478c3cbc8SIcenowy Zheng	regulator-name = "vcc-3v3";
10578c3cbc8SIcenowy Zheng};
10678c3cbc8SIcenowy Zheng
10778c3cbc8SIcenowy Zheng&reg_dcdc2 {
10878c3cbc8SIcenowy Zheng	regulator-always-on;
10978c3cbc8SIcenowy Zheng	regulator-min-microvolt = <1040000>;
11078c3cbc8SIcenowy Zheng	regulator-max-microvolt = <1300000>;
11178c3cbc8SIcenowy Zheng	regulator-name = "vdd-cpux";
11278c3cbc8SIcenowy Zheng};
11378c3cbc8SIcenowy Zheng
11478c3cbc8SIcenowy Zheng/* DCDC3 is polyphased with DCDC2 */
11578c3cbc8SIcenowy Zheng
11678c3cbc8SIcenowy Zheng&reg_dcdc5 {
11778c3cbc8SIcenowy Zheng	regulator-always-on;
11878c3cbc8SIcenowy Zheng	regulator-min-microvolt = <1200000>;
11978c3cbc8SIcenowy Zheng	regulator-max-microvolt = <1200000>;
12078c3cbc8SIcenowy Zheng	regulator-name = "vcc-dram";
12178c3cbc8SIcenowy Zheng};
12278c3cbc8SIcenowy Zheng
12378c3cbc8SIcenowy Zheng&reg_dcdc6 {
12478c3cbc8SIcenowy Zheng	regulator-always-on;
12578c3cbc8SIcenowy Zheng	regulator-min-microvolt = <1100000>;
12678c3cbc8SIcenowy Zheng	regulator-max-microvolt = <1100000>;
12778c3cbc8SIcenowy Zheng	regulator-name = "vdd-sys";
12878c3cbc8SIcenowy Zheng};
12978c3cbc8SIcenowy Zheng
13078c3cbc8SIcenowy Zheng&reg_eldo1 {
13178c3cbc8SIcenowy Zheng	regulator-always-on;
13278c3cbc8SIcenowy Zheng	regulator-min-microvolt = <1800000>;
13378c3cbc8SIcenowy Zheng	regulator-max-microvolt = <1800000>;
13478c3cbc8SIcenowy Zheng	regulator-name = "vdd-1v8-lpddr";
13578c3cbc8SIcenowy Zheng};
13678c3cbc8SIcenowy Zheng
13778c3cbc8SIcenowy Zheng&reg_fldo1 {
13878c3cbc8SIcenowy Zheng	regulator-min-microvolt = <1200000>;
13978c3cbc8SIcenowy Zheng	regulator-max-microvolt = <1200000>;
14078c3cbc8SIcenowy Zheng	regulator-name = "vcc-1v2-hsic";
14178c3cbc8SIcenowy Zheng};
14278c3cbc8SIcenowy Zheng
14378c3cbc8SIcenowy Zheng/*
14478c3cbc8SIcenowy Zheng * The A64 chip cannot work without this regulator off, although
14578c3cbc8SIcenowy Zheng * it seems to be only driving the AR100 core.
14678c3cbc8SIcenowy Zheng * Maybe we don't still know well about CPUs domain.
14778c3cbc8SIcenowy Zheng */
14878c3cbc8SIcenowy Zheng&reg_fldo2 {
14978c3cbc8SIcenowy Zheng	regulator-always-on;
15078c3cbc8SIcenowy Zheng	regulator-min-microvolt = <1100000>;
15178c3cbc8SIcenowy Zheng	regulator-max-microvolt = <1100000>;
15278c3cbc8SIcenowy Zheng	regulator-name = "vdd-cpus";
15378c3cbc8SIcenowy Zheng};
15478c3cbc8SIcenowy Zheng
15578c3cbc8SIcenowy Zheng&reg_rtc_ldo {
15678c3cbc8SIcenowy Zheng	regulator-name = "vcc-rtc";
15778c3cbc8SIcenowy Zheng};
158