0001 /*
0002 * Copyright 2015 Priit Laes
0003 *
0004 * Priit Laes <plaes@plaes.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 "sun4i-a10.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048 #include <dt-bindings/gpio/gpio.h>
0049 #include <dt-bindings/input/input.h>
0050 #include <dt-bindings/interrupt-controller/irq.h>
0051
0052 / {
0053 model = "Gemei G9 Tablet";
0054 compatible = "gemei,g9", "allwinner,sun4i-a10";
0055
0056 aliases {
0057 serial0 = &uart0;
0058 };
0059
0060 chosen {
0061 stdout-path = "serial0:115200n8";
0062 };
0063 };
0064
0065 /*
0066 * TODO:
0067 * 2x cameras via CSI
0068 * AXP battery management
0069 * NAND
0070 * OTG
0071 * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
0072 */
0073 &codec {
0074 /* PH15 controls power to external amplifier (ft2012q) */
0075 allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>;
0076 status = "okay";
0077 };
0078
0079 &cpu0 {
0080 cpu-supply = <®_dcdc2>;
0081 };
0082
0083 &ehci0 {
0084 status = "okay";
0085 };
0086
0087 &ehci1 {
0088 status = "okay";
0089 };
0090
0091 &i2c0 {
0092 status = "okay";
0093
0094 axp209: pmic@34 {
0095 reg = <0x34>;
0096 interrupts = <0>;
0097 };
0098 };
0099
0100 #include "axp209.dtsi"
0101
0102 &i2c1 {
0103 status = "okay";
0104
0105 /* Accelerometer */
0106 bma250@18 {
0107 compatible = "bosch,bma250";
0108 reg = <0x18>;
0109 interrupt-parent = <&pio>;
0110 interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH00 / EINT0 */
0111 };
0112 };
0113
0114 &lradc {
0115 vref-supply = <®_ldo2>;
0116
0117 status = "okay";
0118
0119 button-158 {
0120 label = "Volume Down";
0121 linux,code = <KEY_VOLUMEDOWN>;
0122 channel = <0>;
0123 voltage = <158730>;
0124 };
0125
0126 button-349 {
0127 label = "Volume Up";
0128 linux,code = <KEY_VOLUMEUP>;
0129 channel = <0>;
0130 voltage = <349206>;
0131 };
0132
0133 button-1142 {
0134 label = "Esc";
0135 linux,code = <KEY_ESC>;
0136 channel = <0>;
0137 voltage = <1142856>;
0138 };
0139 };
0140
0141 &mmc0 {
0142 vmmc-supply = <®_vcc3v3>;
0143 bus-width = <4>;
0144 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH01 */
0145 status = "okay";
0146 };
0147
0148 ®_dcdc2 {
0149 regulator-always-on;
0150 regulator-min-microvolt = <1000000>;
0151 regulator-max-microvolt = <1400000>;
0152 regulator-name = "vdd-cpu";
0153 };
0154
0155 ®_dcdc3 {
0156 regulator-always-on;
0157 regulator-min-microvolt = <1250000>;
0158 regulator-max-microvolt = <1250000>;
0159 regulator-name = "vdd-int-dll";
0160 };
0161
0162 ®_ldo1 {
0163 regulator-name = "vdd-rtc";
0164 };
0165
0166 ®_ldo2 {
0167 regulator-always-on;
0168 regulator-min-microvolt = <3000000>;
0169 regulator-max-microvolt = <3000000>;
0170 regulator-name = "avcc";
0171 };
0172
0173 ®_usb1_vbus {
0174 status = "okay";
0175 };
0176
0177 ®_usb2_vbus {
0178 status = "okay";
0179 };
0180
0181
0182 &uart0 {
0183 pinctrl-names = "default";
0184 pinctrl-0 = <&uart0_pb_pins>;
0185 status = "okay";
0186 };
0187
0188 &usbphy {
0189 usb1_vbus-supply = <®_usb1_vbus>;
0190 usb2_vbus-supply = <®_usb2_vbus>;
0191 status = "okay";
0192 };