ARM: dts: Configure regulators for suspend on exynos Peach boards

The regulator core now has support to choose if a regulator
has to be enabled or disabled during system suspend and also
supports changing the regulator operating mode during runtime
and when the system enters into sleep mode.

To lower power during suspend, configure the regulators state
using the same configuration found in the ChromeOS 3.8 kernel

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
This commit is contained in:
Javier Martinez Canillas 2015-01-15 00:30:49 +09:00 committed by Kukjin Kim
parent ae845476b2
commit 23c76dc666
2 changed files with 162 additions and 0 deletions

View file

@ -13,6 +13,7 @@
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/maxim,max77802.h> #include <dt-bindings/clock/maxim,max77802.h>
#include <dt-bindings/regulator/maxim,max77802.h>
#include "exynos5420.dtsi" #include "exynos5420.dtsi"
/ { / {
@ -201,6 +202,9 @@ buck1_reg: BUCK1 {
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-ramp-delay = <12500>; regulator-ramp-delay = <12500>;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck2_reg: BUCK2 { buck2_reg: BUCK2 {
@ -210,6 +214,9 @@ buck2_reg: BUCK2 {
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-ramp-delay = <12500>; regulator-ramp-delay = <12500>;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck3_reg: BUCK3 { buck3_reg: BUCK3 {
@ -219,6 +226,9 @@ buck3_reg: BUCK3 {
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-ramp-delay = <12500>; regulator-ramp-delay = <12500>;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck4_reg: BUCK4 { buck4_reg: BUCK4 {
@ -228,6 +238,9 @@ buck4_reg: BUCK4 {
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-ramp-delay = <12500>; regulator-ramp-delay = <12500>;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck5_reg: BUCK5 { buck5_reg: BUCK5 {
@ -236,6 +249,9 @@ buck5_reg: BUCK5 {
regulator-max-microvolt = <1200000>; regulator-max-microvolt = <1200000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck6_reg: BUCK6 { buck6_reg: BUCK6 {
@ -245,6 +261,9 @@ buck6_reg: BUCK6 {
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-ramp-delay = <12500>; regulator-ramp-delay = <12500>;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck7_reg: BUCK7 { buck7_reg: BUCK7 {
@ -253,6 +272,9 @@ buck7_reg: BUCK7 {
regulator-max-microvolt = <1350000>; regulator-max-microvolt = <1350000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem {
regulator-on-in-suspend;
};
}; };
buck8_reg: BUCK8 { buck8_reg: BUCK8 {
@ -261,6 +283,9 @@ buck8_reg: BUCK8 {
regulator-max-microvolt = <2850000>; regulator-max-microvolt = <2850000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck9_reg: BUCK9 { buck9_reg: BUCK9 {
@ -269,6 +294,9 @@ buck9_reg: BUCK9 {
regulator-max-microvolt = <2000000>; regulator-max-microvolt = <2000000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem {
regulator-on-in-suspend;
};
}; };
buck10_reg: BUCK10 { buck10_reg: BUCK10 {
@ -277,6 +305,9 @@ buck10_reg: BUCK10 {
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem {
regulator-on-in-suspend;
};
}; };
ldo1_reg: LDO1 { ldo1_reg: LDO1 {
@ -284,6 +315,10 @@ ldo1_reg: LDO1 {
regulator-min-microvolt = <1000000>; regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>; regulator-max-microvolt = <1000000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-on-in-suspend;
regulator-mode = <MAX77802_OPMODE_LP>;
};
}; };
ldo2_reg: LDO2 { ldo2_reg: LDO2 {
@ -297,6 +332,10 @@ ldo3_reg: LDO3 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-on-in-suspend;
regulator-mode = <MAX77802_OPMODE_LP>;
};
}; };
vqmmc_sdcard: ldo4_reg: LDO4 { vqmmc_sdcard: ldo4_reg: LDO4 {
@ -304,6 +343,9 @@ vqmmc_sdcard: ldo4_reg: LDO4 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo5_reg: LDO5 { ldo5_reg: LDO5 {
@ -311,6 +353,9 @@ ldo5_reg: LDO5 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo6_reg: LDO6 { ldo6_reg: LDO6 {
@ -318,6 +363,9 @@ ldo6_reg: LDO6 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo7_reg: LDO7 { ldo7_reg: LDO7 {
@ -331,6 +379,9 @@ ldo8_reg: LDO8 {
regulator-min-microvolt = <1000000>; regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>; regulator-max-microvolt = <1000000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo9_reg: LDO9 { ldo9_reg: LDO9 {
@ -338,6 +389,10 @@ ldo9_reg: LDO9 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-on-in-suspend;
regulator-mode = <MAX77802_OPMODE_LP>;
};
}; };
ldo10_reg: LDO10 { ldo10_reg: LDO10 {
@ -345,6 +400,9 @@ ldo10_reg: LDO10 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo11_reg: LDO11 { ldo11_reg: LDO11 {
@ -352,6 +410,10 @@ ldo11_reg: LDO11 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-on-in-suspend;
regulator-mode = <MAX77802_OPMODE_LP>;
};
}; };
ldo12_reg: LDO12 { ldo12_reg: LDO12 {
@ -359,6 +421,9 @@ ldo12_reg: LDO12 {
regulator-min-microvolt = <3000000>; regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>; regulator-max-microvolt = <3000000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo13_reg: LDO13 { ldo13_reg: LDO13 {
@ -366,6 +431,10 @@ ldo13_reg: LDO13 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-on-in-suspend;
regulator-mode = <MAX77802_OPMODE_LP>;
};
}; };
ldo14_reg: LDO14 { ldo14_reg: LDO14 {
@ -373,6 +442,9 @@ ldo14_reg: LDO14 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo15_reg: LDO15 { ldo15_reg: LDO15 {
@ -380,6 +452,9 @@ ldo15_reg: LDO15 {
regulator-min-microvolt = <1000000>; regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>; regulator-max-microvolt = <1000000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo17_reg: LDO17 { ldo17_reg: LDO17 {
@ -387,6 +462,9 @@ ldo17_reg: LDO17 {
regulator-min-microvolt = <900000>; regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1400000>; regulator-max-microvolt = <1400000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo18_reg: LDO18 { ldo18_reg: LDO18 {
@ -460,6 +538,9 @@ ldo30_reg: LDO30 {
regulator-min-microvolt = <1000000>; regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>; regulator-max-microvolt = <1000000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo32_reg: LDO32 { ldo32_reg: LDO32 {

View file

@ -13,6 +13,7 @@
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/maxim,max77802.h> #include <dt-bindings/clock/maxim,max77802.h>
#include <dt-bindings/regulator/maxim,max77802.h>
#include "exynos5800.dtsi" #include "exynos5800.dtsi"
/ { / {
@ -201,6 +202,9 @@ buck1_reg: BUCK1 {
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-ramp-delay = <12500>; regulator-ramp-delay = <12500>;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck2_reg: BUCK2 { buck2_reg: BUCK2 {
@ -210,6 +214,9 @@ buck2_reg: BUCK2 {
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-ramp-delay = <12500>; regulator-ramp-delay = <12500>;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck3_reg: BUCK3 { buck3_reg: BUCK3 {
@ -219,6 +226,9 @@ buck3_reg: BUCK3 {
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-ramp-delay = <12500>; regulator-ramp-delay = <12500>;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck4_reg: BUCK4 { buck4_reg: BUCK4 {
@ -228,6 +238,9 @@ buck4_reg: BUCK4 {
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-ramp-delay = <12500>; regulator-ramp-delay = <12500>;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck5_reg: BUCK5 { buck5_reg: BUCK5 {
@ -236,6 +249,9 @@ buck5_reg: BUCK5 {
regulator-max-microvolt = <1200000>; regulator-max-microvolt = <1200000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck6_reg: BUCK6 { buck6_reg: BUCK6 {
@ -245,6 +261,9 @@ buck6_reg: BUCK6 {
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-ramp-delay = <12500>; regulator-ramp-delay = <12500>;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck7_reg: BUCK7 { buck7_reg: BUCK7 {
@ -253,6 +272,9 @@ buck7_reg: BUCK7 {
regulator-max-microvolt = <1350000>; regulator-max-microvolt = <1350000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem {
regulator-on-in-suspend;
};
}; };
buck8_reg: BUCK8 { buck8_reg: BUCK8 {
@ -261,6 +283,9 @@ buck8_reg: BUCK8 {
regulator-max-microvolt = <2850000>; regulator-max-microvolt = <2850000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
buck9_reg: BUCK9 { buck9_reg: BUCK9 {
@ -269,6 +294,9 @@ buck9_reg: BUCK9 {
regulator-max-microvolt = <2000000>; regulator-max-microvolt = <2000000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem {
regulator-on-in-suspend;
};
}; };
buck10_reg: BUCK10 { buck10_reg: BUCK10 {
@ -277,6 +305,9 @@ buck10_reg: BUCK10 {
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem {
regulator-on-in-suspend;
};
}; };
ldo1_reg: LDO1 { ldo1_reg: LDO1 {
@ -284,6 +315,10 @@ ldo1_reg: LDO1 {
regulator-min-microvolt = <1000000>; regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>; regulator-max-microvolt = <1000000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-on-in-suspend;
regulator-mode = <MAX77802_OPMODE_LP>;
};
}; };
ldo2_reg: LDO2 { ldo2_reg: LDO2 {
@ -297,6 +332,10 @@ ldo3_reg: LDO3 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-on-in-suspend;
regulator-mode = <MAX77802_OPMODE_LP>;
};
}; };
vqmmc_sdcard: ldo4_reg: LDO4 { vqmmc_sdcard: ldo4_reg: LDO4 {
@ -304,6 +343,9 @@ vqmmc_sdcard: ldo4_reg: LDO4 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo5_reg: LDO5 { ldo5_reg: LDO5 {
@ -311,6 +353,9 @@ ldo5_reg: LDO5 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo6_reg: LDO6 { ldo6_reg: LDO6 {
@ -318,6 +363,9 @@ ldo6_reg: LDO6 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo7_reg: LDO7 { ldo7_reg: LDO7 {
@ -331,6 +379,9 @@ ldo8_reg: LDO8 {
regulator-min-microvolt = <1000000>; regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>; regulator-max-microvolt = <1000000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo9_reg: LDO9 { ldo9_reg: LDO9 {
@ -338,6 +389,10 @@ ldo9_reg: LDO9 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-on-in-suspend;
regulator-mode = <MAX77802_OPMODE_LP>;
};
}; };
ldo10_reg: LDO10 { ldo10_reg: LDO10 {
@ -345,6 +400,9 @@ ldo10_reg: LDO10 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo11_reg: LDO11 { ldo11_reg: LDO11 {
@ -352,6 +410,10 @@ ldo11_reg: LDO11 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-on-in-suspend;
regulator-mode = <MAX77802_OPMODE_LP>;
};
}; };
ldo12_reg: LDO12 { ldo12_reg: LDO12 {
@ -359,6 +421,9 @@ ldo12_reg: LDO12 {
regulator-min-microvolt = <3000000>; regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>; regulator-max-microvolt = <3000000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo13_reg: LDO13 { ldo13_reg: LDO13 {
@ -366,6 +431,10 @@ ldo13_reg: LDO13 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-on-in-suspend;
regulator-mode = <MAX77802_OPMODE_LP>;
};
}; };
ldo14_reg: LDO14 { ldo14_reg: LDO14 {
@ -373,6 +442,9 @@ ldo14_reg: LDO14 {
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo15_reg: LDO15 { ldo15_reg: LDO15 {
@ -380,6 +452,9 @@ ldo15_reg: LDO15 {
regulator-min-microvolt = <1000000>; regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>; regulator-max-microvolt = <1000000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo17_reg: LDO17 { ldo17_reg: LDO17 {
@ -387,6 +462,9 @@ ldo17_reg: LDO17 {
regulator-min-microvolt = <900000>; regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1400000>; regulator-max-microvolt = <1400000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo18_reg: LDO18 { ldo18_reg: LDO18 {
@ -460,6 +538,9 @@ ldo30_reg: LDO30 {
regulator-min-microvolt = <1000000>; regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>; regulator-max-microvolt = <1000000>;
regulator-always-on; regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
}; };
ldo32_reg: LDO32 { ldo32_reg: LDO32 {