* Adding esdhc4 eMMC support on mx6sabresd
@ 2014-05-07 20:14 Fabio Estevam
2014-05-08 7:18 ` Lothar Waßmann
0 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2014-05-07 20:14 UTC (permalink / raw)
To: linux-arm-kernel
Hi Dong,
I have tested the following patch to add support for the emmc port on
mx6qsabresd:
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -444,6 +444,21 @@
MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059
>;
};
+
+ pinctrl_usdhc4: usdhc4grp {
+ fsl,pins = <
+ MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059
+ MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059
+ MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
+ MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
+ MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
+ MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
+ MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059
+ MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059
+ MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059
+ MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059
+ >;
+ };
};
gpio_leds {
@@ -535,3 +550,11 @@
wp-gpios = <&gpio2 1 0>;
status = "okay";
};
+
+&usdhc4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usdhc4>;
+ bus-width = <8>;
+ non-removable;
+ status = "okay";
+};
,and this is the result:
mmc2: new high speed DDR MMC card at address 0001
mmcblk1: mmc2:0001 SEM08G 7.39 GiB
mmcblk1boot0: mmc2:0001 SEM08G partition 1 2.00 MiB
mmcblk1boot1: mmc2:0001 SEM08G partition 2 2.00 MiB
mmcblk1rpmb: mmc2:0001 SEM08G partition 3 128 KiB
mmcblk1: error -110 sending stop command, original cmd response 0x900, card sta0
mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card 0
mmcblk1: retrying using single block read
mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card 0
end_request: I/O error, dev mmcblk1, sector 0
mmcblk1: error -84 transferring data, sector 1, nr 7, cmd response 0x900, card 0
end_request: I/O error, dev mmcblk1, sector 1
mmcblk1: error -84 transferring data, sector 2, nr 6, cmd response 0x900, card 0
end_request: I/O error, dev mmcblk1, sector 2
mmcblk1: error -84 transferring data, sector 3, nr 5, cmd response 0x900, card 0
end_request: I/O error, dev mmcblk1, sector 3
mmcblk1: error -84 transferring data, sector 4, nr 4, cmd response 0x900, card 0
....
Is there any extra patch I need to apply? I am running linux-next 20140506.
Thanks,
Fabio Estevam
^ permalink raw reply [flat|nested] 7+ messages in thread* Adding esdhc4 eMMC support on mx6sabresd
2014-05-07 20:14 Adding esdhc4 eMMC support on mx6sabresd Fabio Estevam
@ 2014-05-08 7:18 ` Lothar Waßmann
2014-05-08 10:17 ` Dong Aisheng
0 siblings, 1 reply; 7+ messages in thread
From: Lothar Waßmann @ 2014-05-08 7:18 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Fabio Estevam wrote:
> Hi Dong,
>
> I have tested the following patch to add support for the emmc port on
> mx6qsabresd:
>
> --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> @@ -444,6 +444,21 @@
> MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059
> >;
> };
> +
> + pinctrl_usdhc4: usdhc4grp {
> + fsl,pins = <
> + MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059
> + MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059
> + MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
> + MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
> + MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
> + MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
> + MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059
> + MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059
> + MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059
> + MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059
[...]
>
> Is there any extra patch I need to apply? I am running linux-next 20140506.
>
I'm using the pad settings 0x070b1 for our i.MX6 module with eMMC.
At least you should probably drop the HYS setting (0x10000), since
according to my experience the SD interface works much better with
hysteresis disabled.
Lothar Wa?mann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread* Adding esdhc4 eMMC support on mx6sabresd
2014-05-08 7:18 ` Lothar Waßmann
@ 2014-05-08 10:17 ` Dong Aisheng
2014-05-08 14:05 ` Fabio Estevam
2014-05-09 3:16 ` Shawn Guo
0 siblings, 2 replies; 7+ messages in thread
From: Dong Aisheng @ 2014-05-08 10:17 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, May 08, 2014 at 09:18:35AM +0200, Lothar Wa?mann wrote:
> Hi,
>
> Fabio Estevam wrote:
> > Hi Dong,
> >
> > I have tested the following patch to add support for the emmc port on
> > mx6qsabresd:
> >
> > --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> > +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> > @@ -444,6 +444,21 @@
> > MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059
> > >;
> > };
> > +
> > + pinctrl_usdhc4: usdhc4grp {
> > + fsl,pins = <
> > + MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059
> > + MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059
> > + MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
> > + MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
> > + MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
> > + MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
> > + MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059
> > + MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059
> > + MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059
> > + MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059
> [...]
> >
> > Is there any extra patch I need to apply? I am running linux-next 20140506.
> >
> I'm using the pad settings 0x070b1 for our i.MX6 module with eMMC.
> At least you should probably drop the HYS setting (0x10000), since
> according to my experience the SD interface works much better with
> hysteresis disabled.
>
I'm not very sure about HYS bit, but it should not be pad setting issue.
This pad setting was tested ok with FSL internal tree.
I just tested an old Chris/mmc-next tree which is 3.14 rc2 with the top commit is b42b9b.
The eMMC works well on SabreSD boards.
But it failed and got the same issue with latest chris/mmc-next tree.
I noticed there's no changes on sdhci-esdhc-imx.c
Probably some other changes breaks this function.
Fabio,
You may bisect it yourself or i will do it later when i'm a bit free.
Shawn,
I remember this patch should have been upstream through your tree long time ago.
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-October/206446.html
It seems somehow missed.
Regards
Dong Aisheng
>
> Lothar Wa?mann
> --
> ___________________________________________________________
>
> Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
> Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
> Gesch?ftsf?hrer: Matthias Kaussen
> Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
>
> www.karo-electronics.de | info at karo-electronics.de
> ___________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread* Adding esdhc4 eMMC support on mx6sabresd
2014-05-08 10:17 ` Dong Aisheng
@ 2014-05-08 14:05 ` Fabio Estevam
2014-05-09 3:16 ` Shawn Guo
1 sibling, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2014-05-08 14:05 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, May 8, 2014 at 7:17 AM, Dong Aisheng <b29396@freescale.com> wrote:
> I'm not very sure about HYS bit, but it should not be pad setting issue.
> This pad setting was tested ok with FSL internal tree.
>
> I just tested an old Chris/mmc-next tree which is 3.14 rc2 with the top commit is b42b9b.
> The eMMC works well on SabreSD boards.
> But it failed and got the same issue with latest chris/mmc-next tree.
> I noticed there's no changes on sdhci-esdhc-imx.c
> Probably some other changes breaks this function.
>
> Fabio,
> You may bisect it yourself or i will do it later when i'm a bit free.
Ok, I have just tested with Shawn's branch and the mmc error does not
happen, so it must be something in linux-next that causes the issue.
Will submit the dts change.
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 7+ messages in thread
* Adding esdhc4 eMMC support on mx6sabresd
2014-05-08 10:17 ` Dong Aisheng
2014-05-08 14:05 ` Fabio Estevam
@ 2014-05-09 3:16 ` Shawn Guo
2014-05-09 2:24 ` Dong Aisheng
1 sibling, 1 reply; 7+ messages in thread
From: Shawn Guo @ 2014-05-09 3:16 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, May 08, 2014 at 06:17:32PM +0800, Dong Aisheng wrote:
> I just tested an old Chris/mmc-next tree which is 3.14 rc2 with the top commit is b42b9b.
> The eMMC works well on SabreSD boards.
> But it failed and got the same issue with latest chris/mmc-next tree.
> I noticed there's no changes on sdhci-esdhc-imx.c
> Probably some other changes breaks this function.
>
> Fabio,
> You may bisect it yourself or i will do it later when i'm a bit free.
The regression is caused by the following commit ...
commit 79f7ae7c45a6ccf04e2908337461dee615f6afb0
Author: Seungwon Jeon <tgih.jun@samsung.com>
Date: Fri Mar 14 21:11:56 2014 +0900
mmc: clarify DDR timing mode between SD-UHS and eMMC
This change distinguishes DDR timing mode of current
mixed usage to clarify device type.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
... and the line below.
@@ -1264,7 +1264,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
goto err;
}
mmc_card_set_ddr_mode(card);
- mmc_set_timing(card->host, MMC_TIMING_UHS_DDR50);
+ mmc_set_timing(card->host, MMC_TIMING_MMC_DDR52);
mmc_set_bus_width(card->host, bus_width);
}
}
> Shawn,
> I remember this patch should have been upstream through your tree long time ago.
> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-October/206446.html
> It seems somehow missed.
Ah, yes. It got lost.
Shawn
^ permalink raw reply [flat|nested] 7+ messages in thread* Adding esdhc4 eMMC support on mx6sabresd
2014-05-09 3:16 ` Shawn Guo
@ 2014-05-09 2:24 ` Dong Aisheng
0 siblings, 0 replies; 7+ messages in thread
From: Dong Aisheng @ 2014-05-09 2:24 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, May 09, 2014 at 11:16:25AM +0800, Shawn Guo wrote:
> On Thu, May 08, 2014 at 06:17:32PM +0800, Dong Aisheng wrote:
> > I just tested an old Chris/mmc-next tree which is 3.14 rc2 with the top commit is b42b9b.
> > The eMMC works well on SabreSD boards.
> > But it failed and got the same issue with latest chris/mmc-next tree.
> > I noticed there's no changes on sdhci-esdhc-imx.c
> > Probably some other changes breaks this function.
> >
> > Fabio,
> > You may bisect it yourself or i will do it later when i'm a bit free.
>
> The regression is caused by the following commit ...
>
> commit 79f7ae7c45a6ccf04e2908337461dee615f6afb0
> Author: Seungwon Jeon <tgih.jun@samsung.com>
> Date: Fri Mar 14 21:11:56 2014 +0900
>
> mmc: clarify DDR timing mode between SD-UHS and eMMC
>
> This change distinguishes DDR timing mode of current
> mixed usage to clarify device type.
>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Chris Ball <chris@printf.net>
>
> ... and the line below.
>
> @@ -1264,7 +1264,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
> goto err;
> }
> mmc_card_set_ddr_mode(card);
> - mmc_set_timing(card->host, MMC_TIMING_UHS_DDR50);
> + mmc_set_timing(card->host, MMC_TIMING_MMC_DDR52);
> mmc_set_bus_width(card->host, bus_width);
> }
> }
>
Thanks for the info.
The plat driver is still using UHS_DDR50 which may need update too.
I will submit a patch to fix it ASAP.
Regards
Dong Aisheng
>
> > Shawn,
> > I remember this patch should have been upstream through your tree long time ago.
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-October/206446.html
> > It seems somehow missed.
>
> Ah, yes. It got lost.
>
> Shawn
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAKVbgXpn43n-8Azjc9f2-RHw51uVAAKkv_dT7b_iXWxNm7q+Qw@mail.gmail.com>]
end of thread, other threads:[~2014-11-18 15:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07 20:14 Adding esdhc4 eMMC support on mx6sabresd Fabio Estevam
2014-05-08 7:18 ` Lothar Waßmann
2014-05-08 10:17 ` Dong Aisheng
2014-05-08 14:05 ` Fabio Estevam
2014-05-09 3:16 ` Shawn Guo
2014-05-09 2:24 ` Dong Aisheng
[not found] <CAKVbgXpn43n-8Azjc9f2-RHw51uVAAKkv_dT7b_iXWxNm7q+Qw@mail.gmail.com>
2014-11-18 15:02 ` Fabio Estevam
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).