Forums › Reference, Evaluation, and Development Boards › OSD3358-SM-RED › Unable access SPI NOR flash in Linux user space
Tagged: spi
Hi,
I have a OSD3358-SM-RED dev kit and I am trying to use SPI NOR flash S25FL127S for bootup.I tried to access it on /dev/spidevx.x following this guide, https://www.infineon.com/dgdl/Infineon-AN233637_Accessing_SPI_NOR_flash_registers_in_Linux_user_space-ApplicationNotes-v01_00-EN.pdf?fileId=8ac78c8c7ddc01d7017ddd028cbe5917, but I can’t query any device ID or registers. I am using recent debian image from https://www.beagleboard.org/distros, and I can see /dev/spidev0.0, 0.1, 1.0, 1.1. Can you let me know how to modify it to be able to access SPI NOR flash? I have made sure J11 is populated, and I can use SD card to boot up the device.
Thanks,
Judy,
You will need to change the device tree in order to enable the SPI flash functionality. https://github.com/RobertCNelson/dtb-rebuilder provides a good way to do custom device trees. SM-RED’s device tree can be found here: https://github.com/octavosystems/OSD335x-Device-Tree/tree/master.
Please take a look at https://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components/Kernel/Kernel_Drivers/SPI.html for additional information. Example implementation from ICEV2 board: https://github.com/RobertCNelson/dtb-rebuilder/blob/4.14-ti/src/arm/am335x-icev2-common.dtsi#L233
Best,
Neeraj
Hi Neeraj,
Thank you for the reply. I also want to know how to access SPI NOR flash in uboot. I followed this discussion, https://octavosystems.com/forums/topic/spi-nor-from-u-boot/. I have compiled “sf” commands and also added ““CONFIG_SPI_FLASH_SPANSION=y”” in config in the uboot. When I executed “sf probe 0”, it shows the error , “Invalid bus 0 (err=-19)
Failed to initialize SPI flash at 0:0 (error -19)”
I tried both am335x_evm_defconfig and am335x_evm_spiboot_defconfig, but both gave me the same error. Can you let me know how to modify to access it from uboot? THank you
Judy,
Have you looked at https://octavosystems.com/forums/topic/spi-nor-from-u-boot/#post-6713 in specific pinmux definitions that are needed?
Please also take a look at https://e2e.ti.com/support/processors-group/processors/f/processors-forum/758423/linux-am5718-qspi-boot-fail-spi-probe-failed with the same error. While the post is for a different device all the inputs should apply to AM335x.
Best,
Neeraj
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields