All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vernon Sauder <vernoninhand-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
Subject: pxa2xx_spi with SFRM
Date: Thu, 07 Aug 2008 14:03:22 -0400	[thread overview]
Message-ID: <489B38EA.8030904@gmail.com> (raw)

Hi,

I am using a custom PXA270 board and tried to use the SSP port to 
communication with a SPI Flash. After reading docs on how to configure 
the spi_master and spi devices, I have the device driver's probe being 
called. But I cannot get the pxa2xx_spi driver to work correctly. I can 
connect either a SD card or a M26P16 Flash chip to the SPI port on my 
board. Neither device driver can completely operate their device.

It looks like it is impossible for the device drivers to control the 
chip select (CS) line. If I use the manual cs_control callback, the 
timing is invalid because the SSP clock keeps running. That means that 
several bits are clocked out before the SSP controller starts to drive 
the TX line correctly. If the SFRM signal is used, it does not allow the 
driver to keep CS active for multiple transactions as they expect and 
assume. The spi_sync call takes an spi_message which contains a list of 
transactions to send. Normally, the device will need the CS active 
during the complete message. But the SSP controller deactivates SFRM 
when it is done with each buffer. For instance, the M25P16 datasheet 
indicates that CS has to stay active from the READ command through the 
complete data transfer. When it goes high, it resets the command interface.

It looks like the SSP port needs to have a register bit to turn off the 
clock when there is nothing to transmit. Or a bit to tell the SSP 
controller to leave CS active. Or I can change the HW so CS gates the 
clock and a manual CS chip operates the device CS pin. I might also try 
the bitbanging SPI driver next to see if that can operate with the Flash 
chip.

Is there some other setting I am missing here? Is anyone else using the 
M25P16 chip with PXA270 SPI driver?

Vernon Sauder

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

             reply	other threads:[~2008-08-07 18:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 18:03 Vernon Sauder [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-08-08  8:02 pxa2xx_spi with SFRM nforrester-/d+BM93fTQY
     [not found] ` <1218182539.489bfd8b24a3d-2RFepEojUI3934Ez3d9NBg@public.gmane.org>
2008-08-08 10:08   ` Jonathan Cameron
     [not found]     ` <489C1B23.6040804-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2008-08-11 22:55       ` Vernon Sauder
     [not found]         ` <48A0C35D.5010606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-08-14 15:29           ` Ned Forrester
     [not found]             ` <48A44F77.1020908-/d+BM93fTQY@public.gmane.org>
2008-08-15  2:44               ` Vernon Sauder
     [not found]                 ` <48A4ED85.1030803-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-08-15 19:09                   ` Ned Forrester
     [not found]                     ` <48A5D44D.6040106-/d+BM93fTQY@public.gmane.org>
2008-08-16  2:33                       ` Vernon Sauder
     [not found]                         ` <20080815223307.02db86aa-W37fpRALFaH6NKmgiXY+hA0JkcsJGQge@public.gmane.org>
2008-08-18 18:34                           ` Ned Forrester
     [not found]                             ` <48A9C0D0.5050304-/d+BM93fTQY@public.gmane.org>
2008-08-20  0:59                               ` Ned Forrester
     [not found]                                 ` <48AB6C8F.4040408-/d+BM93fTQY@public.gmane.org>
2008-08-21 22:08                                   ` Vernon Sauder
     [not found]                                     ` <20080821180826.491ac70b-W37fpRALFaH6NKmgiXY+hA0JkcsJGQge@public.gmane.org>
2008-08-23  3:23                                       ` Ned Forrester
     [not found]                                         ` <48AF82B3.8040709-/d+BM93fTQY@public.gmane.org>
2008-08-29 19:18                                           ` Vernon Sauder
     [not found]                                             ` <20080829151839.7a85e7d6-W37fpRALFaH6NKmgiXY+hA0JkcsJGQge@public.gmane.org>
2008-08-30  3:07                                               ` Ned Forrester
2008-09-08 22:50                           ` David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=489B38EA.8030904@gmail.com \
    --to=vernoninhand-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.