devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: exynos: remove the cd-gpios property for eMMC of odroid-xu3/4
@ 2016-11-21  7:10 Jaehoon Chung
       [not found] ` <20161121071032.10183-1-jh80.chung-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Jaehoon Chung @ 2016-11-21  7:10 UTC (permalink / raw)
  To: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, kgene-DgEjT+Ai2ygdnm+yROfE0A,
	krzk-DgEjT+Ai2ygdnm+yROfE0A, cw00.choi-Sze3O3UU22JBDgjK7y7TUQ,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	catalin.marinas-5wv7dgnIgG8, will.deacon-5wv7dgnIgG8,
	m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
	a.hajda-Sze3O3UU22JBDgjK7y7TUQ,
	jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ, Jaehoon Chung

Odroid-xu3/4 didn't need to use the cd-gpios for detecting card.
Because Host controller has the CDETECT register through SDx_CDN line.
Host controller can know whether card is inserted or not with this
register.

When i have checked the Odroid-xu3/4, they are using CDETECT register.
(Not using exteranl cd-gpio.)

Fixes: fb1aeedb61ad ("ARM: dts: add mmc detect gpio for exynos5422-odroidxu3")
Signed-off-by: Jaehoon Chung <jh80.chung-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
index 9e63328..05b9afdd 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
@@ -510,7 +510,6 @@
 &mmc_0 {
 	status = "okay";
 	mmc-pwrseq = <&emmc_pwrseq>;
-	cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>;
 	card-detect-delay = <200>;
 	samsung,dw-mshc-ciu-div = <3>;
 	samsung,dw-mshc-sdr-timing = <0 4>;
-- 
2.10.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] ARM: dts: exynos: remove the cd-gpios property for eMMC of odroid-xu3/4
       [not found] ` <20161121071032.10183-1-jh80.chung-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2016-11-21 17:06   ` Krzysztof Kozlowski
  2016-11-22  1:24     ` Jaehoon Chung
  0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2016-11-21 17:06 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, kgene-DgEjT+Ai2ygdnm+yROfE0A,
	krzk-DgEjT+Ai2ygdnm+yROfE0A, cw00.choi-Sze3O3UU22JBDgjK7y7TUQ,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	catalin.marinas-5wv7dgnIgG8, will.deacon-5wv7dgnIgG8,
	m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
	a.hajda-Sze3O3UU22JBDgjK7y7TUQ,
	jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ

On Mon, Nov 21, 2016 at 04:10:32PM +0900, Jaehoon Chung wrote:
> Odroid-xu3/4 didn't need to use the cd-gpios for detecting card.
> Because Host controller has the CDETECT register through SDx_CDN line.
> Host controller can know whether card is inserted or not with this
> register.
> 
> When i have checked the Odroid-xu3/4, they are using CDETECT register.
> (Not using exteranl cd-gpio.)

Makes sense. Just one question: the sd0_cd pinctrl setting should stay,
right?

Best regards,
Krzysztof

> Fixes: fb1aeedb61ad ("ARM: dts: add mmc detect gpio for exynos5422-odroidxu3")
> Signed-off-by: Jaehoon Chung <jh80.chung-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> ---
>  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
> index 9e63328..05b9afdd 100644
> --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
> @@ -510,7 +510,6 @@
>  &mmc_0 {
>  	status = "okay";
>  	mmc-pwrseq = <&emmc_pwrseq>;
> -	cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>;
>  	card-detect-delay = <200>;
>  	samsung,dw-mshc-ciu-div = <3>;
>  	samsung,dw-mshc-sdr-timing = <0 4>;
> -- 
> 2.10.1
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] ARM: dts: exynos: remove the cd-gpios property for eMMC of odroid-xu3/4
  2016-11-21 17:06   ` Krzysztof Kozlowski
@ 2016-11-22  1:24     ` Jaehoon Chung
       [not found]       ` <9ecce088-b91d-d51a-5a19-33476961d2ea-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Jaehoon Chung @ 2016-11-22  1:24 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, kgene-DgEjT+Ai2ygdnm+yROfE0A,
	cw00.choi-Sze3O3UU22JBDgjK7y7TUQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, catalin.marinas-5wv7dgnIgG8,
	will.deacon-5wv7dgnIgG8, m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
	a.hajda-Sze3O3UU22JBDgjK7y7TUQ,
	jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ

On 11/22/2016 02:06 AM, Krzysztof Kozlowski wrote:
> On Mon, Nov 21, 2016 at 04:10:32PM +0900, Jaehoon Chung wrote:
>> Odroid-xu3/4 didn't need to use the cd-gpios for detecting card.
>> Because Host controller has the CDETECT register through SDx_CDN line.
>> Host controller can know whether card is inserted or not with this
>> register.
>>
>> When i have checked the Odroid-xu3/4, they are using CDETECT register.
>> (Not using exteranl cd-gpio.)
> 
> Makes sense. Just one question: the sd0_cd pinctrl setting should stay,
> right?

Right, It needs to use SD0_CD function.
I have tested on Odroid-XU3/XU4.

Tested with the below cases.

1) On boot with SD-card (without eMMC)
- Inserted eMMC : Detected
- Removed eMMC : Detected

2) On boot with Sd-card (with eMMC)
- Detected

3) On boot with eMMC 
- Detected

Best Regards,
Jaehoon Chung

> 
> Best regards,
> Krzysztof
> 
>> Fixes: fb1aeedb61ad ("ARM: dts: add mmc detect gpio for exynos5422-odroidxu3")
>> Signed-off-by: Jaehoon Chung <jh80.chung-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>> ---
>>  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>> index 9e63328..05b9afdd 100644
>> --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>> @@ -510,7 +510,6 @@
>>  &mmc_0 {
>>  	status = "okay";
>>  	mmc-pwrseq = <&emmc_pwrseq>;
>> -	cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>;
>>  	card-detect-delay = <200>;
>>  	samsung,dw-mshc-ciu-div = <3>;
>>  	samsung,dw-mshc-sdr-timing = <0 4>;
>> -- 
>> 2.10.1
>>
> 
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] ARM: dts: exynos: remove the cd-gpios property for eMMC of odroid-xu3/4
       [not found]       ` <9ecce088-b91d-d51a-5a19-33476961d2ea-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2016-11-22  7:51         ` Andrzej Hajda
  2016-11-22  8:19           ` Jaehoon Chung
  0 siblings, 1 reply; 6+ messages in thread
