xref: /openbmc/u-boot/arch/arm/dts/sun4i-a10-gemei-g9.dts (revision cc49e2bdb8fbd47af28cb7e47696322586e9fff1)
153ab4af3SHans de Goede/*
253ab4af3SHans de Goede * Copyright 2015 Priit Laes
353ab4af3SHans de Goede *
453ab4af3SHans de Goede * Priit Laes <plaes@plaes.org>
553ab4af3SHans de Goede *
653ab4af3SHans de Goede * This file is dual-licensed: you can use it either under the terms
753ab4af3SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual
853ab4af3SHans de Goede * licensing only applies to this file, and not this project as a
953ab4af3SHans de Goede * whole.
1053ab4af3SHans de Goede *
1153ab4af3SHans de Goede *  a) This file is free software; you can redistribute it and/or
1253ab4af3SHans de Goede *     modify it under the terms of the GNU General Public License as
1353ab4af3SHans de Goede *     published by the Free Software Foundation; either version 2 of the
1453ab4af3SHans de Goede *     License, or (at your option) any later version.
1553ab4af3SHans de Goede *
1653ab4af3SHans de Goede *     This file is distributed in the hope that it will be useful,
1753ab4af3SHans de Goede *     but WITHOUT ANY WARRANTY; without even the implied warranty of
1853ab4af3SHans de Goede *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1953ab4af3SHans de Goede *     GNU General Public License for more details.
2053ab4af3SHans de Goede *
2153ab4af3SHans de Goede * Or, alternatively,
2253ab4af3SHans de Goede *
2353ab4af3SHans de Goede *  b) Permission is hereby granted, free of charge, to any person
2453ab4af3SHans de Goede *     obtaining a copy of this software and associated documentation
2553ab4af3SHans de Goede *     files (the "Software"), to deal in the Software without
2653ab4af3SHans de Goede *     restriction, including without limitation the rights to use,
2753ab4af3SHans de Goede *     copy, modify, merge, publish, distribute, sublicense, and/or
2853ab4af3SHans de Goede *     sell copies of the Software, and to permit persons to whom the
2953ab4af3SHans de Goede *     Software is furnished to do so, subject to the following
3053ab4af3SHans de Goede *     conditions:
3153ab4af3SHans de Goede *
3253ab4af3SHans de Goede *     The above copyright notice and this permission notice shall be
3353ab4af3SHans de Goede *     included in all copies or substantial portions of the Software.
3453ab4af3SHans de Goede *
3553ab4af3SHans de Goede *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3653ab4af3SHans de Goede *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3753ab4af3SHans de Goede *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3853ab4af3SHans de Goede *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
3953ab4af3SHans de Goede *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
4053ab4af3SHans de Goede *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4153ab4af3SHans de Goede *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4253ab4af3SHans de Goede *     OTHER DEALINGS IN THE SOFTWARE.
4353ab4af3SHans de Goede */
4453ab4af3SHans de Goede
4553ab4af3SHans de Goede/dts-v1/;
4653ab4af3SHans de Goede#include "sun4i-a10.dtsi"
4753ab4af3SHans de Goede#include "sunxi-common-regulators.dtsi"
4853ab4af3SHans de Goede#include <dt-bindings/gpio/gpio.h>
4953ab4af3SHans de Goede#include <dt-bindings/input/input.h>
5080e5f83cSHans de Goede#include <dt-bindings/interrupt-controller/irq.h>
5153ab4af3SHans de Goede
5253ab4af3SHans de Goede/ {
5353ab4af3SHans de Goede	model = "Gemei G9 Tablet";
5453ab4af3SHans de Goede	compatible = "gemei,g9", "allwinner,sun4i-a10";
5553ab4af3SHans de Goede
5653ab4af3SHans de Goede	aliases {
5753ab4af3SHans de Goede		serial0 = &uart0;
5853ab4af3SHans de Goede	};
5953ab4af3SHans de Goede
6053ab4af3SHans de Goede	chosen {
6153ab4af3SHans de Goede		stdout-path = "serial0:115200n8";
6253ab4af3SHans de Goede	};
6353ab4af3SHans de Goede};
6453ab4af3SHans de Goede
6553ab4af3SHans de Goede/*
6653ab4af3SHans de Goede * TODO:
6753ab4af3SHans de Goede *   2x cameras via CSI
6853ab4af3SHans de Goede *   AXP battery management
6953ab4af3SHans de Goede *   NAND
7053ab4af3SHans de Goede *   OTG
7153ab4af3SHans de Goede *   Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
7253ab4af3SHans de Goede */
7380e5f83cSHans de Goede&codec {
7480e5f83cSHans de Goede	/* PH15 controls power to external amplifier (ft2012q) */
7580e5f83cSHans de Goede	allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>;
7680e5f83cSHans de Goede	status = "okay";
7780e5f83cSHans de Goede};
7880e5f83cSHans de Goede
7980e5f83cSHans de Goede&cpu0 {
8080e5f83cSHans de Goede	cpu-supply = <&reg_dcdc2>;
8180e5f83cSHans de Goede};
8253ab4af3SHans de Goede
8353ab4af3SHans de Goede&ehci0 {
8453ab4af3SHans de Goede	status = "okay";
8553ab4af3SHans de Goede};
8653ab4af3SHans de Goede
8753ab4af3SHans de Goede&ehci1 {
8853ab4af3SHans de Goede	status = "okay";
8953ab4af3SHans de Goede};
9053ab4af3SHans de Goede
9153ab4af3SHans de Goede&i2c0 {
9253ab4af3SHans de Goede	status = "okay";
9353ab4af3SHans de Goede
9453ab4af3SHans de Goede	axp209: pmic@34 {
9553ab4af3SHans de Goede		reg = <0x34>;
9653ab4af3SHans de Goede		interrupts = <0>;
9780e5f83cSHans de Goede	};
9880e5f83cSHans de Goede};
9953ab4af3SHans de Goede
10080e5f83cSHans de Goede#include "axp209.dtsi"
10153ab4af3SHans de Goede
10253ab4af3SHans de Goede&i2c1 {
10353ab4af3SHans de Goede	status = "okay";
10453ab4af3SHans de Goede
10553ab4af3SHans de Goede	/* Accelerometer */
10653ab4af3SHans de Goede	bma250@18 {
10753ab4af3SHans de Goede		compatible = "bosch,bma250";
10853ab4af3SHans de Goede		reg = <0x18>;
10980e5f83cSHans de Goede		interrupt-parent = <&pio>;
11080e5f83cSHans de Goede		interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH00 / EINT0 */
11153ab4af3SHans de Goede	};
11253ab4af3SHans de Goede};
11353ab4af3SHans de Goede
11453ab4af3SHans de Goede&lradc {
11580e5f83cSHans de Goede	vref-supply = <&reg_ldo2>;
11653ab4af3SHans de Goede
11753ab4af3SHans de Goede	status = "okay";
11853ab4af3SHans de Goede
119*3c92cca3SJagan Teki	button-158 {
12053ab4af3SHans de Goede		label = "Volume Down";
12153ab4af3SHans de Goede		linux,code = <KEY_VOLUMEDOWN>;
12253ab4af3SHans de Goede		channel = <0>;
12353ab4af3SHans de Goede		voltage = <158730>;
12453ab4af3SHans de Goede	};
12553ab4af3SHans de Goede
126*3c92cca3SJagan Teki	button-349 {
12753ab4af3SHans de Goede		label = "Volume Up";
12853ab4af3SHans de Goede		linux,code = <KEY_VOLUMEUP>;
12953ab4af3SHans de Goede		channel = <0>;
13053ab4af3SHans de Goede		voltage = <349206>;
13153ab4af3SHans de Goede	};
13253ab4af3SHans de Goede
133*3c92cca3SJagan Teki	button-1142 {
13453ab4af3SHans de Goede		label = "Esc";
13553ab4af3SHans de Goede		linux,code = <KEY_ESC>;
13653ab4af3SHans de Goede		channel = <0>;
13753ab4af3SHans de Goede		voltage = <1142856>;
13853ab4af3SHans de Goede	};
13953ab4af3SHans de Goede};
14053ab4af3SHans de Goede
14153ab4af3SHans de Goede&mmc0 {
14253ab4af3SHans de Goede	vmmc-supply = <&reg_vcc3v3>;
14353ab4af3SHans de Goede	bus-width = <4>;
144*3c92cca3SJagan Teki	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH01 */
14553ab4af3SHans de Goede	status = "okay";
14653ab4af3SHans de Goede};
14753ab4af3SHans de Goede
14880e5f83cSHans de Goede&reg_dcdc2 {
14980e5f83cSHans de Goede	regulator-always-on;
15080e5f83cSHans de Goede	regulator-min-microvolt = <1000000>;
15180e5f83cSHans de Goede	regulator-max-microvolt = <1400000>;
15280e5f83cSHans de Goede	regulator-name = "vdd-cpu";
15380e5f83cSHans de Goede};
15480e5f83cSHans de Goede
15580e5f83cSHans de Goede&reg_dcdc3 {
15680e5f83cSHans de Goede	regulator-always-on;
15780e5f83cSHans de Goede	regulator-min-microvolt = <1250000>;
15880e5f83cSHans de Goede	regulator-max-microvolt = <1250000>;
15980e5f83cSHans de Goede	regulator-name = "vdd-int-dll";
16080e5f83cSHans de Goede};
16180e5f83cSHans de Goede
16280e5f83cSHans de Goede&reg_ldo1 {
16380e5f83cSHans de Goede	regulator-name = "vdd-rtc";
16480e5f83cSHans de Goede};
16580e5f83cSHans de Goede
16680e5f83cSHans de Goede&reg_ldo2 {
16780e5f83cSHans de Goede	regulator-always-on;
16880e5f83cSHans de Goede	regulator-min-microvolt = <3000000>;
16980e5f83cSHans de Goede	regulator-max-microvolt = <3000000>;
17080e5f83cSHans de Goede	regulator-name = "avcc";
17180e5f83cSHans de Goede};
17280e5f83cSHans de Goede
17353ab4af3SHans de Goede&reg_usb1_vbus {
17453ab4af3SHans de Goede	status = "okay";
17553ab4af3SHans de Goede};
17653ab4af3SHans de Goede
17753ab4af3SHans de Goede&reg_usb2_vbus {
17853ab4af3SHans de Goede	status = "okay";
17953ab4af3SHans de Goede};
18053ab4af3SHans de Goede
18153ab4af3SHans de Goede
18253ab4af3SHans de Goede&uart0  {
18353ab4af3SHans de Goede	pinctrl-names = "default";
184*3c92cca3SJagan Teki	pinctrl-0 = <&uart0_pb_pins>;
18553ab4af3SHans de Goede	status = "okay";
18653ab4af3SHans de Goede};
18753ab4af3SHans de Goede
18853ab4af3SHans de Goede&usbphy {
18953ab4af3SHans de Goede	usb1_vbus-supply = <&reg_usb1_vbus>;
19053ab4af3SHans de Goede	usb2_vbus-supply = <&reg_usb2_vbus>;
19153ab4af3SHans de Goede	status = "okay";
19253ab4af3SHans de Goede};
193