Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2016 Hans de Goede <hdegoede@redhat.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 #include "sunxi-common-regulators.dtsi"
0044 
0045 #include <dt-bindings/gpio/gpio.h>
0046 #include <dt-bindings/input/input.h>
0047 
0048 / {
0049         aliases {
0050                 serial0 = &uart0;
0051         };
0052 
0053         chosen {
0054                 stdout-path = "serial0:115200n8";
0055         };
0056 };
0057 
0058 &cpu0 {
0059         cpu-supply = <&reg_dcdc3>;
0060 };
0061 
0062 &ehci0 {
0063         /* Wifi is connected here */
0064         status = "okay";
0065 };
0066 
0067 &mmc0 {
0068         pinctrl-names = "default";
0069         pinctrl-0 = <&mmc0_pins>;
0070         vmmc-supply = <&reg_dcdc1>;
0071         bus-width = <4>;
0072         cd-gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
0073         status = "okay";
0074 };
0075 
0076 &p2wi {
0077         status = "okay";
0078 
0079         axp22x: pmic@68 {
0080                 compatible = "x-powers,axp221";
0081                 reg = <0x68>;
0082                 interrupt-parent = <&r_intc>;
0083                 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
0084                 drivevbus-supply = <&reg_vcc5v0>;
0085                 x-powers,drive-vbus-en;
0086         };
0087 };
0088 
0089 #include "axp22x.dtsi"
0090 
0091 &reg_aldo3 {
0092         regulator-always-on;
0093         regulator-min-microvolt = <2700000>;
0094         regulator-max-microvolt = <3300000>;
0095         regulator-name = "avcc";
0096 };
0097 
0098 &reg_dc1sw {
0099         regulator-name = "vcc-lcd";
0100 };
0101 
0102 &reg_dc5ldo {
0103         regulator-always-on;
0104         regulator-min-microvolt = <700000>;
0105         regulator-max-microvolt = <1320000>;
0106         regulator-name = "vdd-cpus"; /* This is an educated guess */
0107 };
0108 
0109 &reg_dcdc1 {
0110         regulator-always-on;
0111         regulator-min-microvolt = <3000000>;
0112         regulator-max-microvolt = <3000000>;
0113         regulator-name = "vcc-3v0";
0114 };
0115 
0116 &reg_dcdc2 {
0117         regulator-min-microvolt = <700000>;
0118         regulator-max-microvolt = <1320000>;
0119         regulator-name = "vdd-gpu";
0120 };
0121 
0122 &reg_dcdc3 {
0123         regulator-always-on;
0124         regulator-min-microvolt = <700000>;
0125         regulator-max-microvolt = <1320000>;
0126         regulator-name = "vdd-cpu";
0127 };
0128 
0129 &reg_dcdc4 {
0130         regulator-always-on;
0131         regulator-min-microvolt = <700000>;
0132         regulator-max-microvolt = <1320000>;
0133         regulator-name = "vdd-sys-dll";
0134 };
0135 
0136 &reg_dcdc5 {
0137         regulator-always-on;
0138         regulator-min-microvolt = <1500000>;
0139         regulator-max-microvolt = <1500000>;
0140         regulator-name = "vcc-dram";
0141 };
0142 
0143 &reg_dldo1 {
0144         regulator-min-microvolt = <3300000>;
0145         regulator-max-microvolt = <3300000>;
0146         regulator-name = "vcc-wifi";
0147 };
0148 
0149 &reg_drivevbus {
0150         regulator-name = "usb0-vbus";
0151         status = "okay";
0152 };
0153 
0154 &simplefb_lcd {
0155         vcc-lcd-supply = <&reg_dc1sw>;
0156 };
0157 
0158 &usb_otg {
0159         dr_mode = "otg";
0160         status = "okay";
0161 };
0162 
0163 &usb_power_supply {
0164         status = "okay";
0165 };
0166 
0167 &usbphy {
0168         usb0_id_det-gpios = <&pio 0 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PA15 */
0169         usb0_vbus_power-supply = <&usb_power_supply>;
0170         usb0_vbus-supply = <&reg_drivevbus>;
0171         usb1_vbus-supply = <&reg_dldo1>;
0172         status = "okay";
0173 };