2010-06-16 19:02:58 Recommended way to handle holes in SPI_SEL?
Andrew Kohlsmith (CANADA)
Message: 90349
Good evening,
The board we're working on is only going to use the internal flash of a BF518F; the spi_bf5xx driver however requests all P_SPI0_SPISELx pins when it initializes. This doesn't work for us as we're using some of the other pins for other functions.
Currently the only way I can think of making this work is to mangle the ssel aray in the driver so that P_SPI0_SPISEL5 is the first entry, and then changing the platform definition to indicate only one SPI select for SPI0. This is, of course, not very clean.
My guess is that the answer would be to move the spi select stuff into the platform definition file, but before I embarked on that adventure I thought it best to check here.
-A.
QuoteReplyEditDelete
2010-06-16 19:08:42 Re: Recommended way to handle holes in SPI_SEL?
Mike Frysinger (UNITED STATES)
Message: 90350
the Blackfin SPI driver does not request all CS's for a SPI bus. it only requests CS's that your board resources say have a SPI device connected to it. so fix your board resources.
QuoteReplyEditDelete
2010-06-16 19:45:01 Re: Recommended way to handle holes in SPI_SEL?
Andrew Kohlsmith (CANADA)
Message: 90351
Excellent news. I have modified the platform resources file and it seems to work better. Tell me, is the internal flash chip in the BF518F supported by any of the existing SPI flash drivers in the uClinux tree?
QuoteReplyEditDelete
2010-06-16 19:54:56 Re: Recommended way to handle holes in SPI_SEL?
Mike Frysinger (UNITED STATES)
Message: 90352
iirc, the SPI flash is either a ST or SST part. either way, it should work out of the box with the 2009R1.1 release.
QuoteReplyEditDelete
2010-06-16 19:56:16 Re: Recommended way to handle holes in SPI_SEL?
Andrew Kohlsmith (CANADA)
Message: 90353
It's an SST25WF040; It might work out of the box if I told it the correct modalias in the platform resources file. :-)
QuoteReplyEditDelete
2010-06-16 20:38:55 Re: Recommended way to handle holes in SPI_SEL?
Andrew Kohlsmith (CANADA)
Message: 90354
I got it. The BF518 gpio and portmux do not support PH8, which is where the SPI chip select #4 exists on this part (not PG10 as the header files currently have it).
Once I did that things started working. Where would you like me to submit the patch?
QuoteReplyEditDelete
2010-06-16 20:45:58 Re: Recommended way to handle holes in SPI_SEL?
Mike Frysinger (UNITED STATES)
Message: 90355
afaik, i fixed the PH8 issue in trunk recently. you can post the patch to your message as an attachment for me to double check to see if i missed something.
QuoteReplyEditDelete
2010-06-17 09:21:56 Re: Recommended way to handle holes in SPI_SEL?
Andrew Kohlsmith (CANADA)
Message: 90376
Here's the patch against 2009R1.1-RC4.
bf518-ph8.patch
QuoteReplyEditDelete
2010-06-17 12:43:20 Re: Recommended way to handle holes in SPI_SEL?
Mike Frysinger (UNITED STATES)
Message: 90382
that's pretty much the patch ive committed to svn trunk/branch already. thanks.