I'm trying to initialise an LCD over SPI within U-Boot on an i.MX6ULLEVK. Can someone point me at some relevant U-Boot examples of setting up and using an SPI slave?
It's fairly simple once you find the file you need to edit! If like me you're new to Yocto then that in itself is a challenge. As far as I can make out, all of the u-boot board specific code for the i.MX6ULLEVK is in:
I couldn't find any helpful spi libraries in the u-boot code - I think there might be some there but even the int enable_spi_clk(unsigned char enable, unsigned spi_num); failed to link with object not found so I figured I was on my own with the reference manual.
The attached patch adds a hacked in spi lcd initialisation (note the LCD in question uses 9-bit transfers) to the do_enable_parallel_lcd function.
If you're using an i.MX6ULBB you'll also need to remove resistors R1633 (hidden next to the SOM), R1634, R1635 and R1636 (all hidden on the back of the board) and fit 0R in R907,R908,R910 and R911 (hidden next to R1633).
Thanks for sharing your solution with the Community! As you mentioned, SPI driver is already included on the U-boot sources, so, you need to modify it according to your application requirements.
Retrieving data ...