1*53ab4af3SHans de Goede/* 2*53ab4af3SHans de Goede * Copyright 2015 Hans de Goede <hdegoede@redhat.com> 3*53ab4af3SHans de Goede * 4*53ab4af3SHans de Goede * This file is dual-licensed: you can use it either under the terms 5*53ab4af3SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual 6*53ab4af3SHans de Goede * licensing only applies to this file, and not this project as a 7*53ab4af3SHans de Goede * whole. 8*53ab4af3SHans de Goede * 9*53ab4af3SHans de Goede * a) This file is free software; you can redistribute it and/or 10*53ab4af3SHans de Goede * modify it under the terms of the GNU General Public License as 11*53ab4af3SHans de Goede * published by the Free Software Foundation; either version 2 of the 12*53ab4af3SHans de Goede * License, or (at your option) any later version. 13*53ab4af3SHans de Goede * 14*53ab4af3SHans de Goede * This file is distributed in the hope that it will be useful, 15*53ab4af3SHans de Goede * but WITHOUT ANY WARRANTY; without even the implied warranty of 16*53ab4af3SHans de Goede * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17*53ab4af3SHans de Goede * GNU General Public License for more details. 18*53ab4af3SHans de Goede * 19*53ab4af3SHans de Goede * You should have received a copy of the GNU General Public 20*53ab4af3SHans de Goede * License along with this file; if not, write to the Free 21*53ab4af3SHans de Goede * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 22*53ab4af3SHans de Goede * MA 02110-1301 USA 23*53ab4af3SHans de Goede * 24*53ab4af3SHans de Goede * Or, alternatively, 25*53ab4af3SHans de Goede * 26*53ab4af3SHans de Goede * b) Permission is hereby granted, free of charge, to any person 27*53ab4af3SHans de Goede * obtaining a copy of this software and associated documentation 28*53ab4af3SHans de Goede * files (the "Software"), to deal in the Software without 29*53ab4af3SHans de Goede * restriction, including without limitation the rights to use, 30*53ab4af3SHans de Goede * copy, modify, merge, publish, distribute, sublicense, and/or 31*53ab4af3SHans de Goede * sell copies of the Software, and to permit persons to whom the 32*53ab4af3SHans de Goede * Software is furnished to do so, subject to the following 33*53ab4af3SHans de Goede * conditions: 34*53ab4af3SHans de Goede * 35*53ab4af3SHans de Goede * The above copyright notice and this permission notice shall be 36*53ab4af3SHans de Goede * included in all copies or substantial portions of the Software. 37*53ab4af3SHans de Goede * 38*53ab4af3SHans de Goede * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 39*53ab4af3SHans de Goede * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 40*53ab4af3SHans de Goede * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 41*53ab4af3SHans de Goede * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 42*53ab4af3SHans de Goede * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 43*53ab4af3SHans de Goede * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 44*53ab4af3SHans de Goede * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 45*53ab4af3SHans de Goede * OTHER DEALINGS IN THE SOFTWARE. 46*53ab4af3SHans de Goede */ 47*53ab4af3SHans de Goede 48*53ab4af3SHans de Goede/dts-v1/; 49*53ab4af3SHans de Goede#include "sun5i-a13.dtsi" 50*53ab4af3SHans de Goede#include "sunxi-common-regulators.dtsi" 51*53ab4af3SHans de Goede#include <dt-bindings/gpio/gpio.h> 52*53ab4af3SHans de Goede#include <dt-bindings/input/input.h> 53*53ab4af3SHans de Goede#include <dt-bindings/pinctrl/sun4i-a10.h> 54*53ab4af3SHans de Goede 55*53ab4af3SHans de Goede/ { 56*53ab4af3SHans de Goede model = "Utoo P66"; 57*53ab4af3SHans de Goede compatible = "utoo,p66", "allwinner,sun5i-a13"; 58*53ab4af3SHans de Goede 59*53ab4af3SHans de Goede aliases { 60*53ab4af3SHans de Goede serial0 = &uart1; 61*53ab4af3SHans de Goede }; 62*53ab4af3SHans de Goede 63*53ab4af3SHans de Goede chosen { 64*53ab4af3SHans de Goede stdout-path = "serial0:115200n8"; 65*53ab4af3SHans de Goede }; 66*53ab4af3SHans de Goede 67*53ab4af3SHans de Goede i2c_lcd: i2c@0 { 68*53ab4af3SHans de Goede /* The lcd panel i2c interface is hooked up via gpios */ 69*53ab4af3SHans de Goede compatible = "i2c-gpio"; 70*53ab4af3SHans de Goede pinctrl-names = "default"; 71*53ab4af3SHans de Goede pinctrl-0 = <&i2c_lcd_pins>; 72*53ab4af3SHans de Goede gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>, /* PG12, sda */ 73*53ab4af3SHans de Goede <&pio 6 10 GPIO_ACTIVE_HIGH>; /* PG10, scl */ 74*53ab4af3SHans de Goede i2c-gpio,delay-us = <5>; 75*53ab4af3SHans de Goede }; 76*53ab4af3SHans de Goede}; 77*53ab4af3SHans de Goede 78*53ab4af3SHans de Goede&cpu0 { 79*53ab4af3SHans de Goede cpu-supply = <®_dcdc2>; 80*53ab4af3SHans de Goede}; 81*53ab4af3SHans de Goede 82*53ab4af3SHans de Goede&ehci0 { 83*53ab4af3SHans de Goede status = "okay"; 84*53ab4af3SHans de Goede}; 85*53ab4af3SHans de Goede 86*53ab4af3SHans de Goede&i2c0 { 87*53ab4af3SHans de Goede pinctrl-names = "default"; 88*53ab4af3SHans de Goede pinctrl-0 = <&i2c0_pins_a>; 89*53ab4af3SHans de Goede status = "okay"; 90*53ab4af3SHans de Goede 91*53ab4af3SHans de Goede axp209: pmic@34 { 92*53ab4af3SHans de Goede reg = <0x34>; 93*53ab4af3SHans de Goede interrupts = <0>; 94*53ab4af3SHans de Goede }; 95*53ab4af3SHans de Goede}; 96*53ab4af3SHans de Goede 97*53ab4af3SHans de Goede#include "axp209.dtsi" 98*53ab4af3SHans de Goede 99*53ab4af3SHans de Goede&i2c1 { 100*53ab4af3SHans de Goede pinctrl-names = "default"; 101*53ab4af3SHans de Goede pinctrl-0 = <&i2c1_pins_a>; 102*53ab4af3SHans de Goede status = "okay"; 103*53ab4af3SHans de Goede 104*53ab4af3SHans de Goede pcf8563: rtc@51 { 105*53ab4af3SHans de Goede compatible = "nxp,pcf8563"; 106*53ab4af3SHans de Goede reg = <0x51>; 107*53ab4af3SHans de Goede }; 108*53ab4af3SHans de Goede}; 109*53ab4af3SHans de Goede 110*53ab4af3SHans de Goede&lradc { 111*53ab4af3SHans de Goede vref-supply = <®_ldo2>; 112*53ab4af3SHans de Goede status = "okay"; 113*53ab4af3SHans de Goede 114*53ab4af3SHans de Goede button@200 { 115*53ab4af3SHans de Goede label = "Volume Up"; 116*53ab4af3SHans de Goede linux,code = <KEY_VOLUMEUP>; 117*53ab4af3SHans de Goede channel = <0>; 118*53ab4af3SHans de Goede voltage = <200000>; 119*53ab4af3SHans de Goede }; 120*53ab4af3SHans de Goede 121*53ab4af3SHans de Goede button@400 { 122*53ab4af3SHans de Goede label = "Volume Down"; 123*53ab4af3SHans de Goede linux,code = <KEY_VOLUMEDOWN>; 124*53ab4af3SHans de Goede channel = <0>; 125*53ab4af3SHans de Goede voltage = <400000>; 126*53ab4af3SHans de Goede }; 127*53ab4af3SHans de Goede}; 128*53ab4af3SHans de Goede 129*53ab4af3SHans de Goede&mmc0 { 130*53ab4af3SHans de Goede pinctrl-names = "default"; 131*53ab4af3SHans de Goede pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_p66>; 132*53ab4af3SHans de Goede vmmc-supply = <®_vcc3v3>; 133*53ab4af3SHans de Goede bus-width = <4>; 134*53ab4af3SHans de Goede cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ 135*53ab4af3SHans de Goede cd-inverted; 136*53ab4af3SHans de Goede status = "okay"; 137*53ab4af3SHans de Goede}; 138*53ab4af3SHans de Goede 139*53ab4af3SHans de Goede&mmc2 { 140*53ab4af3SHans de Goede pinctrl-names = "default"; 141*53ab4af3SHans de Goede pinctrl-0 = <&mmc2_pins_a>; 142*53ab4af3SHans de Goede vmmc-supply = <®_vcc3v3>; 143*53ab4af3SHans de Goede bus-width = <8>; 144*53ab4af3SHans de Goede non-removable; 145*53ab4af3SHans de Goede status = "okay"; 146*53ab4af3SHans de Goede 147*53ab4af3SHans de Goede mmccard: mmccard@0 { 148*53ab4af3SHans de Goede reg = <0>; 149*53ab4af3SHans de Goede compatible = "mmc-card"; 150*53ab4af3SHans de Goede broken-hpi; 151*53ab4af3SHans de Goede }; 152*53ab4af3SHans de Goede}; 153*53ab4af3SHans de Goede 154*53ab4af3SHans de Goede&pio { 155*53ab4af3SHans de Goede mmc0_cd_pin_p66: mmc0_cd_pin@0 { 156*53ab4af3SHans de Goede allwinner,pins = "PG0"; 157*53ab4af3SHans de Goede allwinner,function = "gpio_in"; 158*53ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 159*53ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 160*53ab4af3SHans de Goede }; 161*53ab4af3SHans de Goede 162*53ab4af3SHans de Goede i2c_lcd_pins: i2c_lcd_pin@0 { 163*53ab4af3SHans de Goede allwinner,pins = "PG10", "PG12"; 164*53ab4af3SHans de Goede allwinner,function = "gpio_out"; 165*53ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 166*53ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 167*53ab4af3SHans de Goede }; 168*53ab4af3SHans de Goede 169*53ab4af3SHans de Goede usb0_vbus_pin_a: usb0_vbus_pin@0 { 170*53ab4af3SHans de Goede allwinner,pins = "PB4"; 171*53ab4af3SHans de Goede allwinner,function = "gpio_out"; 172*53ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 173*53ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 174*53ab4af3SHans de Goede }; 175*53ab4af3SHans de Goede}; 176*53ab4af3SHans de Goede 177*53ab4af3SHans de Goede®_dcdc2 { 178*53ab4af3SHans de Goede regulator-always-on; 179*53ab4af3SHans de Goede regulator-min-microvolt = <1000000>; 180*53ab4af3SHans de Goede regulator-max-microvolt = <1500000>; 181*53ab4af3SHans de Goede regulator-name = "vdd-cpu"; 182*53ab4af3SHans de Goede}; 183*53ab4af3SHans de Goede 184*53ab4af3SHans de Goede®_dcdc3 { 185*53ab4af3SHans de Goede regulator-always-on; 186*53ab4af3SHans de Goede regulator-min-microvolt = <1000000>; 187*53ab4af3SHans de Goede regulator-max-microvolt = <1400000>; 188*53ab4af3SHans de Goede regulator-name = "vdd-int-pll"; 189*53ab4af3SHans de Goede}; 190*53ab4af3SHans de Goede 191*53ab4af3SHans de Goede®_ldo1 { 192*53ab4af3SHans de Goede regulator-name = "vdd-rtc"; 193*53ab4af3SHans de Goede}; 194*53ab4af3SHans de Goede 195*53ab4af3SHans de Goede®_ldo2 { 196*53ab4af3SHans de Goede regulator-always-on; 197*53ab4af3SHans de Goede regulator-min-microvolt = <3000000>; 198*53ab4af3SHans de Goede regulator-max-microvolt = <3000000>; 199*53ab4af3SHans de Goede regulator-name = "avcc"; 200*53ab4af3SHans de Goede}; 201*53ab4af3SHans de Goede 202*53ab4af3SHans de Goede®_ldo3 { 203*53ab4af3SHans de Goede regulator-min-microvolt = <3300000>; 204*53ab4af3SHans de Goede regulator-max-microvolt = <3300000>; 205*53ab4af3SHans de Goede regulator-name = "vcc-wifi"; 206*53ab4af3SHans de Goede}; 207*53ab4af3SHans de Goede 208*53ab4af3SHans de Goede®_usb0_vbus { 209*53ab4af3SHans de Goede gpio = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ 210*53ab4af3SHans de Goede status = "okay"; 211*53ab4af3SHans de Goede}; 212*53ab4af3SHans de Goede 213*53ab4af3SHans de Goede&uart1 { 214*53ab4af3SHans de Goede pinctrl-names = "default"; 215*53ab4af3SHans de Goede pinctrl-0 = <&uart1_pins_b>; 216*53ab4af3SHans de Goede status = "okay"; 217*53ab4af3SHans de Goede}; 218*53ab4af3SHans de Goede 219*53ab4af3SHans de Goede&usbphy { 220*53ab4af3SHans de Goede usb0_vbus-supply = <®_usb0_vbus>; 221*53ab4af3SHans de Goede usb1_vbus-supply = <®_ldo3>; 222*53ab4af3SHans de Goede status = "okay"; 223*53ab4af3SHans de Goede}; 224