153ab4af3SHans de Goede/* 253ab4af3SHans de Goede * Copyright 2015 Aleksei Mamlin 353ab4af3SHans de Goede * Aleksei Mamlin <mamlinav@gmail.com> 453ab4af3SHans de Goede * 553ab4af3SHans de Goede * This file is dual-licensed: you can use it either under the terms 653ab4af3SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual 753ab4af3SHans de Goede * licensing only applies to this file, and not this project as a 853ab4af3SHans de Goede * whole. 953ab4af3SHans de Goede * 1053ab4af3SHans de Goede * a) This file is free software; you can redistribute it and/or 1153ab4af3SHans de Goede * modify it under the terms of the GNU General Public License as 1253ab4af3SHans de Goede * published by the Free Software Foundation; either version 2 of the 1353ab4af3SHans de Goede * License, or (at your option) any later version. 1453ab4af3SHans de Goede * 1553ab4af3SHans de Goede * This file is distributed in the hope that it will be useful, 1653ab4af3SHans de Goede * but WITHOUT ANY WARRANTY; without even the implied warranty of 1753ab4af3SHans de Goede * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1853ab4af3SHans de Goede * GNU General Public License for more details. 1953ab4af3SHans de Goede * 2053ab4af3SHans de Goede * Or, alternatively, 2153ab4af3SHans de Goede * 2253ab4af3SHans de Goede * b) Permission is hereby granted, free of charge, to any person 2353ab4af3SHans de Goede * obtaining a copy of this software and associated documentation 2453ab4af3SHans de Goede * files (the "Software"), to deal in the Software without 2553ab4af3SHans de Goede * restriction, including without limitation the rights to use, 2653ab4af3SHans de Goede * copy, modify, merge, publish, distribute, sublicense, and/or 2753ab4af3SHans de Goede * sell copies of the Software, and to permit persons to whom the 2853ab4af3SHans de Goede * Software is furnished to do so, subject to the following 2953ab4af3SHans de Goede * conditions: 3053ab4af3SHans de Goede * 3153ab4af3SHans de Goede * The above copyright notice and this permission notice shall be 3253ab4af3SHans de Goede * included in all copies or substantial portions of the Software. 3353ab4af3SHans de Goede * 3453ab4af3SHans de Goede * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 3553ab4af3SHans de Goede * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 3653ab4af3SHans de Goede * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 3753ab4af3SHans de Goede * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 3853ab4af3SHans de Goede * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 3953ab4af3SHans de Goede * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 4053ab4af3SHans de Goede * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 4153ab4af3SHans de Goede * OTHER DEALINGS IN THE SOFTWARE. 4253ab4af3SHans de Goede */ 4353ab4af3SHans de Goede 4453ab4af3SHans de Goede/dts-v1/; 4553ab4af3SHans de Goede#include "sun7i-a20.dtsi" 4653ab4af3SHans de Goede#include "sunxi-common-regulators.dtsi" 4753ab4af3SHans de Goede 4853ab4af3SHans de Goede#include <dt-bindings/gpio/gpio.h> 4953ab4af3SHans de Goede#include <dt-bindings/input/input.h> 5053ab4af3SHans de Goede#include <dt-bindings/interrupt-controller/irq.h> 51*80e5f83cSHans de Goede#include <dt-bindings/pwm/pwm.h> 5253ab4af3SHans de Goede 5353ab4af3SHans de Goede/ { 5453ab4af3SHans de Goede model = "Wexler TAB7200"; 5553ab4af3SHans de Goede compatible = "wexler,tab7200", "allwinner,sun7i-a20"; 5653ab4af3SHans de Goede 5753ab4af3SHans de Goede aliases { 5853ab4af3SHans de Goede serial0 = &uart0; 5953ab4af3SHans de Goede }; 6053ab4af3SHans de Goede 61*80e5f83cSHans de Goede backlight { 62*80e5f83cSHans de Goede compatible = "pwm-backlight"; 63*80e5f83cSHans de Goede pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; 64*80e5f83cSHans de Goede brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; 65*80e5f83cSHans de Goede default-brightness-level = <8>; 66*80e5f83cSHans de Goede pinctrl-names = "default"; 67*80e5f83cSHans de Goede pinctrl-0 = <&bl_enable_pin>; 68*80e5f83cSHans de Goede enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ 69*80e5f83cSHans de Goede }; 70*80e5f83cSHans de Goede 7153ab4af3SHans de Goede chosen { 7253ab4af3SHans de Goede stdout-path = "serial0:115200n8"; 7353ab4af3SHans de Goede }; 7453ab4af3SHans de Goede}; 7553ab4af3SHans de Goede 76*80e5f83cSHans de Goede&codec { 77*80e5f83cSHans de Goede pinctrl-names = "default"; 78*80e5f83cSHans de Goede pinctrl-0 = <&codec_pa_pin>; 79*80e5f83cSHans de Goede allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ 80*80e5f83cSHans de Goede status = "okay"; 81*80e5f83cSHans de Goede}; 82*80e5f83cSHans de Goede 8353ab4af3SHans de Goede&cpu0 { 8453ab4af3SHans de Goede cpu-supply = <®_dcdc2>; 8553ab4af3SHans de Goede}; 8653ab4af3SHans de Goede 8753ab4af3SHans de Goede&ehci0 { 8853ab4af3SHans de Goede status = "okay"; 8953ab4af3SHans de Goede}; 9053ab4af3SHans de Goede 9153ab4af3SHans de Goede&ehci1 { 9253ab4af3SHans de Goede status = "okay"; 9353ab4af3SHans de Goede}; 9453ab4af3SHans de Goede 9553ab4af3SHans de Goede&i2c0 { 9653ab4af3SHans de Goede pinctrl-names = "default"; 9753ab4af3SHans de Goede pinctrl-0 = <&i2c0_pins_a>; 9853ab4af3SHans de Goede status = "okay"; 9953ab4af3SHans de Goede 10053ab4af3SHans de Goede axp209: pmic@34 { 10153ab4af3SHans de Goede reg = <0x34>; 10253ab4af3SHans de Goede interrupt-parent = <&nmi_intc>; 10353ab4af3SHans de Goede interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 10453ab4af3SHans de Goede }; 10553ab4af3SHans de Goede}; 10653ab4af3SHans de Goede 107*80e5f83cSHans de Goede#include "axp209.dtsi" 108*80e5f83cSHans de Goede 10953ab4af3SHans de Goede&i2c1 { 11053ab4af3SHans de Goede pinctrl-names = "default"; 11153ab4af3SHans de Goede pinctrl-0 = <&i2c1_pins_a>; 11253ab4af3SHans de Goede status = "okay"; 11353ab4af3SHans de Goede}; 11453ab4af3SHans de Goede 11553ab4af3SHans de Goede&i2c2 { 11653ab4af3SHans de Goede pinctrl-names = "default"; 11753ab4af3SHans de Goede pinctrl-0 = <&i2c2_pins_a>; 11853ab4af3SHans de Goede status = "okay"; 119*80e5f83cSHans de Goede 120*80e5f83cSHans de Goede gt911: touchscreen@5d { 121*80e5f83cSHans de Goede compatible = "goodix,gt911"; 122*80e5f83cSHans de Goede reg = <0x5d>; 123*80e5f83cSHans de Goede interrupt-parent = <&pio>; 124*80e5f83cSHans de Goede interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ 125*80e5f83cSHans de Goede pinctrl-names = "default"; 126*80e5f83cSHans de Goede pinctrl-0 = <&ts_reset_pin>; 127*80e5f83cSHans de Goede irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */ 128*80e5f83cSHans de Goede reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */ 129*80e5f83cSHans de Goede touchscreen-swapped-x-y; 130*80e5f83cSHans de Goede }; 13153ab4af3SHans de Goede}; 13253ab4af3SHans de Goede 13353ab4af3SHans de Goede&lradc { 13453ab4af3SHans de Goede vref-supply = <®_vcc3v0>; 13553ab4af3SHans de Goede status = "okay"; 13653ab4af3SHans de Goede 13753ab4af3SHans de Goede button@571 { 13853ab4af3SHans de Goede label = "Volume Up"; 13953ab4af3SHans de Goede linux,code = <KEY_VOLUMEUP>; 14053ab4af3SHans de Goede channel = <0>; 14153ab4af3SHans de Goede voltage = <571428>; 14253ab4af3SHans de Goede }; 14353ab4af3SHans de Goede 14453ab4af3SHans de Goede button@761 { 14553ab4af3SHans de Goede label = "Volume Down"; 14653ab4af3SHans de Goede linux,code = <KEY_VOLUMEDOWN>; 14753ab4af3SHans de Goede channel = <0>; 14853ab4af3SHans de Goede voltage = <761904>; 14953ab4af3SHans de Goede }; 15053ab4af3SHans de Goede}; 15153ab4af3SHans de Goede 15253ab4af3SHans de Goede&mmc0 { 15353ab4af3SHans de Goede pinctrl-names = "default"; 15453ab4af3SHans de Goede pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 15553ab4af3SHans de Goede vmmc-supply = <®_vcc3v3>; 15653ab4af3SHans de Goede bus-width = <4>; 15753ab4af3SHans de Goede cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 15853ab4af3SHans de Goede cd-inverted; 15953ab4af3SHans de Goede status = "okay"; 16053ab4af3SHans de Goede}; 16153ab4af3SHans de Goede 16253ab4af3SHans de Goede&ohci0 { 16353ab4af3SHans de Goede status = "okay"; 16453ab4af3SHans de Goede}; 16553ab4af3SHans de Goede 16653ab4af3SHans de Goede&ohci1 { 16753ab4af3SHans de Goede status = "okay"; 16853ab4af3SHans de Goede}; 16953ab4af3SHans de Goede 170*80e5f83cSHans de Goede&otg_sram { 171*80e5f83cSHans de Goede status = "okay"; 172*80e5f83cSHans de Goede}; 173*80e5f83cSHans de Goede 174*80e5f83cSHans de Goede&pio { 175*80e5f83cSHans de Goede bl_enable_pin: bl_enable_pin@0 { 176*80e5f83cSHans de Goede allwinner,pins = "PH7"; 177*80e5f83cSHans de Goede allwinner,function = "gpio_out"; 178*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 179*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 180*80e5f83cSHans de Goede }; 181*80e5f83cSHans de Goede 182*80e5f83cSHans de Goede codec_pa_pin: codec_pa_pin@0 { 183*80e5f83cSHans de Goede allwinner,pins = "PH15"; 184*80e5f83cSHans de Goede allwinner,function = "gpio_out"; 185*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 186*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 187*80e5f83cSHans de Goede }; 188*80e5f83cSHans de Goede 189*80e5f83cSHans de Goede ts_reset_pin: ts_reset_pin@0 { 190*80e5f83cSHans de Goede allwinner,pins = "PB13"; 191*80e5f83cSHans de Goede allwinner,function = "gpio_out"; 192*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 193*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 194*80e5f83cSHans de Goede }; 195*80e5f83cSHans de Goede 196*80e5f83cSHans de Goede usb0_id_detect_pin: usb0_id_detect_pin@0 { 197*80e5f83cSHans de Goede allwinner,pins = "PH4"; 198*80e5f83cSHans de Goede allwinner,function = "gpio_in"; 199*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 200*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 201*80e5f83cSHans de Goede }; 202*80e5f83cSHans de Goede}; 203*80e5f83cSHans de Goede 204*80e5f83cSHans de Goede&pwm { 205*80e5f83cSHans de Goede pinctrl-names = "default"; 206*80e5f83cSHans de Goede pinctrl-0 = <&pwm0_pins_a>; 207*80e5f83cSHans de Goede status = "okay"; 208*80e5f83cSHans de Goede}; 20953ab4af3SHans de Goede 21053ab4af3SHans de Goede®_dcdc2 { 21153ab4af3SHans de Goede regulator-always-on; 21253ab4af3SHans de Goede regulator-min-microvolt = <1000000>; 21353ab4af3SHans de Goede regulator-max-microvolt = <1450000>; 21453ab4af3SHans de Goede regulator-name = "vdd-cpu"; 21553ab4af3SHans de Goede}; 21653ab4af3SHans de Goede 21753ab4af3SHans de Goede®_dcdc3 { 21853ab4af3SHans de Goede regulator-always-on; 21953ab4af3SHans de Goede regulator-min-microvolt = <1000000>; 22053ab4af3SHans de Goede regulator-max-microvolt = <1400000>; 22153ab4af3SHans de Goede regulator-name = "vdd-int-dll"; 22253ab4af3SHans de Goede}; 22353ab4af3SHans de Goede 22453ab4af3SHans de Goede®_ldo1 { 22553ab4af3SHans de Goede regulator-name = "vdd-rtc"; 22653ab4af3SHans de Goede}; 22753ab4af3SHans de Goede 22853ab4af3SHans de Goede®_ldo2 { 22953ab4af3SHans de Goede regulator-always-on; 23053ab4af3SHans de Goede regulator-min-microvolt = <3000000>; 23153ab4af3SHans de Goede regulator-max-microvolt = <3000000>; 23253ab4af3SHans de Goede regulator-name = "avcc"; 23353ab4af3SHans de Goede}; 23453ab4af3SHans de Goede 235*80e5f83cSHans de Goede®_usb0_vbus { 236*80e5f83cSHans de Goede status = "okay"; 237*80e5f83cSHans de Goede}; 238*80e5f83cSHans de Goede 23953ab4af3SHans de Goede®_usb1_vbus { 24053ab4af3SHans de Goede status = "okay"; 24153ab4af3SHans de Goede}; 24253ab4af3SHans de Goede 24353ab4af3SHans de Goede®_usb2_vbus { 24453ab4af3SHans de Goede status = "okay"; 24553ab4af3SHans de Goede}; 24653ab4af3SHans de Goede 24753ab4af3SHans de Goede&uart0 { 24853ab4af3SHans de Goede pinctrl-names = "default"; 24953ab4af3SHans de Goede pinctrl-0 = <&uart0_pins_a>; 25053ab4af3SHans de Goede status = "okay"; 25153ab4af3SHans de Goede}; 25253ab4af3SHans de Goede 253*80e5f83cSHans de Goede&usb_otg { 254*80e5f83cSHans de Goede dr_mode = "otg"; 255*80e5f83cSHans de Goede status = "okay"; 256*80e5f83cSHans de Goede}; 257*80e5f83cSHans de Goede 258*80e5f83cSHans de Goede&usb_power_supply { 259*80e5f83cSHans de Goede status = "okay"; 260*80e5f83cSHans de Goede}; 261*80e5f83cSHans de Goede 26253ab4af3SHans de Goede&usbphy { 263*80e5f83cSHans de Goede pinctrl-names = "default"; 264*80e5f83cSHans de Goede pinctrl-0 = <&usb0_id_detect_pin>; 265*80e5f83cSHans de Goede usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ 266*80e5f83cSHans de Goede usb0_vbus_power-supply = <&usb_power_supply>; 267*80e5f83cSHans de Goede usb0_vbus-supply = <®_usb0_vbus>; 26853ab4af3SHans de Goede usb1_vbus-supply = <®_usb1_vbus>; 26953ab4af3SHans de Goede usb2_vbus-supply = <®_usb2_vbus>; 27053ab4af3SHans de Goede status = "okay"; 27153ab4af3SHans de Goede}; 272