0001 /*
0002 * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
0003 * Copyright 2015 Karsten Merker <merker@debian.org>
0004 * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
0005 *
0006 * This file is dual-licensed: you can use it either under the terms
0007 * of the GPL or the X11 license, at your option. Note that this dual
0008 * licensing only applies to this file, and not this project as a
0009 * whole.
0010 *
0011 * a) This file is free software; you can redistribute it and/or
0012 * modify it under the terms of the GNU General Public License as
0013 * published by the Free Software Foundation; either version 2 of the
0014 * License, or (at your option) any later version.
0015 *
0016 * This file is distributed in the hope that it will be useful,
0017 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0019 * GNU General Public License for more details.
0020 *
0021 * Or, alternatively,
0022 *
0023 * b) Permission is hereby granted, free of charge, to any person
0024 * obtaining a copy of this software and associated documentation
0025 * files (the "Software"), to deal in the Software without
0026 * restriction, including without limitation the rights to use,
0027 * copy, modify, merge, publish, distribute, sublicense, and/or
0028 * sell copies of the Software, and to permit persons to whom the
0029 * Software is furnished to do so, subject to the following
0030 * conditions:
0031 *
0032 * The above copyright notice and this permission notice shall be
0033 * included in all copies or substantial portions of the Software.
0034 *
0035 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0036 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0037 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0038 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0039 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0040 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0041 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0042 * OTHER DEALINGS IN THE SOFTWARE.
0043 */
0044
0045 /dts-v1/;
0046 #include "sun6i-a31s.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048
0049 #include <dt-bindings/gpio/gpio.h>
0050 #include <dt-bindings/input/input.h>
0051
0052 / {
0053 model = "MSI Primo81 tablet";
0054 compatible = "msi,primo81", "allwinner,sun6i-a31s";
0055
0056 hdmi-connector {
0057 compatible = "hdmi-connector";
0058 type = "c";
0059
0060 port {
0061 hdmi_con_in: endpoint {
0062 remote-endpoint = <&hdmi_out_con>;
0063 };
0064 };
0065 };
0066 };
0067
0068 &cpu0 {
0069 cpu-supply = <®_dcdc3>;
0070 };
0071
0072 &de {
0073 status = "okay";
0074 };
0075
0076 &ehci0 {
0077 /* rtl8188etv wifi is connected here */
0078 status = "okay";
0079 };
0080
0081 &hdmi {
0082 status = "okay";
0083 };
0084
0085 &hdmi_out {
0086 hdmi_out_con: endpoint {
0087 remote-endpoint = <&hdmi_con_in>;
0088 };
0089 };
0090
0091 &i2c0 {
0092 /* pull-ups and device VDDIO use AXP221 DLDO3 */
0093 status = "failed";
0094 };
0095
0096 &i2c1 {
0097 status = "okay";
0098
0099 ctp@5d {
0100 compatible = "goodix,gt911";
0101 reg = <0x5d>;
0102 interrupt-parent = <&pio>;
0103 interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
0104 touchscreen-swapped-x-y;
0105 };
0106 };
0107
0108 &i2c2 {
0109 status = "okay";
0110
0111 accelerometer@1c {
0112 pinctrl-names = "default";
0113 pinctrl-0 = <&mma8452_int_primo81>;
0114 compatible = "fsl,mma8452";
0115 reg = <0x1c>;
0116 interrupt-parent = <&pio>;
0117 interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */
0118 };
0119 };
0120
0121 &lradc {
0122 vref-supply = <®_aldo3>;
0123 status = "okay";
0124
0125 button-158 {
0126 label = "Volume Up";
0127 linux,code = <KEY_VOLUMEUP>;
0128 channel = <0>;
0129 voltage = <158730>;
0130 };
0131
0132 button-349 {
0133 label = "Volume Down";
0134 linux,code = <KEY_VOLUMEDOWN>;
0135 channel = <0>;
0136 voltage = <349206>;
0137 };
0138 };
0139
0140 &mmc0 {
0141 vmmc-supply = <®_dcdc1>;
0142 bus-width = <4>;
0143 cd-gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
0144 status = "okay";
0145 };
0146
0147 &pio {
0148 mma8452_int_primo81: mma8452-int-pin {
0149 pins = "PA9";
0150 function = "gpio_in";
0151 bias-pull-up;
0152 };
0153 };
0154
0155 &p2wi {
0156 status = "okay";
0157
0158 axp22x: pmic@68 {
0159 compatible = "x-powers,axp221";
0160 reg = <0x68>;
0161 interrupt-parent = <&r_intc>;
0162 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
0163 x-powers,drive-vbus-en;
0164 };
0165 };
0166
0167 #include "axp22x.dtsi"
0168
0169 &battery_power_supply {
0170 status = "okay";
0171 };
0172
0173 ®_aldo3 {
0174 regulator-always-on;
0175 regulator-min-microvolt = <2700000>;
0176 regulator-max-microvolt = <3300000>;
0177 regulator-name = "avcc";
0178 };
0179
0180 ®_dc1sw {
0181 regulator-name = "vcc-lcd";
0182 };
0183
0184 ®_dc5ldo {
0185 regulator-min-microvolt = <700000>;
0186 regulator-max-microvolt = <1320000>;
0187 regulator-name = "vdd-cpus"; /* This is an educated guess */
0188 };
0189
0190 ®_dcdc1 {
0191 regulator-always-on;
0192 regulator-min-microvolt = <3000000>;
0193 regulator-max-microvolt = <3000000>;
0194 regulator-name = "vcc-3v0";
0195 };
0196
0197 ®_dcdc2 {
0198 regulator-min-microvolt = <700000>;
0199 regulator-max-microvolt = <1320000>;
0200 regulator-name = "vdd-gpu";
0201 };
0202
0203 ®_dcdc3 {
0204 regulator-always-on;
0205 regulator-min-microvolt = <700000>;
0206 regulator-max-microvolt = <1320000>;
0207 regulator-name = "vdd-cpu";
0208 };
0209
0210 ®_dcdc4 {
0211 regulator-always-on;
0212 regulator-min-microvolt = <700000>;
0213 regulator-max-microvolt = <1320000>;
0214 regulator-name = "vdd-sys-dll";
0215 };
0216
0217 ®_dcdc5 {
0218 regulator-always-on;
0219 regulator-min-microvolt = <1500000>;
0220 regulator-max-microvolt = <1500000>;
0221 regulator-name = "vcc-dram";
0222 };
0223
0224 ®_dldo1 {
0225 regulator-min-microvolt = <3300000>;
0226 regulator-max-microvolt = <3300000>;
0227 regulator-name = "vcc-wifi";
0228 };
0229
0230 ®_dldo3 {
0231 regulator-min-microvolt = <2800000>;
0232 regulator-max-microvolt = <2800000>;
0233 regulator-name = "vddio-csi";
0234 };
0235
0236 ®_drivevbus {
0237 regulator-name = "usb0-vbus";
0238 status = "okay";
0239 };
0240
0241 ®_eldo3 {
0242 regulator-min-microvolt = <1080000>;
0243 regulator-max-microvolt = <1320000>;
0244 regulator-name = "vdd-mipi-bridge";
0245 };
0246
0247 &simplefb_lcd {
0248 vcc-lcd-supply = <®_dc1sw>;
0249 vdd-mipi-bridge-supply = <®_eldo3>;
0250 };
0251
0252 &usb_otg {
0253 dr_mode = "otg";
0254 status = "okay";
0255 };
0256
0257 &usb_power_supply {
0258 status = "okay";
0259 };
0260
0261 &usbphy {
0262 usb0_id_det-gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */
0263 usb0_vbus_power-supply = <&usb_power_supply>;
0264 usb0_vbus-supply = <®_drivevbus>;
0265 usb1_vbus-supply = <®_dldo1>;
0266 status = "okay";
0267 };