hi Leo,
My 4.4 kernel can't detect any sd card on hikey board but 3.18 kernel can. I run the kernel from u-boot bootloader.
3.18 kernel log: ---------------- [ 3.370348] mmc_host mmc1: Bus speed (slot 0) = 99200000Hz (slot req 100000000Hz, actual 99200000HZ div = 0) [ 3.370365] mmc1: new ultra high speed SDR50 SDHC card at address aaaa [ 3.371147] mmcblk1: mmc1:aaaa SS08G 7.40 GiB [ 3.372995] mmcblk1: p1 p2 p3 p4
4.4 kernel log: --------------- 4.4 kernel from: git://github.com/96boards-hikey/linux.git hikey-mainline-rebase and config is defconfig.
# uname -a Linux linaro-alip 4.4.0+ #2 SMP PREEMPT Sun Apr 10 21:40:33 CST 2016 aarch64 GNU/Linux # dmesg|grep mmc1 [ 0.247672] dwmmc_k3 f723e000.dwmmc1: fifo-depth property not found, using value of FIFOTH register as default [ 0.247728] dwmmc_k3 f723e000.dwmmc1: IDMAC supports 32-bit address mode. [ 0.247808] dwmmc_k3 f723e000.dwmmc1: Using internal DMA controller. [ 0.247818] dwmmc_k3 f723e000.dwmmc1: Version ID is 250a [ 0.247850] dwmmc_k3 f723e000.dwmmc1: DW MMC controller at irq 40,32 bit host data width,64 deep fifo [ 0.248038] dwmmc_k3 f723e000.dwmmc1: Got CD GPIO [ 0.263396] mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 400000Hz, actual 390625HZ div = 32) [ 0.280453] dwmmc_k3 f723e000.dwmmc1: 1 slots initialized [ 0.376089] mmc1: error -110 whilst initialising SD card
Does 4.4 kernel still not support SD card?
BR, Liming Wang
Hi, Liming
The subject line is miss-leading. :)
Kernel 4.4 based hikey-mainline-rebase is full featured. MMC/SD card is supported. One of the possible reason should be related to mmc host controller not reset completely.
There is no such issue in UEFI. But since you are using uboot, maybe it lacks some initialization codes for mmc controller.
How about you try this patch? Modify the usleep_range() value if (100, 200) doesn't work. The spec said several clk period is enough.
Let me know your result. Thanks.
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 7e7f25b..22af896 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -3028,8 +3028,11 @@ int dw_mci_probe(struct dw_mci *host) } }
- if (host->pdata->rstc != NULL) + if (host->pdata->rstc != NULL) { + reset_control_assert(host->pdata->rstc); + usleep_range(100, 200); reset_control_deassert(host->pdata->rstc); + }
setup_timer(&host->cmd11_timer, dw_mci_cmd11_timer, (unsigned long)host);
-Guodong
On 21 April 2016 at 00:10, Liming Wang liming.wang@canonical.com wrote:
hi Leo,
My 4.4 kernel can't detect any sd card on hikey board but 3.18 kernel can. I run the kernel from u-boot bootloader.
3.18 kernel log:
[ 3.370348] mmc_host mmc1: Bus speed (slot 0) = 99200000Hz (slot req 100000000Hz, actual 99200000HZ div = 0) [ 3.370365] mmc1: new ultra high speed SDR50 SDHC card at address aaaa [ 3.371147] mmcblk1: mmc1:aaaa SS08G 7.40 GiB [ 3.372995] mmcblk1: p1 p2 p3 p4
4.4 kernel log:
4.4 kernel from: git://github.com/96boards-hikey/linux.git hikey-mainline-rebase and config is defconfig.
# uname -a Linux linaro-alip 4.4.0+ #2 SMP PREEMPT Sun Apr 10 21:40:33 CST 2016 aarch64 GNU/Linux # dmesg|grep mmc1 [ 0.247672] dwmmc_k3 f723e000.dwmmc1: fifo-depth property not found, using value of FIFOTH register as default [ 0.247728] dwmmc_k3 f723e000.dwmmc1: IDMAC supports 32-bit address mode. [ 0.247808] dwmmc_k3 f723e000.dwmmc1: Using internal DMA controller. [ 0.247818] dwmmc_k3 f723e000.dwmmc1: Version ID is 250a [ 0.247850] dwmmc_k3 f723e000.dwmmc1: DW MMC controller at irq 40,32 bit host data width,64 deep fifo [ 0.248038] dwmmc_k3 f723e000.dwmmc1: Got CD GPIO [ 0.263396] mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 400000Hz, actual 390625HZ div = 32) [ 0.280453] dwmmc_k3 f723e000.dwmmc1: 1 slots initialized [ 0.376089] mmc1: error -110 whilst initialising SD card
Does 4.4 kernel still not support SD card?
As said, supported.
-Guodong
BR, Liming Wang _______________________________________________ Dev mailing list Dev@lists.96boards.org https://lists.96boards.org/mailman/listinfo/dev
Hi Guodong,
On 21 April 2016 at 02:38, Guodong Xu guodong.xu@linaro.org wrote:
Hi, Liming
The subject line is miss-leading. :)
Kernel 4.4 based hikey-mainline-rebase is full featured. MMC/SD card is supported. One of the possible reason should be related to mmc host controller not reset completely.
There is no such issue in UEFI. But since you are using uboot, maybe it lacks some initialization codes for mmc controller.
Does the UEFI code assert the reset line on the IP before booting the kernel? If so I might need to add something similar to U-Boot.
regards,
Peter.
On 21 April 2016 at 15:29, Peter Griffin peter.griffin@linaro.org wrote:
Hi Guodong,
On 21 April 2016 at 02:38, Guodong Xu guodong.xu@linaro.org wrote:
Hi, Liming
The subject line is miss-leading. :)
Kernel 4.4 based hikey-mainline-rebase is full featured. MMC/SD card is supported. One of the possible reason should be related to mmc host controller not reset completely.
There is no such issue in UEFI. But since you are using uboot, maybe it lacks some initialization codes for mmc controller.
Does the UEFI code assert the reset line on the IP before booting the kernel? If so I might need to add something similar to U-Boot.
UEFI didn't reset eMMC/SD just before booting the kernel.
Regards Haojian
On 21 April 2016 at 16:07, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 21 April 2016 at 15:29, Peter Griffin peter.griffin@linaro.org wrote:
Hi Guodong,
On 21 April 2016 at 02:38, Guodong Xu guodong.xu@linaro.org wrote:
Hi, Liming
The subject line is miss-leading. :)
Kernel 4.4 based hikey-mainline-rebase is full featured. MMC/SD card is supported. One of the possible reason should be related to mmc host controller not reset completely.
There is no such issue in UEFI. But since you are using uboot, maybe it lacks some initialization codes for mmc controller.
Does the UEFI code assert the reset line on the IP before booting the kernel? If so I might need to add something similar to U-Boot.
UEFI didn't reset eMMC/SD just before booting the kernel.
Let's wait and see Liming's test result. I would prefer to do this in mmc kernel driver, instead of bootloader.
From SoC hardware engineer, he confirmed that need to set assert bit
then wait, then deassert.
-Guodong
Regards Haojian
On Thu, Apr 21, 2016 at 04:38:29PM +0800, Guodong Xu wrote:
On 21 April 2016 at 16:07, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 21 April 2016 at 15:29, Peter Griffin peter.griffin@linaro.org wrote:
Hi Guodong,
On 21 April 2016 at 02:38, Guodong Xu guodong.xu@linaro.org wrote:
Hi, Liming
The subject line is miss-leading. :)
Kernel 4.4 based hikey-mainline-rebase is full featured. MMC/SD card is supported. One of the possible reason should be related to mmc host controller not reset completely.
There is no such issue in UEFI. But since you are using uboot, maybe it lacks some initialization codes for mmc controller.
Does the UEFI code assert the reset line on the IP before booting the kernel? If so I might need to add something similar to U-Boot.
UEFI didn't reset eMMC/SD just before booting the kernel.
Let's wait and see Liming's test result. I would prefer to do this in mmc kernel driver, instead of bootloader.
Hi Guodong,
I have tested your patch, but unfortunately, with your patch, my 4.4 kernel still can't detect any sd card on hikey board. BTW, my hikey board is LeMaker's 2G DRAM/8G NAND FLash version.
But I found some causes why the kernel can't detect the sd card: it's all about the dtb.
1. For 3.18 kernel, I used dtbs from snapshot version [1] and release version [2], but only release version works well. After investigating the code, I found below commit removes some settings from dts:
commit d840635065f5a2731dea22cf827d8dadc6524729 Author: Fei Wang william.wfei@gmail.com Date: Fri Dec 18 22:31:55 2015 +0800
dts: hikey: fix some sd card partition not recognized
Some sd card be recognized SDR50 and set 1.8v, but when read partition return -84 error so that not get partition information.
TODO:make sure set voltage is right!
If I revert this commit, the 3.18 kernel can detect sd cards.
2. For 4.4 kernel, I found this commit modifies the wrong location:
commit 40fd5e086e1ef1835b97f11f4f5d6a3253c2fe3d Author: Guodong Xu guodong.xu@linaro.org Date: Sat Feb 6 19:55:49 2016 +0800
arm64: dts: hi6220: add sd-uhs- properties into dwmmc_1
With these properties added, sd cards inserted into hikey can work at UHS mode if they have such capability.
Due to some silicon defect in hi6220, a UHS support patch must be applied into drivers/mmc/host/dw_mmc to enable UHS mode. If you didn't add this patch, but added sd-uhs- properties into dwmmc_1, then sd cards cannot work.
This patch should modify dwmmc_1 but it actually modifies dwmmc_0. After fix this bug, my 4.4 kernel also can detect sd card.
3. In all my testings, whether 3.18 or 4.4 kernel, on UEFI or u-boot, the kernel can't detect sd card when booting up. Only if I re-insert the sd card to slot, the kernel could detect the sd card.
4. But the detections are not 100% successful.
If it fails, the kernel prints: mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 400000Hz, actual 390625HZ div = 32) mmc1: error -110 whilst initialising SD card
If it succeeds, the kernel prints: mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 100000000Hz, actual 100000000HZ div = 0) mmc1: new ultra high speed SDR50 SDHC card at address aaaa
It seems that when host->bus_hz is 100000000Hz, it will succeed, otherwise, 25000000Hz or 50000000Hz, it always fails.
Wish my testing results may help you to fix the bug.
BR, Liming Wang
[1] https://builds.96boards.org/snapshots/hikey/linaro/debian/latest/ [2] https://builds.96boards.org/releases/hikey/linaro/debian/latest/
From SoC hardware engineer, he confirmed that need to set assert bit then wait, then deassert.
-Guodong
Regards Haojian
Dev mailing list Dev@lists.96boards.org https://lists.96boards.org/mailman/listinfo/dev
On 21 April 2016 at 21:11, Liming Wang liming.wang@canonical.com wrote:
On Thu, Apr 21, 2016 at 04:38:29PM +0800, Guodong Xu wrote:
On 21 April 2016 at 16:07, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 21 April 2016 at 15:29, Peter Griffin peter.griffin@linaro.org wrote:
Hi Guodong,
On 21 April 2016 at 02:38, Guodong Xu guodong.xu@linaro.org wrote:
Hi, Liming
The subject line is miss-leading. :)
Kernel 4.4 based hikey-mainline-rebase is full featured. MMC/SD card is supported. One of the possible reason should be related to mmc host controller not reset completely.
There is no such issue in UEFI. But since you are using uboot, maybe it lacks some initialization codes for mmc controller.
Does the UEFI code assert the reset line on the IP before booting the kernel? If so I might need to add something similar to U-Boot.
UEFI didn't reset eMMC/SD just before booting the kernel.
Let's wait and see Liming's test result. I would prefer to do this in mmc kernel driver, instead of bootloader.
Hi Guodong,
I have tested your patch, but unfortunately, with your patch, my 4.4 kernel still can't detect any sd card on hikey board. BTW, my hikey board is LeMaker's 2G DRAM/8G NAND FLash version.
But I found some causes why the kernel can't detect the sd card: it's all about the dtb.
For 3.18 kernel, I used dtbs from snapshot version [1] and release version [2], but only release version works well. After investigating the code, I found below commit removes some settings from dts:
commit d840635065f5a2731dea22cf827d8dadc6524729 Author: Fei Wang william.wfei@gmail.com Date: Fri Dec 18 22:31:55 2015 +0800
dts: hikey: fix some sd card partition not recognized Some sd card be recognized SDR50 and set 1.8v, but when read partition return -84 error so that not get partition information. TODO:make sure set voltage is right!
If I revert this commit, the 3.18 kernel can detect sd cards.
From this and log messages below, your SD card is a 'UHS' mode card.
(https://www.sdcard.org/developers/overview/bus_speed/). Let me know if it is not.
- For 4.4 kernel, I found this commit modifies the wrong location:
commit 40fd5e086e1ef1835b97f11f4f5d6a3253c2fe3d Author: Guodong Xu guodong.xu@linaro.org Date: Sat Feb 6 19:55:49 2016 +0800
arm64: dts: hi6220: add sd-uhs- properties into dwmmc_1 With these properties added, sd cards inserted into hikey can work at UHS mode if they have such capability. Due to some silicon defect in hi6220, a UHS support patch must be applied into drivers/mmc/host/dw_mmc to enable UHS mode. If you didn't add this patch, but added sd-uhs- properties into dwmmc_1, then sd cards cannot work.
This patch should modify dwmmc_1 but it actually modifies dwmmc_0. After fix this bug, my 4.4 kernel also can detect sd card.
Thanks a lot. I will fix that.
- In all my testings, whether 3.18 or 4.4 kernel, on UEFI or u-boot, the kernel
can't detect sd card when booting up. Only if I re-insert the sd card to slot, the kernel could detect the sd card.
The boot sequence of UEFI is: if SD card exists, it will try boot from SD card; when there is no valid partition and kernel image (and files) in SD cards, then it will not boot. Does this match what you saw on UEFI w/ both 3.18 and 4.4 kernel?
- But the detections are not 100% successful.
Do you mean on 3.18 or 4.4? If 3.18, I'm afraid we will not do anything since it's already released and moved on to 4.4.
I have a board with me using 4.6-rc3 kernel, about 20 insertion/removal, UHS-1 mode sd, all success.
I will test a 4.4 version in this afternoon. Will report back.
If it fails, the kernel prints: mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 400000Hz, actual 390625HZ div = 32) mmc1: error -110 whilst initialising SD card
If it succeeds, the kernel prints: mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 100000000Hz, actual 100000000HZ div = 0) mmc1: new ultra high speed SDR50 SDHC card at address aaaa
It seems that when host->bus_hz is 100000000Hz, it will succeed, otherwise, 25000000Hz or 50000000Hz, it always fails.
Wish my testing results may help you to fix the bug.
Very useful. Thanks a lot.
-Guodong
BR, Liming Wang
[1] https://builds.96boards.org/snapshots/hikey/linaro/debian/latest/ [2] https://builds.96boards.org/releases/hikey/linaro/debian/latest/
From SoC hardware engineer, he confirmed that need to set assert bit then wait, then deassert.
-Guodong
Regards Haojian
Dev mailing list Dev@lists.96boards.org https://lists.96boards.org/mailman/listinfo/dev
On Fri, Apr 22, 2016 at 11:12:56AM +0800, Guodong Xu wrote:
On 21 April 2016 at 21:11, Liming Wang liming.wang@canonical.com wrote:
On Thu, Apr 21, 2016 at 04:38:29PM +0800, Guodong Xu wrote:
On 21 April 2016 at 16:07, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 21 April 2016 at 15:29, Peter Griffin peter.griffin@linaro.org wrote:
Hi Guodong,
On 21 April 2016 at 02:38, Guodong Xu guodong.xu@linaro.org wrote:
Hi, Liming
The subject line is miss-leading. :)
Kernel 4.4 based hikey-mainline-rebase is full featured. MMC/SD card is supported. One of the possible reason should be related to mmc host controller not reset completely.
There is no such issue in UEFI. But since you are using uboot, maybe it lacks some initialization codes for mmc controller.
Does the UEFI code assert the reset line on the IP before booting the kernel? If so I might need to add something similar to U-Boot.
UEFI didn't reset eMMC/SD just before booting the kernel.
Let's wait and see Liming's test result. I would prefer to do this in mmc kernel driver, instead of bootloader.
Hi Guodong,
I have tested your patch, but unfortunately, with your patch, my 4.4 kernel still can't detect any sd card on hikey board. BTW, my hikey board is LeMaker's 2G DRAM/8G NAND FLash version.
But I found some causes why the kernel can't detect the sd card: it's all about the dtb.
For 3.18 kernel, I used dtbs from snapshot version [1] and release version [2], but only release version works well. After investigating the code, I found below commit removes some settings from dts:
commit d840635065f5a2731dea22cf827d8dadc6524729 Author: Fei Wang william.wfei@gmail.com Date: Fri Dec 18 22:31:55 2015 +0800
dts: hikey: fix some sd card partition not recognized Some sd card be recognized SDR50 and set 1.8v, but when read partition return -84 error so that not get partition information. TODO:make sure set voltage is right!
If I revert this commit, the 3.18 kernel can detect sd cards.
From this and log messages below, your SD card is a 'UHS' mode card. (https://www.sdcard.org/developers/overview/bus_speed/). Let me know if it is not.
Yes, I tested two cards, both are UHS mode.
- For 4.4 kernel, I found this commit modifies the wrong location:
commit 40fd5e086e1ef1835b97f11f4f5d6a3253c2fe3d Author: Guodong Xu guodong.xu@linaro.org Date: Sat Feb 6 19:55:49 2016 +0800
arm64: dts: hi6220: add sd-uhs- properties into dwmmc_1 With these properties added, sd cards inserted into hikey can work at UHS mode if they have such capability. Due to some silicon defect in hi6220, a UHS support patch must be applied into drivers/mmc/host/dw_mmc to enable UHS mode. If you didn't add this patch, but added sd-uhs- properties into dwmmc_1, then sd cards cannot work.
This patch should modify dwmmc_1 but it actually modifies dwmmc_0. After fix this bug, my 4.4 kernel also can detect sd card.
Thanks a lot. I will fix that.
- In all my testings, whether 3.18 or 4.4 kernel, on UEFI or u-boot, the kernel
can't detect sd card when booting up. Only if I re-insert the sd card to slot, the kernel could detect the sd card.
The boot sequence of UEFI is: if SD card exists, it will try boot from SD card; when there is no valid partition and kernel image (and files) in SD cards, then it will not boot. Does this match what you saw on UEFI w/ both 3.18 and 4.4 kernel?
My target is to make kernel detect SD card, so I always make UEFI boot from emmc.
- But the detections are not 100% successful.
Do you mean on 3.18 or 4.4? If 3.18, I'm afraid we will not do
On both 3.18 and 4.4.
anything since it's already released and moved on to 4.4.
I have a board with me using 4.6-rc3 kernel, about 20 insertion/removal, UHS-1 mode sd, all success.
OK, please tell me the git tree and branch, let me also have a try.
I will test a 4.4 version in this afternoon. Will report back.
OK, thanks,
BR, Liming Wang
If it fails, the kernel prints: mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 400000Hz, actual 390625HZ div = 32) mmc1: error -110 whilst initialising SD card
If it succeeds, the kernel prints: mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 100000000Hz, actual 100000000HZ div = 0) mmc1: new ultra high speed SDR50 SDHC card at address aaaa
It seems that when host->bus_hz is 100000000Hz, it will succeed, otherwise, 25000000Hz or 50000000Hz, it always fails.
Wish my testing results may help you to fix the bug.
Very useful. Thanks a lot.
-Guodong
BR, Liming Wang
[1] https://builds.96boards.org/snapshots/hikey/linaro/debian/latest/ [2] https://builds.96boards.org/releases/hikey/linaro/debian/latest/
From SoC hardware engineer, he confirmed that need to set assert bit then wait, then deassert.
-Guodong
Regards Haojian
Dev mailing list Dev@lists.96boards.org https://lists.96boards.org/mailman/listinfo/dev
Hi, Liming
I just noticed I failed to send this email. Resending...
I have a board with me using 4.6-rc3 kernel, about 20 insertion/removal, UHS-1 mode sd, all success.
OK, please tell me the git tree and branch, let me also have a try.
For 4.6-rc3: git tree and branch: https://github.com/96boards-hikey/linux/tree/hikey-mainline-rebase-v4.6-rc3
You can use it with rootfs here: https://builds.96boards.org/snapshots/hikey/community/hikey-mainline-rebase/...
I will test a 4.4 version in this afternoon. Will report back.
OK, thanks,
(If I recall correctly.) I tested 60 insertion/removal cycles. The first forty are all successes. Then I see two of them failed. But such failure doesn't last. I mean automatically the next insertion can work normal again.
So, my intention is this is not a critical issue, and will not be solved.
-Guodong
On 22 April 2016 at 15:10, Liming Wang liming.wang@canonical.com wrote:
On Fri, Apr 22, 2016 at 11:12:56AM +0800, Guodong Xu wrote:
On 21 April 2016 at 21:11, Liming Wang liming.wang@canonical.com wrote:
On Thu, Apr 21, 2016 at 04:38:29PM +0800, Guodong Xu wrote:
On 21 April 2016 at 16:07, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 21 April 2016 at 15:29, Peter Griffin peter.griffin@linaro.org wrote:
Hi Guodong,
On 21 April 2016 at 02:38, Guodong Xu guodong.xu@linaro.org wrote: > > Hi, Liming > > The subject line is miss-leading. :) > > Kernel 4.4 based hikey-mainline-rebase is full featured. MMC/SD card > is supported. One of the possible reason should be related to mmc host > controller not reset completely. > > There is no such issue in UEFI. But since you are using uboot, maybe > it lacks some initialization codes for mmc controller.
Does the UEFI code assert the reset line on the IP before booting the kernel? If so I might need to add something similar to U-Boot.
UEFI didn't reset eMMC/SD just before booting the kernel.
Let's wait and see Liming's test result. I would prefer to do this in mmc kernel driver, instead of bootloader.
Hi Guodong,
I have tested your patch, but unfortunately, with your patch, my 4.4 kernel still can't detect any sd card on hikey board. BTW, my hikey board is LeMaker's 2G DRAM/8G NAND FLash version.
But I found some causes why the kernel can't detect the sd card: it's all about the dtb.
For 3.18 kernel, I used dtbs from snapshot version [1] and release version [2], but only release version works well. After investigating the code, I found below commit removes some settings from dts:
commit d840635065f5a2731dea22cf827d8dadc6524729 Author: Fei Wang william.wfei@gmail.com Date: Fri Dec 18 22:31:55 2015 +0800
dts: hikey: fix some sd card partition not recognized Some sd card be recognized SDR50 and set 1.8v, but when read partition return -84 error so that not get partition information. TODO:make sure set voltage is right!
If I revert this commit, the 3.18 kernel can detect sd cards.
From this and log messages below, your SD card is a 'UHS' mode card. (https://www.sdcard.org/developers/overview/bus_speed/). Let me know if it is not.
Yes, I tested two cards, both are UHS mode.
- For 4.4 kernel, I found this commit modifies the wrong location:
commit 40fd5e086e1ef1835b97f11f4f5d6a3253c2fe3d Author: Guodong Xu guodong.xu@linaro.org Date: Sat Feb 6 19:55:49 2016 +0800
arm64: dts: hi6220: add sd-uhs- properties into dwmmc_1 With these properties added, sd cards inserted into hikey can work at UHS mode if they have such capability. Due to some silicon defect in hi6220, a UHS support patch must be applied into drivers/mmc/host/dw_mmc to enable UHS mode. If you didn't add this patch, but added sd-uhs- properties into dwmmc_1, then sd cards cannot work.
This patch should modify dwmmc_1 but it actually modifies dwmmc_0. After fix this bug, my 4.4 kernel also can detect sd card.
Thanks a lot. I will fix that.
- In all my testings, whether 3.18 or 4.4 kernel, on UEFI or u-boot, the kernel
can't detect sd card when booting up. Only if I re-insert the sd card to slot, the kernel could detect the sd card.
The boot sequence of UEFI is: if SD card exists, it will try boot from SD card; when there is no valid partition and kernel image (and files) in SD cards, then it will not boot. Does this match what you saw on UEFI w/ both 3.18 and 4.4 kernel?
My target is to make kernel detect SD card, so I always make UEFI boot from emmc.
- But the detections are not 100% successful.
Do you mean on 3.18 or 4.4? If 3.18, I'm afraid we will not do
On both 3.18 and 4.4.
anything since it's already released and moved on to 4.4.
I have a board with me using 4.6-rc3 kernel, about 20 insertion/removal, UHS-1 mode sd, all success.
OK, please tell me the git tree and branch, let me also have a try.
I will test a 4.4 version in this afternoon. Will report back.
OK, thanks,
BR, Liming Wang
If it fails, the kernel prints: mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 400000Hz, actual 390625HZ div = 32) mmc1: error -110 whilst initialising SD card
If it succeeds, the kernel prints: mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 100000000Hz, actual 100000000HZ div = 0) mmc1: new ultra high speed SDR50 SDHC card at address aaaa
It seems that when host->bus_hz is 100000000Hz, it will succeed, otherwise, 25000000Hz or 50000000Hz, it always fails.
Wish my testing results may help you to fix the bug.
Very useful. Thanks a lot.
-Guodong
BR, Liming Wang
[1] https://builds.96boards.org/snapshots/hikey/linaro/debian/latest/ [2] https://builds.96boards.org/releases/hikey/linaro/debian/latest/
From SoC hardware engineer, he confirmed that need to set assert bit then wait, then deassert.
-Guodong
Regards Haojian
Dev mailing list Dev@lists.96boards.org https://lists.96boards.org/mailman/listinfo/dev
On Thu, May 05, 2016 at 03:33:41PM +0800, Guodong Xu wrote:
Hi, Liming
I just noticed I failed to send this email. Resending...
I have a board with me using 4.6-rc3 kernel, about 20 insertion/removal, UHS-1 mode sd, all success.
OK, please tell me the git tree and branch, let me also have a try.
For 4.6-rc3: git tree and branch: https://github.com/96boards-hikey/linux/tree/hikey-mainline-rebase-v4.6-rc3
You can use it with rootfs here: https://builds.96boards.org/snapshots/hikey/community/hikey-mainline-rebase/...
I will test a 4.4 version in this afternoon. Will report back.
OK, thanks,
(If I recall correctly.) I tested 60 insertion/removal cycles. The first forty are all successes. Then I see two of them failed. But such failure doesn't last. I mean automatically the next insertion can work normal again.
So, my intention is this is not a critical issue, and will not be solved.
Hi Guodong,
Thanks for your help. Another issue is that whether below branch supports HDMI out? I'm using arch/arm64/configs/defconfig and found no output on HDMI display. https://github.com/96boards-hikey/linux/tree/hikey-mainline-rebase-4.4
BTW, HDMI works well when I tested 3.18 kernel.
BR, Liming Wang
-Guodong
On 22 April 2016 at 15:10, Liming Wang liming.wang@canonical.com wrote:
On Fri, Apr 22, 2016 at 11:12:56AM +0800, Guodong Xu wrote:
On 21 April 2016 at 21:11, Liming Wang liming.wang@canonical.com wrote:
On Thu, Apr 21, 2016 at 04:38:29PM +0800, Guodong Xu wrote:
On 21 April 2016 at 16:07, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 21 April 2016 at 15:29, Peter Griffin peter.griffin@linaro.org wrote: > Hi Guodong, > > On 21 April 2016 at 02:38, Guodong Xu guodong.xu@linaro.org wrote: >> >> Hi, Liming >> >> The subject line is miss-leading. :) >> >> Kernel 4.4 based hikey-mainline-rebase is full featured. MMC/SD card >> is supported. One of the possible reason should be related to mmc host >> controller not reset completely. >> >> There is no such issue in UEFI. But since you are using uboot, maybe >> it lacks some initialization codes for mmc controller. > > > Does the UEFI code assert the reset line on the IP before booting the > kernel? > If so I might need to add something similar to U-Boot. >
UEFI didn't reset eMMC/SD just before booting the kernel.
Let's wait and see Liming's test result. I would prefer to do this in mmc kernel driver, instead of bootloader.
Hi Guodong,
I have tested your patch, but unfortunately, with your patch, my 4.4 kernel still can't detect any sd card on hikey board. BTW, my hikey board is LeMaker's 2G DRAM/8G NAND FLash version.
But I found some causes why the kernel can't detect the sd card: it's all about the dtb.
For 3.18 kernel, I used dtbs from snapshot version [1] and release version [2], but only release version works well. After investigating the code, I found below commit removes some settings from dts:
commit d840635065f5a2731dea22cf827d8dadc6524729 Author: Fei Wang william.wfei@gmail.com Date: Fri Dec 18 22:31:55 2015 +0800
dts: hikey: fix some sd card partition not recognized Some sd card be recognized SDR50 and set 1.8v, but when read partition return -84 error so that not get partition information. TODO:make sure set voltage is right!
If I revert this commit, the 3.18 kernel can detect sd cards.
From this and log messages below, your SD card is a 'UHS' mode card. (https://www.sdcard.org/developers/overview/bus_speed/). Let me know if it is not.
Yes, I tested two cards, both are UHS mode.
- For 4.4 kernel, I found this commit modifies the wrong location:
commit 40fd5e086e1ef1835b97f11f4f5d6a3253c2fe3d Author: Guodong Xu guodong.xu@linaro.org Date: Sat Feb 6 19:55:49 2016 +0800
arm64: dts: hi6220: add sd-uhs- properties into dwmmc_1 With these properties added, sd cards inserted into hikey can work at UHS mode if they have such capability. Due to some silicon defect in hi6220, a UHS support patch must be applied into drivers/mmc/host/dw_mmc to enable UHS mode. If you didn't add this patch, but added sd-uhs- properties into dwmmc_1, then sd cards cannot work.
This patch should modify dwmmc_1 but it actually modifies dwmmc_0. After fix this bug, my 4.4 kernel also can detect sd card.
Thanks a lot. I will fix that.
- In all my testings, whether 3.18 or 4.4 kernel, on UEFI or u-boot, the kernel
can't detect sd card when booting up. Only if I re-insert the sd card to slot, the kernel could detect the sd card.
The boot sequence of UEFI is: if SD card exists, it will try boot from SD card; when there is no valid partition and kernel image (and files) in SD cards, then it will not boot. Does this match what you saw on UEFI w/ both 3.18 and 4.4 kernel?
My target is to make kernel detect SD card, so I always make UEFI boot from emmc.
- But the detections are not 100% successful.
Do you mean on 3.18 or 4.4? If 3.18, I'm afraid we will not do
On both 3.18 and 4.4.
anything since it's already released and moved on to 4.4.
I have a board with me using 4.6-rc3 kernel, about 20 insertion/removal, UHS-1 mode sd, all success.
OK, please tell me the git tree and branch, let me also have a try.
I will test a 4.4 version in this afternoon. Will report back.
OK, thanks,
BR, Liming Wang
If it fails, the kernel prints: mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 400000Hz, actual 390625HZ div = 32) mmc1: error -110 whilst initialising SD card
If it succeeds, the kernel prints: mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 100000000Hz, actual 100000000HZ div = 0) mmc1: new ultra high speed SDR50 SDHC card at address aaaa
It seems that when host->bus_hz is 100000000Hz, it will succeed, otherwise, 25000000Hz or 50000000Hz, it always fails.
Wish my testing results may help you to fix the bug.
Very useful. Thanks a lot.
-Guodong
BR, Liming Wang
[1] https://builds.96boards.org/snapshots/hikey/linaro/debian/latest/ [2] https://builds.96boards.org/releases/hikey/linaro/debian/latest/
From SoC hardware engineer, he confirmed that need to set assert bit then wait, then deassert.
-Guodong
Regards Haojian
Dev mailing list Dev@lists.96boards.org https://lists.96boards.org/mailman/listinfo/dev