153ab4af3SHans de Goede/* 253ab4af3SHans de Goede * Copyright 2014 Chen-Yu Tsai <wens@csie.org> 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 4753ab4af3SHans de Goede#include <dt-bindings/gpio/gpio.h> 48da52a4a3SHans de Goede#include <dt-bindings/input/input.h> 4953ab4af3SHans de Goede 5053ab4af3SHans de Goede/ { 5153ab4af3SHans de Goede model = "HSG H702"; 5253ab4af3SHans de Goede compatible = "hsg,h702", "allwinner,sun5i-a13"; 5353ab4af3SHans de Goede 5453ab4af3SHans de Goede aliases { 5553ab4af3SHans de Goede serial0 = &uart1; 5653ab4af3SHans de Goede }; 5753ab4af3SHans de Goede 5853ab4af3SHans de Goede chosen { 5953ab4af3SHans de Goede stdout-path = "serial0:115200n8"; 6053ab4af3SHans de Goede }; 6153ab4af3SHans de Goede}; 6253ab4af3SHans de Goede 6353ab4af3SHans de Goede&cpu0 { 6453ab4af3SHans de Goede cpu-supply = <®_dcdc2>; 6553ab4af3SHans de Goede}; 6653ab4af3SHans de Goede 6753ab4af3SHans de Goede&ehci0 { 6853ab4af3SHans de Goede status = "okay"; 6953ab4af3SHans de Goede}; 7053ab4af3SHans de Goede 7153ab4af3SHans de Goede&i2c0 { 7253ab4af3SHans de Goede pinctrl-names = "default"; 7353ab4af3SHans de Goede pinctrl-0 = <&i2c0_pins_a>; 7453ab4af3SHans de Goede status = "okay"; 7553ab4af3SHans de Goede 7653ab4af3SHans de Goede axp209: pmic@34 { 7753ab4af3SHans de Goede reg = <0x34>; 7853ab4af3SHans de Goede interrupts = <0>; 7953ab4af3SHans de Goede }; 8053ab4af3SHans de Goede}; 8153ab4af3SHans de Goede 8253ab4af3SHans de Goede&i2c1 { 8353ab4af3SHans de Goede pinctrl-names = "default"; 8453ab4af3SHans de Goede pinctrl-0 = <&i2c1_pins_a>; 8553ab4af3SHans de Goede status = "okay"; 8653ab4af3SHans de Goede 8753ab4af3SHans de Goede pcf8563: rtc@51 { 8853ab4af3SHans de Goede compatible = "nxp,pcf8563"; 8953ab4af3SHans de Goede reg = <0x51>; 9053ab4af3SHans de Goede }; 9153ab4af3SHans de Goede}; 9253ab4af3SHans de Goede 9353ab4af3SHans de Goede&i2c2 { 9453ab4af3SHans de Goede pinctrl-names = "default"; 9553ab4af3SHans de Goede pinctrl-0 = <&i2c2_pins_a>; 9653ab4af3SHans de Goede status = "okay"; 9753ab4af3SHans de Goede}; 9853ab4af3SHans de Goede 99da52a4a3SHans de Goede&lradc { 100da52a4a3SHans de Goede vref-supply = <®_ldo2>; 101da52a4a3SHans de Goede status = "okay"; 102da52a4a3SHans de Goede 103da52a4a3SHans de Goede button@200 { 104da52a4a3SHans de Goede label = "Volume Up"; 105da52a4a3SHans de Goede linux,code = <KEY_VOLUMEUP>; 106da52a4a3SHans de Goede channel = <0>; 107da52a4a3SHans de Goede voltage = <200000>; 108da52a4a3SHans de Goede }; 109da52a4a3SHans de Goede 110da52a4a3SHans de Goede button@400 { 111da52a4a3SHans de Goede label = "Volume Down"; 112da52a4a3SHans de Goede linux,code = <KEY_VOLUMEDOWN>; 113da52a4a3SHans de Goede channel = <0>; 114da52a4a3SHans de Goede voltage = <400000>; 115da52a4a3SHans de Goede }; 116da52a4a3SHans de Goede}; 117da52a4a3SHans de Goede 11853ab4af3SHans de Goede&mmc0 { 11953ab4af3SHans de Goede pinctrl-names = "default"; 12053ab4af3SHans de Goede pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_h702>; 12153ab4af3SHans de Goede vmmc-supply = <®_vcc3v3>; 12253ab4af3SHans de Goede bus-width = <4>; 123*13b36facSJagan Teki cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */ 12453ab4af3SHans de Goede status = "okay"; 12553ab4af3SHans de Goede}; 12653ab4af3SHans de Goede 12753ab4af3SHans de Goede&ohci0 { 12853ab4af3SHans de Goede status = "okay"; 12953ab4af3SHans de Goede}; 13053ab4af3SHans de Goede 131da52a4a3SHans de Goede&otg_sram { 132da52a4a3SHans de Goede status = "okay"; 133da52a4a3SHans de Goede}; 134da52a4a3SHans de Goede 13553ab4af3SHans de Goede&pio { 13653ab4af3SHans de Goede mmc0_cd_pin_h702: mmc0_cd_pin@0 { 137*13b36facSJagan Teki pins = "PG0"; 138*13b36facSJagan Teki function = "gpio_in"; 139*13b36facSJagan Teki bias-pull-up; 14053ab4af3SHans de Goede }; 141da52a4a3SHans de Goede 142da52a4a3SHans de Goede usb0_id_detect_pin: usb0_id_detect_pin@0 { 143*13b36facSJagan Teki pins = "PG2"; 144*13b36facSJagan Teki function = "gpio_in"; 145*13b36facSJagan Teki bias-pull-up; 146da52a4a3SHans de Goede }; 147da52a4a3SHans de Goede 148da52a4a3SHans de Goede usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { 149*13b36facSJagan Teki pins = "PG1"; 150*13b36facSJagan Teki function = "gpio_in"; 151da52a4a3SHans de Goede }; 15253ab4af3SHans de Goede}; 15353ab4af3SHans de Goede 15453ab4af3SHans de Goede#include "axp209.dtsi" 15553ab4af3SHans de Goede 15653ab4af3SHans de Goede®_dcdc2 { 15753ab4af3SHans de Goede regulator-always-on; 15853ab4af3SHans de Goede regulator-min-microvolt = <1000000>; 15953ab4af3SHans de Goede regulator-max-microvolt = <1500000>; 16053ab4af3SHans de Goede regulator-name = "vdd-cpu"; 16153ab4af3SHans de Goede}; 16253ab4af3SHans de Goede 16353ab4af3SHans de Goede®_dcdc3 { 16453ab4af3SHans de Goede regulator-always-on; 16553ab4af3SHans de Goede regulator-min-microvolt = <1000000>; 16653ab4af3SHans de Goede regulator-max-microvolt = <1400000>; 16753ab4af3SHans de Goede regulator-name = "vdd-int-dll"; 16853ab4af3SHans de Goede}; 16953ab4af3SHans de Goede 17053ab4af3SHans de Goede®_ldo1 { 17153ab4af3SHans de Goede regulator-name = "vdd-rtc"; 17253ab4af3SHans de Goede}; 17353ab4af3SHans de Goede 17453ab4af3SHans de Goede®_ldo2 { 17553ab4af3SHans de Goede regulator-always-on; 17653ab4af3SHans de Goede regulator-min-microvolt = <3000000>; 17753ab4af3SHans de Goede regulator-max-microvolt = <3000000>; 17853ab4af3SHans de Goede regulator-name = "avcc"; 17953ab4af3SHans de Goede}; 18053ab4af3SHans de Goede 18153ab4af3SHans de Goede®_ldo3 { 18253ab4af3SHans de Goede regulator-min-microvolt = <3300000>; 18353ab4af3SHans de Goede regulator-max-microvolt = <3300000>; 18453ab4af3SHans de Goede regulator-name = "vcc-wifi"; 18553ab4af3SHans de Goede}; 18653ab4af3SHans de Goede 187da52a4a3SHans de Goede®_usb0_vbus { 188da52a4a3SHans de Goede gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ 189da52a4a3SHans de Goede status = "okay"; 190da52a4a3SHans de Goede}; 191da52a4a3SHans de Goede 19253ab4af3SHans de Goede&uart1 { 19353ab4af3SHans de Goede pinctrl-names = "default"; 19453ab4af3SHans de Goede pinctrl-0 = <&uart1_pins_b>; 19553ab4af3SHans de Goede status = "okay"; 19653ab4af3SHans de Goede}; 19753ab4af3SHans de Goede 198da52a4a3SHans de Goede&usb_otg { 199da52a4a3SHans de Goede dr_mode = "otg"; 200da52a4a3SHans de Goede status = "okay"; 201da52a4a3SHans de Goede}; 202da52a4a3SHans de Goede 20353ab4af3SHans de Goede&usbphy { 204da52a4a3SHans de Goede pinctrl-names = "default"; 205da52a4a3SHans de Goede pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; 206da52a4a3SHans de Goede usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ 207da52a4a3SHans de Goede usb0_vbus_det-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ 208da52a4a3SHans de Goede usb0_vbus-supply = <®_usb0_vbus>; 20953ab4af3SHans de Goede usb1_vbus-supply = <®_ldo3>; 21053ab4af3SHans de Goede status = "okay"; 21153ab4af3SHans de Goede}; 212