All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: exynos: set LDO7 regulator as always on
       [not found] <CGME20170124124537eucas1p23ef10c2cf3b15ce70682b0cf71ae14a3@eucas1p2.samsung.com>
@ 2017-01-24 12:45 ` Andrzej Hajda
  2017-01-24 17:52   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Andrzej Hajda @ 2017-01-24 12:45 UTC (permalink / raw)
  To: linux-samsung-soc, Krzysztof Kozlowski
  Cc: Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
	Javier Martinez Canillas, Inki Dae, sw0312.kim, Chanwoo Choi

LDO7 regulator beside DSI and HDMI provides power for core blocks in Exynos
5433 SoC. Disabling it causes serious current leak - about 200mA.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
index 5f1e172..b22bec8 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
@@ -432,6 +432,10 @@
 				regulator-name = "VDD18_MIPI2L_1.8V_AP";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
 			};
 
 			ldo8_reg: LDO8 {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: exynos: set LDO7 regulator as always on
  2017-01-24 12:45 ` [PATCH] arm64: dts: exynos: set LDO7 regulator as always on Andrzej Hajda
@ 2017-01-24 17:52   ` Krzysztof Kozlowski
  2017-01-24 17:57     ` Javier Martinez Canillas
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2017-01-24 17:52 UTC (permalink / raw)
  To: Andrzej Hajda
  Cc: linux-samsung-soc, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
	Javier Martinez Canillas, Inki Dae, sw0312.kim, Chanwoo Choi

On Tue, Jan 24, 2017 at 01:45:28PM +0100, Andrzej Hajda wrote:
> LDO7 regulator beside DSI and HDMI provides power for core blocks in Exynos
> 5433 SoC. Disabling it causes serious current leak - about 200mA.
> 
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
>  arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
> index 5f1e172..b22bec8 100644
> --- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
> @@ -432,6 +432,10 @@
>  				regulator-name = "VDD18_MIPI2L_1.8V_AP";
>  				regulator-min-microvolt = <1800000>;
>  				regulator-max-microvolt = <1800000>;
> +				regulator-always-on;
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +				};

Thanks, applied.

Just to satisfy my curiosity, how disabling the regulator causes current
leak? What happens exactly?

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: exynos: set LDO7 regulator as always on
  2017-01-24 17:52   ` Krzysztof Kozlowski
@ 2017-01-24 17:57     ` Javier Martinez Canillas
  2017-01-24 18:26       ` Krzysztof Kozlowski
  2017-01-25  7:13       ` Marek Szyprowski
  0 siblings, 2 replies; 7+ messages in thread
From: Javier Martinez Canillas @ 2017-01-24 17:57 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andrzej Hajda
  Cc: linux-samsung-soc, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
	Inki Dae, sw0312.kim, Chanwoo Choi

Hello Krzysztof,

On 01/24/2017 02:52 PM, Krzysztof Kozlowski wrote:
> On Tue, Jan 24, 2017 at 01:45:28PM +0100, Andrzej Hajda wrote:
>> LDO7 regulator beside DSI and HDMI provides power for core blocks in Exynos
>> 5433 SoC. Disabling it causes serious current leak - about 200mA.
>>
>> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
>> ---
>>  arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
>> index 5f1e172..b22bec8 100644
>> --- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
>> +++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
>> @@ -432,6 +432,10 @@
>>  				regulator-name = "VDD18_MIPI2L_1.8V_AP";
>>  				regulator-min-microvolt = <1800000>;
>>  				regulator-max-microvolt = <1800000>;

I see you already applied, but I think it would be good to have some comments
here explaining why the regulator should be always-on. Otherwise, in future a
developer might want to disable the regulator since it may think that is not
needed due dsi and hdmi already enabling it.

>> +				regulator-always-on;
>> +				regulator-state-mem {
>> +					regulator-off-in-suspend;
>> +				};
> 
> Thanks, applied.
>
> Just to satisfy my curiosity, how disabling the regulator causes current
> leak? What happens exactly?
>

I was wondering the same.

