1*a1243f78SHans de Goede/* 2*a1243f78SHans de Goede * Copyright 2016 Hans de Goede <hdegoede@redhat.com> 3*a1243f78SHans de Goede * 4*a1243f78SHans de Goede * This file is dual-licensed: you can use it either under the terms 5*a1243f78SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual 6*a1243f78SHans de Goede * licensing only applies to this file, and not this project as a 7*a1243f78SHans de Goede * whole. 8*a1243f78SHans de Goede * 9*a1243f78SHans de Goede * a) This file is free software; you can redistribute it and/or 10*a1243f78SHans de Goede * modify it under the terms of the GNU General Public License as 11*a1243f78SHans de Goede * published by the Free Software Foundation; either version 2 of the 12*a1243f78SHans de Goede * License, or (at your option) any later version. 13*a1243f78SHans de Goede * 14*a1243f78SHans de Goede * This file is distributed in the hope that it will be useful, 15*a1243f78SHans de Goede * but WITHOUT ANY WARRANTY; without even the implied warranty of 16*a1243f78SHans de Goede * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17*a1243f78SHans de Goede * GNU General Public License for more details. 18*a1243f78SHans de Goede * 19*a1243f78SHans de Goede * Or, alternatively, 20*a1243f78SHans de Goede * 21*a1243f78SHans de Goede * b) Permission is hereby granted, free of charge, to any person 22*a1243f78SHans de Goede * obtaining a copy of this software and associated documentation 23*a1243f78SHans de Goede * files (the "Software"), to deal in the Software without 24*a1243f78SHans de Goede * restriction, including without limitation the rights to use, 25*a1243f78SHans de Goede * copy, modify, merge, publish, distribute, sublicense, and/or 26*a1243f78SHans de Goede * sell copies of the Software, and to permit persons to whom the 27*a1243f78SHans de Goede * Software is furnished to do so, subject to the following 28*a1243f78SHans de Goede * conditions: 29*a1243f78SHans de Goede * 30*a1243f78SHans de Goede * The above copyright notice and this permission notice shall be 31*a1243f78SHans de Goede * included in all copies or substantial portions of the Software. 32*a1243f78SHans de Goede * 33*a1243f78SHans de Goede * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34*a1243f78SHans de Goede * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35*a1243f78SHans de Goede * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36*a1243f78SHans de Goede * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37*a1243f78SHans de Goede * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38*a1243f78SHans de Goede * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39*a1243f78SHans de Goede * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40*a1243f78SHans de Goede * OTHER DEALINGS IN THE SOFTWARE. 41*a1243f78SHans de Goede */ 42*a1243f78SHans de Goede 43*a1243f78SHans de Goede#include "sunxi-common-regulators.dtsi" 44*a1243f78SHans de Goede 45*a1243f78SHans de Goede#include <dt-bindings/gpio/gpio.h> 46*a1243f78SHans de Goede#include <dt-bindings/input/input.h> 47*a1243f78SHans de Goede#include <dt-bindings/pinctrl/sun4i-a10.h> 48*a1243f78SHans de Goede 49*a1243f78SHans de Goede/ { 50*a1243f78SHans de Goede aliases { 51*a1243f78SHans de Goede serial0 = &uart0; 52*a1243f78SHans de Goede }; 53*a1243f78SHans de Goede 54*a1243f78SHans de Goede chosen { 55*a1243f78SHans de Goede stdout-path = "serial0:115200n8"; 56*a1243f78SHans de Goede }; 57*a1243f78SHans de Goede}; 58*a1243f78SHans de Goede 59*a1243f78SHans de Goede&cpu0 { 60*a1243f78SHans de Goede cpu-supply = <®_dcdc3>; 61*a1243f78SHans de Goede}; 62*a1243f78SHans de Goede 63*a1243f78SHans de Goede&ehci0 { 64*a1243f78SHans de Goede /* Wifi is connected here */ 65*a1243f78SHans de Goede status = "okay"; 66*a1243f78SHans de Goede}; 67*a1243f78SHans de Goede 68*a1243f78SHans de Goede&mmc0 { 69*a1243f78SHans de Goede pinctrl-names = "default"; 70*a1243f78SHans de Goede pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_e708_q1>; 71*a1243f78SHans de Goede vmmc-supply = <®_dcdc1>; 72*a1243f78SHans de Goede bus-width = <4>; 73*a1243f78SHans de Goede cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ 74*a1243f78SHans de Goede cd-inverted; 75*a1243f78SHans de Goede status = "okay"; 76*a1243f78SHans de Goede}; 77*a1243f78SHans de Goede 78*a1243f78SHans de Goede&pio { 79*a1243f78SHans de Goede mmc0_cd_pin_e708_q1: mmc0_cd_pin@0 { 80*a1243f78SHans de Goede allwinner,pins = "PA8"; 81*a1243f78SHans de Goede allwinner,function = "gpio_in"; 82*a1243f78SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 83*a1243f78SHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 84*a1243f78SHans de Goede }; 85*a1243f78SHans de Goede 86*a1243f78SHans de Goede usb0_id_detect_pin: usb0_id_detect_pin@0 { 87*a1243f78SHans de Goede allwinner,pins = "PA15"; 88*a1243f78SHans de Goede allwinner,function = "gpio_in"; 89*a1243f78SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 90*a1243f78SHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 91*a1243f78SHans de Goede }; 92*a1243f78SHans de Goede}; 93*a1243f78SHans de Goede 94*a1243f78SHans de Goede&p2wi { 95*a1243f78SHans de Goede status = "okay"; 96*a1243f78SHans de Goede 97*a1243f78SHans de Goede axp22x: pmic@68 { 98*a1243f78SHans de Goede compatible = "x-powers,axp221"; 99*a1243f78SHans de Goede reg = <0x68>; 100*a1243f78SHans de Goede interrupt-parent = <&nmi_intc>; 101*a1243f78SHans de Goede interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 102*a1243f78SHans de Goede drivevbus-supply = <®_vcc5v0>; 103*a1243f78SHans de Goede x-powers,drive-vbus-en; 104*a1243f78SHans de Goede }; 105*a1243f78SHans de Goede}; 106*a1243f78SHans de Goede 107*a1243f78SHans de Goede#include "axp22x.dtsi" 108*a1243f78SHans de Goede 109*a1243f78SHans de Goede®_aldo3 { 110*a1243f78SHans de Goede regulator-always-on; 111*a1243f78SHans de Goede regulator-min-microvolt = <2700000>; 112*a1243f78SHans de Goede regulator-max-microvolt = <3300000>; 113*a1243f78SHans de Goede regulator-name = "avcc"; 114*a1243f78SHans de Goede}; 115*a1243f78SHans de Goede 116*a1243f78SHans de Goede®_dc1sw { 117*a1243f78SHans de Goede regulator-name = "vcc-lcd"; 118*a1243f78SHans de Goede}; 119*a1243f78SHans de Goede 120*a1243f78SHans de Goede®_dc5ldo { 121*a1243f78SHans de Goede regulator-always-on; 122*a1243f78SHans de Goede regulator-min-microvolt = <700000>; 123*a1243f78SHans de Goede regulator-max-microvolt = <1320000>; 124*a1243f78SHans de Goede regulator-name = "vdd-cpus"; /* This is an educated guess */ 125*a1243f78SHans de Goede}; 126*a1243f78SHans de Goede 127*a1243f78SHans de Goede®_dcdc1 { 128*a1243f78SHans de Goede regulator-always-on; 129*a1243f78SHans de Goede regulator-min-microvolt = <3000000>; 130*a1243f78SHans de Goede regulator-max-microvolt = <3000000>; 131*a1243f78SHans de Goede regulator-name = "vcc-3v0"; 132*a1243f78SHans de Goede}; 133*a1243f78SHans de Goede 134*a1243f78SHans de Goede®_dcdc2 { 135*a1243f78SHans de Goede regulator-min-microvolt = <700000>; 136*a1243f78SHans de Goede regulator-max-microvolt = <1320000>; 137*a1243f78SHans de Goede regulator-name = "vdd-gpu"; 138*a1243f78SHans de Goede}; 139*a1243f78SHans de Goede 140*a1243f78SHans de Goede®_dcdc3 { 141*a1243f78SHans de Goede regulator-always-on; 142*a1243f78SHans de Goede regulator-min-microvolt = <700000>; 143*a1243f78SHans de Goede regulator-max-microvolt = <1320000>; 144*a1243f78SHans de Goede regulator-name = "vdd-cpu"; 145*a1243f78SHans de Goede}; 146*a1243f78SHans de Goede 147*a1243f78SHans de Goede®_dcdc4 { 148*a1243f78SHans de Goede regulator-always-on; 149*a1243f78SHans de Goede regulator-min-microvolt = <700000>; 150*a1243f78SHans de Goede regulator-max-microvolt = <1320000>; 151*a1243f78SHans de Goede regulator-name = "vdd-sys-dll"; 152*a1243f78SHans de Goede}; 153*a1243f78SHans de Goede 154*a1243f78SHans de Goede®_dcdc5 { 155*a1243f78SHans de Goede regulator-always-on; 156*a1243f78SHans de Goede regulator-min-microvolt = <1500000>; 157*a1243f78SHans de Goede regulator-max-microvolt = <1500000>; 158*a1243f78SHans de Goede regulator-name = "vcc-dram"; 159*a1243f78SHans de Goede}; 160*a1243f78SHans de Goede 161*a1243f78SHans de Goede®_dldo1 { 162*a1243f78SHans de Goede regulator-min-microvolt = <3300000>; 163*a1243f78SHans de Goede regulator-max-microvolt = <3300000>; 164*a1243f78SHans de Goede regulator-name = "vcc-wifi"; 165*a1243f78SHans de Goede}; 166*a1243f78SHans de Goede 167*a1243f78SHans de Goede®_drivevbus { 168*a1243f78SHans de Goede regulator-name = "usb0-vbus"; 169*a1243f78SHans de Goede status = "okay"; 170*a1243f78SHans de Goede}; 171*a1243f78SHans de Goede 172*a1243f78SHans de Goede&simplefb_lcd { 173*a1243f78SHans de Goede vcc-lcd-supply = <®_dc1sw>; 174*a1243f78SHans de Goede}; 175*a1243f78SHans de Goede 176*a1243f78SHans de Goede&usb_otg { 177*a1243f78SHans de Goede dr_mode = "otg"; 178*a1243f78SHans de Goede status = "okay"; 179*a1243f78SHans de Goede}; 180*a1243f78SHans de Goede 181*a1243f78SHans de Goede&usb_power_supply { 182*a1243f78SHans de Goede status = "okay"; 183*a1243f78SHans de Goede}; 184*a1243f78SHans de Goede 185*a1243f78SHans de Goede&usbphy { 186*a1243f78SHans de Goede pinctrl-names = "default"; 187*a1243f78SHans de Goede pinctrl-0 = <&usb0_id_detect_pin>; 188*a1243f78SHans de Goede usb0_id_det-gpio = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */ 189*a1243f78SHans de Goede usb0_vbus_power-supply = <&usb_power_supply>; 190*a1243f78SHans de Goede usb0_vbus-supply = <®_drivevbus>; 191*a1243f78SHans de Goede usb1_vbus-supply = <®_dldo1>; 192*a1243f78SHans de Goede status = "okay"; 193*a1243f78SHans de Goede}; 194