0001 /*
0002 * Copyright 2015 Aleksei Mamlin
0003 * Aleksei Mamlin <mamlinav@gmail.com>
0004 *
0005 * This file is dual-licensed: you can use it either under the terms
0006 * of the GPL or the X11 license, at your option. Note that this dual
0007 * licensing only applies to this file, and not this project as a
0008 * whole.
0009 *
0010 * a) This file is free software; you can redistribute it and/or
0011 * modify it under the terms of the GNU General Public License as
0012 * published by the Free Software Foundation; either version 2 of the
0013 * License, or (at your option) any later version.
0014 *
0015 * This file is distributed in the hope that it will be useful,
0016 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0018 * GNU General Public License for more details.
0019 *
0020 * Or, alternatively,
0021 *
0022 * b) Permission is hereby granted, free of charge, to any person
0023 * obtaining a copy of this software and associated documentation
0024 * files (the "Software"), to deal in the Software without
0025 * restriction, including without limitation the rights to use,
0026 * copy, modify, merge, publish, distribute, sublicense, and/or
0027 * sell copies of the Software, and to permit persons to whom the
0028 * Software is furnished to do so, subject to the following
0029 * conditions:
0030 *
0031 * The above copyright notice and this permission notice shall be
0032 * included in all copies or substantial portions of the Software.
0033 *
0034 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0035 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0036 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0037 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0038 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0039 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0040 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0041 * OTHER DEALINGS IN THE SOFTWARE.
0042 */
0043
0044 /dts-v1/;
0045 #include "sun7i-a20.dtsi"
0046 #include "sunxi-common-regulators.dtsi"
0047
0048 #include <dt-bindings/gpio/gpio.h>
0049 #include <dt-bindings/input/input.h>
0050 #include <dt-bindings/interrupt-controller/irq.h>
0051 #include <dt-bindings/pwm/pwm.h>
0052
0053 / {
0054 model = "Wexler TAB7200";
0055 compatible = "wexler,tab7200", "allwinner,sun7i-a20";
0056
0057 aliases {
0058 serial0 = &uart0;
0059 };
0060
0061 backlight {
0062 compatible = "pwm-backlight";
0063 pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
0064 brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
0065 default-brightness-level = <8>;
0066 enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
0067 power-supply = <®_vcc3v3>;
0068 };
0069
0070 chosen {
0071 stdout-path = "serial0:115200n8";
0072 };
0073 };
0074
0075 &codec {
0076 allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
0077 status = "okay";
0078 };
0079
0080 &cpu0 {
0081 cpu-supply = <®_dcdc2>;
0082 };
0083
0084 &ehci0 {
0085 status = "okay";
0086 };
0087
0088 &ehci1 {
0089 status = "okay";
0090 };
0091
0092 &i2c0 {
0093 status = "okay";
0094
0095 axp209: pmic@34 {
0096 reg = <0x34>;
0097 interrupt-parent = <&nmi_intc>;
0098 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0099 };
0100 };
0101
0102 #include "axp209.dtsi"
0103
0104 &i2c1 {
0105 status = "okay";
0106 };
0107
0108 &i2c2 {
0109 status = "okay";
0110
0111 gt911: touchscreen@5d {
0112 compatible = "goodix,gt911";
0113 reg = <0x5d>;
0114 interrupt-parent = <&pio>;
0115 interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
0116 irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
0117 reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
0118 touchscreen-swapped-x-y;
0119 };
0120 };
0121
0122 &lradc {
0123 vref-supply = <®_vcc3v0>;
0124 status = "okay";
0125
0126 button-571 {
0127 label = "Volume Up";
0128 linux,code = <KEY_VOLUMEUP>;
0129 channel = <0>;
0130 voltage = <571428>;
0131 };
0132
0133 button-761 {
0134 label = "Volume Down";
0135 linux,code = <KEY_VOLUMEDOWN>;
0136 channel = <0>;
0137 voltage = <761904>;
0138 };
0139 };
0140
0141 &mmc0 {
0142 vmmc-supply = <®_vcc3v3>;
0143 bus-width = <4>;
0144 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0145 status = "okay";
0146 };
0147
0148 &ohci0 {
0149 status = "okay";
0150 };
0151
0152 &ohci1 {
0153 status = "okay";
0154 };
0155
0156 &otg_sram {
0157 status = "okay";
0158 };
0159
0160 &pwm {
0161 pinctrl-names = "default";
0162 pinctrl-0 = <&pwm0_pin>;
0163 status = "okay";
0164 };
0165
0166 ®_dcdc2 {
0167 regulator-always-on;
0168 regulator-min-microvolt = <1000000>;
0169 regulator-max-microvolt = <1450000>;
0170 regulator-name = "vdd-cpu";
0171 };
0172
0173 ®_dcdc3 {
0174 regulator-always-on;
0175 regulator-min-microvolt = <1000000>;
0176 regulator-max-microvolt = <1400000>;
0177 regulator-name = "vdd-int-dll";
0178 };
0179
0180 ®_ldo1 {
0181 regulator-name = "vdd-rtc";
0182 };
0183
0184 ®_ldo2 {
0185 regulator-always-on;
0186 regulator-min-microvolt = <3000000>;
0187 regulator-max-microvolt = <3000000>;
0188 regulator-name = "avcc";
0189 };
0190
0191 ®_usb0_vbus {
0192 status = "okay";
0193 };
0194
0195 ®_usb1_vbus {
0196 status = "okay";
0197 };
0198
0199 ®_usb2_vbus {
0200 status = "okay";
0201 };
0202
0203 &uart0 {
0204 pinctrl-names = "default";
0205 pinctrl-0 = <&uart0_pb_pins>;
0206 status = "okay";
0207 };
0208
0209 &usb_otg {
0210 dr_mode = "otg";
0211 status = "okay";
0212 };
0213
0214 &usb_power_supply {
0215 status = "okay";
0216 };
0217
0218 &usbphy {
0219 usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0220 usb0_vbus_power-supply = <&usb_power_supply>;
0221 usb0_vbus-supply = <®_usb0_vbus>;
0222 usb1_vbus-supply = <®_usb1_vbus>;
0223 usb2_vbus-supply = <®_usb2_vbus>;
0224 status = "okay";
0225 };