From: Andrzej Hajda @ 2016-11-22  7:51 UTC (permalink / raw)
  To: Jaehoon Chung, Krzysztof Kozlowski
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, kgene-DgEjT+Ai2ygdnm+yROfE0A,
	cw00.choi-Sze3O3UU22JBDgjK7y7TUQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, catalin.marinas-5wv7dgnIgG8,
	will.deacon-5wv7dgnIgG8, m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
	jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ

On 22.11.2016 02:24, Jaehoon Chung wrote:
> On 11/22/2016 02:06 AM, Krzysztof Kozlowski wrote:
>> On Mon, Nov 21, 2016 at 04:10:32PM +0900, Jaehoon Chung wrote:
>>> Odroid-xu3/4 didn't need to use the cd-gpios for detecting card.
>>> Because Host controller has the CDETECT register through SDx_CDN line.
>>> Host controller can know whether card is inserted or not with this
>>> register.
>>>
>>> When i have checked the Odroid-xu3/4, they are using CDETECT register.
>>> (Not using exteranl cd-gpio.)
>> Makes sense. Just one question: the sd0_cd pinctrl setting should stay,
>> right?
> Right, It needs to use SD0_CD function.
> I have tested on Odroid-XU3/XU4.
>
> Tested with the below cases.
>
> 1) On boot with SD-card (without eMMC)
> - Inserted eMMC : Detected
> - Removed eMMC : Detected
>
> 2) On boot with Sd-card (with eMMC)
> - Detected
>
> 3) On boot with eMMC 
> - Detected

I suspect that MMC device (or its parts) should be always awake to keep
working CDETECT register. With cd-gpio it should be possible to power it
off when unused but still having detection working, am I right? I am not
familiar enough with the code to be certain that it improves PM but it
could be the case.

My other question is about polling thread, original patch was developed
to avoid polling thread which caused occasional hangs, crashes and
unnecessary work. Since then lot of mmc code changed and I do not follow
these changes. So my question is if this patch will not re-enable polling?

Regards
Andrzej

