ARM: dts: exynos: Fix regulators configuration on Peach Pi/Pit Chromebooks

Message ID 20180810080919eucas1p2bb23af2e77cec919ea4fedf5d7060a2c~Jd4SboJkM2411624116eucas1p2n@eucas1p2.samsung.com
State New
Headers show
Series
  • ARM: dts: exynos: Fix regulators configuration on Peach Pi/Pit Chromebooks
Related show

Commit Message

Marek Szyprowski Aug. 10, 2018, 8:04 a.m.
Regulators, which are marked as 'on-in-suspend' seems to be critical for
board operation, thus they must not be disabled anytime. This can be
only assured by marking them as 'always-on', because otherwise some
actions of their clients might result in turning them off. This patch
restores suspend/resume operation on Peach-Pit Chromebook board. It
partially reverts 'always-on' property removal done by the commit
mentioned in the Fixes tag.

Fixes: 665c441eea3d ("ARM: dts: exynos: Remove unneded always-on for regulators on Peach boards")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

---
This partial revert restores suspend/resume operation on Linux v4.7
release. To make suspend/resume working on current linux-next (tested
on next-20180806), one has to additionally revert following commits:

925ffff2ea8b "Input: cros_ec_keyb - remove check before calling pm_wakeup_event"
38ba34a43dbc "Input: cros_ec_keyb - mark cros_ec_keyb driver as wake enabled device."
47b7de2f6c18 "mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs"
2695578b896a "net: usbnet: fix potential deadlock on 32bit hosts"

I'm investigating those issues and separate reports/fixes will be
posted for them.

Best regards
Marek Szyprowski
---
 arch/arm/boot/dts/exynos5420-peach-pit.dts | 3 +++
 arch/arm/boot/dts/exynos5800-peach-pi.dts  | 3 +++
 2 files changed, 6 insertions(+)

-- 
2.17.1

Comments

Krzysztof Kozlowski Aug. 10, 2018, 11:39 a.m. | #1
On 10 August 2018 at 10:04, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> Regulators, which are marked as 'on-in-suspend' seems to be critical for

> board operation, thus they must not be disabled anytime. This can be

> only assured by marking them as 'always-on', because otherwise some

> actions of their clients might result in turning them off. This patch

> restores suspend/resume operation on Peach-Pit Chromebook board. It

> partially reverts 'always-on' property removal done by the commit

> mentioned in the Fixes tag.

>

> Fixes: 665c441eea3d ("ARM: dts: exynos: Remove unneded always-on for regulators on Peach boards")

> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---

> This partial revert restores suspend/resume operation on Linux v4.7

> release. To make suspend/resume working on current linux-next (tested

> on next-20180806), one has to additionally revert following commits:

>

> 925ffff2ea8b "Input: cros_ec_keyb - remove check before calling pm_wakeup_event"

> 38ba34a43dbc "Input: cros_ec_keyb - mark cros_ec_keyb driver as wake enabled device."

> 47b7de2f6c18 "mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs"

> 2695578b896a "net: usbnet: fix potential deadlock on 32bit hosts"

>

> I'm investigating those issues and separate reports/fixes will be

> posted for them.

>

> Best regards

> Marek Szyprowski

> ---

>  arch/arm/boot/dts/exynos5420-peach-pit.dts | 3 +++

>  arch/arm/boot/dts/exynos5800-peach-pi.dts  | 3 +++

>  2 files changed, 6 insertions(+)

>


Makes sense. While looking around this, in
arch/arm/boot/dts/exynos4412-midas.dtsi two more regulators follow
this pattern (LDO15, LDO16). Maybe these are one of reasons why S2R
stopped working on Trats2?

Best regards,
Krzysztof
Marek Szyprowski Aug. 10, 2018, 11:56 a.m. | #2
Hi Krzysztof,

On 2018-08-10 13:39, Krzysztof Kozlowski wrote:
>   On 10 August 2018 at 10:04, Marek Szyprowski <m.szyprowski@samsung.com> wrote:

>> Regulators, which are marked as 'on-in-suspend' seems to be critical for

>> board operation, thus they must not be disabled anytime. This can be

>> only assured by marking them as 'always-on', because otherwise some

>> actions of their clients might result in turning them off. This patch

>> restores suspend/resume operation on Peach-Pit Chromebook board. It

>> partially reverts 'always-on' property removal done by the commit

>> mentioned in the Fixes tag.

>>

>> Fixes: 665c441eea3d ("ARM: dts: exynos: Remove unneded always-on for regulators on Peach boards")

>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

>> ---

>> This partial revert restores suspend/resume operation on Linux v4.7

>> release. To make suspend/resume working on current linux-next (tested

>> on next-20180806), one has to additionally revert following commits:

>>

>> 925ffff2ea8b "Input: cros_ec_keyb - remove check before calling pm_wakeup_event"

>> 38ba34a43dbc "Input: cros_ec_keyb - mark cros_ec_keyb driver as wake enabled device."

>> 47b7de2f6c18 "mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs"

>> 2695578b896a "net: usbnet: fix potential deadlock on 32bit hosts"

>>

>> I'm investigating those issues and separate reports/fixes will be

>> posted for them.

>>

>> Best regards

>> Marek Szyprowski

>> ---

>>   arch/arm/boot/dts/exynos5420-peach-pit.dts | 3 +++

>>   arch/arm/boot/dts/exynos5800-peach-pi.dts  | 3 +++

