Could I use GPS_EN pin as GPIO for SDMMC3?

Hello,

I’m trying to use sdmmc3.
Card Detect Pin and VDD Enable Pin are connected as follows :
SDMMC_CD => GPIO08 (GPIO_PZ2 / GPIO3_PZ.02)
SDMMC_VDD_EN => GPIO03 (GPS_EN / GPIO3_PI.02)

I set the cd-gpios like this
=> cd-gpios = <&gpio TEGRA_GPIO(Z, 2) GPIO_ACTIVE_LOW>;

Now I am curious could i use the GPIO03 as follow?
=> power-gpios= <&gpio TEGRA_GPIO(I, 2) GPIO_ACTIVE_HIGH>;

we sat the sdmmc configurations as like it, but we can’t detect anythings.
There are

	sdhci@700b0400 {
		status = "okay";
		/delete-property/ keep-power-in-suspend;
		/delete-property/ non-removable;
 		cd-gpios = <&gpio TEGRA_GPIO(Z, 2) GPIO_ACTIVE_LOW>;
    		power-gpios= <&gpio TEGRA_GPIO(I, 2) GPIO_ACTIVE_HIGH>;
    		bus-width = <4>;
 		cap-mmc-highspeed;
    		cap-sd-highspeed;
		sd-uhs-sdr104;
    		sd-uhs-sdr50;
    		sd-uhs-sdr25;
    		sd-uhs-sdr12;
		mmc-ddr-1_8v;
		mmc-ocr-mask = <3>;
		uhs-mask = <0x0>;
		tap-delay = <3>;
	};

And there are some configurations about GPS_EN.
Should i have to modify anything for SDMMC_VDD_EN?

gps_en_pi2 {
nvidia,pins = "gps_en_pi2";
nvidia,function = "rsvd0";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};

hello sumin.lee,

please access pinmux spreadsheets, this pin is unused and defined as GPIO3_PI.02 by default.
may I know what’s your actual use-case, are you going to detect a SD-card? please share the kernel logs (i.e. $ dmesg --follow) for inserting the SD-card.
BTW,
please check this thread as see-also, Topic 108226.
thanks

Dear @JerryChang

One of our cooperation company made their sample board.
And they connect sdmmc_vdd_en and sdmmc_cd as what i said.
SDMMC_CD => GPIO08 (GPIO_PZ2 / GPIO3_PZ.02)
SDMMC_VDD_EN => GPIO03 (GPS_EN / GPIO3_PI.02)

Actually, I thought GPIO3_PI.02 is enabled when I saw the spread sheet
So, You mean we have to apply Pinmux Changes
I understand it.

Anyway, GPIO03._PZ.03 and GPIO3_PI.02 has same setting as “Output” and “Drive 0”.
I think it could be work. So, they will try the setting as follows:
https://forums.developer.nvidia.com/t/micro-sd-card-on-custom-jetson-nano/184294/72

Regulator will be sat for our gpio connection.

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(I, 2) 0>;
			enable-active-high;
			regulator-boot-on;
			vin-supply = <&p3448_vdd_3v3_sys>;
		};

I will offer sdmmc_vdd_en pin jump to GPIO3_PZ.03, if this try would faild.

Please leave the message, if I thought something wrong.

And I will post the feedback with result.

Any result to be shared?

We remove unnecessary devices and some missmatch gpios are disabled.
And then it works and we can use GPS_EN pin.
It seems the problem was using expand gpio for power.

Great! Glad to know issue resolved!
Thanks for the update.

1 Like