>
> Best Regards,
> Jaehoon Chung
>
>> Best regards,
>> Krzysztof
>>
>>> Fixes: fb1aeedb61ad ("ARM: dts: add mmc detect gpio for exynos5422-odroidxu3")
>>> Signed-off-by: Jaehoon Chung <jh80.chung-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>>> ---
>>>  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 -
>>>  1 file changed, 1 deletion(-)
>>>
>>> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>>> index 9e63328..05b9afdd 100644
>>> --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>>> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>>> @@ -510,7 +510,6 @@
>>>  &mmc_0 {
>>>  	status = "okay";
>>>  	mmc-pwrseq = <&emmc_pwrseq>;
>>> -	cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>;
>>>  	card-detect-delay = <200>;
>>>  	samsung,dw-mshc-ciu-div = <3>;
>>>  	samsung,dw-mshc-sdr-timing = <0 4>;
>>> -- 
>>> 2.10.1
>>>
>>
>>
>
>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] ARM: dts: exynos: remove the cd-gpios property for eMMC of odroid-xu3/4
  2016-11-22  7:51         ` Andrzej Hajda
@ 2016-11-22  8:19           ` Jaehoon Chung
  2016-11-23 17:20             ` Krzysztof Kozlowski
  0 siblings, 1 reply; 6+ messages in thread
From: Jaehoon Chung @ 2016-11-22  8:19 UTC (permalink / raw)
  To: Andrzej Hajda, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-kernel, devicetree, kgene, cw00.choi,
	robh+dt, mark.rutland, catalin.marinas, will.deacon, m.szyprowski,
	jy0922.shim

On 11/22/2016 04:51 PM, Andrzej Hajda wrote:
> On 22.11.2016 02:24, Jaehoon Chung wrote:
>> On 11/22/2016 02:06 AM, Krzysztof Kozlowski wrote:
>>> On Mon, Nov 21, 2016 at 04:10:32PM +0900, Jaehoon Chung wrote:
>>>> Odroid-xu3/4 didn't need to use the cd-gpios for detecting card.
>>>> Because Host controller has the CDETECT register through SDx_CDN line.
>>>> Host controller can know whether card is inserted or not with this
>>>> register.
>>>>
>>>> When i have checked the Odroid-xu3/4, they are using CDETECT register.
>>>> (Not using exteranl cd-gpio.)
>>> Makes sense. Just one question: the sd0_cd pinctrl setting should stay,
>>> right?
>> Right, It needs to use SD0_CD function.
>> I have tested on Odroid-XU3/XU4.
>>
>> Tested with the below cases.
>>
>> 1) On boot with SD-card (without eMMC)
>> - Inserted eMMC : Detected
>> - Removed eMMC : Detected
>>
>> 2) On boot with Sd-card (with eMMC)
>> - Detected
>>
>> 3) On boot with eMMC 
>> - Detected
> 
> I suspect that MMC device (or its parts) should be always awake to keep
> working CDETECT register. With cd-gpio it should be possible to power it
> off when unused but still having detection working, am I right? I am not
> familiar enough with the code to be certain that it improves PM but it
> could be the case.

CDETECT register is used only "card is present or not". not needs to keep power..

> 
> My other question is about polling thread, original patch was developed
> to avoid polling thread which caused occasional hangs, crashes and
> unnecessary work. Since then lot of mmc code changed and I do not follow
> these changes. So my question is if this patch will not re-enable polling?

This patch didn't use polling scheme. It just uses the CDETECT register for detecting.
And Host controller has enabled the Card detect bit at INTMSK register.
(For interrupt handling)

Best Regards,
Jaehoon Chung

> 
> Regards
> Andrzej
> 
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>> Best regards,
>>> Krzysztof
>>>
>>>> Fixes: fb1aeedb61ad ("ARM: dts: add mmc detect gpio for exynos5422-odroidxu3")
>>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>>>> ---
>>>>  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 -
>>>>  1 file changed, 1 deletion(-)
>>>>
>>>> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>>>> index 9e63328..05b9afdd 100644
>>>> --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>>>> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>>>> @@ -510,7 +510,6 @@
>>>>  &mmc_0 {
>>>>  	status = "okay";
>>>>  	mmc-pwrseq = <&emmc_pwrseq>;
>>>> -	cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>;
>>>>  	card-detect-delay = <200>;
>>>>  	samsung,dw-mshc-ciu-div = <3>;
>>>>  	samsung,dw-mshc-sdr-timing = <0 4>;
>>>> -- 
>>>> 2.10.1
>>>>
>>>
>>>
>>
>>
> 
> 
> 

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

* Re: [PATCH] ARM: dts: exynos: remove the cd-gpios property for eMMC of odroid-xu3/4
  2016-11-22  8:19           ` Jaehoon Chung
@ 2016-11-23 17:20             ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2016-11-23 17:20 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: Andrzej Hajda, Krzysztof Kozlowski, linux-samsung-soc,
	linux-kernel, devicetree, kgene, cw00.choi, robh+dt, mark.rutland,
	catalin.marinas, will.deacon, m.szyprowski, jy0922.shim

On Tue, Nov 22, 2016 at 05:19:30PM +0900, Jaehoon Chung wrote:
> On 11/22/2016 04:51 PM, Andrzej Hajda wrote:
> > On 22.11.2016 02:24, Jaehoon Chung wrote:
> >> On 11/22/2016 02:06 AM, Krzysztof Kozlowski wrote:
> >>> On Mon, Nov 21, 2016 at 04:10:32PM +0900, Jaehoon Chung wrote:
> >>>> Odroid-xu3/4 didn't need to use the cd-gpios for detecting card.
> >>>> Because Host controller has the CDETECT register through SDx_CDN line.
> >>>> Host controller can know whether card is inserted or not with this
> >>>> register.
> >>>>
> >>>> When i have checked the Odroid-xu3/4, they are using CDETECT register.
> >>>> (Not using exteranl cd-gpio.)
> >>> Makes sense. Just one question: the sd0_cd pinctrl setting should stay,
> >>> right?

Thanks, applied with removal of Fixes tag because commit description did
not mention any issue, error or wrong behavior to fix.

Best regards,
Krzysztof

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

end of thread, other threads:[~2016-11-23 17:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-21  7:10 [PATCH] ARM: dts: exynos: remove the cd-gpios property for eMMC of odroid-xu3/4 Jaehoon Chung
     [not found] ` <20161121071032.10183-1-jh80.chung-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-11-21 17:06   ` Krzysztof Kozlowski
2016-11-22  1:24     ` Jaehoon Chung
     [not found]       ` <9ecce088-b91d-d51a-5a19-33476961d2ea-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-11-22  7:51         ` Andrzej Hajda
2016-11-22  8:19           ` Jaehoon Chung
2016-11-23 17:20             ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).