Using SDMMC3 Pins as GPIO Output pins

Hi, there!

My hardware team selected SDMMC3 Pins as a module reset GPIOs. I need them to be output pins, but nothing it’s working. I can’t get 1V8. I’ve made some changes in the tegra210-porg-pinmux-p3448-0002-b00.dtsi as follows:

	sdmmc3_dat0_pp5 {
			nvidia,pins = "sdmmc3_dat0_pp5";
			nvidia,function = "rsvd2";
			nvidia,pull = <TEGRA_PIN_PULL_UP>;
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
			nvidia,enable-input = <TEGRA_PIN_ENABLE>;

But when i export the sysfs GPIOs (pins 120,121,122,123,124,125) and set their value to 1, nothing happens. The output remais 0V. Any idea about what’s happening?

Hi brenda.jacomelli,

Are you using the devkit or custom board for Jetson Nano?
What’s your Jetpack verion in use?

Do you want to use this pin as normal GPIO?

If so, please configure this pin as following in pinmux spreadsheet.

Please also share the result of the following command:

# cat /sys/kernel/debug/gpio

Hi! It’s a custom board and I’m using the JetPack 4.6.1. The result of the command for the pins:

gpio-120 ( )

gpio-121 ( )

gpio-122 ( )

gpio-123 ( )

gpio-124 ( )

gpio-125 ( )

It still doesn’t work.

Could you share the steps how you use sysfs to control these pins?

I did the usual steps:

echo 125 > /sys/class/gpio
echo out > /sys/class/gpio/gpio125/direction
echo 1 > /sys/class/gpio/gpio125/value

I don’t believe there is something about that, I use sysfs to other pins normally. These pins are connected to a communication module. Do they have a specific impedance requirement? The sysfspin 202, GPIO08, is connected to it and works.

The GPIO function has nothing to do with impedance

Do you mean that you could control some GPIO pins? but some GPIO could not be controlled through sysfs (like 125)?

Do you have Jetson Nano devkit could be verified with the latest R32.7.4?

Yes, that’s exactly what I’m saying. I can’t control sdmmc3_dat0_pp5 through sysfs (gpio125) even changing its functionality in pinmux, but the sysfs gpio202 works fine. I asked about the module impedance, because maybe for some reason the pin can’t trigger. About R32.7.4, I don’t get it.

Hi brenda.jacomelli,

According to the dtsi that you posted, it doesn’t seem that you actually changed the direction from the pin in the dtsi. If you want to set it as output change the AT column from the spreadsheet. Also change the Req. Initial State to Drive 1, in this way you will see a logic one on that pin just after the board boots up.

Embedded SW Engineer at RidgeRun Contact us: Developers wiki: Website:

you should export with the following command first…

# echo 125 > /sys/class/gpio/export

I’ve confirmed it could work on Jetson Nano devkit with the latest JP4.6.4.

@OscarPorras, thank you for your response. I’ve followed the @KevinFFF instructions and generated other dtsi with the correct parameters, the problem remains the same.

@KevinFFF it’s not a sysfs user problem, I just made a mistake while writing to you here, but I know how to use it and I’m exporting correctly, it succeeded with other pins.

@KevinFFF could you show me exactly how its your sdmmc3 nodes in pinmux dtsi that are working?

Are you talking about you can use sysfs to configure GPIO pin on other pins successfully but when it comes to sdmmc3 pin, it would fail?

@WayneWWW that’s exactly what’s happening. I’m able to control other pins throught sysfs, the PZ2 GPIO8 (sysfs gpio202), for example, GPIO4, GPIO12, CAM0_MCLK and etc as well. But sdmmc3 pins just fail, even when I modify the pinmux dtsi as folllows:

                    sdmmc3_clk_pp0 {
                            nvidia,pins = "sdmmc3_clk_pp0";
                            nvidia,function = "rsvd1";
                            nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                            nvidia,tristate = <TEGRA_PIN_DISABLE>;
                            nvidia,enable-input = <TEGRA_PIN_DISABLE>;

Does the “failure” here mean you can see sdmmc3 pp0 pin is configured in /sys/kernel/debug/gpio as sysfs but your cannot see any signal out of it?

Yes, and this for all the sdmmc3 pins: pp0, pp1, pp2, pp3, pp4 and pp5. As @OscarPorras suggested I configured them as drive 1, to init as 1V8, they initiate as 1V8 and I can change their state to 0V through sysfs, but I can’t change it to 1V8 again.

Just to confirm, are you sure sdmmc3 driver is not enabled?

Is there an easy way to confirm that? I’ve changed the function of sdmmc3 as I printed above. Is there any other things that I need to do to disable it?

If you are asking this question, then I guess you didn’t enable it.

You could attach the device dmesg to confirm.

The dmesg result for sdmmc:

[ 0.592884] vddio-sdmmc-ap: 1800 ↔ 3300 mV at 3300 mV
[ 0.600227] vddio-sdmmc3-ap: 1800 ↔ 3300 mV at 2800 mV
[ 0.621847] tegra210_dvfs: no clock found for sdmmc2_ddr
[ 0.621861] tegra210_dvfs: no clock found for sdmmc4_ddr
[ 0.621905] tegra210_dvfs: no clock found for sdmmc1_ddr
[ 0.621919] tegra210_dvfs: no clock found for sdmmc3_ddr
[ 42.103003] vddio-sdmmc3-ap: disabling

Always attach the full log especially when you don’t know what to check…