aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2012-11-17 09:46:14 -0500
committerJason Cooper <jason@lakedaemon.net>2012-11-23 21:57:10 -0500
commit423b89595de34f81061d106c34cfca58cde497da (patch)
treef4384e66e83c371309f3def4d04c3ae60ab98e6b
parent280b348d9157b77cceb1aafd6b0e9ac6eb6c3b44 (diff)
ARM: Kirkwood: Convert LSXL to use regulators
Control the power to USB and HDD using a fixed regulator. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Michael Walle <michael@walle.cc> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/boot/dts/kirkwood-lsxl.dtsi29
-rw-r--r--arch/arm/mach-kirkwood/board-lsxl.c8
2 files changed, 29 insertions, 8 deletions
diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
index 798e60eeedf3..32d302ed2ed0 100644
--- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
+++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
@@ -105,4 +105,33 @@
105 5000 0>; 105 5000 0>;
106 alarm-gpios = <&gpio1 8 0>; 106 alarm-gpios = <&gpio1 8 0>;
107 }; 107 };
108
109 regulators {
110 compatible = "simple-bus";
111 #address-cells = <1>;
112 #size-cells = <0>;
113
114 usb_power: regulator@1 {
115 compatible = "regulator-fixed";
116 reg = <1>;
117 regulator-name = "USB Power";
118 regulator-min-microvolt = <5000000>;
119 regulator-max-microvolt = <5000000>;
120 enable-active-high;
121 regulator-always-on;
122 regulator-boot-on;
123 gpio = <&gpio0 11 0>;
124 };
125 hdd_power: regulator@2 {
126 compatible = "regulator-fixed";
127 reg = <2>;
128 regulator-name = "HDD Power";
129 regulator-min-microvolt = <5000000>;
130 regulator-max-microvolt = <5000000>;
131 enable-active-high;
132 regulator-always-on;
133 regulator-boot-on;
134 gpio = <&gpio0 10 0>;
135 };
136 };
108}; 137};
diff --git a/arch/arm/mach-kirkwood/board-lsxl.c b/arch/arm/mach-kirkwood/board-lsxl.c
index b6fbdaac3843..f780e2e0c5dc 100644
--- a/arch/arm/mach-kirkwood/board-lsxl.c
+++ b/arch/arm/mach-kirkwood/board-lsxl.c
@@ -19,7 +19,6 @@
19#include <linux/spi/flash.h> 19#include <linux/spi/flash.h>
20#include <linux/spi/spi.h> 20#include <linux/spi/spi.h>
21#include <linux/mv643xx_eth.h> 21#include <linux/mv643xx_eth.h>
22#include <linux/gpio.h>
23#include "common.h" 22#include "common.h"
24#include "mpp.h" 23#include "mpp.h"
25 24
@@ -61,9 +60,6 @@ static void lsxl_power_off(void)
61 kirkwood_restart('h', NULL); 60 kirkwood_restart('h', NULL);
62} 61}
63 62
64#define LSXL_GPIO_HDD_POWER 10
65#define LSXL_GPIO_USB_POWER 11
66
67void __init lsxl_init(void) 63void __init lsxl_init(void)
68{ 64{
69 /* 65 /*
@@ -71,10 +67,6 @@ void __init lsxl_init(void)
71 */ 67 */
72 kirkwood_mpp_conf(lsxl_mpp_config); 68 kirkwood_mpp_conf(lsxl_mpp_config);
73 69
74 /* usb and sata power on */
75 gpio_set_value(LSXL_GPIO_USB_POWER, 1);
76 gpio_set_value(LSXL_GPIO_HDD_POWER, 1);
77
78 kirkwood_ge00_init(&lsxl_ge00_data); 70 kirkwood_ge00_init(&lsxl_ge00_data);
79 kirkwood_ge01_init(&lsxl_ge01_data); 71 kirkwood_ge01_init(&lsxl_ge01_data);
80 72