SPI3 - Jestson AGX orin Not retaining the values which is set in Pinmux

We are trying to enable SPI1 and SPI3
SPI1 is working fine.
Whereas in SPI3 we observed that MISO configuration is always zero though we have set as below in PINMUX
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_NONE>;
                            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>;

                    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>;
                    };

We have removed below lines from GPIO for enabling SPI3
TEGRA234_MAIN_GPIO(Y, 0)
TEGRA234_MAIN_GPIO(Y, 1)
TEGRA234_MAIN_GPIO(Y, 2)
TEGRA234_MAIN_GPIO(Y, 3)

sudo ls -l /dev/spidev*
crw-rw---- 1 root gpio 153, 0 Oct 9 17:23 /dev/spidev0.0
crw-rw---- 1 root gpio 153, 1 Oct 9 17:23 /dev/spidev0.1
crw-rw---- 1 root gpio 153, 2 Oct 9 17:23 /dev/spidev2.0
crw-rw---- 1 root gpio 153, 3 Oct 9 17:23 /dev/spidev2.1

///SPI1///
sudo busybox devmem 0x0243d028 //SCK
0x00001400
sudo busybox devmem 0x0243d018 //MISO
0x00000450
sudo busybox devmem 0x0243d040 //MOSI
0x00000400
sudo busybox devmem 0x0243d008 //CS0
0x00000400

///SPI3///
sudo busybox devmem 0x0243d030 //SCK
0x00001400
sudo busybox devmem 0x0243d000 //MISO
0x00000000
sudo busybox devmem 0x0243d048 //MOSI
0x00000400
sudo busybox devmem 0x0243d010 //CS0
0x00000400

Please suggest if any change is required.

Hi vbhm,

Are you using the devkit or custom board for AGX Orin?
What’s your Jetpack version in use?

Could you write this register with the correct value as following?

$ sudo busybox devmem 0x0243d000 w 0x450
$ sudo busybox devmem 0x0243d000

Please also share the pinmux dtsi file for further check.

Hi Kevin,
We are using custom board for AGX Orin and the Jetpack version is 5.1.2.

Writing manually into the register is working.
sudo busybox devmem 0x0243d000
0x00000000
sudo busybox devmem 0x0243d000 w 0x450
sudo busybox devmem 0x0243d000
0x00000450

Below I am attaching Pinmux dtsi

tegra234-mb1-bct-pinmux-p3701-0000-a04 2.dtsi.txt (63.6 KB)

After configuring the register for SPI3_MISO, could your SPI3 work as expected?

From your device tree, it seems SPI configurations are expected.

Hi Kevin,

When we try to write into register as below it works fine.
sudo busybox devmem 0x0243d000 w 0x450
sudo busybox devmem 0x0243d000
0x00000450

But why is this configuration not taking from pinmux dtsi.

I’m not sure if something in your system over-write this register because I don’t see this issue on my local devkit.

Have you confirmed the pinmux for SPI1 and SPI3 are the same?

Hi Kevin,

Yes, the configuration is as same as SPI1 except the pin changes. SPI1 is considering the configuration from pinmux and reflecting the same in register value.
In SPI3 I have only problem with MISO.

Maybe you could try to reflash the board and check if the issue persists

Hi Kevin,

The issue still persists even after reflashing the board.

How do you flash the board?

Hi Kevin,

we flashed by connecting the module in recovery mode and executed “sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1” command for flashing.

Are you using custom BSP package to flash the board?
and using the same board config(jetson-agx-orin-devkit.conf) for the custom carrier board?

Do you have the devkit to reproduce the same issue? Or it could only be reproduced with the custom carrier board?

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