> Best regards,
> Krzysztof
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: exynos: set LDO7 regulator as always on
  2017-01-24 17:57     ` Javier Martinez Canillas
@ 2017-01-24 18:26       ` Krzysztof Kozlowski
  2017-01-25  7:13       ` Marek Szyprowski
  1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2017-01-24 18:26 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Andrzej Hajda, linux-samsung-soc, Bartlomiej Zolnierkiewicz,
	Marek Szyprowski, Inki Dae, sw0312.kim, Chanwoo Choi

On Tue, Jan 24, 2017 at 02:57:00PM -0300, Javier Martinez Canillas wrote:
> Hello Krzysztof,
> 
> On 01/24/2017 02:52 PM, Krzysztof Kozlowski wrote:
> > On Tue, Jan 24, 2017 at 01:45:28PM +0100, Andrzej Hajda wrote:
> >> LDO7 regulator beside DSI and HDMI provides power for core blocks in Exynos
> >> 5433 SoC. Disabling it causes serious current leak - about 200mA.
> >>
> >> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> >> ---
> >>  arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
> >> index 5f1e172..b22bec8 100644
> >> --- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
> >> +++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
> >> @@ -432,6 +432,10 @@
> >>  				regulator-name = "VDD18_MIPI2L_1.8V_AP";
> >>  				regulator-min-microvolt = <1800000>;
> >>  				regulator-max-microvolt = <1800000>;
> 
> I see you already applied, but I think it would be good to have some comments
> here explaining why the regulator should be always-on. Otherwise, in future a
> developer might want to disable the regulator since it may think that is not
> needed due dsi and hdmi already enabling it.

It is a good idea however we never put such information for other
regulators... If agreed, we might make it a requirement for new DTS and
new changes.

Anyway one could get this from the log itself.

> 
> >> +				regulator-always-on;
> >> +				regulator-state-mem {
> >> +					regulator-off-in-suspend;
> >> +				};
> > 
> > Thanks, applied.
> >
> > Just to satisfy my curiosity, how disabling the regulator causes current
> > leak? What happens exactly?
> >
> 
> I was wondering the same.
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: exynos: set LDO7 regulator as always on
  2017-01-24 17:57     ` Javier Martinez Canillas
  2017-01-24 18:26       ` Krzysztof Kozlowski
@ 2017-01-25  7:13       ` Marek Szyprowski
  2017-01-25  7:48         ` Krzysztof Kozlowski
  2017-01-25 11:05         ` Javier Martinez Canillas
  1 sibling, 2 replies; 7+ messages in thread
From: Marek Szyprowski @ 2017-01-25  7:13 UTC (permalink / raw)
  To: Javier Martinez Canillas, Krzysztof Kozlowski, Andrzej Hajda
  Cc: linux-samsung-soc, Bartlomiej Zolnierkiewicz, Inki Dae,
	sw0312.kim, Chanwoo Choi

Hi Javier,


On 2017-01-24 18:57, Javier Martinez Canillas wrote:
> Hello Krzysztof,
>
> On 01/24/2017 02:52 PM, Krzysztof Kozlowski wrote:
>> On Tue, Jan 24, 2017 at 01:45:28PM +0100, Andrzej Hajda wrote:
>>> LDO7 regulator beside DSI and HDMI provides power for core blocks in Exynos
>>> 5433 SoC. Disabling it causes serious current leak - about 200mA.
>>>
>>> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
>>> ---
>>>   arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 4 ++++
>>>   1 file changed, 4 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
>>> index 5f1e172..b22bec8 100644
>>> --- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
>>> +++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
>>> @@ -432,6 +432,10 @@
>>>   				regulator-name = "VDD18_MIPI2L_1.8V_AP";
>>>   				regulator-min-microvolt = <1800000>;
>>>   				regulator-max-microvolt = <1800000>;
> I see you already applied, but I think it would be good to have some comments
> here explaining why the regulator should be always-on. Otherwise, in future a
> developer might want to disable the regulator since it may think that is not
> needed due dsi and hdmi already enabling it.

If such change is added in a separate commit, one can easily find the reason
using "git blame".

>>> +				regulator-always-on;
>>> +				regulator-state-mem {
>>> +					regulator-off-in-suspend;
>>> +				};
>> Thanks, applied.
>>
>> Just to satisfy my curiosity, how disabling the regulator causes current
>> leak? What happens exactly?

Such leakage usually happens if there is a hw block, which have more 
than one
power supply. Disabling power for the one power supply might turn the hw 
logic
into some meta state, in which it still conduct a current from the other 
source.

The best example of such behavior is Odroid U3 and its problems with 
reset when
HDMI cable is connected. Sometimes the current leaks from the HDMI 
connector to
the board when the main power supply is turned off and the board enters some
kind of a a "meta state".