>>   2 files changed, 6 insertions(+)

>>

> Makes sense. While looking around this, in

> arch/arm/boot/dts/exynos4412-midas.dtsi two more regulators follow

> this pattern (LDO15, LDO16). Maybe these are one of reasons why S2R

> stopped working on Trats2?


They should be fixed too, but they are not the source of the s2r issues.

I've checked and S2R works on Trats2 when DEVfreq is disabled, so it is
yet another issue caused by a missing suspend opp in devfreq...

See https://www.spinics.net/lists/linux-samsung-soc/msg56602.html thread.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland
Tomasz Figa Aug. 23, 2018, 12:09 p.m. | #3
Hi Marek,

On Fri, Aug 10, 2018 at 5:09 PM Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
>

> Regulators, which are marked as 'on-in-suspend' seems to be critical for

> board operation, thus they must not be disabled anytime. This can be

> only assured by marking them as 'always-on', because otherwise some

> actions of their clients might result in turning them off. This patch

> restores suspend/resume operation on Peach-Pit Chromebook board. It

> partially reverts 'always-on' property removal done by the commit

> mentioned in the Fixes tag.

>

> Fixes: 665c441eea3d ("ARM: dts: exynos: Remove unneded always-on for regulators on Peach boards")

> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---

> This partial revert restores suspend/resume operation on Linux v4.7

> release. To make suspend/resume working on current linux-next (tested

> on next-20180806), one has to additionally revert following commits:

>

> 925ffff2ea8b "Input: cros_ec_keyb - remove check before calling pm_wakeup_event"

> 38ba34a43dbc "Input: cros_ec_keyb - mark cros_ec_keyb driver as wake enabled device."

> 47b7de2f6c18 "mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs"

> 2695578b896a "net: usbnet: fix potential deadlock on 32bit hosts"

>

> I'm investigating those issues and separate reports/fixes will be

> posted for them.


Without this patch I'm seeing tpm suspend failures on Peach Pi, but
after applying it suspend/resume seems to work fine. The 4 reverts
above are needed indeed, otherwise the device fails to wake up from
suspend.

Tested-by: Tomasz Figa <tfiga@chromium.org>


Thanks for figuring this out.

Best regards,
Tomasz
Krzysztof Kozlowski Aug. 30, 2018, 5:53 p.m. | #4
On Fri, Aug 10, 2018 at 10:04:25AM +0200, Marek Szyprowski wrote:
> Regulators, which are marked as 'on-in-suspend' seems to be critical for

> board operation, thus they must not be disabled anytime. This can be

> only assured by marking them as 'always-on', because otherwise some

> actions of their clients might result in turning them off. This patch

> restores suspend/resume operation on Peach-Pit Chromebook board. It

> partially reverts 'always-on' property removal done by the commit

> mentioned in the Fixes tag.

> 

> Fixes: 665c441eea3d ("ARM: dts: exynos: Remove unneded always-on for regulators on Peach boards")

> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---

> This partial revert restores suspend/resume operation on Linux v4.7

> release. To make suspend/resume working on current linux-next (tested

> on next-20180806), one has to additionally revert following commits:

> 

> 925ffff2ea8b "Input: cros_ec_keyb - remove check before calling pm_wakeup_event"

> 38ba34a43dbc "Input: cros_ec_keyb - mark cros_ec_keyb driver as wake enabled device."

> 47b7de2f6c18 "mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs"

> 2695578b896a "net: usbnet: fix potential deadlock on 32bit hosts"

> 

> I'm investigating those issues and separate reports/fixes will be

> posted for them.

> 

> Best regards


Thanks, applied.

Best regards,
Krzysztof

Patch

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index 57c2332bf282..4ebb37043223 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -312,6 +312,7 @@ 
 				regulator-name = "vdd_1v35";
 				regulator-min-microvolt = <1350000>;
 				regulator-max-microvolt = <1350000>;
+				regulator-always-on;
 				regulator-boot-on;
 				regulator-state-mem {
 					regulator-on-in-suspend;
@@ -333,6 +334,7 @@ 
 				regulator-name = "vdd_2v";
 				regulator-min-microvolt = <2000000>;
 				regulator-max-microvolt = <2000000>;
+				regulator-always-on;
 				regulator-boot-on;
 				regulator-state-mem {
 					regulator-on-in-suspend;
@@ -343,6 +345,7 @@ 
 				regulator-name = "vdd_1v8";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
 				regulator-boot-on;
 				regulator-state-mem {
 					regulator-on-in-suspend;
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index d80ab9085da1..7ada8b53ea31 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -312,6 +312,7 @@ 
 				regulator-name = "vdd_1v35";
 				regulator-min-microvolt = <1350000>;
 				regulator-max-microvolt = <1350000>;
+				regulator-always-on;
 				regulator-boot-on;
 				regulator-state-mem {
 					regulator-on-in-suspend;
@@ -333,6 +334,7 @@ 
 				regulator-name = "vdd_2v";
 				regulator-min-microvolt = <2000000>;
 				regulator-max-microvolt = <2000000>;
+				regulator-always-on;
 				regulator-boot-on;
 				regulator-state-mem {
 					regulator-on-in-suspend;
@@ -343,6 +345,7 @@ 
 				regulator-name = "vdd_1v8";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
 				regulator-boot-on;
 				regulator-state-mem {
 					regulator-on-in-suspend;