Spidev of Jetson nano-emmc core board cannot be used

We used R32.4.2 version package to upgrade Jetson nano emmc core board. After booting, the /dev path has spidev0.0, spidev0.1, spidev1.0, spidev1.1, four device files. We developed program to open and ioctl the spidev0.0, however, there is no output signal through oscilloscope measurement. I wanna know why. Is there something else to config for nano emmc system parameters or device tree ?

1 Like

Please upgrade to J32.4.3 or latest version to use jetson-io to configure those pinmux.

@ShaneCCC
jetson-io can be used with jetson nano module in latest version ?

Yes, jetson-io can configure the pinmux as SPI function for r32.4.3 or latest version.
But I don’t remember there’s r32.4.2? This version should be working maybe.

And the jetson-io tool can be uesed in the eMMC Version if upgrade to J32.4.3?

Don’t know if the jetson-io problem failed on emmc version or not.
If still can’t run the jetson-io on emmc version version then you need to modify the dtb for it.

Hello ShaneCCC.
By the test, jetson-io can not work on emmc nano. Can you give me some advice on how to modify the device tree to enable spidev on emmc nano?

OK, I think you can build the dtb file from the source.

Please modify the …/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0002-xxx.dtsi configure those pin like below to SPIx

			spi1_miso_pc1 {
 				nvidia,pins = "spi1_miso_pc1";
 				nvidia,function = "spi1";
 				nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
 				nvidia,tristate = <TEGRA_PIN_DISABLE>;
 				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
 			};

We tried. The spi0_cs has output signal, but spi0_clk/spi0_mosi has no output signal. As follows is modified device tree file.

spi1_mosi_pc0 {
			nvidia,pins = "spi1_mosi_pc0";
			nvidia,function = "spi1";
			nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
			nvidia,enable-input = <TEGRA_PIN_ENABLE>;
		};

		spi1_miso_pc1 {
			nvidia,pins = "spi1_miso_pc1";
			nvidia,function = "spi1";
			nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
			nvidia,enable-input = <TEGRA_PIN_ENABLE>;
		};

		spi1_sck_pc2 {
			nvidia,pins = "spi1_sck_pc2";
			nvidia,function = "spi1";
			nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
			nvidia,enable-input = <TEGRA_PIN_ENABLE>;
		};

		spi1_cs0_pc3 {
			nvidia,pins = "spi1_cs0_pc3";
			nvidia,function = "spi1";
			nvidia,pull = <TEGRA_PIN_PULL_UP>;
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
			nvidia,enable-input = <TEGRA_PIN_ENABLE>;
		};

Could you check the value of the tegra_gpio to confirm the configure is correct.
Also do you try the spidev_test for the loopback test?

1.Do we need to modify uboot source ?
2.We modify the tegra210-p3448-0002-p3449-0000-b00.dts file accroding to “GitHub - gtjoseph/jetson-nano-support”. Voltmeter or oscilloscope is used to check the output signal of spi/gpio pins.
3. Is there any way to confirm that GPIO is configured as spidev ?

sudo cat /sys/kernel/debug/tegra_gpio to check the c group.

https://elinux.org/Jetson/TX1_SPI

“cat tegra_gpio” shows:
C: 0:2 1f 00 00 18 00 00 000000

According to the eLinux.org, I modified the device tree, but the “1f” not change to “00”. The eLinux.org depends on R28.1 while we are using R32.4.2.
Can you provide me an effective method to change the tegra_gpio by modifing the device tree on R32.4.2 or latest ?

I think there’s no r42.4.2 the Jetpack 4.4 is r32.4.3 and Jetpack 4.4.4 is r32.4.4
I would suggest to update to r32.4.3 or later version.

We upgrade to R32.4.3, however, the result is same as above.

“cat tegra_gpio” shows:
C: 0:2 1f 00 00 18 00 00 000000
According to the eLinux.org, I modified the device tree, but the “1f” not change to “00”.

