Hi ,
I am using iMx6q with 4.1.15 Latest NXP Kernel. I expect default MMC to detect in Kernel after using proper sdhci entries in dtsi. But MMC is not detecting or mounting . The below msgs in console.
sdhci-pltfm: SDHCI platform and OF driver helper
/soc/aips-bus@02100000/usdhc@02190000: voltage-ranges unspecified
sdhci-esdhc-imx 2190000.usdhc: Got CD GPIO
sdhci-esdhc-imx 2190000.usdhc: Got WP GPIO
sdhci-esdhc-imx 2190000.usdhc: No vmmc regulator found
sdhci-esdhc-imx 2190000.usdhc: No vqmmc regulator found
mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
/soc/aips-bus@02100000/usdhc@02198000: voltage-ranges unspecified
sdhci-esdhc-imx 2198000.usdhc: Got CD GPIO
sdhci-esdhc-imx 2198000.usdhc: No vmmc regulator found
sdhci-esdhc-imx 2198000.usdhc: No vqmmc regulator found
usb 1-1: new high-speed USB device number 2 using ci_hdrc
mmc2: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
/soc/aips-bus@02100000/usdhc@0219c000: voltage-ranges unspecified
sdhci-esdhc-imx 219c000.usdhc: No vmmc regulator found
sdhci-esdhc-imx 219c000.usdhc: No vqmmc regulator found
mmc3: SDHCI controller on 219c000.usdhc [219c000.usdhc] using ADMA
In code I have noticed there is no piece of code for cd-gpios - card detection,wp-gpios for write protection and max burst width checking in dts function(sdhci_esdhc_imx_probe_dt in the file drivers/mmc/host/sdhci-esdhc-imx.c).
These help me out to resolve the issue. Thanks in Advance.
Regards,
Dooty.
Hi all,
i have problem with mount external SD card on my iMX6 board. When i insert or remove SD card, it can be detected and on debug console shows as:
when inserted:
mmc1: mmc_rescan_try_freq: trying to init card at 300000 Hz
mmc1: host does not support reading read-only switch, assuming write-enable
mmc1: new high speed SDHC card at address 0007
mmcblk1: mmc1:0007 SL32G 28.9 GiB
mmcblk1: p1 p2
BUT on android 6, nothing happens! i don't see any message, i go to Settings -> Storage & USB and it only shows Internal Storage, NOT exist SD card. I try to use "File Manager" app and it only shows internal storage also!
in /device/fsl/sabresd_6dq/fstab.freescale i'm using this command:
devices/soc0/soc/2100000.aips-bus/2194000.usdhc/mmc_host/mmc1* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
Can any one give me some advices, how to make android mount external sd card?
My device running on Android Mashmallow 6.0.1 and Kernel 4.1.15
Thanks!
Regards,
Nguyen
On our i.MX6Q board, we updated the kernel from 4.1.7 to 4.4.
It broke the SD card detection. The detect pin got inverted, so the card was detected on removal. The SD detect should be active high.., but I had to change to active low to make it work again. Now the dts looks like:
MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 | 0x80000000 /* CD */ | |
cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; |
I could not figure out what has changed in the kernel in between those two versions, but at least my fix works for now.
We are having the exact same issue, the same device tree works perfectly with kernel 3.14.52
+&usdhc3 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc3>;
+ pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
+ pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
+ cd-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
+ vmmc-supply = <®_sd3_vmmc>;
+ vqmmc-1-8-v = <1>;
+ bus-width = <4>;
+ keep-power-in-suspend;
+ enable-sdio-wakeup;
+ status = "okay";
+};
The pin is declared as GPIO
+ | MX6QDL_PAD_EIM_D20__GPIO3_IO20 | 0x80000000 /* SD3 CD*/ |
In the Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
It is very clear, it is the differences of the binding guide of mmc.txt.
The cd-gpios is the commond part of a mmc.
You can ask a software engineer to help to do understand the code.
4 provides an interface for MMC, SD, and SDIO types of memory cards.
5
6 This file documents differences between the core properties described
7 by mmc.txt and the properties used by the sdhci-esdhc-imx driver.
8
9 Required properties:
10 - compatible : Should be "fsl,<chip>-esdhc", the supported chips include
11 "fsl,imx25-esdhc"
12 "fsl,imx35-esdhc"
13 "fsl,imx51-esdhc"
14 "fsl,imx53-esdhc"
15 "fsl,imx6q-usdhc"
16 "fsl,imx6sl-usdhc"
17 "fsl,imx6sx-usdhc"
18 "fsl,imx7d-usdhc"
19
If it is a customized board, have you added the IOMUX for the cd as GPIO?
Have you checked the cd in the debug fs ?
Besides you said it is basic, We have seen any valuable information you have provided. You have ever debug something.
Here is the example in i.MX6UL evk board, which has a very detailed debug skill in the following ticket.
And it is linux knowledge
407 &iomuxc {
408 pinctrl-names = "default";
409 pinctrl-0 = <&pinctrl_hog_1>;
410 imx6ul-evk {
411 pinctrl_hog_1: hoggrp-1 {
412 fsl,pins = <
413 MX6UL_PAD_LCD_RESET__WDOG1_WDOG_ANY 0x30b0
414 MX6UL_PAD_UART1_RTS_B__GPIO1_IO19 0x17059 /* SD1 CD */
415 MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT 0x17059 /* SD1 VSELECT */
416 MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x17059 /* SD1 RESET */
417 >;
root@imx6ulevk:~# cat /sys/kernel/debug/gpio
GPIOs 0-31, platform/209c000.gpio, 209c000.gpio:
gpio-3 (tsc_X- ) in hi
gpio-9 (VSD_3V3 ) out lo
gpio-19 (2190000.usdhc cd ) in hi
GPIOs 32-63, platform/20a0000.gpio, 20a0000.gpio:
GPIOs 64-95, platform/20a4000.gpio, 20a4000.gpio:
GPIOs 96-127, platform/20a8000.gpio, 20a8000.gpio:
gpio-119 (? ) out lo
GPIOs 128-159, platform/20ac000.gpio, 20ac000.gpio:
gpio-131 (? ) out lo
gpio-132 (headset detect ) in lo
gpio-135 (spi32766.0 ) out lo
gpio-136 (? ) out lo
gpio-138 (spi4.14 ) out lo
gpio-139 (spi4.14 ) out lo
Hi,
Since roofs was in Micro SD I cant able to get the console . Right now I am using the SATA as filesystem media and I am proceeding with other interfaces. Still Micro SD is not detected. card detection and Write protection Pins are look proper.
Currently I didn't debug on MSD/MMC.
Regards,
Dooty.
Hi Dooty
seems sdhci_esdhc_imx_probe_dt calls mmc high level subsystem function
mmc_gpio_get_cd in ../mmc/core/slot-gpio.c as described in
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/225652.html
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
HI Igor,
The card detection and other stuffs are available inside this function ( mmc_of_parse(host->mmc);). But still SD/MMC/eMMC interface is not mounting or creating the device. Any one can help why it is not detecting the device. I am trying to boot the Filesystems from Micro SD card. It is waiting for MSD and hanging. I have set the proper Bootargs. No issue in boot argument.
/soc/aips-bus@02100000/usdhc@02190000: voltage-ranges unspecified
sdhci-esdhc-imx 2190000.usdhc: Got CD GPIO #192.
sdhci-esdhc-imx 2190000.usdhc: Got WP GPIO #171.
sdhci-esdhc-imx 2190000.usdhc: No vmmc regulator found
sdhci-esdhc-imx 2190000.usdhc: No vqmmc regulator found
mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
/soc/aips-bus@02100000/usdhc@02198000: voltage-ranges unspecified
sdhci-esdhc-imx 2198000.usdhc: Got CD GPIO #193.
sdhci-esdhc-imx 2198000.usdhc: No vmmc regulator found
sdhci-esdhc-imx 2198000.usdhc: No vqmmc regulator found
usb 1-1: new high-speed USB device number 2 using ci_hdrc
mmc2: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
/soc/aips-bus@02100000/usdhc@0219c000: voltage-ranges unspecified
sdhci-esdhc-imx 219c000.usdhc: No vmmc regulator found
sdhci-esdhc-imx 219c000.usdhc: No vqmmc regulator found
mmc3: SDHCI controller on 219c000.usdhc [219c000.usdhc] using ADMA
Regards,
Dooty.
Hi Dooty
I think this should be entered as separate thread,
suggest to provide more details:
full marking of processor, which reference board is based
your design, full name of used BSP.
Best regards
igor