0001 /*
0002 * sunxi boards common regulator (ahci target power supply, usb-vbus) code
0003 *
0004 * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
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 #include <dt-bindings/gpio/gpio.h>
0046
0047 / {
0048 reg_ahci_5v: ahci-5v {
0049 compatible = "regulator-fixed";
0050 regulator-name = "ahci-5v";
0051 regulator-min-microvolt = <5000000>;
0052 regulator-max-microvolt = <5000000>;
0053 regulator-boot-on;
0054 enable-active-high;
0055 gpio = <&pio 1 8 GPIO_ACTIVE_HIGH>;
0056 status = "disabled";
0057 };
0058
0059 reg_usb0_vbus: usb0-vbus {
0060 compatible = "regulator-fixed";
0061 regulator-name = "usb0-vbus";
0062 regulator-min-microvolt = <5000000>;
0063 regulator-max-microvolt = <5000000>;
0064 enable-active-high;
0065 gpio = <&pio 1 9 GPIO_ACTIVE_HIGH>;
0066 status = "disabled";
0067 };
0068
0069 reg_usb1_vbus: usb1-vbus {
0070 compatible = "regulator-fixed";
0071 regulator-name = "usb1-vbus";
0072 regulator-min-microvolt = <5000000>;
0073 regulator-max-microvolt = <5000000>;
0074 regulator-boot-on;
0075 enable-active-high;
0076 gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>;
0077 status = "disabled";
0078 };
0079
0080 reg_usb2_vbus: usb2-vbus {
0081 compatible = "regulator-fixed";
0082 regulator-name = "usb2-vbus";
0083 regulator-min-microvolt = <5000000>;
0084 regulator-max-microvolt = <5000000>;
0085 regulator-boot-on;
0086 enable-active-high;
0087 gpio = <&pio 7 3 GPIO_ACTIVE_HIGH>;
0088 status = "disabled";
0089 };
0090
0091 reg_vcc3v0: vcc3v0 {
0092 compatible = "regulator-fixed";
0093 regulator-name = "vcc3v0";
0094 regulator-min-microvolt = <3000000>;
0095 regulator-max-microvolt = <3000000>;
0096 };
0097
0098 reg_vcc3v3: vcc3v3 {
0099 compatible = "regulator-fixed";
0100 regulator-name = "vcc3v3";
0101 regulator-min-microvolt = <3300000>;
0102 regulator-max-microvolt = <3300000>;
0103 };
0104
0105 reg_vcc5v0: vcc5v0 {
0106 compatible = "regulator-fixed";
0107 regulator-name = "vcc5v0";
0108 regulator-min-microvolt = <5000000>;
0109 regulator-max-microvolt = <5000000>;
0110 };
0111 };