Can you provide me an effective method to change the tegra_gpio by modifing the device tree on R32.4.3?

The SD nano spidev runs well.
“cat tegra_gpio” shows:
C: 0:2 18 08 08 08 00 00 000000

How can I modify the device tree to config tegra_gpio as SD nano on EMMC nano board ?

Try to update to J4.4 by sdkmanager.

nvidia@nvidia-desktop:~$ cat /etc/nv_tegra_release
# R32 (release), REVISION: 4.3, GCID: 21589087, BOARD: t210ref, EABI: aarch64, DATE: Fri Jun 26 04:38:25 UTC 2020
nvidia@nvidia-desktop:~$ sudo cat /sys/kernel/debug/tegra_gpio
[sudo] password for nvidia:
Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
 A: 0:0 64 40 40 04 00 00 000000
 B: 0:1 00 00 00 00 00 00 000000
 C: 0:2 00 00 00 00 00 00 000000
 D: 0:3 00 00 00 00 00 00 000000
 E: 1:0 00 00 00 00 00 00 000000
 F: 1:1 00 00 00 00 00 00 000000
 G: 1:2 00 00 00 00 00 00 000000
 H: 1:3 fd 99 00 60 00 00 000000
 I: 2:0 07 07 03 02 00 00 000000
 J: 2:1 00 00 00 00 00 00 000000
 K: 2:2 00 00 00 00 00 00 000000
 L: 2:3 00 00 00 00 00 00 000000
 M: 3:0 00 00 00 00 00 00 000000
 N: 3:1 00 00 00 00 00 00 000000
 O: 3:2 00 00 00 00 00 00 000000
 P: 3:3 00 00 00 00 00 00 000000
 Q: 4:0 00 00 00 00 00 00 000000
 R: 4:1 00 00 00 00 00 00 000000

The latest sdkmanager has some problem on my PC, such as download file failed error. According to the
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fquick_start.html%23
document, chapter “Quick Start Guide”, I downloaded Tegra210_Linux_R32.4.3_aarch64.tbz2 and Tegra_Linux_Sample-Root-Filesystem_R32.4.3_aarch64.tbz2, and complete flashing the OS and file system to emmc. I think this method is same as sdkmanager or jetpack.

The reuslt is same as before, as follows. The board you tried success is EMMC nano ? with default device tree file
tegra210-p3448-0002-p3449-0000-b00.dtb ?

nvidia@nvidia-desktop:~$ cat /etc/nv_tegra_release
R32 (release), REVISION: 4.3, GCID: 21589087, BOARD: t210ref, EABI: aarch64, DATE: Fri Jun 26 04:38:25 UTC 2020
nvidia@nvidia-desktop:~$ sudo cat /sys/kernel/debug/tegra_gpio
Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
 A: 0:0 64 40 40 04 00 00 000000
 B: 0:1 f0 00 00 00 00 00 000000
 C: 0:2 1f 08 08 18 00 00 000000
 D: 0:3 00 00 00 00 00 00 000000
 E: 1:0 40 00 00 00 00 00 000000
 F: 1:1 00 00 00 00 00 00 000000
 G: 1:2 0c 00 00 00 00 00 000000
 H: 1:3 fd 99 00 60 00 00 000000
 I: 2:0 07 07 03 00 00 00 000000
 J: 2:1 f0 00 00 00 00 00 000000
 K: 2:2 00 00 00 00 00 00 000000
 L: 2:3 00 00 00 00 00 00 000000
 M: 3:0 00 00 00 00 00 00 000000
 N: 3:1 00 00 00 00 00 00 000000
 O: 3:2 00 00 00 00 00 00 000000
 P: 3:3 00 00 00 00 00 00 000000
 Q: 4:0 00 00 00 00 00 00 000000
 R: 4:1 00 00 00 00 00 00 000000
 S: 4:2 a0 80 00 00 00 00 000000
 T: 4:3 01 01 00 00 00 00 000000
 U: 5:0 00 00 00 00 00 00 000000
 V: 5:1 03 00 00 02 00 00 000000
 W: 5:2 00 00 00 00 00 00 000000
 X: 5:3 78 08 08 70 00 60 606000
 Y: 6:0 06 00 00 02 00 00 000000
 Z: 6:1 0f 08 00 04 00 04 000400
