public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: dts: Mark SDIO as non-removable for Exynos Chromebooks
@ 2015-10-15 10:55 Javier Martinez Canillas
  2015-10-15 10:55 ` [PATCH 1/3] ARM: dts: Mark SDIO as non-removable in exynos5800-peach-pi Javier Martinez Canillas
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2015-10-15 10:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Krzysztof Kozlowski, Kukjin Kim, Douglas Anderson, Alim Akhtar,
	Tomeu Vizoso, linux-arm-kernel, linux-samsung-soc,
	Javier Martinez Canillas

Hello,

The Exynos based Chromebooks have a Marvell WiFi SDIO chip which is always
present and cannot be detected. The mmc device node is marked as broken-cd
since that property is used in the vendor tree instead of non-removable.

This causes the device to be removed when the system enteres into a suspend
gettings the following warning when the system is resumed:

[  181.944636] mmc2: error -2 during resume (card was removed?)

The rationale for that is explained in commit [0] and it was that using the
non-removable property caused issues with the driver whose reset logic used
the mmc_{remove,add}_host() functions.

But the reset logic in the mwifiex mainline driver has changed and this is
longer the case so it's safe to use non-removable. This series changes the
Snow, Peach Pi and Peach Pit boards to use the correct DT property.

To test, I've cherry picked commit [1] from the vendor tree that adds a
debugfs entry to force a card reset and after the reset, WiFi rescanning works
the card gets connected to an AP and works correctly:

$ echo 1 > /sys/kernel/debug/mwifiex/mlan0/reset

I don't have access to a Snow anymore so testing patch 3/3 on that board will
be appreciated.

[0]: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ad348e1e2381
[1]: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/5995363523de

Best regards,
Javier


Javier Martinez Canillas (3):
  ARM: dts: Mark SDIO as non-removable in exynos5800-peach-pi
  ARM: dts: Mark SDIO as non-removable in exynos5420-peach-pit
  ARM: dts: Mark SDIO as non-removable in exynos5250-snow-common

 arch/arm/boot/dts/exynos5250-snow-common.dtsi | 2 +-
 arch/arm/boot/dts/exynos5420-peach-pit.dts    | 2 +-
 arch/arm/boot/dts/exynos5800-peach-pi.dts     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.4.3


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

* [PATCH 1/3] ARM: dts: Mark SDIO as non-removable in exynos5800-peach-pi
  2015-10-15 10:55 [PATCH 0/3] ARM: dts: Mark SDIO as non-removable for Exynos Chromebooks Javier Martinez Canillas
@ 2015-10-15 10:55 ` Javier Martinez Canillas
  2015-10-15 10:55 ` [PATCH 2/3] ARM: dts: Mark SDIO as non-removable in exynos5420-peach-pit Javier Martinez Canillas
  2015-10-15 10:55 ` [RFT PATCH 3/3] ARM: dts: Mark SDIO as non-removable in exynos5250-snow-common Javier Martinez Canillas
  2 siblings, 0 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2015-10-15 10:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Krzysztof Kozlowski, Kukjin Kim, Douglas Anderson, Alim Akhtar,
	Tomeu Vizoso, linux-arm-kernel, linux-samsung-soc,
	Javier Martinez Canillas

The Exynos5800 Peach Pi Chromebook has a Marvell WiFi SDIO chip which
can't neither be removed nor be detected. But the node isn't marked
as non-removable and instead has the broken-cd DT property.

This causes the device to be removed when the system enters into a
suspend state and the following warnings is shown after a resume:

