Our industrial board is consisted of a Nano production module and a customized carrier board, everything seem Okay except that can’t detect sdcard. Two sdcards are tested with “sudo fdisk -l” command as you can see blow while both of them work normally in the Nano devkit.
root@localhost:/usr/local/bin# fdisk -l | grep mmcblk
Disk /dev/mmcblk0: 14.7 GiB, 15758000128 bytes, 30777344 sectors
/dev/mmcblk0p1 34 29360161 29360128 14G Microsoft basic data
/dev/mmcblk0p2 29360162 29362209 2048 1M Microsoft basic data
/dev/mmcblk0p3 29362210 29374497 12288 6M Microsoft basic data
/dev/mmcblk0p4 29374498 29374657 160 80K Microsoft basic data
/dev/mmcblk0p5 29374658 29505697 131040 64M Microsoft basic data
/dev/mmcblk0p6 29505698 29507745 2048 1M Microsoft basic data
/dev/mmcblk0p7 29507746 29520033 12288 6M Microsoft basic data
/dev/mmcblk0p8 29520034 29520193 160 80K Microsoft basic data
/dev/mmcblk0p9 29520194 29651233 131040 64M Microsoft basic data
/dev/mmcblk0p10 29651234 29651617 384 192K Microsoft basic data
/dev/mmcblk0p11 29651618 29652129 512 256K Microsoft basic data
/dev/mmcblk0p12 29652130 29781153 129024 63M Microsoft basic data
/dev/mmcblk0p13 29781154 29782177 1024 512K Microsoft basic data
/dev/mmcblk0p14 29782178 29782689 512 256K Microsoft basic data
/dev/mmcblk0p15 29782690 29783201 512 256K Microsoft basic data
/dev/mmcblk0p16 29783202 30397601 614400 300M Microsoft basic data
/dev/mmcblk0p17 30397602 30401697 4096 2M Microsoft basic data
Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 sectors
Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 sectors
The voltage of sdcard should be 3.3v,and we tried to change it in the Jetson Nano Pinmux 1.01. What we did is changing the value of BB82 from 1.8v to 3.3v in the EXCEL document. But the generated dtsi files result no difference.
FYI, our board sdcard relative pins are as blow.
We guess it is wrong voltage that results sdcard can’t be detected. So,
Could you tell me how verify the voltage of our sdcard and how to change its voltage?
If its not the voltage problem, then please tell me what we should do to make our board detect sdcard.
Hi,
I don’t know how is your status of development.
From software aspect, if you don’t change anything in device tree and directly use the package from jetpack, then it would have no sd controller enabled.
sdhci@700b0400 {
// vqmmc-supply = <&max77620_sd3>; /* SDMMC3 for 2nd Wifi on loki */
vqmmc-supply = <&max77620_ldo6>;
status = "okay";
// vmmc-supply = <&p3448_vdd_3v3_sys>; /* SDMMC3 no stuff for full size SD on foster */
};
Just do step-1) and do both step-1 and step-2 get the same result.
[ 17.919921] mmc1: CMD CRC or end bit error, int mask 0xc0001
[ 17.926580] mmc1: CMD CRC or end bit error, int mask 0xc0001
[ 17.933192] mmc1: CMD CRC or end bit error, int mask 0xc0000
The full log please refer the attachment.
How we should do to make our sdcard work based on L4T32.3.1?
Hi, did you follow the SD Card Connection Example in OEM DG? There is a load switch for VDD that is controlled by SDMMC_VDD_EN, you can choose a GPIO for it. No need to change default pinmux setting, only need to set pin GPIO08 to SFIO (SDMMC3_CD). For more detail info of SD card design, you can refer to schematic of P2597 (for TX1) in DLC. (http://developer.nvidia.com/embedded/dlc/jetson-tx1-tx2-developer-kit-carrier-board-c02-design-files)
You can try this one which works for me on SDMMC3 r32.3.1. But you need to make sure you have your pins set to special function on sdmmc3. If you are going to do that then you need to set pinmux via DT that is then flashed into “RP1” using the standard “flash” script. It is a good idea to do that rather than try and mess around with jetson-io as it will not do what you want for the pinmux.
“sudo ./flash.sh -k RP1 wideye mmcblk0p1” (DT for nvboot which is the important one for any pinmux and Gpio settings)
“sudo ./flash.sh -k DTB wideye mmcblk0p1” (and then you may as well go ahead and flash the same DTB file for the kernel)
Good luck!
sdhci@700b0400 { /* SDMMC3 for SD card */
vqmmc-supply = <&max77620_ldo6>;
default-drv-type = <1>;
cd-gpios = <&gpio TEGRA_GPIO(Z, 2) 0>;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
sd-uhs-sdr12;
nvidia,cd-wakeup-capable;
nvidia,update-pinctrl-settings;
nvidia,pmc-wakeup = <&tegra_pmc PMC_WAKE_TYPE_GPIO 35 PMC_TRIGGER_TYPE_NONE>;
uhs-mask = <0x0>;
no-sdio;
no-mmc;
disable-wp;
mmc-ocr-mask = <3>;
tap-delay = <3>;
//max-clk-limit = <400000>; // Do not want this! This is for SDIO only which is limited to 400kHz.
max-clk-limit = <204000000>;
//nvidia,disable-rtpm;
status = "okay";
};
Then you just need to delete the line cd-gpios and replace with non-removable like below. You are currently deleting that property with /delete-property so your dt will cause driver probe to fail.
sdhci@700b0400 { /* SDMMC3 for SD card */
vqmmc-supply = <&max77620_ldo6>;
default-drv-type = <1>;
non-removable;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
sd-uhs-sdr12;
nvidia,cd-wakeup-capable;
nvidia,update-pinctrl-settings;
nvidia,pmc-wakeup = <&tegra_pmc PMC_WAKE_TYPE_GPIO 35 PMC_TRIGGER_TYPE_NONE>;
uhs-mask = <0x0>;
no-sdio;
no-mmc;
disable-wp;
mmc-ocr-mask = <3>;
tap-delay = <3>;
//max-clk-limit = <400000>; // Do not want this! This is for SDIO only which is limited to 400kHz.
max-clk-limit = <204000000>;
//nvidia,disable-rtpm;
status = "okay";
};
After using the dts above, then we just do
step 1: sudo ./flash.sh -r -k RP1 jetson-nano-emmc mmcblk0p1,
and step 2: sudo ./flash.sh -r -k DTB jetson-nano-emmc mmcblk0p1,
the sdhci@700b0400 in sysfs is as below,
sercomm@localhost:~$ sudo fdisk -l | grep mmc
[sudo] password for sercomm:
Disk /dev/mmcblk0: 14.7 GiB, 15758000128 bytes, 30777344 sectors
/dev/mmcblk0p1 34 29360161 29360128 14G Microsoft basic data
/dev/mmcblk0p2 29360162 29362209 2048 1M Microsoft basic data
/dev/mmcblk0p3 29362210 29374497 12288 6M Microsoft basic data
/dev/mmcblk0p4 29374498 29374657 160 80K Microsoft basic data
/dev/mmcblk0p5 29374658 29505697 131040 64M Microsoft basic data
/dev/mmcblk0p6 29505698 29507745 2048 1M Microsoft basic data
/dev/mmcblk0p7 29507746 29520033 12288 6M Microsoft basic data
/dev/mmcblk0p8 29520034 29520193 160 80K Microsoft basic data
/dev/mmcblk0p9 29520194 29651233 131040 64M Microsoft basic data
/dev/mmcblk0p10 29651234 29651617 384 192K Microsoft basic data
/dev/mmcblk0p11 29651618 29652129 512 256K Microsoft basic data
/dev/mmcblk0p12 29652130 29781153 129024 63M Microsoft basic data
/dev/mmcblk0p13 29781154 29782177 1024 512K Microsoft basic data
/dev/mmcblk0p14 29782178 29782689 512 256K Microsoft basic data
/dev/mmcblk0p15 29782690 29783201 512 256K Microsoft basic data
/dev/mmcblk0p16 29783202 30397601 614400 300M Microsoft basic data
/dev/mmcblk0p17 30397602 30401697 4096 2M Microsoft basic data
Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 sectors
Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 sectors
Still, the mmcblk1(sdcard) can’t be detected.
The input voltage of the sdcard on our carried board should be 3.3v,and we tried to change it in the Jetson Nano Pinmux 1.01. What we did is changing the value of BB82 from 1.8v to 3.3v. But the generated dtsi makes no difference.
So what the defualt voltage of SDMMC3 and how to change it from 1.8v to 3.3v if it is 1.8v?
sercomm@localhost:~$ sudo fdisk -l | grep mmcblk1
[sudo] password for sercomm:
\Disk /dev/mmcblk1: 59.5 GiB, 63864569856 bytes, 124735488 sectors
/dev/mmcblk1p1 40 29360167 29360128 14G Microsoft basic data
/dev/mmcblk1p2 29360168 29360423 256 128K Microsoft basic data
/dev/mmcblk1p3 29360424 29361319 896 448K Microsoft basic data
/dev/mmcblk1p4 29361320 29362471 1152 576K Microsoft basic data
/dev/mmcblk1p5 29362472 29362599 128 64K Microsoft basic data
/dev/mmcblk1p6 29362600 29362983 384 192K Microsoft basic data
/dev/mmcblk1p7 29362984 29363751 768 384K Microsoft basic data
/dev/mmcblk1p8 29363752 29363879 128 64K Microsoft basic data
/dev/mmcblk1p9 29363880 29364775 896 448K Microsoft basic data
/dev/mmcblk1p10 29364776 29365671 896 448K Microsoft basic data
/dev/mmcblk1p11 29365672 29367207 1536 768K Microsoft basic data
/dev/mmcblk1p12 29367208 29367335 128 64K Microsoft basic data
/dev/mmcblk1p13 29367336 29367495 160 80K Microsoft basic data
/dev/mmcblk1p14 29367496 29367751 256 128K Microsoft basic data
But when mount mmcblk1p1 on ./mnt and ls ./mnt, we get,
Decompile your DTB file and post the sdmmc3 section so we can see it. Like WayneWWW said, the property non-removable is not set as shown in your /sys output. Something is overwriting it somewhere or most likely you have not copied the file. Are you copying your DTB file into the right directory?? It must be placed in the kernel/dtb directory.
The copy should be something like this:
cp sources/kernel/kernel-4.9/arch/arm64/boot/dts/tegra210-p3448-0002-xxxx-xxxx-b00.dtb kernel/dtb/
Then if it still does not work you can post the output of the following 2 commands and I will check your pinmux and GPIOs.