0001 /*
0002 * Copyright 2016 Icenowy Zheng <icenowy@aosc.xyz>
0003 *
0004 * Based on sun5i-a13-olinuxino.dts, which is
0005 * Copyright 2012 Maxime Ripard <maxime.ripard@free-electrons.com>
0006 * Copyright 2013 Hans de Goede <hdegoede@redhat.com>
0007 *
0008 * This file is dual-licensed: you can use it either under the terms
0009 * of the GPL or the X11 license, at your option. Note that this dual
0010 * licensing only applies to this file, and not this project as a
0011 * whole.
0012 *
0013 * a) This file is free software; you can redistribute it and/or
0014 * modify it under the terms of the GNU General Public License as
0015 * published by the Free Software Foundation; either version 2 of the
0016 * License, or (at your option) any later version.
0017 *
0018 * This file is distributed in the hope that it will be useful,
0019 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0021 * GNU General Public License for more details.
0022 *
0023 * Or, alternatively,
0024 *
0025 * b) Permission is hereby granted, free of charge, to any person
0026 * obtaining a copy of this software and associated documentation
0027 * files (the "Software"), to deal in the Software without
0028 * restriction, including without limitation the rights to use,
0029 * copy, modify, merge, publish, distribute, sublicense, and/or
0030 * sell copies of the Software, and to permit persons to whom the
0031 * Software is furnished to do so, subject to the following
0032 * conditions:
0033 *
0034 * The above copyright notice and this permission notice shall be
0035 * included in all copies or substantial portions of the Software.
0036 *
0037 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0038 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0039 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0040 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0041 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0042 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0043 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0044 * OTHER DEALINGS IN THE SOFTWARE.
0045 */
0046
0047 /dts-v1/;
0048 #include "sun5i-a13.dtsi"
0049 #include "sunxi-common-regulators.dtsi"
0050
0051 #include <dt-bindings/gpio/gpio.h>
0052 #include <dt-bindings/input/input.h>
0053
0054 / {
0055 model = "Lichee Pi One";
0056 compatible = "licheepi,licheepi-one", "allwinner,sun5i-a13";
0057
0058 aliases {
0059 serial0 = &uart1;
0060 };
0061
0062 chosen {
0063 stdout-path = "serial0:115200n8";
0064 };
0065
0066 leds {
0067 compatible = "gpio-leds";
0068
0069 led-0 {
0070 label = "licheepi:red:usr";
0071 gpios = <&pio 2 5 GPIO_ACTIVE_LOW>;
0072 };
0073
0074 led-1 {
0075 label = "licheepi:green:usr";
0076 gpios = <&pio 2 19 GPIO_ACTIVE_LOW>;
0077 default-state = "on";
0078 };
0079
0080 led-2 {
0081 label = "licheepi:blue:usr";
0082 gpios = <&pio 2 4 GPIO_ACTIVE_LOW>;
0083 };
0084
0085 };
0086 };
0087
0088 &cpu0 {
0089 cpu-supply = <®_dcdc2>;
0090 };
0091
0092 &ehci0 {
0093 status = "okay";
0094 };
0095
0096 &i2c0 {
0097 status = "okay";
0098
0099 axp209: pmic@34 {
0100 compatible = "x-powers,axp209";
0101 reg = <0x34>;
0102 interrupts = <0>;
0103
0104 interrupt-controller;
0105 #interrupt-cells = <1>;
0106 };
0107 };
0108
0109 &i2c1 {
0110 status = "disabled";
0111 };
0112
0113 &i2c2 {
0114 status = "disabled";
0115 };
0116
0117 &lradc {
0118 vref-supply = <®_ldo2>;
0119 status = "okay";
0120
0121 button-984 {
0122 label = "Home";
0123 linux,code = <KEY_HOMEPAGE>;
0124 channel = <0>;
0125 voltage = <984126>;
0126 };
0127 };
0128
0129 &mmc0 {
0130 vmmc-supply = <®_vcc3v3>;
0131 bus-width = <4>;
0132 broken-cd;
0133 status = "okay";
0134 };
0135
0136 &mmc2 {
0137 pinctrl-names = "default";
0138 pinctrl-0 = <&mmc2_4bit_pc_pins>;
0139 vmmc-supply = <®_vcc3v3>;
0140 bus-width = <4>;
0141 broken-cd;
0142 status = "okay";
0143 };
0144
0145 &ohci0 {
0146 status = "okay";
0147 };
0148
0149 &otg_sram {
0150 status = "okay";
0151 };
0152
0153 #include "axp209.dtsi"
0154
0155 ®_dcdc2 {
0156 regulator-always-on;
0157 regulator-min-microvolt = <1000000>;
0158 regulator-max-microvolt = <1500000>;
0159 regulator-name = "vdd-cpu";
0160 };
0161
0162 ®_dcdc3 {
0163 regulator-always-on;
0164 regulator-min-microvolt = <1000000>;
0165 regulator-max-microvolt = <1400000>;
0166 regulator-name = "vdd-int-dll";
0167 };
0168
0169 ®_ldo1 {
0170 regulator-name = "vdd-rtc";
0171 };
0172
0173 ®_ldo2 {
0174 regulator-always-on;
0175 regulator-min-microvolt = <3000000>;
0176 regulator-max-microvolt = <3000000>;
0177 regulator-name = "avcc";
0178 };
0179
0180 ®_ldo3 {
0181 regulator-min-microvolt = <1800000>;
0182 regulator-max-microvolt = <1800000>;
0183 regulator-name = "csi-1.8v";
0184 };
0185
0186 ®_ldo4 {
0187 regulator-min-microvolt = <2800000>;
0188 regulator-max-microvolt = <2800000>;
0189 regulator-name = "csi-2.8v";
0190 };
0191
0192 ®_usb0_vbus {
0193 gpio = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
0194 status = "okay";
0195 };
0196
0197 &uart1 {
0198 pinctrl-names = "default";
0199 pinctrl-0 = <&uart1_pg_pins>;
0200 status = "okay";
0201 };
0202
0203 &usb_otg {
0204 dr_mode = "otg";
0205 status = "okay";
0206 };
0207
0208 &usbphy {
0209 usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
0210 usb0_vbus_det-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
0211 usb0_vbus-supply = <®_usb0_vbus>;
0212 usb1_vbus-supply = <®_vcc5v0>;
0213 status = "okay";
0214 };