0001 /*
0002 * Copyright 2014 Chen-Yu Tsai <wens@csie.org>
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
0047 #include <dt-bindings/gpio/gpio.h>
0048 #include <dt-bindings/input/input.h>
0049
0050 / {
0051 model = "HSG H702";
0052 compatible = "hsg,h702", "allwinner,sun5i-a13";
0053
0054 aliases {
0055 serial0 = &uart1;
0056 };
0057
0058 chosen {
0059 stdout-path = "serial0:115200n8";
0060 };
0061 };
0062
0063 &cpu0 {
0064 cpu-supply = <®_dcdc2>;
0065 };
0066
0067 &ehci0 {
0068 status = "okay";
0069 };
0070
0071 &i2c0 {
0072 status = "okay";
0073
0074 axp209: pmic@34 {
0075 reg = <0x34>;
0076 interrupts = <0>;
0077 };
0078 };
0079
0080 &i2c1 {
0081 status = "okay";
0082
0083 pcf8563: rtc@51 {
0084 compatible = "nxp,pcf8563";
0085 reg = <0x51>;
0086 };
0087 };
0088
0089 &i2c2 {
0090 status = "okay";
0091 };
0092
0093 &lradc {
0094 vref-supply = <®_ldo2>;
0095 status = "okay";
0096
0097 button-200 {
0098 label = "Volume Up";
0099 linux,code = <KEY_VOLUMEUP>;
0100 channel = <0>;
0101 voltage = <200000>;
0102 };
0103
0104 button-400 {
0105 label = "Volume Down";
0106 linux,code = <KEY_VOLUMEDOWN>;
0107 channel = <0>;
0108 voltage = <400000>;
0109 };
0110 };
0111
0112 &mmc0 {
0113 vmmc-supply = <®_vcc3v3>;
0114 bus-width = <4>;
0115 cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
0116 status = "okay";
0117 };
0118
0119 &ohci0 {
0120 status = "okay";
0121 };
0122
0123 &otg_sram {
0124 status = "okay";
0125 };
0126
0127 #include "axp209.dtsi"
0128
0129 ®_dcdc2 {
0130 regulator-always-on;
0131 regulator-min-microvolt = <1000000>;
0132 regulator-max-microvolt = <1500000>;
0133 regulator-name = "vdd-cpu";
0134 };
0135
0136 ®_dcdc3 {
0137 regulator-always-on;
0138 regulator-min-microvolt = <1000000>;
0139 regulator-max-microvolt = <1400000>;
0140 regulator-name = "vdd-int-dll";
0141 };
0142
0143 ®_ldo1 {
0144 regulator-name = "vdd-rtc";
0145 };
0146
0147 ®_ldo2 {
0148 regulator-always-on;
0149 regulator-min-microvolt = <3000000>;
0150 regulator-max-microvolt = <3000000>;
0151 regulator-name = "avcc";
0152 };
0153
0154 ®_ldo3 {
0155 regulator-min-microvolt = <3300000>;
0156 regulator-max-microvolt = <3300000>;
0157 regulator-name = "vcc-wifi";
0158 };
0159
0160 ®_usb0_vbus {
0161 gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
0162 status = "okay";
0163 };
0164
0165 &uart1 {
0166 pinctrl-names = "default";
0167 pinctrl-0 = <&uart1_pg_pins>;
0168 status = "okay";
0169 };
0170
0171 &usb_otg {
0172 dr_mode = "otg";
0173 status = "okay";
0174 };
0175
0176 &usbphy {
0177 usb0_id_det-gpios = <&pio 6 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG2 */
0178 usb0_vbus_det-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
0179 usb0_vbus-supply = <®_usb0_vbus>;
0180 usb1_vbus-supply = <®_ldo3>;
0181 status = "okay";
0182 };