* [PATCH RESEND] ARM: dts: exynos5422-odroidxu3: add mmc detect gpio
@ 2015-02-13 7:48 Andrzej Hajda
2015-02-13 10:03 ` Javier Martinez Canillas
0 siblings, 1 reply; 4+ messages in thread
From: Andrzej Hajda @ 2015-02-13 7:48 UTC (permalink / raw)
To: linux-mmc
Cc: Andrzej Hajda, Seungwon Jeon, Jaehoon Chung, Marek Szyprowski,
Kyungmin Park, linux-samsung-soc, kgene, javier
The patch adds gpio for detecting presence of MMC card.
It fixes issue with kernel hang due when MMC card is missing.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
Hi,
This is just resend of the patch with added mmc ML and dw-mmc maintainers.
Javier, I have no access to peach-pi(t) schematics, so I do not know if they
have mmc-cd line connected to gpc0-2 gpio, but I guess it could be the case.
You could check if similar patches will fix the issue for them.
Regards
Andrzej
arch/arm/boot/dts/exynos5422-odroidxu3.dts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
index 47ec9bf..a563811 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
@@ -11,6 +11,7 @@
*/
/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
#include "exynos5800.dtsi"
/ {
@@ -355,13 +356,13 @@
&mmc_0 {
status = "okay";
- broken-cd;
+ cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>;
card-detect-delay = <200>;
samsung,dw-mshc-ciu-div = <3>;
samsung,dw-mshc-sdr-timing = <0 4>;
samsung,dw-mshc-ddr-timing = <0 2>;
pinctrl-names = "default";
- pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>;
+ pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8 &sd0_cd>;
bus-width = <8>;
cap-mmc-highspeed;
};
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH RESEND] ARM: dts: exynos5422-odroidxu3: add mmc detect gpio
2015-02-13 7:48 [PATCH RESEND] ARM: dts: exynos5422-odroidxu3: add mmc detect gpio Andrzej Hajda
@ 2015-02-13 10:03 ` Javier Martinez Canillas
2015-05-04 9:45 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Javier Martinez Canillas @ 2015-02-13 10:03 UTC (permalink / raw)
To: Andrzej Hajda
Cc: linux-mmc@vger.kernel.org, Seungwon Jeon, Jaehoon Chung,
Marek Szyprowski, Kyungmin Park,
linux-samsung-soc@vger.kernel.org, Kukjin Kim
Hello Andrzej,
On Fri, Feb 13, 2015 at 8:48 AM, Andrzej Hajda <a.hajda@samsung.com> wrote:
> The patch adds gpio for detecting presence of MMC card.
> It fixes issue with kernel hang due when MMC card is missing.
Maybe s/MMC/eMMC here? to make more clear that this patch is solving
an issue when the eMMC and not the uSD is missing.
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
> Hi,
>
> This is just resend of the patch with added mmc ML and dw-mmc maintainers.
>
> Javier, I have no access to peach-pi(t) schematics, so I do not know if they
> have mmc-cd line connected to gpc0-2 gpio, but I guess it could be the case.
> You could check if similar patches will fix the issue for them.
>
Yes, both the eMMC and uSD card detection lines in the Peach Pit/Pi
are connected to the XMMC0CDN and XMMC2CDN built-in CD# pins so is the
same than the Odroid XU3 if I read the schematics correctly since the
those pins are also GPC0_2 and GPC2_2.
Now, in the Peach Pit Chromebook the eMMC is not removable so card
detection is not an issue there, the problem I'm having is that card
detection for the uSD seems to be broken after adding Addy's patches:
mmc: dw_mmc: fix bug that cause 'Timeout sending command'
mmc: dw_mmc: Don't start command while data busy
And adding a cd-gpios property with a phandle to gpc2_2 to the mmc2
device node does not help.
But without those patches, I've timeouts when mmc commands are sent to
the SDIO slot which has the wifi chip connected to.
> Regards
> Andrzej
>
> arch/arm/boot/dts/exynos5422-odroidxu3.dts | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> index 47ec9bf..a563811 100644
> --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> @@ -11,6 +11,7 @@
> */
>
> /dts-v1/;
> +#include <dt-bindings/gpio/gpio.h>
> #include "exynos5800.dtsi"
>
> / {
> @@ -355,13 +356,13 @@
>
> &mmc_0 {
> status = "okay";
> - broken-cd;
> + cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>;
> card-detect-delay = <200>;
> samsung,dw-mshc-ciu-div = <3>;
> samsung,dw-mshc-sdr-timing = <0 4>;
> samsung,dw-mshc-ddr-timing = <0 2>;
> pinctrl-names = "default";
> - pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>;
> + pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8 &sd0_cd>;
> bus-width = <8>;
> cap-mmc-highspeed;
> };
> --
Your patch looks good to me though from what I've seen in the Odroid
XU3 schematic and taking into account that the eMMC can be removed in
that board.
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Best regards,
Javier
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH RESEND] ARM: dts: exynos5422-odroidxu3: add mmc detect gpio
2015-02-13 10:03 ` Javier Martinez Canillas
@ 2015-05-04 9:45 ` Krzysztof Kozlowski
2015-05-04 11:28 ` Andrzej Hajda
0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2015-05-04 9:45 UTC (permalink / raw)
To: Javier Martinez Canillas, Andrzej Hajda
Cc: linux-mmc@vger.kernel.org, Seungwon Jeon, Jaehoon Chung,
Marek Szyprowski, Kyungmin Park,
linux-samsung-soc@vger.kernel.org, Kukjin Kim
W dniu 13.02.2015 o 19:03, Javier Martinez Canillas pisze:
> Hello Andrzej,
>
> On Fri, Feb 13, 2015 at 8:48 AM, Andrzej Hajda <a.hajda@samsung.com> wrote:
>> The patch adds gpio for detecting presence of MMC card.
>> It fixes issue with kernel hang due when MMC card is missing.
>
> Maybe s/MMC/eMMC here? to make more clear that this patch is solving
> an issue when the eMMC and not the uSD is missing.
>
>>
>> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
>> ---
>> Hi,
>>
>> This is just resend of the patch with added mmc ML and dw-mmc maintainers.
>>
>> Javier, I have no access to peach-pi(t) schematics, so I do not know if they
>> have mmc-cd line connected to gpc0-2 gpio, but I guess it could be the case.
>> You could check if similar patches will fix the issue for them.
>>
>
> Yes, both the eMMC and uSD card detection lines in the Peach Pit/Pi
> are connected to the XMMC0CDN and XMMC2CDN built-in CD# pins so is the
> same than the Odroid XU3 if I read the schematics correctly since the
> those pins are also GPC0_2 and GPC2_2.
>
> Now, in the Peach Pit Chromebook the eMMC is not removable so card
> detection is not an issue there, the problem I'm having is that card
> detection for the uSD seems to be broken after adding Addy's patches:
>
> mmc: dw_mmc: fix bug that cause 'Timeout sending command'
> mmc: dw_mmc: Don't start command while data busy
>
> And adding a cd-gpios property with a phandle to gpc2_2 to the mmc2
> device node does not help.
>
> But without those patches, I've timeouts when mmc commands are sent to
> the SDIO slot which has the wifi chip connected to.
>
>> Regards
>> Andrzej
>>
>> arch/arm/boot/dts/exynos5422-odroidxu3.dts | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>> index 47ec9bf..a563811 100644
>> --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>> @@ -11,6 +11,7 @@
>> */
>>
>> /dts-v1/;
>> +#include <dt-bindings/gpio/gpio.h>
>> #include "exynos5800.dtsi"
>>
>> / {
>> @@ -355,13 +356,13 @@
>>
>> &mmc_0 {
>> status = "okay";
>> - broken-cd;
>> + cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>;
>> card-detect-delay = <200>;
>> samsung,dw-mshc-ciu-div = <3>;
>> samsung,dw-mshc-sdr-timing = <0 4>;
>> samsung,dw-mshc-ddr-timing = <0 2>;
>> pinctrl-names = "default";
>> - pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>;
>> + pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8 &sd0_cd>;
>> bus-width = <8>;
>> cap-mmc-highspeed;
>> };
>> --
>
> Your patch looks good to me though from what I've seen in the Odroid
> XU3 schematic and taking into account that the eMMC can be removed in
> that board.
>
> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Hi Andrzej,
The patch no longer applies cleanly, so could you re-spin it with
Javier's tag above?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH RESEND] ARM: dts: exynos5422-odroidxu3: add mmc detect gpio
2015-05-04 9:45 ` Krzysztof Kozlowski
@ 2015-05-04 11:28 ` Andrzej Hajda
0 siblings, 0 replies; 4+ messages in thread
From: Andrzej Hajda @ 2015-05-04 11:28 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Andrzej Hajda, linux-mmc@vger.kernel.org, Seungwon Jeon,
Jaehoon Chung, Marek Szyprowski, Kyungmin Park,
linux-samsung-soc@vger.kernel.org, Kukjin Kim,
Javier Martinez Canillas
The patch adds gpio for detecting presence of MMC card.
It fixes issue with kernel hang when MMC card is missing.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
Hi Krzysztof,
This is 2nd try today, previously there were missing some
addresses in Cc.
The patch is rebased on the latest next.
Regards
Andrzej
---
arch/arm/boot/dts/exynos5422-odroidxu3.dts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
index edc25cf..cb649b1 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
@@ -11,6 +11,7 @@
*/
/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
#include "exynos5800.dtsi"
/ {
@@ -306,13 +307,13 @@
&mmc_0 {
status = "okay";
mmc-pwrseq = <&emmc_pwrseq>;
- broken-cd;
+ cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>;
card-detect-delay = <200>;
samsung,dw-mshc-ciu-div = <3>;
samsung,dw-mshc-sdr-timing = <0 4>;
samsung,dw-mshc-ddr-timing = <0 2>;
pinctrl-names = "default";
- pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8>;
+ pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd>;
bus-width = <8>;
cap-mmc-highspeed;
};
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-04 11:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-13 7:48 [PATCH RESEND] ARM: dts: exynos5422-odroidxu3: add mmc detect gpio Andrzej Hajda
2015-02-13 10:03 ` Javier Martinez Canillas
2015-05-04 9:45 ` Krzysztof Kozlowski
2015-05-04 11:28 ` Andrzej Hajda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox