153ab4af3SHans de Goede/* 253ab4af3SHans de Goede * Copyright 2015 Hans de Goede <hdegoede@redhat.com> 353ab4af3SHans de Goede * 453ab4af3SHans de Goede * This file is dual-licensed: you can use it either under the terms 553ab4af3SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual 653ab4af3SHans de Goede * licensing only applies to this file, and not this project as a 753ab4af3SHans de Goede * whole. 853ab4af3SHans de Goede * 953ab4af3SHans de Goede * a) This file is free software; you can redistribute it and/or 1053ab4af3SHans de Goede * modify it under the terms of the GNU General Public License as 1153ab4af3SHans de Goede * published by the Free Software Foundation; either version 2 of the 1253ab4af3SHans de Goede * License, or (at your option) any later version. 1353ab4af3SHans de Goede * 1453ab4af3SHans de Goede * This file is distributed in the hope that it will be useful, 1553ab4af3SHans de Goede * but WITHOUT ANY WARRANTY; without even the implied warranty of 1653ab4af3SHans de Goede * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1753ab4af3SHans de Goede * GNU General Public License for more details. 1853ab4af3SHans de Goede * 1953ab4af3SHans de Goede * Or, alternatively, 2053ab4af3SHans de Goede * 2153ab4af3SHans de Goede * b) Permission is hereby granted, free of charge, to any person 2253ab4af3SHans de Goede * obtaining a copy of this software and associated documentation 2353ab4af3SHans de Goede * files (the "Software"), to deal in the Software without 2453ab4af3SHans de Goede * restriction, including without limitation the rights to use, 2553ab4af3SHans de Goede * copy, modify, merge, publish, distribute, sublicense, and/or 2653ab4af3SHans de Goede * sell copies of the Software, and to permit persons to whom the 2753ab4af3SHans de Goede * Software is furnished to do so, subject to the following 2853ab4af3SHans de Goede * conditions: 2953ab4af3SHans de Goede * 3053ab4af3SHans de Goede * The above copyright notice and this permission notice shall be 3153ab4af3SHans de Goede * included in all copies or substantial portions of the Software. 3253ab4af3SHans de Goede * 3353ab4af3SHans de Goede * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 3453ab4af3SHans de Goede * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 3553ab4af3SHans de Goede * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 3653ab4af3SHans de Goede * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 3753ab4af3SHans de Goede * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 3853ab4af3SHans de Goede * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 3953ab4af3SHans de Goede * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 4053ab4af3SHans de Goede * OTHER DEALINGS IN THE SOFTWARE. 4153ab4af3SHans de Goede */ 4253ab4af3SHans de Goede 4353ab4af3SHans de Goede/dts-v1/; 4453ab4af3SHans de Goede#include "sun5i-a13.dtsi" 4553ab4af3SHans de Goede#include "sunxi-common-regulators.dtsi" 4653ab4af3SHans de Goede#include <dt-bindings/gpio/gpio.h> 4753ab4af3SHans de Goede#include <dt-bindings/input/input.h> 488b1ba941SHans de Goede#include <dt-bindings/interrupt-controller/irq.h> 4953ab4af3SHans de Goede#include <dt-bindings/pinctrl/sun4i-a10.h> 5053ab4af3SHans de Goede 5153ab4af3SHans de Goede/ { 5253ab4af3SHans de Goede model = "Utoo P66"; 5353ab4af3SHans de Goede compatible = "utoo,p66", "allwinner,sun5i-a13"; 5453ab4af3SHans de Goede 5553ab4af3SHans de Goede i2c_lcd: i2c@0 { 5653ab4af3SHans de Goede /* The lcd panel i2c interface is hooked up via gpios */ 5753ab4af3SHans de Goede compatible = "i2c-gpio"; 5853ab4af3SHans de Goede pinctrl-names = "default"; 5953ab4af3SHans de Goede pinctrl-0 = <&i2c_lcd_pins>; 6053ab4af3SHans de Goede gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>, /* PG12, sda */ 6153ab4af3SHans de Goede <&pio 6 10 GPIO_ACTIVE_HIGH>; /* PG10, scl */ 6253ab4af3SHans de Goede i2c-gpio,delay-us = <5>; 6353ab4af3SHans de Goede }; 6453ab4af3SHans de Goede}; 6553ab4af3SHans de Goede 6653ab4af3SHans de Goede&cpu0 { 6753ab4af3SHans de Goede cpu-supply = <®_dcdc2>; 6853ab4af3SHans de Goede}; 6953ab4af3SHans de Goede 7053ab4af3SHans de Goede&ehci0 { 7153ab4af3SHans de Goede status = "okay"; 7253ab4af3SHans de Goede}; 7353ab4af3SHans de Goede 7453ab4af3SHans de Goede&i2c0 { 7553ab4af3SHans de Goede pinctrl-names = "default"; 7653ab4af3SHans de Goede pinctrl-0 = <&i2c0_pins_a>; 7753ab4af3SHans de Goede status = "okay"; 7853ab4af3SHans de Goede 7953ab4af3SHans de Goede axp209: pmic@34 { 8053ab4af3SHans de Goede reg = <0x34>; 8153ab4af3SHans de Goede interrupts = <0>; 8253ab4af3SHans de Goede }; 8353ab4af3SHans de Goede}; 8453ab4af3SHans de Goede 8553ab4af3SHans de Goede#include "axp209.dtsi" 8653ab4af3SHans de Goede 8753ab4af3SHans de Goede&i2c1 { 8853ab4af3SHans de Goede pinctrl-names = "default"; 8953ab4af3SHans de Goede pinctrl-0 = <&i2c1_pins_a>; 9053ab4af3SHans de Goede status = "okay"; 9153ab4af3SHans de Goede 928b1ba941SHans de Goede icn8318: touchscreen@40 { 938b1ba941SHans de Goede compatible = "chipone,icn8318"; 948b1ba941SHans de Goede reg = <0x40>; 958b1ba941SHans de Goede interrupt-parent = <&pio>; 96*da52a4a3SHans de Goede interrupts = <6 9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */ 978b1ba941SHans de Goede pinctrl-names = "default"; 988b1ba941SHans de Goede pinctrl-0 = <&ts_wake_pin_p66>; 998b1ba941SHans de Goede wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */ 1008b1ba941SHans de Goede touchscreen-size-x = <800>; 1018b1ba941SHans de Goede touchscreen-size-y = <480>; 1028b1ba941SHans de Goede touchscreen-inverted-x; 1038b1ba941SHans de Goede touchscreen-swapped-x-y; 1048b1ba941SHans de Goede }; 1058b1ba941SHans de Goede 10653ab4af3SHans de Goede pcf8563: rtc@51 { 10753ab4af3SHans de Goede compatible = "nxp,pcf8563"; 10853ab4af3SHans de Goede reg = <0x51>; 10953ab4af3SHans de Goede }; 11053ab4af3SHans de Goede}; 11153ab4af3SHans de Goede 11253ab4af3SHans de Goede&lradc { 11353ab4af3SHans de Goede vref-supply = <®_ldo2>; 11453ab4af3SHans de Goede status = "okay"; 11553ab4af3SHans de Goede 11653ab4af3SHans de Goede button@200 { 11753ab4af3SHans de Goede label = "Volume Up"; 11853ab4af3SHans de Goede linux,code = <KEY_VOLUMEUP>; 11953ab4af3SHans de Goede channel = <0>; 12053ab4af3SHans de Goede voltage = <200000>; 12153ab4af3SHans de Goede }; 12253ab4af3SHans de Goede 12353ab4af3SHans de Goede button@400 { 12453ab4af3SHans de Goede label = "Volume Down"; 12553ab4af3SHans de Goede linux,code = <KEY_VOLUMEDOWN>; 12653ab4af3SHans de Goede channel = <0>; 12753ab4af3SHans de Goede voltage = <400000>; 12853ab4af3SHans de Goede }; 12953ab4af3SHans de Goede}; 13053ab4af3SHans de Goede 13153ab4af3SHans de Goede&mmc0 { 13253ab4af3SHans de Goede pinctrl-names = "default"; 13353ab4af3SHans de Goede pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_p66>; 13453ab4af3SHans de Goede vmmc-supply = <®_vcc3v3>; 13553ab4af3SHans de Goede bus-width = <4>; 13653ab4af3SHans de Goede cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ 13753ab4af3SHans de Goede cd-inverted; 13853ab4af3SHans de Goede status = "okay"; 13953ab4af3SHans de Goede}; 14053ab4af3SHans de Goede 14153ab4af3SHans de Goede&mmc2 { 14253ab4af3SHans de Goede pinctrl-names = "default"; 14353ab4af3SHans de Goede pinctrl-0 = <&mmc2_pins_a>; 14453ab4af3SHans de Goede vmmc-supply = <®_vcc3v3>; 14553ab4af3SHans de Goede bus-width = <8>; 14653ab4af3SHans de Goede non-removable; 14753ab4af3SHans de Goede status = "okay"; 14853ab4af3SHans de Goede 14953ab4af3SHans de Goede mmccard: mmccard@0 { 15053ab4af3SHans de Goede reg = <0>; 15153ab4af3SHans de Goede compatible = "mmc-card"; 15253ab4af3SHans de Goede broken-hpi; 15353ab4af3SHans de Goede }; 15453ab4af3SHans de Goede}; 15553ab4af3SHans de Goede 156*da52a4a3SHans de Goede&otg_sram { 157*da52a4a3SHans de Goede status = "okay"; 158*da52a4a3SHans de Goede}; 159*da52a4a3SHans de Goede 16053ab4af3SHans de Goede&pio { 16153ab4af3SHans de Goede mmc0_cd_pin_p66: mmc0_cd_pin@0 { 16253ab4af3SHans de Goede allwinner,pins = "PG0"; 16353ab4af3SHans de Goede allwinner,function = "gpio_in"; 16453ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 16553ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 16653ab4af3SHans de Goede }; 16753ab4af3SHans de Goede 168*da52a4a3SHans de Goede usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { 169*da52a4a3SHans de Goede allwinner,pins = "PG1"; 170*da52a4a3SHans de Goede allwinner,function = "gpio_in"; 171*da52a4a3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 172*da52a4a3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>; 173*da52a4a3SHans de Goede }; 174*da52a4a3SHans de Goede 175*da52a4a3SHans de Goede usb0_id_detect_pin: usb0_id_detect_pin@0 { 176*da52a4a3SHans de Goede allwinner,pins = "PG2"; 177*da52a4a3SHans de Goede allwinner,function = "gpio_in"; 178*da52a4a3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 179*da52a4a3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 180*da52a4a3SHans de Goede }; 181*da52a4a3SHans de Goede 18253ab4af3SHans de Goede i2c_lcd_pins: i2c_lcd_pin@0 { 18353ab4af3SHans de Goede allwinner,pins = "PG10", "PG12"; 18453ab4af3SHans de Goede allwinner,function = "gpio_out"; 18553ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 18653ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 18753ab4af3SHans de Goede }; 18853ab4af3SHans de Goede 1898b1ba941SHans de Goede ts_wake_pin_p66: ts_wake_pin@0 { 1908b1ba941SHans de Goede allwinner,pins = "PB3"; 1918b1ba941SHans de Goede allwinner,function = "gpio_out"; 1928b1ba941SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 1938b1ba941SHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 1948b1ba941SHans de Goede }; 1958b1ba941SHans de Goede 19653ab4af3SHans de Goede usb0_vbus_pin_a: usb0_vbus_pin@0 { 19753ab4af3SHans de Goede allwinner,pins = "PB4"; 19853ab4af3SHans de Goede allwinner,function = "gpio_out"; 19953ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 20053ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 20153ab4af3SHans de Goede }; 20253ab4af3SHans de Goede}; 20353ab4af3SHans de Goede 20453ab4af3SHans de Goede®_dcdc2 { 20553ab4af3SHans de Goede regulator-always-on; 20653ab4af3SHans de Goede regulator-min-microvolt = <1000000>; 20753ab4af3SHans de Goede regulator-max-microvolt = <1500000>; 20853ab4af3SHans de Goede regulator-name = "vdd-cpu"; 20953ab4af3SHans de Goede}; 21053ab4af3SHans de Goede 21153ab4af3SHans de Goede®_dcdc3 { 21253ab4af3SHans de Goede regulator-always-on; 21353ab4af3SHans de Goede regulator-min-microvolt = <1000000>; 21453ab4af3SHans de Goede regulator-max-microvolt = <1400000>; 21553ab4af3SHans de Goede regulator-name = "vdd-int-pll"; 21653ab4af3SHans de Goede}; 21753ab4af3SHans de Goede 21853ab4af3SHans de Goede®_ldo1 { 21953ab4af3SHans de Goede regulator-name = "vdd-rtc"; 22053ab4af3SHans de Goede}; 22153ab4af3SHans de Goede 22253ab4af3SHans de Goede®_ldo2 { 22353ab4af3SHans de Goede regulator-always-on; 22453ab4af3SHans de Goede regulator-min-microvolt = <3000000>; 22553ab4af3SHans de Goede regulator-max-microvolt = <3000000>; 22653ab4af3SHans de Goede regulator-name = "avcc"; 22753ab4af3SHans de Goede}; 22853ab4af3SHans de Goede 22953ab4af3SHans de Goede®_ldo3 { 23053ab4af3SHans de Goede regulator-min-microvolt = <3300000>; 23153ab4af3SHans de Goede regulator-max-microvolt = <3300000>; 23253ab4af3SHans de Goede regulator-name = "vcc-wifi"; 23353ab4af3SHans de Goede}; 23453ab4af3SHans de Goede 23553ab4af3SHans de Goede®_usb0_vbus { 23653ab4af3SHans de Goede gpio = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ 23753ab4af3SHans de Goede status = "okay"; 23853ab4af3SHans de Goede}; 23953ab4af3SHans de Goede 240*da52a4a3SHans de Goede&usb_otg { 241*da52a4a3SHans de Goede dr_mode = "otg"; 242*da52a4a3SHans de Goede status = "okay"; 243*da52a4a3SHans de Goede}; 244*da52a4a3SHans de Goede 24553ab4af3SHans de Goede&usbphy { 246*da52a4a3SHans de Goede pinctrl-names = "default"; 247*da52a4a3SHans de Goede pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; 248*da52a4a3SHans de Goede usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ 249*da52a4a3SHans de Goede usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ 25053ab4af3SHans de Goede usb0_vbus-supply = <®_usb0_vbus>; 25153ab4af3SHans de Goede usb1_vbus-supply = <®_ldo3>; 25253ab4af3SHans de Goede status = "okay"; 25353ab4af3SHans de Goede}; 254