How to enable TF Card on Jetson Tx2 NX

Hi Nvidia
Sorry,I’m a new user of Jetson
SDMMC_CD is GPIO8 GPIO3_PX.04 #define TEGRA_MAIN_GPIO_PORT_X 19
SDIO_VDD_EN is GPIO14 GPIO3_PV.06 #define TEGRA_AON_GPIO_PORT_V 2
I modify Two dtsi file
Add code in tegra186-p3636-0001-a00-power-tree.dtsi

		p3636_vdd_sdmmc3_sw:regulator@205 {
			compatible = "regulator-fixed";
			reg = <205>;
			regulator-name = "vdd-sdmmc3-sw";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			gpio = <&tegra_aon_gpio TEGRA_AON_GPIO(V, 6) 0>;
			enable-active-high;
		};
	sdhci@3440000 {
		/* vqmmc-supply = <&spmic_ldo5>; */
		vmmc-supply = <&p3636_vdd_sdmmc3_sw>;
	};

Modify code in tegra186-p3636-0001-a00-comms.dtsi

	sdmmc3: sdhci@3440000 {
		cd-gpios = <&tegra_main_gpio TEGRA_MAIN_GPIO(X, 4) 0>;
		vmmc-supply = <&p3636_vdd_sdmmc3_sw>;
		cd-inverted;
		mmc-ocr-mask = <0>;
		uhs-mask = <0x8>;
		status = "okay";
		sd-uhs-sdr104;
		sd-uhs-sdr50;
		sd-uhs-sdr25;
		sd-uhs-sdr12;
		mmc-ddr-1_8v;
		mmc-hs200-1_8v;
		nvidia,always-on;
		/delete-property/ non-removable;
		/delete-property/ force-non-removable-rescan;
	};

I have tried referring to other posts.
kernel log as follows:

[    5.972480] mmc1: CMD CRC or end bit error, int mask 0xc0000
[    5.980024] mmc1: CMD CRC or end bit error, int mask 0x40000
[    5.986989] mmc1: CMD CRC or end bit error, int mask 0x40000
[    5.993906] mmc1: CMD CRC or end bit error, int mask 0x40000
[    6.000844] mmc1: CMD CRC or end bit error, int mask 0x40000
[    6.007791] mmc1: CMD CRC or end bit error, int mask 0xc0000
[    6.014725] mmc1: CMD CRC or end bit error, int mask 0xc0000
[    6.021668] mmc1: CMD CRC or end bit error, int mask 0xc0000
[    6.028612] mmc1: CMD CRC or end bit error, int mask 0xc0000
[    6.035628] mmc1: CMD CRC or end bit error, int mask 0x40000

I refer to this revision log of Xavier NX.
sd_card_dts.log (2.0 KB)

Did I make a mistake at any step?
What should I do next step.
Start.log (47.8 KB)
tegra186-p3636-0001-a00-power-tree.dtsi (10.8 KB)
tegra186-p3636-0001-a00-comms.dtsi (1.5 KB)
No change anything in tegra186-p3636-0001-p3509-0000-a01.dts
tegra186-p3636-0001-p3509-0000-a01.dts (4.4 KB)

https://forums.developer.nvidia.com/t/tx2-nx-platform-sd-card-on-sdmmc3-is-not-work/179090/1

https://forums.developer.nvidia.com/t/tx2-nx-platform-sd-card-on-sdmmc3-is-not-work/179090

Search more topics in TX2-NX for such case. Already enough topics for this.

If you are using new release, then please limit the topic filed in 2022.

hi,I have the same problem, I have referred to many posts, but I still can’t solve them.

error log:
root@tegra-ubuntu:/home/um# dmesg | grep mmc1
[ 0.509662] vddio-sdmmc1: 1800 <–> 3300 mV at 3300 mV
[ 1.509009] mmc1: SDHCI controller on 3440000.sdhci [3440000.sdhci] using ADMA 64-bit with 64 bit addr
[ 1.509349] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 1.515429] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 1.525425] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 1.531525] mmc1: CMD CRC or end bit error, int mask 0x40000
[ 1.537602] mmc1: CMD CRC or end bit error, int mask 0x40000
[ 1.543661] mmc1: CMD CRC or end bit error, int mask 0x40000
[ 1.549691] mmc1: CMD CRC or end bit error, int mask 0x40000
[ 1.555745] mmc1: CMD CRC or end bit error, int mask 0xc0000

power on for the first time:
root@tegra-ubuntu:/home/um# sudo cat /sys/kernel/debug/gpio
gpiochip2: GPIOs 248-255, parent: platform/max77620-gpio, max77620-gpio, can sleep:
gpio-253 ( |spmic_gpio_input ) in lo
gpio-254 ( |spmic_gpio_input ) in lo

gpiochip1: GPIOs 256-319, parent: platform/c2f0000.gpio, tegra-gpio-aon:
gpio-278 ( |vdd-sdmmc3-sw ) out lo
gpio-302 ( |eqos_phy_reset ) out hi
gpio-312 ( |power-key ) in hi

gpiochip0: GPIOs 320-511, parent: platform/2200000.gpio, tegra-gpio:
gpio-340 ( |i2c-mux-gpio ) out hi
gpio-408 ( |w-disable1 ) out lo
gpio-410 ( |w-disable2 ) out lo
gpio-412 ( |external-connection:) in hi
gpio-441 ( |hdmi2.0_hpd ) in lo
gpio-476 ( |cd ) in lo

unplugged and inserted status:
root@tegra-ubuntu:/home/um# sudo cat /sys/kernel/debug/gpio
gpiochip2: GPIOs 248-255, parent: platform/max77620-gpio, max77620-gpio, can sleep:
gpio-253 ( |spmic_gpio_input ) in lo
gpio-254 ( |spmic_gpio_input ) in lo

gpiochip1: GPIOs 256-319, parent: platform/c2f0000.gpio, tegra-gpio-aon:
gpio-278 ( |vdd-sdmmc3-sw ) out hi
gpio-302 ( |eqos_phy_reset ) out hi
gpio-312 ( |power-key ) in hi

gpiochip0: GPIOs 320-511, parent: platform/2200000.gpio, tegra-gpio:
gpio-340 ( |i2c-mux-gpio ) out hi
gpio-408 ( |w-disable1 ) out lo
gpio-410 ( |w-disable2 ) out lo
gpio-412 ( |external-connection:) in hi
gpio-441 ( |hdmi2.0_hpd ) in lo
gpio-476 ( |cd ) in lo
gpio-476 ( |cd ) in lo

TF card inserted,See after power on for the first time,the gpio-278 vdd-sdmmc3-sw is Low level,However, After the TF card is unplugged and inserted, the status of the inserted card, it becomes high level,Looks like there is something wrong with the power supply pin,It may be that there is no configuration?or Is the power supply pin 230 (SDIO_VDD_EN)used elsewhere in the system?

Did you remember to remove your sdhci from bcmdhd wifi driver?

I remove the

bcm4354: bcmdhd_wlan {
	compatible = "android,bcmdhd_wlan";
	interrupt-parent = <&tegra_aon_gpio>;
	interrupts = <TEGRA_AON_GPIO(EE, 2) IRQ_TYPE_LEVEL_HIGH>;
	fw_path = "/lib/firmware/brcm/fw_bcmdhd-old-unlocked.bin";
	nv_path = "/lib/firmware/brcm/nvram.txt";
	sdhci-host = <&sdmmc3>;
	pwr-retry-cnt = <3>;
	status = "okay";
};

from \hardware\nvidia\platform\t18x\lanai\kernel-dts\common\ tegra186-p3636-0001-a00-comms.dtsi
tegra186-p3636-0001-a00-comms.dtsi (1.0 KB)

But nothing has changed!Or what I should do to be right based on Tegra_R32.7.1?

Hello, could you tell me how to remove it?

File your own topic. Your are not the original owner of this topic.

Sorry, I have the same problem,so I replied here.