1dd9d013cSHans de Goede/* 2dd9d013cSHans de Goede * Copyright 2015 Hans de Goede <hdegoede@redhat.com> 3dd9d013cSHans de Goede * 4dd9d013cSHans de Goede * This file is dual-licensed: you can use it either under the terms 5dd9d013cSHans de Goede * of the GPL or the X11 license, at your option. Note that this dual 6dd9d013cSHans de Goede * licensing only applies to this file, and not this project as a 7dd9d013cSHans de Goede * whole. 8dd9d013cSHans de Goede * 9dd9d013cSHans de Goede * a) This file is free software; you can redistribute it and/or 10dd9d013cSHans de Goede * modify it under the terms of the GNU General Public License as 11dd9d013cSHans de Goede * published by the Free Software Foundation; either version 2 of the 12dd9d013cSHans de Goede * License, or (at your option) any later version. 13dd9d013cSHans de Goede * 14dd9d013cSHans de Goede * This file is distributed in the hope that it will be useful, 15dd9d013cSHans de Goede * but WITHOUT ANY WARRANTY; without even the implied warranty of 16dd9d013cSHans de Goede * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17dd9d013cSHans de Goede * GNU General Public License for more details. 18dd9d013cSHans de Goede * 19dd9d013cSHans de Goede * Or, alternatively, 20dd9d013cSHans de Goede * 21dd9d013cSHans de Goede * b) Permission is hereby granted, free of charge, to any person 22dd9d013cSHans de Goede * obtaining a copy of this software and associated documentation 23dd9d013cSHans de Goede * files (the "Software"), to deal in the Software without 24dd9d013cSHans de Goede * restriction, including without limitation the rights to use, 25dd9d013cSHans de Goede * copy, modify, merge, publish, distribute, sublicense, and/or 26dd9d013cSHans de Goede * sell copies of the Software, and to permit persons to whom the 27dd9d013cSHans de Goede * Software is furnished to do so, subject to the following 28dd9d013cSHans de Goede * conditions: 29dd9d013cSHans de Goede * 30dd9d013cSHans de Goede * The above copyright notice and this permission notice shall be 31dd9d013cSHans de Goede * included in all copies or substantial portions of the Software. 32dd9d013cSHans de Goede * 33dd9d013cSHans de Goede * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34dd9d013cSHans de Goede * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35dd9d013cSHans de Goede * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36dd9d013cSHans de Goede * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37dd9d013cSHans de Goede * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38dd9d013cSHans de Goede * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39dd9d013cSHans de Goede * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40dd9d013cSHans de Goede * OTHER DEALINGS IN THE SOFTWARE. 41dd9d013cSHans de Goede */ 42dd9d013cSHans de Goede 43dd9d013cSHans de Goede/dts-v1/; 44dd9d013cSHans de Goede#include "sun4i-a10.dtsi" 45dd9d013cSHans de Goede#include "sunxi-common-regulators.dtsi" 46dd9d013cSHans de Goede#include <dt-bindings/gpio/gpio.h> 47dd9d013cSHans de Goede#include <dt-bindings/input/input.h> 48dd9d013cSHans de Goede#include <dt-bindings/interrupt-controller/irq.h> 49dd9d013cSHans de Goede#include <dt-bindings/pinctrl/sun4i-a10.h> 50*80e5f83cSHans de Goede#include <dt-bindings/pwm/pwm.h> 51dd9d013cSHans de Goede 52dd9d013cSHans de Goede/ { 53dd9d013cSHans de Goede model = "Point of View Protab2-IPS9"; 54dd9d013cSHans de Goede compatible = "pov,protab2-ips9", "allwinner,sun4i-a10"; 55dd9d013cSHans de Goede 56dd9d013cSHans de Goede aliases { 57dd9d013cSHans de Goede serial0 = &uart0; 58dd9d013cSHans de Goede }; 59dd9d013cSHans de Goede 60*80e5f83cSHans de Goede backlight: backlight { 61*80e5f83cSHans de Goede compatible = "pwm-backlight"; 62*80e5f83cSHans de Goede pinctrl-names = "default"; 63*80e5f83cSHans de Goede pinctrl-0 = <&bl_en_pin_protab>; 64*80e5f83cSHans de Goede pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; 65*80e5f83cSHans de Goede brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; 66*80e5f83cSHans de Goede default-brightness-level = <8>; 67*80e5f83cSHans de Goede enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ 68*80e5f83cSHans de Goede }; 69*80e5f83cSHans de Goede 70dd9d013cSHans de Goede chosen { 71dd9d013cSHans de Goede stdout-path = "serial0:115200n8"; 72dd9d013cSHans de Goede }; 73dd9d013cSHans de Goede}; 74dd9d013cSHans de Goede 75*80e5f83cSHans de Goede&codec { 76*80e5f83cSHans de Goede pinctrl-names = "default"; 77*80e5f83cSHans de Goede pinctrl-0 = <&codec_pa_pin>; 78*80e5f83cSHans de Goede allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ 79*80e5f83cSHans de Goede status = "okay"; 80*80e5f83cSHans de Goede}; 81*80e5f83cSHans de Goede 82dd9d013cSHans de Goede&cpu0 { 83dd9d013cSHans de Goede cpu-supply = <®_dcdc2>; 84dd9d013cSHans de Goede}; 85dd9d013cSHans de Goede 86dd9d013cSHans de Goede&ehci0 { 87dd9d013cSHans de Goede status = "okay"; 88dd9d013cSHans de Goede}; 89dd9d013cSHans de Goede 90dd9d013cSHans de Goede&i2c0 { 91dd9d013cSHans de Goede pinctrl-names = "default"; 92dd9d013cSHans de Goede pinctrl-0 = <&i2c0_pins_a>; 93dd9d013cSHans de Goede status = "okay"; 94dd9d013cSHans de Goede 95dd9d013cSHans de Goede axp209: pmic@34 { 96dd9d013cSHans de Goede reg = <0x34>; 97dd9d013cSHans de Goede interrupts = <0>; 98dd9d013cSHans de Goede }; 99dd9d013cSHans de Goede}; 100dd9d013cSHans de Goede 101dd9d013cSHans de Goede#include "axp209.dtsi" 102dd9d013cSHans de Goede 103dd9d013cSHans de Goede&i2c1 { 104dd9d013cSHans de Goede pinctrl-names = "default"; 105dd9d013cSHans de Goede pinctrl-0 = <&i2c1_pins_a>; 106dd9d013cSHans de Goede status = "okay"; 107*80e5f83cSHans de Goede 108*80e5f83cSHans de Goede /* Accelerometer */ 109*80e5f83cSHans de Goede bma250@18 { 110*80e5f83cSHans de Goede compatible = "bosch,bma250"; 111*80e5f83cSHans de Goede reg = <0x18>; 112*80e5f83cSHans de Goede interrupt-parent = <&pio>; 113*80e5f83cSHans de Goede interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */ 114*80e5f83cSHans de Goede }; 115dd9d013cSHans de Goede}; 116dd9d013cSHans de Goede 117dd9d013cSHans de Goede&i2c2 { 118dd9d013cSHans de Goede pinctrl-names = "default"; 119dd9d013cSHans de Goede pinctrl-0 = <&i2c2_pins_a>; 120dd9d013cSHans de Goede status = "okay"; 121*80e5f83cSHans de Goede 122*80e5f83cSHans de Goede pixcir_ts@5c { 123*80e5f83cSHans de Goede pinctrl-names = "default"; 124*80e5f83cSHans de Goede pinctrl-0 = <&touchscreen_pins>; 125*80e5f83cSHans de Goede compatible = "pixcir,pixcir_tangoc"; 126*80e5f83cSHans de Goede reg = <0x5c>; 127*80e5f83cSHans de Goede interrupt-parent = <&pio>; 128*80e5f83cSHans de Goede interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ 129*80e5f83cSHans de Goede attb-gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* PH21 */ 130*80e5f83cSHans de Goede enable-gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; 131*80e5f83cSHans de Goede wake-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>; 132*80e5f83cSHans de Goede touchscreen-size-x = <1024>; 133*80e5f83cSHans de Goede touchscreen-size-y = <768>; 134*80e5f83cSHans de Goede touchscreen-inverted-x; 135*80e5f83cSHans de Goede touchscreen-inverted-y; 136*80e5f83cSHans de Goede }; 137dd9d013cSHans de Goede}; 138dd9d013cSHans de Goede 139dd9d013cSHans de Goede&lradc { 140dd9d013cSHans de Goede vref-supply = <®_ldo2>; 141dd9d013cSHans de Goede status = "okay"; 142dd9d013cSHans de Goede 143dd9d013cSHans de Goede button@400 { 144dd9d013cSHans de Goede label = "Volume Up"; 145dd9d013cSHans de Goede linux,code = <KEY_VOLUMEUP>; 146dd9d013cSHans de Goede channel = <0>; 147dd9d013cSHans de Goede voltage = <400000>; 148dd9d013cSHans de Goede }; 149dd9d013cSHans de Goede 150dd9d013cSHans de Goede button@800 { 151dd9d013cSHans de Goede label = "Volume Down"; 152dd9d013cSHans de Goede linux,code = <KEY_VOLUMEDOWN>; 153dd9d013cSHans de Goede channel = <0>; 154dd9d013cSHans de Goede voltage = <800000>; 155dd9d013cSHans de Goede }; 156dd9d013cSHans de Goede}; 157dd9d013cSHans de Goede 158dd9d013cSHans de Goede&mmc0 { 159dd9d013cSHans de Goede pinctrl-names = "default"; 160dd9d013cSHans de Goede pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 161dd9d013cSHans de Goede vmmc-supply = <®_vcc3v3>; 162dd9d013cSHans de Goede bus-width = <4>; 163dd9d013cSHans de Goede cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 164dd9d013cSHans de Goede cd-inverted; 165dd9d013cSHans de Goede status = "okay"; 166dd9d013cSHans de Goede}; 167dd9d013cSHans de Goede 168dd9d013cSHans de Goede&otg_sram { 169dd9d013cSHans de Goede status = "okay"; 170dd9d013cSHans de Goede}; 171dd9d013cSHans de Goede 172dd9d013cSHans de Goede&pio { 173*80e5f83cSHans de Goede bl_en_pin_protab: bl_en_pin@0 { 174*80e5f83cSHans de Goede allwinner,pins = "PH7"; 175*80e5f83cSHans de Goede allwinner,function = "gpio_out"; 176*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 177*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 178*80e5f83cSHans de Goede }; 179*80e5f83cSHans de Goede 180*80e5f83cSHans de Goede codec_pa_pin: codec_pa_pin@0 { 181*80e5f83cSHans de Goede allwinner,pins = "PH15"; 182*80e5f83cSHans de Goede allwinner,function = "gpio_out"; 183*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 184*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 185*80e5f83cSHans de Goede }; 186*80e5f83cSHans de Goede 187*80e5f83cSHans de Goede touchscreen_pins: touchscreen_pins@0 { 188*80e5f83cSHans de Goede allwinner,pins = "PA5", "PB13"; 189*80e5f83cSHans de Goede allwinner,function = "gpio_out"; 190*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 191*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 192*80e5f83cSHans de Goede }; 193*80e5f83cSHans de Goede 194dd9d013cSHans de Goede usb0_id_detect_pin: usb0_id_detect_pin@0 { 195dd9d013cSHans de Goede allwinner,pins = "PH4"; 196dd9d013cSHans de Goede allwinner,function = "gpio_in"; 197dd9d013cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 198dd9d013cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 199dd9d013cSHans de Goede }; 200dd9d013cSHans de Goede 201dd9d013cSHans de Goede usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { 202dd9d013cSHans de Goede allwinner,pins = "PH5"; 203dd9d013cSHans de Goede allwinner,function = "gpio_in"; 204dd9d013cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 205dd9d013cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>; 206dd9d013cSHans de Goede }; 207dd9d013cSHans de Goede}; 208dd9d013cSHans de Goede 209*80e5f83cSHans de Goede&pwm { 210*80e5f83cSHans de Goede pinctrl-names = "default"; 211*80e5f83cSHans de Goede pinctrl-0 = <&pwm0_pins_a>; 212*80e5f83cSHans de Goede status = "okay"; 213*80e5f83cSHans de Goede}; 214*80e5f83cSHans de Goede 215dd9d013cSHans de Goede®_dcdc2 { 216dd9d013cSHans de Goede regulator-always-on; 217dd9d013cSHans de Goede regulator-min-microvolt = <1000000>; 218dd9d013cSHans de Goede regulator-max-microvolt = <1400000>; 219dd9d013cSHans de Goede regulator-name = "vdd-cpu"; 220dd9d013cSHans de Goede}; 221dd9d013cSHans de Goede 222dd9d013cSHans de Goede®_dcdc3 { 223dd9d013cSHans de Goede regulator-always-on; 224dd9d013cSHans de Goede regulator-min-microvolt = <1250000>; 225dd9d013cSHans de Goede regulator-max-microvolt = <1250000>; 226dd9d013cSHans de Goede regulator-name = "vdd-int-dll"; 227dd9d013cSHans de Goede}; 228dd9d013cSHans de Goede 229dd9d013cSHans de Goede®_ldo1 { 230dd9d013cSHans de Goede regulator-name = "vdd-rtc"; 231dd9d013cSHans de Goede}; 232dd9d013cSHans de Goede 233dd9d013cSHans de Goede®_ldo2 { 234dd9d013cSHans de Goede regulator-always-on; 235dd9d013cSHans de Goede regulator-min-microvolt = <3000000>; 236dd9d013cSHans de Goede regulator-max-microvolt = <3000000>; 237dd9d013cSHans de Goede regulator-name = "avcc"; 238dd9d013cSHans de Goede}; 239dd9d013cSHans de Goede 240dd9d013cSHans de Goede®_ldo3 { 241dd9d013cSHans de Goede /* 242dd9d013cSHans de Goede * We need to always power the camera sensor, otherwhise all access 243dd9d013cSHans de Goede * to i2c1 is blocked. 244dd9d013cSHans de Goede */ 245dd9d013cSHans de Goede regulator-always-on; 246dd9d013cSHans de Goede regulator-min-microvolt = <2800000>; 247dd9d013cSHans de Goede regulator-max-microvolt = <2800000>; 248dd9d013cSHans de Goede regulator-name = "vdd-csi"; 249dd9d013cSHans de Goede}; 250dd9d013cSHans de Goede 251dd9d013cSHans de Goede®_usb0_vbus { 252dd9d013cSHans de Goede status = "okay"; 253dd9d013cSHans de Goede}; 254dd9d013cSHans de Goede 255dd9d013cSHans de Goede®_usb1_vbus { 256dd9d013cSHans de Goede status = "okay"; 257dd9d013cSHans de Goede}; 258dd9d013cSHans de Goede 259dd9d013cSHans de Goede&uart0 { 260dd9d013cSHans de Goede pinctrl-names = "default"; 261dd9d013cSHans de Goede pinctrl-0 = <&uart0_pins_a>; 262dd9d013cSHans de Goede status = "okay"; 263dd9d013cSHans de Goede}; 264dd9d013cSHans de Goede 265dd9d013cSHans de Goede&usb_otg { 266dd9d013cSHans de Goede dr_mode = "otg"; 267dd9d013cSHans de Goede status = "okay"; 268dd9d013cSHans de Goede}; 269dd9d013cSHans de Goede 270dd9d013cSHans de Goede&usbphy { 271dd9d013cSHans de Goede pinctrl-names = "default"; 272dd9d013cSHans de Goede pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; 273dd9d013cSHans de Goede usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ 274dd9d013cSHans de Goede usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ 275dd9d013cSHans de Goede usb0_vbus-supply = <®_usb0_vbus>; 276dd9d013cSHans de Goede usb1_vbus-supply = <®_usb1_vbus>; 277dd9d013cSHans de Goede status = "okay"; 278dd9d013cSHans de Goede}; 279