aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2012-11-17 09:46:11 -0500
committerJason Cooper <jason@lakedaemon.net>2012-11-23 21:56:58 -0500
commit5c2734a30c0838c9ba9b6b95fb18533cea3c1a5a (patch)
tree29524f082db3ad25a1764994dba907120c1f850a
parentc7064a05bdbf9d542b3aa9d4439d30c624967b66 (diff)
ARM: Kirkwood: Convert DNSKW to use regulators
Control the power to SATA0 and SATA1 using a fixed regulator. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Jamie Lentin <jm@lentin.co.uk> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/boot/dts/kirkwood-dnskw.dtsi29
-rw-r--r--arch/arm/mach-kirkwood/board-dnskw.c4
2 files changed, 29 insertions, 4 deletions
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
index 28263a1171ab..d11054f538de 100644
--- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi
+++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
@@ -82,4 +82,33 @@
82 }; 82 };
83 }; 83 };
84 }; 84 };
85
86 regulators {
87 compatible = "simple-bus";
88 #address-cells = <1>;
89 #size-cells = <0>;
90
91 sata0_power: regulator@1 {
92 compatible = "regulator-fixed";
93 reg = <1>;
94 regulator-name = "SATA0 Power";
95 regulator-min-microvolt = <5000000>;
96 regulator-max-microvolt = <5000000>;
97 enable-active-high;
98 regulator-always-on;
99 regulator-boot-on;
100 gpio = <&gpio1 7 0>;
101 };
102 sata1_power: regulator@2 {
103 compatible = "regulator-fixed";
104 reg = <2>;
105 regulator-name = "SATA1 Power";
106 regulator-min-microvolt = <5000000>;
107 regulator-max-microvolt = <5000000>;
108 enable-active-high;
109 regulator-always-on;
110 regulator-boot-on;
111 gpio = <&gpio1 8 0>;
112 };
113 };
85}; 114};
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index 903680182453..6c4028c9c3b7 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -75,10 +75,6 @@ void __init dnskw_init(void)
75 75
76 kirkwood_ge00_init(&dnskw_ge00_data); 76 kirkwood_ge00_init(&dnskw_ge00_data);
77 77
78 /* Ensure power is supplied to both HDDs */
79 dnskw_gpio_register(39, "dnskw:power:sata0", 1);
80 dnskw_gpio_register(40, "dnskw:power:sata1", 1);
81
82 /* Set NAS to turn back on after a power failure */ 78 /* Set NAS to turn back on after a power failure */
83 dnskw_gpio_register(37, "dnskw:power:recover", 1); 79 dnskw_gpio_register(37, "dnskw:power:recover", 1);
84} 80}