Hi all,
Via the attached patch and the CONFIG_SPI_SPIDEV Linux kernel configuration item, I've enabled SPI1 (CS 0) for use by spidev (/dev/spidev2.0). After looking at the signals on a scope, everything seems to be working, except for the fact that my MOSI and MISO pins seemed to be swapped. (Perhaps someone could use my patch and spidev to double check this assertion?) With this setup, it appears that I'm seeing my output data on AA3.
In the DM8148 TRM I see that this is actually software-configurable via the DPE0, DPE1 bits of the MCSPI_CH<n>CONF register. However, at this point I'm still prototyping using spidev rather than modifying/extending the mcspi driver directly.
(1) Are there are any quick sysfs or kernel cmdline parameters I could use to specify the MOSI/MISO assignments of these pins, or perhaps a quick change to board_ti814xevm.c that I'm missing?
(2) I've been looking at the TRM and the PSP's McSPI Driver Guide, but didn't see anything about the default MISO/MOSI assignment of these pins (and/or what the McSPI driver sets them to initially). Would anyone happen to know what document/source file I should be looking at? I expect that I'm overlooking this...
(3) If the answer to (1) is "no," could anyone provide a bit of insight in where I should be looking to make changes? In the future I may be using devices on SPI0 which may not have the same SPIX_D[0/1] assignments, so I just want to keep that in mind.
Basically, I would like the SPI1_D[0/1] assignments to match what I see in the Mistral DM8148EVM schematic for the EVM base board (see pg 24 of MS_TI_CEN_BB_REVC_DDR3_PG2_SCH.pdf, rev C): AA6=SPI1_MOSI, AA3=SPI1_MISO.
(4) [CORRECTION] I see that on the Mistral EVM Expansion board (see MS_TI_CEN_CAT_APP_BETA_SCH.pdf, rev B, page 5, connector J2) seems to have connected AA6 (Labeled SPI1_MOSI) to the SDO (ACC_SPI_DO) of the accelerometer on the board, and AA3 (Labeled SPI1_MISO) is attached to the SDI on the accelerometer (ACC_SPI1_DI). The input/output arrow directions also seem to indicated that MISO and MOSI have been mislabeled here. Am I correct on this being a typo on the schematic?
Thank you,
Jon
--- ../../../../linux-2.6.37-psp04.01.00.06.patch2.bak/arch/arm/mach-omap2/board-ti8148evm.c 2011-11-21 12:58:36.000000000 -0500 +++ ./board-ti8148evm.c 2012-02-28 15:29:03.018814557 -0500 @@ -480,6 +480,13 @@ .bus_num = 1, .chip_select = 0, }, + { + .modalias = "spidev", + .mode = SPI_MODE_0, + .max_speed_hz = 48000000, + .bus_num = 2, + .chip_select = 0, + }, }; void __init ti8148_spi_init(void)