Back to home page

OSCL-LXR

 
 

    


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 "sun5i-a13.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 = "Empire Electronix D709 tablet";
0053         compatible = "empire-electronix,d709", "allwinner,sun5i-a13";
0054 
0055         aliases {
0056                 serial0 = &uart1;
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                 power-supply = <&reg_vcc3v3>;
0065                 /* TODO: backlight uses axp gpio1 as enable pin */
0066         };
0067 
0068         chosen {
0069                 stdout-path = "serial0:115200n8";
0070         };
0071 };
0072 
0073 &cpu0 {
0074         cpu-supply = <&reg_dcdc2>;
0075 };
0076 
0077 &ehci0 {
0078         status = "okay";
0079 };
0080 
0081 &i2c0 {
0082         status = "okay";
0083 
0084         axp209: pmic@34 {
0085                 reg = <0x34>;
0086                 interrupts = <0>;
0087         };
0088 };
0089 
0090 #include "axp209.dtsi"
0091 
0092 &i2c1 {
0093         status = "okay";
0094 
0095         pcf8563: rtc@51 {
0096                 compatible = "nxp,pcf8563";
0097                 reg = <0x51>;
0098         };
0099 };
0100 
0101 &lradc {
0102         vref-supply = <&reg_ldo2>;
0103         status = "okay";
0104 
0105         button-200 {
0106                 label = "Volume Up";
0107                 linux,code = <KEY_VOLUMEUP>;
0108                 channel = <0>;
0109                 voltage = <200000>;
0110         };
0111 
0112         button-400 {
0113                 label = "Volume Down";
0114                 linux,code = <KEY_VOLUMEDOWN>;
0115                 channel = <0>;
0116                 voltage = <400000>;
0117         };
0118 };
0119 
0120 &mmc0 {
0121         vmmc-supply = <&reg_vcc3v3>;
0122         bus-width = <4>;
0123         cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
0124         status = "okay";
0125 };
0126 
0127 &otg_sram {
0128         status = "okay";
0129 };
0130 
0131 &pwm {
0132         pinctrl-names = "default";
0133         pinctrl-0 = <&pwm0_pin>;
0134         status = "okay";
0135 };
0136 
0137 &reg_dcdc2 {
0138         regulator-always-on;
0139         regulator-min-microvolt = <1000000>;
0140         regulator-max-microvolt = <1400000>;
0141         regulator-name = "vdd-cpu";
0142 };
0143 
0144 &reg_dcdc3 {
0145         regulator-always-on;
0146         regulator-min-microvolt = <1250000>;
0147         regulator-max-microvolt = <1250000>;
0148         regulator-name = "vdd-int-pll";
0149 };
0150 
0151 &reg_ldo1 {
0152         regulator-name = "vdd-rtc";
0153 };
0154 
0155 &reg_ldo2 {
0156         regulator-always-on;
0157         regulator-min-microvolt = <3000000>;
0158         regulator-max-microvolt = <3000000>;
0159         regulator-name = "avcc";
0160 };
0161 
0162 &reg_ldo3 {
0163         regulator-min-microvolt = <3300000>;
0164         regulator-max-microvolt = <3300000>;
0165         regulator-name = "vcc-wifi";
0166 };
0167 
0168 &reg_usb0_vbus {
0169         gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
0170         status = "okay";
0171 };
0172 
0173 &uart1 {
0174         pinctrl-names = "default";
0175         pinctrl-0 = <&uart1_pg_pins>;
0176         status = "okay";
0177 };
0178 
0179 &usb_otg {
0180         dr_mode = "otg";
0181         status = "okay";
0182 };
0183 
0184 &usbphy {
0185         usb0_id_det-gpios = <&pio 6 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG2 */
0186         usb0_vbus_det-gpios = <&pio 6 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PG1 */
0187         usb0_vbus-supply = <&reg_usb0_vbus>;
0188         usb1_vbus-supply = <&reg_ldo3>;
0189         status = "okay";
0190 };