From: RayS <ra...@bl...> - 2010-02-24 21:27:46
|
<html> <body> At 01:06 PM 2/24/2010, you wrote:<br> <blockquote type=cite class=cite cite="">On Wed, Feb 24, 2010 at 11:14 AM, RayS <ra...@bl...> wrote:<br> > We have an Overo with Palo43 and LCD module; all is well and the device<br> > boots and works fine. The LCD however has 4 wire SPI (ie with CS) and is is<br> > not the best example for a driver for a read-only ADC module (no CS). The<br> > main issue we're having is that the Gumstix only enables the SPI clock<br> > (SCLK) if a device is recognized at boot.<br><br> I think your expectations might be wrong.</blockquote><br> <font color="#800000">always possible!<br><br> </font><blockquote type=cite class=cite cite="">The SPI clock is not free-running. It is only driven during actual<br> SPI transactions.</blockquote><br> <font color="#800000">SPI/SCLK can free run for the ADS1278 DEV (or not)<br> <a href="http://www.ti.com/lit/gpn/ads1278" eudora="autourl"> http://www.ti.com/lit/gpn/ads1278<br><br> </a></font><blockquote type=cite class=cite cite="">If you intend to have more than one device on the SPI bus you *must*<br> have a chip select per device, otherwise the master has no way to<br> indicate which slave should talk/listen.<br> If you have only one device on SPI then you can get by with no chip select.</blockquote><br> <font color="#800000">which is the current state of things<br><br> </font><blockquote type=cite class=cite cite="">> We're having a tough time figuring<br> > out what we need to write a kernel (or user) driver that enables SPI, or can<br> > assume SPI is enabled from boot..<br><br> SPI is enabled in the standard image, but you will of course need to<br> write a kernel driver for the SPI chip you intend to use, and you will<br> also need to modify the overo board file in linux to enable that<br> driver.</blockquote><br> <font color="#800000">working on that...<br><br> </font><blockquote type=cite class=cite cite="">> By observing the log file of the booting when the touchscreen is mounted,<br> > u-boot seems to do device<br> > recognition.<br><br> U-boot does nothing with SPI. The log messages you are referring to<br> are output by the linux kernel during the boot process.<br><br> > Before the log file shows "remounting root fs" (including remounting of<br> > ads7846.c, which is the<br> > touchscreen driver), the log file shows "booting", meaning u-boot is<br> > running.<br> > It is during this "booting" that ADS7846 is detected on SPI 1, Chip Select<br> > 0, or is not.<br> > It is detected when in board_overo.c the field .modalias = "ads7846".<br> > Without this field written in board-overo.c, the detection doesn't happen.<br> > Once again, this detection is during "booting" as per the log file.<br> > The log file prints messages that show detection or not.<br> > The exact words in these messages are not found with a search engine on the<br> > computer, meaning<br> > we don't have the source code that generates them.<br> > So, where are they?<br><br> They are in the linux ads7846 driver!<br> <a href="http://www.sakoman.com/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=blob;f=drivers/input/touchscreen/ads7846.c;h=7cc9973241e51dcb88de2087b77c9526a4ed7666;hb=refs/heads/omap3-2.6.32" eudora="autourl"> http://www.sakoman.com/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=blob;f=drivers/input/touchscreen/ads7846.c;h=7cc9973241e51dcb88de2087b77c9526a4ed7666;hb=refs/heads/omap3-2.6.32</a> <br> > u-boot also puts Chip Select to 0 on SPI 1 after it detects ADS7846.<br> > Later-on, after "remounting root fs", the file ads7846.c (the touchscreen<br> > driver) takes over, detects ADS7846<br> > like u-boot did, does transmit and receive on the SPI bus when the screen is<br> > touched, and maintains<br> > Chip Select to 0.<br><br> U-boot does nothing with SPI. The log messages you are referring to<br> are output by the linux kernel during the boot process.</blockquote><br> <font color="#800000">thanks, we'll review <br><br> <br> Ray</font></body> </html> |