AA: 6:2 00 00 00 00 00 00 000000
BB: 6:3 01 00 00 00 00 00 000000
CC: 7:0 92 80 80 02 00 12 121200
DD: 7:1 01 00 00 00 00 00 000000
EE: 7:2 00 00 00 00 00 00 000000
FF: 7:3 00 00 00 00 00 00 000000
nvidia@nvidia-desktop:~$ 

The latest sdkmanager has some problem on my PC, such as download file failed error. According to the
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fquick_start.html%23
document, chapter “Quick Start Guide”, I downloaded Tegra210_Linux_R32.4.3_aarch64.tbz2 and Tegra_Linux_Sample-Root-Filesystem_R32.4.3_aarch64.tbz2, and complete flashing the OS and file system to emmc. I think this method is same as sdkmanager or jetpack.

The reuslt is same as before, as follows. The board you tried success is EMMC nano ? with default device tree file
tegra210-p3448-0002-p3449-0000-b00.dtb ?

nvidia@nvidia-desktop:~$ cat /etc/nv_tegra_release
R32 (release), REVISION: 4.3, GCID: 21589087, BOARD: t210ref, EABI: aarch64, DATE: Fri Jun 26 04:38:25 UTC 2020
nvidia@nvidia-desktop:~$ sudo cat /sys/kernel/debug/tegra_gpio
Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
 A: 0:0 64 40 40 04 00 00 000000
 B: 0:1 f0 00 00 00 00 00 000000
 C: 0:2 1f 08 08 18 00 00 000000
 D: 0:3 00 00 00 00 00 00 000000
 E: 1:0 40 00 00 00 00 00 000000
 F: 1:1 00 00 00 00 00 00 000000
 G: 1:2 0c 00 00 00 00 00 000000
 H: 1:3 fd 99 00 60 00 00 000000
 I: 2:0 07 07 03 00 00 00 000000
 J: 2:1 f0 00 00 00 00 00 000000
 K: 2:2 00 00 00 00 00 00 000000
 L: 2:3 00 00 00 00 00 00 000000
 M: 3:0 00 00 00 00 00 00 000000
 N: 3:1 00 00 00 00 00 00 000000
 O: 3:2 00 00 00 00 00 00 000000
 P: 3:3 00 00 00 00 00 00 000000
 Q: 4:0 00 00 00 00 00 00 000000
 R: 4:1 00 00 00 00 00 00 000000
 S: 4:2 a0 80 00 00 00 00 000000
 T: 4:3 01 01 00 00 00 00 000000
 U: 5:0 00 00 00 00 00 00 000000
 V: 5:1 03 00 00 02 00 00 000000
 W: 5:2 00 00 00 00 00 00 000000
 X: 5:3 78 08 08 70 00 60 606000
 Y: 6:0 06 00 00 02 00 00 000000
 Z: 6:1 0f 08 00 04 00 04 000400
AA: 6:2 00 00 00 00 00 00 000000
BB: 6:3 01 00 00 00 00 00 000000
CC: 7:0 92 80 80 02 00 12 121200
DD: 7:1 01 00 00 00 00 00 000000
EE: 7:2 00 00 00 00 00 00 000000
FF: 7:3 00 00 00 00 00 00 000000
nvidia@nvidia-desktop:~$ 

Anybody can give us some advices how to modify devicetree in the eMMC nano Module to support SPI0?

We had try serival ways to modify the devicestree according the introduce of forum, but don’t successfully. But in the SD nano module , re-configed using the jetson-io, the SPI0 is ok. Why the eMMC nano cannot config ? BTW, We used R32.4.2 and R32.4.3.