xref: /rk3399_rockchip-uboot/arch/arm/dts/sun8i-a23-evb.dts (revision 6f43ba70d15e15a08c25b3d956c70addb6740737)
1*8b1ba941SHans de Goede/*
2*8b1ba941SHans de Goede * Copyright 2015 Maxime Ripard
3*8b1ba941SHans de Goede *
4*8b1ba941SHans de Goede * Maxime Ripard <maxime.ripard@free-electrons.com>
5*8b1ba941SHans de Goede *
6*8b1ba941SHans de Goede * This file is dual-licensed: you can use it either under the terms
7*8b1ba941SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual
8*8b1ba941SHans de Goede * licensing only applies to this file, and not this project as a
9*8b1ba941SHans de Goede * whole.
10*8b1ba941SHans de Goede *
11*8b1ba941SHans de Goede *  a) This file is free software; you can redistribute it and/or
12*8b1ba941SHans de Goede *     modify it under the terms of the GNU General Public License as
13*8b1ba941SHans de Goede *     published by the Free Software Foundation; either version 2 of the
14*8b1ba941SHans de Goede *     License, or (at your option) any later version.
15*8b1ba941SHans de Goede *
16*8b1ba941SHans de Goede *     This file is distributed in the hope that it will be useful,
17*8b1ba941SHans de Goede *     but WITHOUT ANY WARRANTY; without even the implied warranty of
18*8b1ba941SHans de Goede *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19*8b1ba941SHans de Goede *     GNU General Public License for more details.
20*8b1ba941SHans de Goede *
21*8b1ba941SHans de Goede * Or, alternatively,
22*8b1ba941SHans de Goede *
23*8b1ba941SHans de Goede *  b) Permission is hereby granted, free of charge, to any person
24*8b1ba941SHans de Goede *     obtaining a copy of this software and associated documentation
25*8b1ba941SHans de Goede *     files (the "Software"), to deal in the Software without
26*8b1ba941SHans de Goede *     restriction, including without limitation the rights to use,
27*8b1ba941SHans de Goede *     copy, modify, merge, publish, distribute, sublicense, and/or
28*8b1ba941SHans de Goede *     sell copies of the Software, and to permit persons to whom the
29*8b1ba941SHans de Goede *     Software is furnished to do so, subject to the following
30*8b1ba941SHans de Goede *     conditions:
31*8b1ba941SHans de Goede *
32*8b1ba941SHans de Goede *     The above copyright notice and this permission notice shall be
33*8b1ba941SHans de Goede *     included in all copies or substantial portions of the Software.
34*8b1ba941SHans de Goede *
35*8b1ba941SHans de Goede *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36*8b1ba941SHans de Goede *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37*8b1ba941SHans de Goede *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38*8b1ba941SHans de Goede *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39*8b1ba941SHans de Goede *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40*8b1ba941SHans de Goede *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41*8b1ba941SHans de Goede *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42*8b1ba941SHans de Goede *     OTHER DEALINGS IN THE SOFTWARE.
43*8b1ba941SHans de Goede */
44*8b1ba941SHans de Goede
45*8b1ba941SHans de Goede/dts-v1/;
46*8b1ba941SHans de Goede#include "sun8i-a23.dtsi"
47*8b1ba941SHans de Goede#include "sunxi-common-regulators.dtsi"
48*8b1ba941SHans de Goede
49*8b1ba941SHans de Goede#include <dt-bindings/gpio/gpio.h>
50*8b1ba941SHans de Goede#include <dt-bindings/input/input.h>
51*8b1ba941SHans de Goede#include <dt-bindings/pinctrl/sun4i-a10.h>
52*8b1ba941SHans de Goede
53*8b1ba941SHans de Goede/ {
54*8b1ba941SHans de Goede	model = "Allwinner A23 Evaluation Board";
55*8b1ba941SHans de Goede	compatible = "allwinner,sun8i-a23-evb", "allwinner,sun8i-a23";
56*8b1ba941SHans de Goede
57*8b1ba941SHans de Goede	aliases {
58*8b1ba941SHans de Goede		i2c0 = &i2c0;
59*8b1ba941SHans de Goede		i2c1 = &i2c1;
60*8b1ba941SHans de Goede		serial0 = &r_uart;
61*8b1ba941SHans de Goede	};
62*8b1ba941SHans de Goede
63*8b1ba941SHans de Goede	chosen {
64*8b1ba941SHans de Goede		stdout-path = "serial0:115200n8";
65*8b1ba941SHans de Goede	};
66*8b1ba941SHans de Goede};
67*8b1ba941SHans de Goede
68*8b1ba941SHans de Goede&i2c0 {
69*8b1ba941SHans de Goede	pinctrl-names = "default";
70*8b1ba941SHans de Goede	pinctrl-0 = <&i2c0_pins_a>;
71*8b1ba941SHans de Goede	status = "okay";
72*8b1ba941SHans de Goede};
73*8b1ba941SHans de Goede
74*8b1ba941SHans de Goede&i2c1 {
75*8b1ba941SHans de Goede	pinctrl-names = "default";
76*8b1ba941SHans de Goede	pinctrl-0 = <&i2c1_pins_a>;
77*8b1ba941SHans de Goede	status = "okay";
78*8b1ba941SHans de Goede};
79*8b1ba941SHans de Goede
80*8b1ba941SHans de Goede&lradc {
81*8b1ba941SHans de Goede	vref-supply = <&reg_vcc3v0>;
82*8b1ba941SHans de Goede	status = "okay";
83*8b1ba941SHans de Goede
84*8b1ba941SHans de Goede	button@190 {
85*8b1ba941SHans de Goede		label = "Volume Up";
86*8b1ba941SHans de Goede		linux,code = <KEY_VOLUMEUP>;
87*8b1ba941SHans de Goede		channel = <0>;
88*8b1ba941SHans de Goede		voltage = <190000>;
89*8b1ba941SHans de Goede	};
90*8b1ba941SHans de Goede
91*8b1ba941SHans de Goede	button@390 {
92*8b1ba941SHans de Goede		label = "Volume Down";
93*8b1ba941SHans de Goede		linux,code = <KEY_VOLUMEDOWN>;
94*8b1ba941SHans de Goede		channel = <0>;
95*8b1ba941SHans de Goede		voltage = <390000>;
96*8b1ba941SHans de Goede	};
97*8b1ba941SHans de Goede
98*8b1ba941SHans de Goede	button@600 {
99*8b1ba941SHans de Goede		label = "Home";
100*8b1ba941SHans de Goede		linux,code = <KEY_HOME>;
101*8b1ba941SHans de Goede		channel = <0>;
102*8b1ba941SHans de Goede		voltage = <600000>;
103*8b1ba941SHans de Goede	};
104*8b1ba941SHans de Goede};
105*8b1ba941SHans de Goede
106*8b1ba941SHans de Goede&mmc0 {
107*8b1ba941SHans de Goede	pinctrl-names = "default";
108*8b1ba941SHans de Goede	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_evb>;
109*8b1ba941SHans de Goede	vmmc-supply = <&reg_vcc3v0>;
110*8b1ba941SHans de Goede	bus-width = <4>;
111*8b1ba941SHans de Goede	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
112*8b1ba941SHans de Goede	cd-inverted;
113*8b1ba941SHans de Goede	status = "okay";
114*8b1ba941SHans de Goede};
115*8b1ba941SHans de Goede
116*8b1ba941SHans de Goede&pio {
117*8b1ba941SHans de Goede	mmc0_cd_pin_evb: mmc0_cd_pin@0 {
118*8b1ba941SHans de Goede		allwinner,pins = "PB4";
119*8b1ba941SHans de Goede		allwinner,function = "gpio_in";
120*8b1ba941SHans de Goede		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
121*8b1ba941SHans de Goede		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
122*8b1ba941SHans de Goede	};
123*8b1ba941SHans de Goede};
124*8b1ba941SHans de Goede
125*8b1ba941SHans de Goede/*
126*8b1ba941SHans de Goede * The RX line has a non-populated resistance. In order to use it, you
127*8b1ba941SHans de Goede * need to solder R207 on the back of the board in order to close the
128*8b1ba941SHans de Goede * line and get a working UART.
129*8b1ba941SHans de Goede */
130*8b1ba941SHans de Goede&r_uart {
131*8b1ba941SHans de Goede	pinctrl-names = "default";
132*8b1ba941SHans de Goede	pinctrl-0 = <&r_uart_pins_a>;
133*8b1ba941SHans de Goede	status = "okay";
134*8b1ba941SHans de Goede};
135