Is it possible to access spi connected device from u-boot for Tx2i?
Our customized board has a nvram connected to spi for Tx2i. There is no problem to operate this spi connected nvram from kernel space. However, I am unable to access the same nvram from u-boot using either “sf probe” or “sspi”, and the following is the reported error:
Invalid bus 0 (err=-19)
Failed to initialize SPI flash at 0:0 (error -19)
Any suggestion or pointers how to access the nvram from u-boot would be appreciated.
Thanks.
Is there any spi driver currently available at u-boot space for TX2i without the need to port?
If not, I have couple more questions:
For porting a spi driver to driver model per spi-howto.txt , which driver should be based on? u-boot source has tegra114_spi and tegra210_qspi. Are these the right driver to base on? If not, what driver should be used for porting?
Is there a need to update the device tree to enable the access? If yes, can you provide information how to modify it like which file, and how does the entry looks like?
Is there a need to configure the pins? If yes, can you provide information how to configure it?
The tegra114_spi driver in U-Boot should be applicable to TX1, TX2, Nano, etc., . It’s not currently in the build for p2771 (aka TX2), so you need to add it to the defconfig for TX2 (p2771-0000-500_defconfig) as CONFIG_TEGRA114_SPI=y and rebuild U-Boot.
Walter, please update when you get a chance, I know thru our email conversations that you’ve made significant progress getting the tegra114_spi.c driver to work on TX2, and it might help others to see your changes here.