Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2016 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 = "Dserve DSRV9703C";
0053         compatible = "dserve,dsrv9703c", "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 = <&reg_vcc3v3>;
0066         };
0067 
0068         chosen {
0069                 stdout-path = "serial0:115200n8";
0070         };
0071 
0072         haptics {
0073                 compatible = "regulator-haptic";
0074                 haptic-supply = <&reg_motor>;
0075                 min-microvolt = <3000000>;
0076                 max-microvolt = <3000000>;
0077         };
0078 
0079         reg_motor: reg-motor {
0080                 compatible = "regulator-fixed";
0081                 regulator-name = "vcc-motor";
0082                 regulator-min-microvolt = <3000000>;
0083                 regulator-max-microvolt = <3000000>;
0084                 enable-active-high;
0085                 gpio = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
0086         };
0087 };
0088 
0089 &codec {
0090         allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
0091         status = "okay";
0092 };
0093 
0094 &cpu0 {
0095         cpu-supply = <&reg_dcdc2>;
0096 };
0097 
0098 &ehci1 {
0099         status = "okay";
0100 };
0101 
0102 &i2c0 {
0103         status = "okay";
0104 
0105         axp209: pmic@34 {
0106                 reg = <0x34>;
0107                 interrupts = <0>;
0108         };
0109 };
0110 
0111 #include "axp209.dtsi"
0112 
0113 &i2c1 {
0114         /* pull-ups and devices require AXP209 LDO3 */
0115         status = "failed";
0116 };
0117 
0118 &i2c2 {
0119         status = "okay";
0120 
0121         ft5406ee8: touchscreen@38 {
0122                 compatible = "edt,edt-ft5406";
0123                 reg = <0x38>;
0124                 interrupt-parent = <&pio>;
0125                 interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
0126                 reset-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>;
0127                 touchscreen-size-x = <1024>;
0128                 touchscreen-size-y = <768>;
0129         };
0130 };
0131 
0132 &lradc {
0133         vref-supply = <&reg_ldo2>;
0134         status = "okay";
0135 
0136         button-400 {
0137                 label = "Volume Down";
0138                 linux,code = <KEY_VOLUMEDOWN>;
0139                 channel = <0>;
0140                 voltage = <400000>;
0141         };
0142 
0143         button-800 {
0144                 label = "Volume Up";
0145                 linux,code = <KEY_VOLUMEUP>;
0146                 channel = <0>;
0147                 voltage = <800000>;
0148         };
0149 };
0150 
0151 &mmc0 {
0152         vmmc-supply = <&reg_vcc3v3>;
0153         bus-width = <4>;
0154         cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0155         status = "okay";
0156 };
0157 
0158 &otg_sram {
0159         status = "okay";
0160 };
0161 
0162 &pwm {
0163         pinctrl-names = "default";
0164         pinctrl-0 = <&pwm0_pin>;
0165         status = "okay";
0166 };
0167 
0168 &reg_dcdc2 {
0169         regulator-always-on;
0170         regulator-min-microvolt = <1000000>;
0171         regulator-max-microvolt = <1400000>;
0172         regulator-name = "vdd-cpu";
0173 };
0174 
0175 &reg_dcdc3 {
0176         regulator-always-on;
0177         regulator-min-microvolt = <1250000>;
0178         regulator-max-microvolt = <1250000>;
0179         regulator-name = "vdd-int-dll";
0180 };
0181 
0182 &reg_ldo1 {
0183         regulator-name = "vdd-rtc";
0184 };
0185 
0186 &reg_ldo2 {
0187         regulator-always-on;
0188         regulator-min-microvolt = <3000000>;
0189         regulator-max-microvolt = <3000000>;
0190         regulator-name = "avcc";
0191 };
0192 
0193 &reg_usb0_vbus {
0194         status = "okay";
0195 };
0196 
0197 &reg_usb2_vbus {
0198         status = "okay";
0199 };
0200 
0201 &uart0 {
0202         pinctrl-names = "default";
0203         pinctrl-0 = <&uart0_pb_pins>;
0204         status = "okay";
0205 };
0206 
0207 &usb_otg {
0208         dr_mode = "otg";
0209         status = "okay";
0210 };
0211 
0212 &usbphy {
0213         usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0214         usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
0215         usb0_vbus-supply = <&reg_usb0_vbus>;
0216         usb2_vbus-supply = <&reg_usb2_vbus>;
0217         status = "okay";
0218 };