AGX ORIN SPI3 pinmux configuration not taking effect

Hi NVIDIA Support Team,

We encountered an issue while configuring SPI3 via Pinmux Changes chapter** on an AGX Orin device (JetPack 6.0, L4T R36.3). Request your assistance to verify our methodology.

The steps we follow:
1.use Orin_Jetson_Series_Pinmux_Config_Template_2.0 to enable spi3
spi3 configuration as below


upload pinmux and gpio dtsi gennerated:
Orin-jetson_agx_orin-gpio-default.txt (4.9 KB)
Orin-jetson_agx_orin-pinmux.txt (65.7 KB)
2.rename Orin-jetson_agx_orin-gpio-default.txt → tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi
rename Orin-jetson_agx_orin-pinmux.txt → tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi
3. put tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi to Linux_for_Tegra/bootloader/generic/BCT
put tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi to Linux_for_Tegra/bootloader
4.flash target to update pinmux configuration.
we use

sudo ROOTFS_AB=1 ROOTFS_RETRY_COUNT_MAX=5 ./flash.sh -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-agx-orin-devkit external

But after agx bringup, we cheched pinmux reg as below

$ sudo busybox devmem 0x0243d000
0x00000455
$ sudo busybox devmem 0x0243d004
0x00001055
$ sudo busybox devmem 0x0243d020
0x00000000
$ sudo busybox devmem 0x0243d030
0x00001055
$ sudo busybox devmem 0x0243d048
0x00000055

It seems the configuration didn’t take effect.
are the two dts files the correct? tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi and tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi
In the flash log, we find it’s copying tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi


In p3701.conf.common we find the env of pinmux is also tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi
image

Please help check whether the method of updating the pinmux configuration is correct.

Best Regards

config GPIO_SF_SE as SFIO and regenerate the pinmux and gpio dts files.
tegra234-mb1-bct-pinmux-p3701-0000-a04.txt (65.7 KB)
tegra234-mb1-bct-gpio-p3701-0000-a04.txt (4.6 KB)

The regs are still incorrect

$ sudo busybox devmem 0x0243d000
0x00000454
$ sudo busybox devmem 0x0243d004
0x00000000
sudo busybox devmem 0x0243d020
0x00000404
sudo busybox devmem 0x0243d030
0x00001404
sudo busybox devmem 0x0243d048
0x00000404

reconfig the pinmux, now the value of the regs are as below,but still can’t get spi3 clk or data signal by a oscilloscope. Could you help confirm whether the registers are functioning properly.
Thanks

PADCTL_G2_SPI3_MISO_0  0x0243d000 
$ sudo busybox devmem 0x0243d000
0x00000454

PADCTL_G2_SPI3_CS0_0    
$ sudo busybox devmem 0x0243d010
0x00000454

PADCTL_G2_SPI3_CS1_0  
$ sudo busybox devmem 0x0243d020
0x00000454

PADCTL_G2_SPI3_SCK_0  
$ sudo busybox devmem 0x0243d030
0x00001454

PADCTL_G2_SPI3_MOSI_0  
$ sudo busybox devmem 0x0243d048
0x00000454

Hi hanyang369,

Why you configure all of them as GPIO/Input?

Do you also update the #include in tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi?

Are you usign the devkit or custom board for AGX Orin?

Hi KevinFFF,

Why you configure all of them as GPIO/Input?

We copied the configuration of SPI1in the spreadsheet.
now we have reconfiged the regs

		spi3_sck_py0 {
				nvidia,pins = "spi3_sck_py0";
				nvidia,function = "spi3";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
				nvidia,lpdr = <TEGRA_PIN_DISABLE>;
			};

			spi3_miso_py1 {
				nvidia,pins = "spi3_miso_py1";
				nvidia,function = "spi3";
				nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
				nvidia,lpdr = <TEGRA_PIN_DISABLE>;
			};

			spi3_mosi_py2 {
				nvidia,pins = "spi3_mosi_py2";
				nvidia,function = "spi3";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
				nvidia,lpdr = <TEGRA_PIN_DISABLE>;
			};

			spi3_cs0_py3 {
				nvidia,pins = "spi3_cs0_py3";
				nvidia,function = "spi3";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
				nvidia,lpdr = <TEGRA_PIN_DISABLE>;
			};

			spi3_cs1_py4 {
				nvidia,pins = "spi3_cs1_py4";
				nvidia,function = "spi3";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
				nvidia,lpdr = <TEGRA_PIN_DISABLE>;
			};
Do you also update the #include in tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi?

Yes, I have changed it.

Are you usign the devkit or custom board for AGX Orin?

I’m using a custom board for AGX Orin

After we applied the new configuration, SPI3 is working properly. We successfully performed a loopback test using spidev_test. However, the current issue is that although SPI3 is functional, during kernel boot, the SJA1105 device which is on SPI3 fails to read the device ID. But if we manually load the sja1105 kernel module after the kernel has fully booted, it can read the device ID correctly.

We suspect that there might be some unmet dependencies during the initialization of the SJA1105. We have already checked the power-up sequence and clock signals of the SJA1105 and found no potential issues. Could you provide some suggestions?
sja1105_probefail.txt (40.7 KB)

Thanks

The SPI function is disabled by default so that you’ve configured either pinmux spreadsheet or Jetson-IO to enable them.

Good, it seems you’ve enabled it corretly.

Please confirm that spi driver should be probed before it loads SJA1105 driver.

From the log you shared, I don’t see any messages about SPI driver for SPI3 been probed. (i.e. no messages for 3230000.spi)