xref: /rk3399_rockchip-uboot/arch/arm/dts/sun7i-a20-olimex-som-evb.dts (revision b5b84be8a7356d4c3618b6edcb501885e53569f5)
150222f3bSMarcus Cooper/*
250222f3bSMarcus Cooper * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
3*80e5f83cSHans de Goede * Copyright 2015 - Karsten Merker <merker@debian.org>
450222f3bSMarcus Cooper *
550222f3bSMarcus Cooper * This file is dual-licensed: you can use it either under the terms
650222f3bSMarcus Cooper * of the GPL or the X11 license, at your option. Note that this dual
750222f3bSMarcus Cooper * licensing only applies to this file, and not this project as a
850222f3bSMarcus Cooper * whole.
950222f3bSMarcus Cooper *
1050222f3bSMarcus Cooper *  a) This file is free software; you can redistribute it and/or
1150222f3bSMarcus Cooper *     modify it under the terms of the GNU General Public License as
1250222f3bSMarcus Cooper *     published by the Free Software Foundation; either version 2 of the
1350222f3bSMarcus Cooper *     License, or (at your option) any later version.
1450222f3bSMarcus Cooper *
1550222f3bSMarcus Cooper *     This file is distributed in the hope that it will be useful,
1650222f3bSMarcus Cooper *     but WITHOUT ANY WARRANTY; without even the implied warranty of
1750222f3bSMarcus Cooper *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1850222f3bSMarcus Cooper *     GNU General Public License for more details.
1950222f3bSMarcus Cooper *
2050222f3bSMarcus Cooper * Or, alternatively,
2150222f3bSMarcus Cooper *
2250222f3bSMarcus Cooper *  b) Permission is hereby granted, free of charge, to any person
2350222f3bSMarcus Cooper *     obtaining a copy of this software and associated documentation
2450222f3bSMarcus Cooper *     files (the "Software"), to deal in the Software without
2550222f3bSMarcus Cooper *     restriction, including without limitation the rights to use,
2650222f3bSMarcus Cooper *     copy, modify, merge, publish, distribute, sublicense, and/or
2750222f3bSMarcus Cooper *     sell copies of the Software, and to permit persons to whom the
2850222f3bSMarcus Cooper *     Software is furnished to do so, subject to the following
2950222f3bSMarcus Cooper *     conditions:
3050222f3bSMarcus Cooper *
3150222f3bSMarcus Cooper *     The above copyright notice and this permission notice shall be
3250222f3bSMarcus Cooper *     included in all copies or substantial portions of the Software.
3350222f3bSMarcus Cooper *
3450222f3bSMarcus Cooper *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3550222f3bSMarcus Cooper *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3650222f3bSMarcus Cooper *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3750222f3bSMarcus Cooper *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
3850222f3bSMarcus Cooper *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
3950222f3bSMarcus Cooper *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4050222f3bSMarcus Cooper *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4150222f3bSMarcus Cooper *     OTHER DEALINGS IN THE SOFTWARE.
4250222f3bSMarcus Cooper */
4350222f3bSMarcus Cooper
4450222f3bSMarcus Cooper/dts-v1/;
4550222f3bSMarcus Cooper#include "sun7i-a20.dtsi"
4650222f3bSMarcus Cooper#include "sunxi-common-regulators.dtsi"
4750222f3bSMarcus Cooper
4850222f3bSMarcus Cooper#include <dt-bindings/gpio/gpio.h>
49*80e5f83cSHans de Goede#include <dt-bindings/input/input.h>
5050222f3bSMarcus Cooper#include <dt-bindings/interrupt-controller/irq.h>
5150222f3bSMarcus Cooper#include <dt-bindings/pinctrl/sun4i-a10.h>
5250222f3bSMarcus Cooper
5350222f3bSMarcus Cooper/ {
5450222f3bSMarcus Cooper	model = "Olimex A20-Olimex-SOM-EVB";
5550222f3bSMarcus Cooper	compatible = "olimex,a20-olimex-som-evb", "allwinner,sun7i-a20";
5650222f3bSMarcus Cooper
5750222f3bSMarcus Cooper	aliases {
5850222f3bSMarcus Cooper		serial0 = &uart0;
5950222f3bSMarcus Cooper	};
6050222f3bSMarcus Cooper
6150222f3bSMarcus Cooper	chosen {
6250222f3bSMarcus Cooper		stdout-path = "serial0:115200n8";
6350222f3bSMarcus Cooper	};
6450222f3bSMarcus Cooper
6550222f3bSMarcus Cooper	leds {
6650222f3bSMarcus Cooper		compatible = "gpio-leds";
6750222f3bSMarcus Cooper		pinctrl-names = "default";
6850222f3bSMarcus Cooper		pinctrl-0 = <&led_pins_olimex_som_evb>;
6950222f3bSMarcus Cooper
7050222f3bSMarcus Cooper		green {
7150222f3bSMarcus Cooper			label = "a20-olimex-som-evb:green:usr";
7250222f3bSMarcus Cooper			gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
7350222f3bSMarcus Cooper			default-state = "on";
7450222f3bSMarcus Cooper		};
7550222f3bSMarcus Cooper	};
7650222f3bSMarcus Cooper};
7750222f3bSMarcus Cooper
7850222f3bSMarcus Cooper&ahci {
7950222f3bSMarcus Cooper	target-supply = <&reg_ahci_5v>;
8050222f3bSMarcus Cooper	status = "okay";
8150222f3bSMarcus Cooper};
8250222f3bSMarcus Cooper
8350222f3bSMarcus Cooper&ehci0 {
8450222f3bSMarcus Cooper	status = "okay";
8550222f3bSMarcus Cooper};
8650222f3bSMarcus Cooper
8750222f3bSMarcus Cooper&ehci1 {
8850222f3bSMarcus Cooper	status = "okay";
8950222f3bSMarcus Cooper};
9050222f3bSMarcus Cooper
91*80e5f83cSHans de Goede&codec {
92*80e5f83cSHans de Goede	status = "okay";
93*80e5f83cSHans de Goede};
94*80e5f83cSHans de Goede
9550222f3bSMarcus Cooper&gmac {
9650222f3bSMarcus Cooper	pinctrl-names = "default";
9750222f3bSMarcus Cooper	pinctrl-0 = <&gmac_pins_rgmii_a>;
9850222f3bSMarcus Cooper	phy = <&phy1>;
9950222f3bSMarcus Cooper	phy-mode = "rgmii";
10050222f3bSMarcus Cooper	status = "okay";
10150222f3bSMarcus Cooper
10250222f3bSMarcus Cooper	phy1: ethernet-phy@1 {
10350222f3bSMarcus Cooper		reg = <1>;
10450222f3bSMarcus Cooper	};
10550222f3bSMarcus Cooper};
10650222f3bSMarcus Cooper
10750222f3bSMarcus Cooper&i2c0 {
10850222f3bSMarcus Cooper	pinctrl-names = "default";
10950222f3bSMarcus Cooper	pinctrl-0 = <&i2c0_pins_a>;
11050222f3bSMarcus Cooper	status = "okay";
11150222f3bSMarcus Cooper
11250222f3bSMarcus Cooper	axp209: pmic@34 {
11350222f3bSMarcus Cooper		reg = <0x34>;
11450222f3bSMarcus Cooper		interrupt-parent = <&nmi_intc>;
11550222f3bSMarcus Cooper		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
11650222f3bSMarcus Cooper	};
11750222f3bSMarcus Cooper};
11850222f3bSMarcus Cooper
119*80e5f83cSHans de Goede&lradc {
120*80e5f83cSHans de Goede	vref-supply = <&reg_vcc3v0>;
12150222f3bSMarcus Cooper	status = "okay";
122*80e5f83cSHans de Goede
123*80e5f83cSHans de Goede	button@190 {
124*80e5f83cSHans de Goede		label = "Volume Up";
125*80e5f83cSHans de Goede		linux,code = <KEY_VOLUMEUP>;
126*80e5f83cSHans de Goede		channel = <0>;
127*80e5f83cSHans de Goede		voltage = <190000>;
128*80e5f83cSHans de Goede	};
129*80e5f83cSHans de Goede
130*80e5f83cSHans de Goede	button@390 {
131*80e5f83cSHans de Goede		label = "Volume Down";
132*80e5f83cSHans de Goede		linux,code = <KEY_VOLUMEDOWN>;
133*80e5f83cSHans de Goede		channel = <0>;
134*80e5f83cSHans de Goede		voltage = <390000>;
135*80e5f83cSHans de Goede	};
136*80e5f83cSHans de Goede
137*80e5f83cSHans de Goede	button@600 {
138*80e5f83cSHans de Goede		label = "Menu";
139*80e5f83cSHans de Goede		linux,code = <KEY_MENU>;
140*80e5f83cSHans de Goede		channel = <0>;
141*80e5f83cSHans de Goede		voltage = <600000>;
142*80e5f83cSHans de Goede	};
143*80e5f83cSHans de Goede
144*80e5f83cSHans de Goede	button@800 {
145*80e5f83cSHans de Goede		label = "Search";
146*80e5f83cSHans de Goede		linux,code = <KEY_SEARCH>;
147*80e5f83cSHans de Goede		channel = <0>;
148*80e5f83cSHans de Goede		voltage = <800000>;
149*80e5f83cSHans de Goede	};
150*80e5f83cSHans de Goede
151*80e5f83cSHans de Goede	button@980 {
152*80e5f83cSHans de Goede		label = "Home";
153*80e5f83cSHans de Goede		linux,code = <KEY_HOMEPAGE>;
154*80e5f83cSHans de Goede		channel = <0>;
155*80e5f83cSHans de Goede		voltage = <980000>;
156*80e5f83cSHans de Goede	};
157*80e5f83cSHans de Goede
158*80e5f83cSHans de Goede	button@1180 {
159*80e5f83cSHans de Goede		label = "Esc";
160*80e5f83cSHans de Goede		linux,code = <KEY_ESC>;
161*80e5f83cSHans de Goede		channel = <0>;
162*80e5f83cSHans de Goede		voltage = <1180000>;
163*80e5f83cSHans de Goede	};
164*80e5f83cSHans de Goede
165*80e5f83cSHans de Goede	button@1400 {
166*80e5f83cSHans de Goede		label = "Enter";
167*80e5f83cSHans de Goede		linux,code = <KEY_ENTER>;
168*80e5f83cSHans de Goede		channel = <0>;
169*80e5f83cSHans de Goede		voltage = <1400000>;
170*80e5f83cSHans de Goede	};
17150222f3bSMarcus Cooper};
17250222f3bSMarcus Cooper
17350222f3bSMarcus Cooper&mmc0 {
17450222f3bSMarcus Cooper	pinctrl-names = "default";
17550222f3bSMarcus Cooper	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
17650222f3bSMarcus Cooper	vmmc-supply = <&reg_vcc3v3>;
17750222f3bSMarcus Cooper	bus-width = <4>;
17850222f3bSMarcus Cooper	cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
17950222f3bSMarcus Cooper	cd-inverted;
18050222f3bSMarcus Cooper	status = "okay";
18150222f3bSMarcus Cooper};
18250222f3bSMarcus Cooper
183*80e5f83cSHans de Goede&mmc3 {
184*80e5f83cSHans de Goede	pinctrl-names = "default";
185*80e5f83cSHans de Goede	pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olimex_som_evb>;
186*80e5f83cSHans de Goede	vmmc-supply = <&reg_vcc3v3>;
187*80e5f83cSHans de Goede	bus-width = <4>;
188*80e5f83cSHans de Goede	cd-gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
189*80e5f83cSHans de Goede	cd-inverted;
190*80e5f83cSHans de Goede	status = "okay";
191*80e5f83cSHans de Goede};
192*80e5f83cSHans de Goede
19350222f3bSMarcus Cooper&ohci0 {
19450222f3bSMarcus Cooper	status = "okay";
19550222f3bSMarcus Cooper};
19650222f3bSMarcus Cooper
19750222f3bSMarcus Cooper&ohci1 {
19850222f3bSMarcus Cooper	status = "okay";
19950222f3bSMarcus Cooper};
20050222f3bSMarcus Cooper
20150222f3bSMarcus Cooper&otg_sram {
20250222f3bSMarcus Cooper	status = "okay";
20350222f3bSMarcus Cooper};
20450222f3bSMarcus Cooper
20550222f3bSMarcus Cooper&pio {
20650222f3bSMarcus Cooper	ahci_pwr_pin_olimex_som_evb: ahci_pwr_pin@1 {
20750222f3bSMarcus Cooper		allwinner,pins = "PC3";
20850222f3bSMarcus Cooper		allwinner,function = "gpio_out";
20950222f3bSMarcus Cooper		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
21050222f3bSMarcus Cooper		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
21150222f3bSMarcus Cooper	};
21250222f3bSMarcus Cooper
21350222f3bSMarcus Cooper	led_pins_olimex_som_evb: led_pins@0 {
21450222f3bSMarcus Cooper		allwinner,pins = "PH2";
21550222f3bSMarcus Cooper		allwinner,function = "gpio_out";
21650222f3bSMarcus Cooper		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
21750222f3bSMarcus Cooper		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
21850222f3bSMarcus Cooper	};
21950222f3bSMarcus Cooper
220*80e5f83cSHans de Goede	mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin@0 {
221*80e5f83cSHans de Goede		allwinner,pins = "PH0";
222*80e5f83cSHans de Goede		allwinner,function = "gpio_in";
223*80e5f83cSHans de Goede		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
224*80e5f83cSHans de Goede		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
225*80e5f83cSHans de Goede	};
226*80e5f83cSHans de Goede
22750222f3bSMarcus Cooper	usb0_id_detect_pin: usb0_id_detect_pin@0 {
228*80e5f83cSHans de Goede		allwinner,pins = "PH4";
22950222f3bSMarcus Cooper		allwinner,function = "gpio_in";
23050222f3bSMarcus Cooper		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
23150222f3bSMarcus Cooper		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
23250222f3bSMarcus Cooper	};
23350222f3bSMarcus Cooper
23450222f3bSMarcus Cooper	usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
235*80e5f83cSHans de Goede		allwinner,pins = "PH5";
23650222f3bSMarcus Cooper		allwinner,function = "gpio_in";
23750222f3bSMarcus Cooper		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
23850222f3bSMarcus Cooper		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
23950222f3bSMarcus Cooper	};
24050222f3bSMarcus Cooper};
24150222f3bSMarcus Cooper
24250222f3bSMarcus Cooper&reg_ahci_5v {
24350222f3bSMarcus Cooper	pinctrl-0 = <&ahci_pwr_pin_olimex_som_evb>;
24450222f3bSMarcus Cooper	gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
24550222f3bSMarcus Cooper	status = "okay";
24650222f3bSMarcus Cooper};
24750222f3bSMarcus Cooper
24850222f3bSMarcus Cooper#include "axp209.dtsi"
24950222f3bSMarcus Cooper
25050222f3bSMarcus Cooper&reg_dcdc2 {
25150222f3bSMarcus Cooper	regulator-always-on;
25250222f3bSMarcus Cooper	regulator-min-microvolt = <1000000>;
253*80e5f83cSHans de Goede	regulator-max-microvolt = <1400000>;
25450222f3bSMarcus Cooper	regulator-name = "vdd-cpu";
25550222f3bSMarcus Cooper};
25650222f3bSMarcus Cooper
25750222f3bSMarcus Cooper&reg_dcdc3 {
25850222f3bSMarcus Cooper	regulator-always-on;
25950222f3bSMarcus Cooper	regulator-min-microvolt = <1000000>;
26050222f3bSMarcus Cooper	regulator-max-microvolt = <1400000>;
26150222f3bSMarcus Cooper	regulator-name = "vdd-int-dll";
26250222f3bSMarcus Cooper};
26350222f3bSMarcus Cooper
26450222f3bSMarcus Cooper&reg_ldo1 {
26550222f3bSMarcus Cooper	regulator-name = "vdd-rtc";
26650222f3bSMarcus Cooper};
26750222f3bSMarcus Cooper
26850222f3bSMarcus Cooper&reg_ldo2 {
26950222f3bSMarcus Cooper	regulator-always-on;
27050222f3bSMarcus Cooper	regulator-min-microvolt = <3000000>;
27150222f3bSMarcus Cooper	regulator-max-microvolt = <3000000>;
27250222f3bSMarcus Cooper	regulator-name = "avcc";
27350222f3bSMarcus Cooper};
27450222f3bSMarcus Cooper
27550222f3bSMarcus Cooper&reg_usb0_vbus {
27650222f3bSMarcus Cooper	status = "okay";
27750222f3bSMarcus Cooper};
27850222f3bSMarcus Cooper
27950222f3bSMarcus Cooper&reg_usb1_vbus {
28050222f3bSMarcus Cooper	status = "okay";
28150222f3bSMarcus Cooper};
28250222f3bSMarcus Cooper
28350222f3bSMarcus Cooper&reg_usb2_vbus {
28450222f3bSMarcus Cooper	status = "okay";
28550222f3bSMarcus Cooper};
28650222f3bSMarcus Cooper
28750222f3bSMarcus Cooper&uart0 {
28850222f3bSMarcus Cooper	pinctrl-names = "default";
28950222f3bSMarcus Cooper	pinctrl-0 = <&uart0_pins_a>;
29050222f3bSMarcus Cooper	status = "okay";
29150222f3bSMarcus Cooper};
29250222f3bSMarcus Cooper
29350222f3bSMarcus Cooper&usb_otg {
29450222f3bSMarcus Cooper	dr_mode = "otg";
29550222f3bSMarcus Cooper	status = "okay";
29650222f3bSMarcus Cooper};
29750222f3bSMarcus Cooper
29850222f3bSMarcus Cooper&usbphy {
29950222f3bSMarcus Cooper	pinctrl-names = "default";
30050222f3bSMarcus Cooper	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
301*80e5f83cSHans de Goede	usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */
302*80e5f83cSHans de Goede	usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */
30350222f3bSMarcus Cooper	usb0_vbus-supply = <&reg_usb0_vbus>;
30450222f3bSMarcus Cooper	usb1_vbus-supply = <&reg_usb1_vbus>;
30550222f3bSMarcus Cooper	usb2_vbus-supply = <&reg_usb2_vbus>;
30650222f3bSMarcus Cooper	status = "okay";
30750222f3bSMarcus Cooper};
308