Supply for SDMMC3

Using a Jetson Nano eMMC module on a custom board. The Nano SDMMC3 is wired to a WiFi chip through SDIO (1.8V only). When using the below device tree settings for the vqmmc-supply it works, but the settings don’t make any sense to me.

How should the supplies and pins be set for correct operation?

file: tegra210-porg-p3448-common.dtsi

sdmmc-io-pads {
	pins = "sdmmc1", "sdmmc3";
	nvidia,enable-voltage-switching;
};

sdhci@700b0400 {
	status = "okay";
	bus-width = <4>;

	// vqmmc-supply = <&max77620_ldo2>; // fails!!!
	vqmmc-supply = <&max77620_ldo6>; // works!!!
	// vqmmc-supply = <&max77620_sd3>; // fails!!!

	vmmc-supply = <&p3448_vdd_3v3_sys>;
	non-removable;
	cap-sdio-irq;
	keep-power-in-suspend;
	wakeup-source;
	only-1-8-v;
};
file: tegra210-porg-power-tree-p3448-0000-a00.dtsi

	pmc-iopower {
		iopower-sys-supply = <&max77620_sd3>;
		iopower-uart-supply = <&max77620_sd3>;
		iopower-audio-supply = <&max77620_sd3>;
		iopower-cam-supply = <&max77620_sd3>;
		iopower-pex-ctrl-supply = <&max77620_sd3>;
		iopower-sdmmc1-supply = <&max77620_ldo2>;

		iopower-sdmmc3-supply = <&max77620_sd3>; // works!!!

		iopower-sdmmc4-supply = <&max77620_sd3>;
		iopower-audio-hv-supply = <&max77620_sd3>;
		iopower-debug-supply = <&max77620_sd3>;
		iopower-dmic-supply = <&max77620_sd3>;
		iopower-gpio-supply = <&max77620_sd3>;
		iopower-spi-supply = <&max77620_sd3>;
		iopower-spi-hv-supply = <&max77620_sd3>;
		iopower-sdmmc2-supply = <&max77620_sd3>;
		iopower-dp-supply = <&max77620_sd3>;
	};

			sdmmc3_clk_pp0 {
				nvidia,pins = "sdmmc3_clk_pp0";
				nvidia,function = "sdmmc3";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
//				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
			};

			sdmmc3_cmd_pp1 {
				nvidia,pins = "sdmmc3_cmd_pp1";
				nvidia,function = "sdmmc3";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
//				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
			};

			sdmmc3_dat0_pp5 {
				nvidia,pins = "sdmmc3_dat0_pp5";
				nvidia,function = "sdmmc3";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
//				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
			};

			sdmmc3_dat1_pp4 {
				nvidia,pins = "sdmmc3_dat1_pp4";
				nvidia,function = "sdmmc3";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
//				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
			};

			sdmmc3_dat2_pp3 {
				nvidia,pins = "sdmmc3_dat2_pp3";
				nvidia,function = "sdmmc3";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
//				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
			};

			sdmmc3_dat3_pp2 {
				nvidia,pins = "sdmmc3_dat3_pp2";
				nvidia,function = "sdmmc3";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
//				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
			};

The “iopower-sdmmc3-supply” is set to supply “max77620_sd3”. The “sdmmc-io-pads” are set to “nvidia,enable-voltage-switching” for “sdmmc3”. When setting “vqmmc-supply” to the same supply “max77620_sd3” (1.8V only) it fails. When Setting “vqmmc-supply” to a different supply “max77620_ldo6” (1.8V or 3.3V) it works. Also, setting “vqmmc-supply” to the supply “max77620_ldo2” (1.8V or 3.3V) causes it to fail.

Setting “nvidia,io-high-voltage” to “<TEGRA_PIN_DISABLE>” causes multiple kernel crashes. Is this the correct setting for 1.8V operation?

When it works the following command works and gives the following results. Also the scope shows activity on the SDIO CLK pin (blue) and SDIO CMD pin (yellow).

# cat /sys/kernel/debug/mmc1/ios                                                                                                                                                  
clock:          204000000 Hz
vdd:            21 (3.3 ~ 3.4 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      2 (4 bits)
timing spec:    6 (sd uhs SDR104)
signal voltage: 1 (1.80 V)
driver type:    0 (driver type B)

When it fails the following command fails and gives the following results. Note the “vdd” says “invalid”. The scope shows no activity on the SDIO CMD pin (yellow) when it fails, but the SDIO CLK pin (blue) does show activity.

# cat /sys/kernel/debug/mmc1/ios
clock:          0 Hz
actual clock:   99221 Hz
vdd:            0 (invalid)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     0 (off)
bus width:      0 (1 bits)
timing spec:    0 (legacy)
signal voltage: 1 (1.80 V)
driver type:    0 (driver type B)

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

What is your hardware design here? Any schematic to share? The dts should match your hardware design. It sounds like you just keep try different parameters in device tree and don’t know what yourself is doing.

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