ARM: Dove: add fixed regulator for CuBox USB power
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Thu, 27 Dec 2012 22:21:59 +0000 (23:21 +0100)
committerArnd Bergmann <arnd@arndb.de>
Thu, 28 Feb 2013 17:57:12 +0000 (18:57 +0100)
CuBox needs to enable USB power on a gpio pin. Add a fixed regulator
to always enable usb power on boot.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/dove-cubox.dts
arch/arm/mach-dove/Kconfig

index bed5b62b73a329b207c0cbaa6b7842983f74ad9a..7e3065abd7512eaccc203feefd60345ac931e7f0 100644 (file)
                        linux,default-trigger = "default-on";
                };
        };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               usb_power: regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       regulator-name = "USB Power";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       enable-active-high;
+                       regulator-always-on;
+                       regulator-boot-on;
+                       gpio = <&gpio0 1 0>;
+               };
+       };
 };
 
 &uart0 { status = "okay"; };
 };
 
 &pinctrl {
-       pinctrl-0 = <&pmx_gpio_12>;
+       pinctrl-0 = <&pmx_gpio_1 &pmx_gpio_12>;
        pinctrl-names = "default";
 
+       pmx_gpio_1: pmx-gpio-1 {
+               marvell,pins = "mpp1";
+               marvell,function = "gpio";
+       };
+
        pmx_gpio_12: pmx-gpio-12 {
                marvell,pins = "mpp12";
                marvell,function = "gpio";
index aedd0baa04bf395e46499cf710e72777e469dc57..36469d813951dc65e76f2e94acb1960706d6d600 100644 (file)
@@ -24,6 +24,8 @@ config MACH_DOVE_DT
        bool "Marvell Dove Flattened Device Tree"
        select MVEBU_CLK_CORE
        select MVEBU_CLK_GATING
+       select REGULATOR
+       select REGULATOR_FIXED_VOLTAGE
        select USE_OF
        help
          Say 'Y' here if you want your kernel to support the