1/*
2 * sunxi boards common regulator (ahci target power supply, usb-vbus) code
3 *
4 * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
5 *
6 * The code contained herein is licensed under the GNU General Public
7 * License. You may obtain a copy of the GNU General Public License
8 * Version 2 or later at the following locations:
9 *
10 * http://www.opensource.org/licenses/gpl-license.html
11 * http://www.gnu.org/copyleft/gpl.html
12 */
13
14/ {
15	soc@01c00000 {
16		pio: pinctrl@01c20800 {
17			ahci_pwr_pin_a: ahci_pwr_pin@0 {
18				allwinner,pins = "PB8";
19				allwinner,function = "gpio_out";
20				allwinner,drive = <0>;
21				allwinner,pull = <0>;
22			};
23
24			usb1_vbus_pin_a: usb1_vbus_pin@0 {
25				allwinner,pins = "PH6";
26				allwinner,function = "gpio_out";
27				allwinner,drive = <0>;
28				allwinner,pull = <0>;
29			};
30
31			usb2_vbus_pin_a: usb2_vbus_pin@0 {
32				allwinner,pins = "PH3";
33				allwinner,function = "gpio_out";
34				allwinner,drive = <0>;
35				allwinner,pull = <0>;
36			};
37		};
38	};
39
40	reg_ahci_5v: ahci-5v {
41		compatible = "regulator-fixed";
42		pinctrl-names = "default";
43		pinctrl-0 = <&ahci_pwr_pin_a>;
44		regulator-name = "ahci-5v";
45		regulator-min-microvolt = <5000000>;
46		regulator-max-microvolt = <5000000>;
47		enable-active-high;
48		gpio = <&pio 1 8 0>;
49		status = "disabled";
50	};
51
52	reg_usb1_vbus: usb1-vbus {
53		compatible = "regulator-fixed";
54		pinctrl-names = "default";
55		pinctrl-0 = <&usb1_vbus_pin_a>;
56		regulator-name = "usb1-vbus";
57		regulator-min-microvolt = <5000000>;
58		regulator-max-microvolt = <5000000>;
59		enable-active-high;
60		gpio = <&pio 7 6 0>;
61		status = "disabled";
62	};
63
64	reg_usb2_vbus: usb2-vbus {
65		compatible = "regulator-fixed";
66		pinctrl-names = "default";
67		pinctrl-0 = <&usb2_vbus_pin_a>;
68		regulator-name = "usb2-vbus";
69		regulator-min-microvolt = <5000000>;
70		regulator-max-microvolt = <5000000>;
71		enable-active-high;
72		gpio = <&pio 7 3 0>;
73		status = "disabled";
74	};
75
76	reg_vcc3v0: vcc3v0 {
77		compatible = "regulator-fixed";
78		regulator-name = "vcc3v0";
79		regulator-min-microvolt = <3000000>;
80		regulator-max-microvolt = <3000000>;
81	};
82
83	reg_vcc3v3: vcc3v3 {
84		compatible = "regulator-fixed";
85		regulator-name = "vcc3v3";
86		regulator-min-microvolt = <3300000>;
87		regulator-max-microvolt = <3300000>;
88	};
89};
90