Okay, you can refer to the similar steps in Jetson/L4T/peripheral/ - eLinux.org for SPI loopback test.
Please note that Jetson-IO may not work with your custom carrier board so that you need to configure the pinmux for SPI related pins first.
You can share the porting guide and related resources with us to check.
Yes, spi@3230000 is for SPI1 which includes following SPI pins:
PY.00: SPI1_SCK
PY.01: SPI1_MISO
PY.02: SPI1_MOSI
PY.03: SPI1_CS0
PY.04: SPI1_CS1
You can configure them as following in pinmux spreadsheet.
Thanks for the solution sir. I applied the above topic solution. i moved on to this error [ 7.963013] spi-tegra114 3230000.spi: can not register to master err -517 [ 8.041094] spi-tegra114 3230000.spi: can not register to master err -517 [ 9.835335] spi-tegra114 3230000.spi: can not register to master err -517
just one difference to mine I used values of TEGRA194_MAIN(Y,3) reset-gpios = <0xe5 474 0x00>;
because of reflashing is not feasible for me. Secondly, changing pinmux dtsi (tegra234-mb1-bct-pinmux-p3767-dp-a03) doesnt seem to effect the result. I still see some gpios set as output as input in gpioinfo. My custom board is for ORIN NX. with JP6.1
Based on Formula given in pinctrl_tegra194.h header file I calculated and set the values to 194 and 195. And it gave again no probe error.
I did next step I removed the DTB entry and added back the default spi@0 : tegra-spidev entry and tested the 0x80 0xD4 0x00 0x00 is an instruction to read 1 byte out of register TPM_ACCESS_0. which gave me 00000000 against the expected 00000001. I dont know whether this was correct .
But you are configuring SPI0(3210000.spi) for TPM.
Could you confirm again which SPI interface are you using?
This is not valid to me since it is for T194 series. However, you are using Orin Nano(which is T234 series).
As a result, please specify TEGRA234_MAIN_GPIO instead
Please refer to the configurations for T234 series.
I am using SPI1 interface with SPICS0 as CS and SPI1CS1 as TPM reset.
As a result, please specify TEGRA234_MAIN_GPIO instead
Yes I corrected it my CS is TEGRA234_MAIN_GPIO(Y,3) and RESET is TEGRA234_MAIN_GPIO(Y,4)… As per TEGRA_GPIO_CTRL.H header file I calculated the values to be 147 and 148… while based on Jetson Adaptation and bring up guide I calculated it to be 473 and 474 respectively
dear @KevinFFF thanks for your response. I did set it to like that but still it did not detect it. I believe its hardware issue. May I know what it means if put default settings tegra-spidev. the spi does not give errors that way.
How did you determine that it is hardware issue? Well Its my assumption because when I set spi to vendor sepcific CTI it gives probe error.
Have you tried to get a scope to capture the signal to check?
No sir. Currently I have limitation but I will check soon.
Please share the full device tree you used and dmesg currently.
here it the dtb Customised_DTB.txt (323.1 KB)
dmesg has only one thing tpm-spi probe error.
Your configuration in device tree looks good to me.
I would suggest using scope to check SPI signal first.
Or you can add more logs in tpm driver(tpm_tis_spi_main.c) to debug further the root cause.