[  181.944636] mmc2: error -2 during resume (card was removed?)

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 arch/arm/boot/dts/exynos5800-peach-pi.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index 49a4f43e5ac2..2866ac8e3ad0 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -672,7 +672,7 @@
 &mmc_1 {
 	status = "okay";
 	num-slots = <1>;
-	broken-cd;
+	non-removable;
 	cap-sdio-irq;
 	keep-power-in-suspend;
 	card-detect-delay = <200>;
-- 
2.4.3


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

* [PATCH 2/3] ARM: dts: Mark SDIO as non-removable in exynos5420-peach-pit
  2015-10-15 10:55 [PATCH 0/3] ARM: dts: Mark SDIO as non-removable for Exynos Chromebooks Javier Martinez Canillas
  2015-10-15 10:55 ` [PATCH 1/3] ARM: dts: Mark SDIO as non-removable in exynos5800-peach-pi Javier Martinez Canillas
@ 2015-10-15 10:55 ` Javier Martinez Canillas
  2015-10-15 10:55 ` [RFT PATCH 3/3] ARM: dts: Mark SDIO as non-removable in exynos5250-snow-common Javier Martinez Canillas
  2 siblings, 0 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2015-10-15 10:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Krzysztof Kozlowski, Kukjin Kim, Douglas Anderson, Alim Akhtar,
	Tomeu Vizoso, linux-arm-kernel, linux-samsung-soc,
	Javier Martinez Canillas

The Exynos5420 Peach Pit Chromebook has a Marvell WiFi SDIO chip which
can't neither be removed nor be detected. But the node isn't marked
as non-removable and instead has the broken-cd DT property.

This causes the device to be removed when the system enters into a
suspend state and the following warnings is shown after a resume:

[  181.944636] mmc2: error -2 during resume (card was removed?)

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 arch/arm/boot/dts/exynos5420-peach-pit.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index 72ba6f032ed7..293bf6a76a16 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -690,7 +690,7 @@
 &mmc_0 {
 	status = "okay";
 	num-slots = <1>;
-	broken-cd;
+	non-removable;
 	mmc-hs200-1_8v;
 	cap-mmc-highspeed;
 	non-removable;
-- 
2.4.3


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

* [RFT PATCH 3/3] ARM: dts: Mark SDIO as non-removable in exynos5250-snow-common
  2015-10-15 10:55 [PATCH 0/3] ARM: dts: Mark SDIO as non-removable for Exynos Chromebooks Javier Martinez Canillas
  2015-10-15 10:55 ` [PATCH 1/3] ARM: dts: Mark SDIO as non-removable in exynos5800-peach-pi Javier Martinez Canillas
  2015-10-15 10:55 ` [PATCH 2/3] ARM: dts: Mark SDIO as non-removable in exynos5420-peach-pit Javier Martinez Canillas
@ 2015-10-15 10:55 ` Javier Martinez Canillas
  2015-10-15 12:30   ` Tomeu Vizoso
  2 siblings, 1 reply; 6+ messages in thread
From: Javier Martinez Canillas @ 2015-10-15 10:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Krzysztof Kozlowski, Kukjin Kim, Douglas Anderson, Alim Akhtar,
	Tomeu Vizoso, linux-arm-kernel, linux-samsung-soc,
	Javier Martinez Canillas

The Exynos5250 Snow Chromebooks have a Marvell WiFi SDIO chip which
can't neither be removed nor be detected. But the node isn't marked
as non-removable and instead has the broken-cd DT property.

This causes the device to be removed when the system enters into a
suspend state and the following warnings is shown after a resume:

[  181.944636] mmc2: error -2 during resume (card was removed?)

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 arch/arm/boot/dts/exynos5250-snow-common.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
index 0a7f408824d8..bf27957fd660 100644
--- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
+++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
@@ -520,7 +520,7 @@
 &mmc_0 {
 	status = "okay";
 	num-slots = <1>;
-	broken-cd;
+	non-removable;
 	card-detect-delay = <200>;
 	samsung,dw-mshc-ciu-div = <3>;
 	samsung,dw-mshc-sdr-timing = <2 3>;
-- 
2.4.3


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

* Re: [RFT PATCH 3/3] ARM: dts: Mark SDIO as non-removable in exynos5250-snow-common
  2015-10-15 10:55 ` [RFT PATCH 3/3] ARM: dts: Mark SDIO as non-removable in exynos5250-snow-common Javier Martinez Canillas
@ 2015-10-15 12:30   ` Tomeu Vizoso
  2015-10-15 14:42     ` Javier Martinez Canillas
  0 siblings, 1 reply; 6+ messages in thread
From: Tomeu Vizoso @ 2015-10-15 12:30 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel@vger.kernel.org, Krzysztof Kozlowski, Kukjin Kim,
	Douglas Anderson, Alim Akhtar,
	linux-arm-kernel@lists.infradead.org, linux-samsung-soc

On 15 October 2015 at 12:55, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> The Exynos5250 Snow Chromebooks have a Marvell WiFi SDIO chip which
> can't neither be removed nor be detected. But the node isn't marked
> as non-removable and instead has the broken-cd DT property.
>
> This causes the device to be removed when the system enters into a
> suspend state and the following warnings is shown after a resume:
>
> [  181.944636] mmc2: error -2 during resume (card was removed?)

Hi Javier,

isn't wifi on snow on mmc_3?

With your patch, I don't see any change, but if I do it on mmc_3
instead, the machine fails to resume. Will try to get more info.

Regards,

Tomeu

> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> ---
>
>  arch/arm/boot/dts/exynos5250-snow-common.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> index 0a7f408824d8..bf27957fd660 100644
> --- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> @@ -520,7 +520,7 @@
>  &mmc_0 {
>         status = "okay";
>         num-slots = <1>;
> -       broken-cd;
> +       non-removable;
>         card-detect-delay = <200>;
>         samsung,dw-mshc-ciu-div = <3>;
>         samsung,dw-mshc-sdr-timing = <2 3>;
> --
> 2.4.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [RFT PATCH 3/3] ARM: dts: Mark SDIO as non-removable in exynos5250-snow-common
  2015-10-15 12:30   ` Tomeu Vizoso
@ 2015-10-15 14:42     ` Javier Martinez Canillas
  0 siblings, 0 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2015-10-15 14:42 UTC (permalink / raw)
  To: Tomeu Vizoso
  Cc: linux-kernel@vger.kernel.org, Krzysztof Kozlowski, Kukjin Kim,
	Douglas Anderson, Alim Akhtar,
	linux-arm-kernel@lists.infradead.org, linux-samsung-soc

Hello Tomeu,

On 10/15/2015 02:30 PM, Tomeu Vizoso wrote:
> On 15 October 2015 at 12:55, Javier Martinez Canillas
> <javier@osg.samsung.com> wrote:
>> The Exynos5250 Snow Chromebooks have a Marvell WiFi SDIO chip which
>> can't neither be removed nor be detected. But the node isn't marked
>> as non-removable and instead has the broken-cd DT property.
>>
>> This causes the device to be removed when the system enters into a
>> suspend state and the following warnings is shown after a resume:
>>
>> [  181.944636] mmc2: error -2 during resume (card was removed?)
> 
> Hi Javier,
> 
> isn't wifi on snow on mmc_3?
>

Sigh, you are correct. It seems I have a really bad day and missed.

I got confused though because the node for mmc_0 (eMMC) in Snow
also has a broken-cd property instead of non-removable. I'll add
another patch to the series changing that.

I also noticed that the mmc_0 (eMMC) node in Peach boards have both
non-removable and broken-cd which doesn't make sense and the MMC
DT binding is clear that the options are mutually exclusive.

Seems to be copy & paste error from the vendor tree since the
downstream DTS also have both properties in the nodes. So I'll also
add patches to remove the broken-cd from these nodes.

> With your patch, I don't see any change, but if I do it on mmc_3
> instead, the machine fails to resume. Will try to get more info.
>

Yes, I wouldn't expect any changes since the patch is marking the
eMMC as non-removable but I wonder why is causing a fail to resume.
Are you sure the system is resuming without $SUBJECT? You mentioned
in IRC that S2R was broken for Snow in linux-next.

> Regards,
> 
> Tomeu
> 

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

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

end of thread, other threads:[~2015-10-15 14:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 10:55 [PATCH 0/3] ARM: dts: Mark SDIO as non-removable for Exynos Chromebooks Javier Martinez Canillas
2015-10-15 10:55 ` [PATCH 1/3] ARM: dts: Mark SDIO as non-removable in exynos5800-peach-pi Javier Martinez Canillas
2015-10-15 10:55 ` [PATCH 2/3] ARM: dts: Mark SDIO as non-removable in exynos5420-peach-pit Javier Martinez Canillas
2015-10-15 10:55 ` [RFT PATCH 3/3] ARM: dts: Mark SDIO as non-removable in exynos5250-snow-common Javier Martinez Canillas
2015-10-15 12:30   ` Tomeu Vizoso
2015-10-15 14:42     ` Javier Martinez Canillas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox