]>
Commit | Line | Data |
---|---|---|
38b7da6f GKH |
1 | From daebabd578647440d41fc9b48d8c7a88dc2f7ab5 Mon Sep 17 00:00:00 2001 |
2 | From: Tony Lindgren <tony@atomide.com> | |
3 | Date: Tue, 19 Aug 2014 08:24:05 -0700 | |
4 | Subject: mfd: twl4030-power: Fix PM idle pin configuration to not conflict with regulators | |
5 | ||
6 | From: Tony Lindgren <tony@atomide.com> | |
7 | ||
8 | commit daebabd578647440d41fc9b48d8c7a88dc2f7ab5 upstream. | |
9 | ||
10 | Commit 43fef47f94a1 (mfd: twl4030-power: Add a configuration to turn | |
11 | off oscillator during off-idle) added support for configuring the PMIC | |
12 | to cut off resources during deeper idle states to save power. | |
13 | ||
14 | This however caused regression for n900 display power that needed the | |
15 | PMIC configuration to be disabled with commit d937678ab625 (ARM: dts: | |
16 | Revert enabling of twl configuration for n900). | |
17 | ||
18 | Turns out the root cause of the problem is that we must use | |
19 | TWL4030_RESCONFIG_UNDEF instead of DEV_GRP_NULL to avoid disabling | |
20 | regulators that may have been enabled before the init function | |
21 | for twl4030-power.c runs. With TWL4030_RESCONFIG_UNDEF we let the | |
22 | regulator framework control the regulators like it should. Here we | |
23 | need to only configure the sys_clken and sys_off_mode triggers for | |
24 | the regulators that cannot be done by the regulator framework as | |
25 | it's not running at that point. | |
26 | ||
27 | This allows us to enable the PMIC configuration for n900. | |
28 | ||
29 | Fixes: 43fef47f94a1 (mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle) | |
30 | ||
31 | Signed-off-by: Tony Lindgren <tony@atomide.com> | |
32 | Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> | |
33 | Signed-off-by: Lee Jones <lee.jones@linaro.org> | |
34 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
35 | ||
36 | --- | |
37 | arch/arm/boot/dts/omap3-n900.dts | 2 +- | |
38 | drivers/mfd/twl4030-power.c | 20 ++++++++++---------- | |
39 | 2 files changed, 11 insertions(+), 11 deletions(-) | |
40 | ||
41 | --- a/arch/arm/boot/dts/omap3-n900.dts | |
42 | +++ b/arch/arm/boot/dts/omap3-n900.dts | |
43 | @@ -353,7 +353,7 @@ | |
44 | }; | |
45 | ||
46 | twl_power: power { | |
47 | - compatible = "ti,twl4030-power-n900"; | |
48 | + compatible = "ti,twl4030-power-n900", "ti,twl4030-power-idle-osc-off"; | |
49 | ti,use_poweroff; | |
50 | }; | |
51 | }; | |
52 | --- a/drivers/mfd/twl4030-power.c | |
53 | +++ b/drivers/mfd/twl4030-power.c | |
54 | @@ -724,24 +724,24 @@ static struct twl4030_script *omap3_idle | |
55 | * above. | |
56 | */ | |
57 | static struct twl4030_resconfig omap3_idle_rconfig[] = { | |
58 | - TWL_REMAP_SLEEP(RES_VAUX1, DEV_GRP_NULL, 0, 0), | |
59 | - TWL_REMAP_SLEEP(RES_VAUX2, DEV_GRP_NULL, 0, 0), | |
60 | - TWL_REMAP_SLEEP(RES_VAUX3, DEV_GRP_NULL, 0, 0), | |
61 | - TWL_REMAP_SLEEP(RES_VAUX4, DEV_GRP_NULL, 0, 0), | |
62 | - TWL_REMAP_SLEEP(RES_VMMC1, DEV_GRP_NULL, 0, 0), | |
63 | - TWL_REMAP_SLEEP(RES_VMMC2, DEV_GRP_NULL, 0, 0), | |
64 | + TWL_REMAP_SLEEP(RES_VAUX1, TWL4030_RESCONFIG_UNDEF, 0, 0), | |
65 | + TWL_REMAP_SLEEP(RES_VAUX2, TWL4030_RESCONFIG_UNDEF, 0, 0), | |
66 | + TWL_REMAP_SLEEP(RES_VAUX3, TWL4030_RESCONFIG_UNDEF, 0, 0), | |
67 | + TWL_REMAP_SLEEP(RES_VAUX4, TWL4030_RESCONFIG_UNDEF, 0, 0), | |
68 | + TWL_REMAP_SLEEP(RES_VMMC1, TWL4030_RESCONFIG_UNDEF, 0, 0), | |
69 | + TWL_REMAP_SLEEP(RES_VMMC2, TWL4030_RESCONFIG_UNDEF, 0, 0), | |
70 | TWL_REMAP_OFF(RES_VPLL1, DEV_GRP_P1, 3, 1), | |
71 | TWL_REMAP_SLEEP(RES_VPLL2, DEV_GRP_P1, 0, 0), | |
72 | - TWL_REMAP_SLEEP(RES_VSIM, DEV_GRP_NULL, 0, 0), | |
73 | - TWL_REMAP_SLEEP(RES_VDAC, DEV_GRP_NULL, 0, 0), | |
74 | + TWL_REMAP_SLEEP(RES_VSIM, TWL4030_RESCONFIG_UNDEF, 0, 0), | |
75 | + TWL_REMAP_SLEEP(RES_VDAC, TWL4030_RESCONFIG_UNDEF, 0, 0), | |
76 | TWL_REMAP_SLEEP(RES_VINTANA1, TWL_DEV_GRP_P123, 1, 2), | |
77 | TWL_REMAP_SLEEP(RES_VINTANA2, TWL_DEV_GRP_P123, 0, 2), | |
78 | TWL_REMAP_SLEEP(RES_VINTDIG, TWL_DEV_GRP_P123, 1, 2), | |
79 | TWL_REMAP_SLEEP(RES_VIO, TWL_DEV_GRP_P123, 2, 2), | |
80 | TWL_REMAP_OFF(RES_VDD1, DEV_GRP_P1, 4, 1), | |
81 | TWL_REMAP_OFF(RES_VDD2, DEV_GRP_P1, 3, 1), | |
82 | - TWL_REMAP_SLEEP(RES_VUSB_1V5, DEV_GRP_NULL, 0, 0), | |
83 | - TWL_REMAP_SLEEP(RES_VUSB_1V8, DEV_GRP_NULL, 0, 0), | |
84 | + TWL_REMAP_SLEEP(RES_VUSB_1V5, TWL4030_RESCONFIG_UNDEF, 0, 0), | |
85 | + TWL_REMAP_SLEEP(RES_VUSB_1V8, TWL4030_RESCONFIG_UNDEF, 0, 0), | |
86 | TWL_REMAP_SLEEP(RES_VUSB_3V1, TWL_DEV_GRP_P123, 0, 0), | |
87 | /* Resource #20 USB charge pump skipped */ | |
88 | TWL_REMAP_SLEEP(RES_REGEN, TWL_DEV_GRP_P123, 2, 1), |