0001 /*
0002 * Copyright 2015 Lawrence Yu <lyu@micile.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 "sun6i-a31s.dtsi"
0045 #include "sunxi-common-regulators.dtsi"
0046
0047 #include <dt-bindings/gpio/gpio.h>
0048
0049 / {
0050 model = "Yones TopTech BS1078 v2 Tablet";
0051 compatible = "yones-toptech,bs1078-v2", "allwinner,sun6i-a31s";
0052
0053 aliases {
0054 serial0 = &uart0;
0055 i2c1 = &i2c1;
0056 i2c2 = &i2c2;
0057 };
0058
0059 chosen {
0060 stdout-path = "serial0:115200n8";
0061 };
0062 };
0063
0064 &i2c1 {
0065 status = "okay";
0066 };
0067
0068 &i2c2 {
0069 status = "okay";
0070 };
0071
0072 &ehci0 {
0073 status = "okay";
0074 };
0075
0076 &ehci1 {
0077 status = "okay";
0078 };
0079
0080 &ohci0 {
0081 status = "okay";
0082 };
0083
0084 &ohci1 {
0085 status = "okay";
0086 };
0087
0088 &mmc0 {
0089 vmmc-supply = <®_vcc3v0>;
0090 bus-width = <4>;
0091 cd-gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
0092 status = "okay";
0093 };
0094
0095 &p2wi {
0096 status = "okay";
0097
0098 axp22x: pmic@68 {
0099 compatible = "x-powers,axp221";
0100 reg = <0x68>;
0101 interrupt-parent = <&r_intc>;
0102 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
0103 };
0104 };
0105
0106 #include "axp22x.dtsi"
0107
0108 ®_aldo3 {
0109 regulator-always-on;
0110 regulator-min-microvolt = <2700000>;
0111 regulator-max-microvolt = <3300000>;
0112 regulator-name = "avcc";
0113 };
0114
0115 ®_dc1sw {
0116 regulator-name = "vcc-lcd-usb2";
0117 };
0118
0119 ®_dc5ldo {
0120 regulator-min-microvolt = <700000>;
0121 regulator-max-microvolt = <1320000>;
0122 regulator-name = "vdd-cpus";
0123 };
0124
0125 ®_dcdc1 {
0126 regulator-always-on;
0127 regulator-min-microvolt = <3000000>;
0128 regulator-max-microvolt = <3000000>;
0129 regulator-name = "vcc-3v0";
0130 };
0131
0132 ®_dcdc2 {
0133 regulator-min-microvolt = <700000>;
0134 regulator-max-microvolt = <1320000>;
0135 regulator-name = "vdd-gpu";
0136 };
0137
0138 ®_dcdc3 {
0139 regulator-always-on;
0140 regulator-min-microvolt = <700000>;
0141 regulator-max-microvolt = <1320000>;
0142 regulator-name = "vdd-cpu";
0143 };
0144
0145 ®_dcdc4 {
0146 regulator-always-on;
0147 regulator-min-microvolt = <700000>;
0148 regulator-max-microvolt = <1320000>;
0149 regulator-name = "vdd-sys-dll";
0150 };
0151
0152 ®_dcdc5 {
0153 regulator-always-on;
0154 regulator-min-microvolt = <1500000>;
0155 regulator-max-microvolt = <1500000>;
0156 regulator-name = "vcc-dram";
0157 };
0158
0159 ®_dldo1 {
0160 regulator-min-microvolt = <3300000>;
0161 regulator-max-microvolt = <3300000>;
0162 regulator-name = "vcc-wifi";
0163 };
0164
0165 /* Voltage source for I2C pullup resistors for I2C Bus 0 */
0166 ®_dldo3 {
0167 regulator-min-microvolt = <2800000>;
0168 regulator-max-microvolt = <2800000>;
0169 regulator-name = "vddio-csi";
0170 };
0171
0172 &uart0 {
0173 pinctrl-names = "default";
0174 pinctrl-0 = <&uart0_ph_pins>;
0175 status = "okay";
0176 };
0177
0178 &usbphy {
0179 usb1_vbus-supply = <®_dldo1>;
0180 usb2_vbus-supply = <®_dc1sw>;
0181 status = "okay";
0182 };