I modified the pinmux to enable spi on pin 19, 21, 23, 24.
I tried various configuration as the doc is unclear. Column L (allowed pin direction)indicates B (bidirectionnal). So I tried bidirectional, but also with combination of inputs and outputs (throw errors).
What should it be? do we define here if we want to be master or slave, or do we put bidirectionnal (to define the port as spi) and then we can put slave or master later? (I didn’t check yet how SPI is implemented in software)
What is the combox box “Boot device” (emmc or qspi) on the top right? Is it already implemented?
Concerning u-boot, I checked a little bit. Among the different modifications, there was a modification in the latest release r32.2 where it disables the SD card before doing the pinmux config due to a hardware problem. And TZ3 is set to OUT0 to disable a loadswitch.
Now with this code, when we do not modify the pinmux, the board can boot. I am wondering if changing the pinmux on SPI do not create another hardware problem of some kind.
But maybe this issue is not related. I don’t have time now to go in further details about u-boot.
Did anybody manage to test SPI with R32.2 release? Could you please check with the hardware team if they can test it?
To enable SPI, you should modify pinmux settings in u-boot:
In u-boot source code, pinmux-config-p3450-porg.h header file is present which is generated from pinmux xlsm.
Update this header file with your pin settings.
For pins 19, 21, 23, 24: They are configured as GPIO. To configure them as SPI, you will see following differences after updating xlsm and generate new header file.
You should not see GPIO PORT C0-C3 under gpio_config
GPIO_INIT(C, 0, IN),
GPIO_INIT(C, 1, IN),
GPIO_INIT(C, 2, IN),
GPIO_INIT(C, 3, IN),
Pinmux config will be changed according to your settings:
Ex. For pin SPI1_MISO:
These are the settings:
PINCFG(SPI1_MISO_PC1, SPI1, DOWN, NORMAL, INPUT, DISABLE, DEFAULT),
Please let me know in what pin configuration, board is not booting up. And your detailed steps.
I use “Jetson_Nano_DeveloperKit_Users_Pinmux_Configuration.xlsm” version 1.0, 4/15/2019 and Configuration Application Note (rev 1.0) from Nvidia’s download center. yes, I did configure column AR. For AS and AT, as I wrote, I am not sure.
do you have a working jetson nano developper kit with SPI enabled and r32.2?
Can you send me your files (the 2 *.dtsi, the *.csv, the generated *.dtb)?
Hi,
Do not update any pin settings in kernel. Kernel settings do not get applied. Please update u-boot pinmux file.I have attached files you have asked but do not update kernel pinmux dtsi, gpio dtsi, final kernel dtb. You should update file in u-boot according to my earlier comment. Please check settings in attached header file.
Extension is .txt just to attach files here, please rename to .dtsi
* THIS FILE IS AUTO-GENERATED - DO NOT EDIT!
*
* To generate this file, use the tegra-pinmux-scripts tool available from
* https://github.com/NVIDIA/tegra-pinmux-scripts
* Run "board-to-uboot.py p3450-porg".
*/
Your h file:
* To generate this file, use the tegra-pinmux-scripts tool available from
* https://github.com/NVIDIA/tegra-pinmux-scripts
* Run "board-to-uboot.py nano".
* Used the T210_P3448_SKU0_pinmux sheet, tab B00-B01 as of 2 May 2019, v18.
They are also differences in the code. so probably you also have another spreadsheet too.
With SPI lines identical, I can boot with a u-boot made with your file, but cannot boot with one made with my file.
However, when I boot with your file I don’t see SPI in /dev.
Hi,
You are not seeing SPI in /dev because there are no devices connected in SPI which are enabled in DT. You should connect a slave under spi@7000d400 (for 40 pin SPI1: 19,21,23,24) and configure slave in DT to get node under /dev
The differences you are seeing are my local changes. Please do not bother about it. The *.h generates using tegra-pinmux-scripts is latest. Update SPI configurations according to your uses and to enable SPI, remove GPIO lines from PORT C0 to C3 in *.h and use this updated file.
The link you have mentioned is no more available.
Are you able to enable SPI ? If not, can you please share the steps you have used so that I can help you out.
I think, u-boot support is no longer there to enable SPI. You can directly enable it using kernel dtb node by making status = “okay” and configure pinmux registers for SPI.
MOSI (addr: 0x70003050 val: 0xe000)
MISO (addr: 0x70003054 val: 0xe040)
SCK (addr: 0x70003058 val: 0xe000)
CS0 (addr: 0x7000305c val: 0xe008)
CS1 (addr: 0x70003060 val: 0xe008)
GPIO (addr: 0x6000d008 val: 0x00)
Write corresponding values to SPI register addresses as shown above directly on device after flash. This will enable SPI.
We have Jetson_IO python tool coming up which configures pinmux dynamically on device. I do not have steps on how to use this tool as of now but can provide later.
Please try the above method and let me know if you face any issues.