Micro SD hot plug

Hello!

I am using a custom version of the carrier board and a jetson nano module with EMMC memory. There is a micro SD card slot on the carrier board. With constant power on, there are no problems with the memory card working.

sdhci@700b0400 {
		status = "okay";
		cd-gpios = <&gpio TEGRA_GPIO(V, 0) 0>;
		nvidia,vmmc-always-on;
		/delete-property/ keep-power-in-suspend;
		vmmc-supply = <&p3448_vdd_3v3_sd>;
	    non-removable;
        cd-inverted;
		wp-inverted;
		sd-uhs-sdr104;
		sd-uhs-sdr50;
		sd-uhs-sdr25;
		sd-uhs-sdr12;
		mmc-hs200-1_8v;
		no-sdio;
		no-mmc;
	};

When I remove non-removable and nvidia,vmmc-always-on, the power to the card starts to be out of phase. When there is no card, there is power; when there is a card, there is no power. The Cd-inverted option has no effect, I tried both with and without it.

	sdhci@700b0400 {
		status = "okay";
		cd-gpios = <&gpio TEGRA_GPIO(V, 0) 0>;
	    /delete-property/ nvidia,vmmc-always-on;
		/delete-property/ keep-power-in-suspend;
		vmmc-supply = <&p3448_vdd_3v3_sd>;
	    /delete-property/ non-removable;
        cd-inverted;
		wp-inverted;
		sd-uhs-sdr104;
		sd-uhs-sdr50;
		sd-uhs-sdr25;
		sd-uhs-sdr12;
		mmc-hs200-1_8v;
		no-sdio;
		no-mmc;
	};

What could be the problem? DTS second option attached.
current.dts (318.9 KB)

Change the cd-gpios from active high to active low and see if any difference.

Thanks for the tip, I changed

cd-gpios = <&gpio TEGRA_GPIO(V, 0) 1>;

Hot plugging now works correctly.

Are you sure the gpio in regulator p3448_vdd_3v3_sd is configured correctly?

here is the config:

	p3448_vdd_3v3_sd: regulator@3 {
			compatible = "regulator-fixed-sync";
			reg = <3>;
			regulator-name = "vdd-3v3-sd";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			gpio = <&gpio TEGRA_GPIO(BB, 0) 0>;
			enable-active-high;
			regulator-boot-on;
			vin-supply = <&p3448_vdd_3v3_sys>;
		};

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks

Yes , it worked

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.