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