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> 5180e5f83cSHans 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 6180e5f83cSHans de Goede backlight { 6280e5f83cSHans de Goede compatible = "pwm-backlight"; 6380e5f83cSHans de Goede pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; 6480e5f83cSHans de Goede brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; 6580e5f83cSHans de Goede default-brightness-level = <8>; 6680e5f83cSHans de Goede pinctrl-names = "default"; 6780e5f83cSHans de Goede pinctrl-0 = <&bl_enable_pin>; 6880e5f83cSHans de Goede enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ 6980e5f83cSHans de Goede }; 7080e5f83cSHans de Goede 7153ab4af3SHans de Goede chosen { 7253ab4af3SHans de Goede stdout-path = "serial0:115200n8"; 7353ab4af3SHans de Goede }; 7453ab4af3SHans de Goede}; 7553ab4af3SHans de Goede 7680e5f83cSHans de Goede&codec { 7780e5f83cSHans de Goede pinctrl-names = "default"; 7880e5f83cSHans de Goede pinctrl-0 = <&codec_pa_pin>; 7980e5f83cSHans de Goede allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ 8080e5f83cSHans de Goede status = "okay"; 8180e5f83cSHans de Goede}; 8280e5f83cSHans 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 10780e5f83cSHans de Goede#include "axp209.dtsi" 10880e5f83cSHans 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"; 11980e5f83cSHans de Goede 12080e5f83cSHans de Goede gt911: touchscreen@5d { 12180e5f83cSHans de Goede compatible = "goodix,gt911"; 12280e5f83cSHans de Goede reg = <0x5d>; 12380e5f83cSHans de Goede interrupt-parent = <&pio>; 12480e5f83cSHans de Goede interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ 12580e5f83cSHans de Goede pinctrl-names = "default"; 12680e5f83cSHans de Goede pinctrl-0 = <&ts_reset_pin>; 12780e5f83cSHans de Goede irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */ 12880e5f83cSHans de Goede reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */ 12980e5f83cSHans de Goede touchscreen-swapped-x-y; 13080e5f83cSHans 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"; 154*b9d59d08SJagan Teki pinctrl-0 = <&mmc0_pins_a>; 15553ab4af3SHans de Goede vmmc-supply = <®_vcc3v3>; 15653ab4af3SHans de Goede bus-width = <4>; 157*b9d59d08SJagan Teki cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */ 15853ab4af3SHans de Goede status = "okay"; 15953ab4af3SHans de Goede}; 16053ab4af3SHans de Goede 16153ab4af3SHans de Goede&ohci0 { 16253ab4af3SHans de Goede status = "okay"; 16353ab4af3SHans de Goede}; 16453ab4af3SHans de Goede 16553ab4af3SHans de Goede&ohci1 { 16653ab4af3SHans de Goede status = "okay"; 16753ab4af3SHans de Goede}; 16853ab4af3SHans de Goede 16980e5f83cSHans de Goede&otg_sram { 17080e5f83cSHans de Goede status = "okay"; 17180e5f83cSHans de Goede}; 17280e5f83cSHans de Goede 17380e5f83cSHans de Goede&pio { 17480e5f83cSHans de Goede bl_enable_pin: bl_enable_pin@0 { 175*b9d59d08SJagan Teki pins = "PH7"; 176*b9d59d08SJagan Teki function = "gpio_out"; 17780e5f83cSHans de Goede }; 17880e5f83cSHans de Goede 17980e5f83cSHans de Goede codec_pa_pin: codec_pa_pin@0 { 180*b9d59d08SJagan Teki pins = "PH15"; 181*b9d59d08SJagan Teki function = "gpio_out"; 18280e5f83cSHans de Goede }; 18380e5f83cSHans de Goede 18480e5f83cSHans de Goede ts_reset_pin: ts_reset_pin@0 { 185*b9d59d08SJagan Teki pins = "PB13"; 186*b9d59d08SJagan Teki function = "gpio_out"; 18780e5f83cSHans de Goede }; 18880e5f83cSHans de Goede 18980e5f83cSHans de Goede usb0_id_detect_pin: usb0_id_detect_pin@0 { 190*b9d59d08SJagan Teki pins = "PH4"; 191*b9d59d08SJagan Teki function = "gpio_in"; 192*b9d59d08SJagan Teki bias-pull-up; 19380e5f83cSHans de Goede }; 19480e5f83cSHans de Goede}; 19580e5f83cSHans de Goede 19680e5f83cSHans de Goede&pwm { 19780e5f83cSHans de Goede pinctrl-names = "default"; 19880e5f83cSHans de Goede pinctrl-0 = <&pwm0_pins_a>; 19980e5f83cSHans de Goede status = "okay"; 20080e5f83cSHans de Goede}; 20153ab4af3SHans de Goede 20253ab4af3SHans de Goede®_dcdc2 { 20353ab4af3SHans de Goede regulator-always-on; 20453ab4af3SHans de Goede regulator-min-microvolt = <1000000>; 20553ab4af3SHans de Goede regulator-max-microvolt = <1450000>; 20653ab4af3SHans de Goede regulator-name = "vdd-cpu"; 20753ab4af3SHans de Goede}; 20853ab4af3SHans de Goede 20953ab4af3SHans de Goede®_dcdc3 { 21053ab4af3SHans de Goede regulator-always-on; 21153ab4af3SHans de Goede regulator-min-microvolt = <1000000>; 21253ab4af3SHans de Goede regulator-max-microvolt = <1400000>; 21353ab4af3SHans de Goede regulator-name = "vdd-int-dll"; 21453ab4af3SHans de Goede}; 21553ab4af3SHans de Goede 21653ab4af3SHans de Goede®_ldo1 { 21753ab4af3SHans de Goede regulator-name = "vdd-rtc"; 21853ab4af3SHans de Goede}; 21953ab4af3SHans de Goede 22053ab4af3SHans de Goede®_ldo2 { 22153ab4af3SHans de Goede regulator-always-on; 22253ab4af3SHans de Goede regulator-min-microvolt = <3000000>; 22353ab4af3SHans de Goede regulator-max-microvolt = <3000000>; 22453ab4af3SHans de Goede regulator-name = "avcc"; 22553ab4af3SHans de Goede}; 22653ab4af3SHans de Goede 22780e5f83cSHans de Goede®_usb0_vbus { 22880e5f83cSHans de Goede status = "okay"; 22980e5f83cSHans de Goede}; 23080e5f83cSHans de Goede 23153ab4af3SHans de Goede®_usb1_vbus { 23253ab4af3SHans de Goede status = "okay"; 23353ab4af3SHans de Goede}; 23453ab4af3SHans de Goede 23553ab4af3SHans de Goede®_usb2_vbus { 23653ab4af3SHans de Goede status = "okay"; 23753ab4af3SHans de Goede}; 23853ab4af3SHans de Goede 23953ab4af3SHans de Goede&uart0 { 24053ab4af3SHans de Goede pinctrl-names = "default"; 24153ab4af3SHans de Goede pinctrl-0 = <&uart0_pins_a>; 24253ab4af3SHans de Goede status = "okay"; 24353ab4af3SHans de Goede}; 24453ab4af3SHans de Goede 24580e5f83cSHans de Goede&usb_otg { 24680e5f83cSHans de Goede dr_mode = "otg"; 24780e5f83cSHans de Goede status = "okay"; 24880e5f83cSHans de Goede}; 24980e5f83cSHans de Goede 25080e5f83cSHans de Goede&usb_power_supply { 25180e5f83cSHans de Goede status = "okay"; 25280e5f83cSHans de Goede}; 25380e5f83cSHans de Goede 25453ab4af3SHans de Goede&usbphy { 25580e5f83cSHans de Goede pinctrl-names = "default"; 25680e5f83cSHans de Goede pinctrl-0 = <&usb0_id_detect_pin>; 25780e5f83cSHans de Goede usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ 25880e5f83cSHans de Goede usb0_vbus_power-supply = <&usb_power_supply>; 25980e5f83cSHans de Goede usb0_vbus-supply = <®_usb0_vbus>; 26053ab4af3SHans de Goede usb1_vbus-supply = <®_usb1_vbus>; 26153ab4af3SHans de Goede usb2_vbus-supply = <®_usb2_vbus>; 26253ab4af3SHans de Goede status = "okay"; 26353ab4af3SHans de Goede}; 264