We still have no idea which hw block causes this leakage in case of TM2/TM2e
though.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: exynos: set LDO7 regulator as always on
  2017-01-25  7:13       ` Marek Szyprowski
@ 2017-01-25  7:48         ` Krzysztof Kozlowski
  2017-01-25 11:05         ` Javier Martinez Canillas
  1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2017-01-25  7:48 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: Javier Martinez Canillas, Andrzej Hajda, linux-samsung-soc,
	Bartlomiej Zolnierkiewicz, Inki Dae, Seung Woo Kim, Chanwoo Choi

On Wed, Jan 25, 2017 at 9:13 AM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> Such leakage usually happens if there is a hw block, which have more than
> one
> power supply. Disabling power for the one power supply might turn the hw
> logic
> into some meta state, in which it still conduct a current from the other
> source.
>
> The best example of such behavior is Odroid U3 and its problems with reset
> when
> HDMI cable is connected. Sometimes the current leaks from the HDMI connector
> to
> the board when the main power supply is turned off and the board enters some
> kind of a a "meta state".
>
> We still have no idea which hw block causes this leakage in case of TM2/TM2e
> though.

Interesting topic... Thanks for explanation!

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: exynos: set LDO7 regulator as always on
  2017-01-25  7:13       ` Marek Szyprowski
  2017-01-25  7:48         ` Krzysztof Kozlowski
@ 2017-01-25 11:05         ` Javier Martinez Canillas
  1 sibling, 0 replies; 7+ messages in thread
From: Javier Martinez Canillas @ 2017-01-25 11:05 UTC (permalink / raw)
  To: Marek Szyprowski, Krzysztof Kozlowski, Andrzej Hajda
  Cc: linux-samsung-soc, Bartlomiej Zolnierkiewicz, Inki Dae,
	sw0312.kim, Chanwoo Choi

Hello Marek,

On 01/25/2017 04:13 AM, Marek Szyprowski wrote:
> Hi Javier,
> 
> 
> On 2017-01-24 18:57, Javier Martinez Canillas wrote:
>> Hello Krzysztof,
>>
>> On 01/24/2017 02:52 PM, Krzysztof Kozlowski wrote:
>>> On Tue, Jan 24, 2017 at 01:45:28PM +0100, Andrzej Hajda wrote:
>>>> LDO7 regulator beside DSI and HDMI provides power for core blocks in Exynos
>>>> 5433 SoC. Disabling it causes serious current leak - about 200mA.
>>>>
>>>> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
>>>> ---
>>>>   arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 4 ++++
>>>>   1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
>>>> index 5f1e172..b22bec8 100644
>>>> --- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
>>>> +++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
>>>> @@ -432,6 +432,10 @@
>>>>                   regulator-name = "VDD18_MIPI2L_1.8V_AP";
>>>>                   regulator-min-microvolt = <1800000>;
>>>>                   regulator-max-microvolt = <1800000>;
>> I see you already applied, but I think it would be good to have some comments
>> here explaining why the regulator should be always-on. Otherwise, in future a
>> developer might want to disable the regulator since it may think that is not
>> needed due dsi and hdmi already enabling it.
> 
> If such change is added in a separate commit, one can easily find the reason
> using "git blame".
>

Yes, that's true.
 
>>>> +                regulator-always-on;
>>>> +                regulator-state-mem {
>>>> +                    regulator-off-in-suspend;
>>>> +                };
>>> Thanks, applied.
>>>
>>> Just to satisfy my curiosity, how disabling the regulator causes current
>>> leak? What happens exactly?
> 
> Such leakage usually happens if there is a hw block, which have more than one
> power supply. Disabling power for the one power supply might turn the hw logic
> into some meta state, in which it still conduct a current from the other source.
> 
> The best example of such behavior is Odroid U3 and its problems with reset when
> HDMI cable is connected. Sometimes the current leaks from the HDMI connector to
> the board when the main power supply is turned off and the board enters some
> kind of a a "meta state".
> 

I didn't know about all this, thanks a lot for the explanation.

> We still have no idea which hw block causes this leakage in case of TM2/TM2e
> though.
> 
> Best regards

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-01-25 11:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170124124537eucas1p23ef10c2cf3b15ce70682b0cf71ae14a3@eucas1p2.samsung.com>
2017-01-24 12:45 ` [PATCH] arm64: dts: exynos: set LDO7 regulator as always on Andrzej Hajda
2017-01-24 17:52   ` Krzysztof Kozlowski
2017-01-24 17:57     ` Javier Martinez Canillas
2017-01-24 18:26       ` Krzysztof Kozlowski
2017-01-25  7:13       ` Marek Szyprowski
2017-01-25  7:48         ` Krzysztof Kozlowski
2017-01-25 11:05         ` Javier Martinez Canillas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.