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