All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sourav Poddar <sourav.poddar@ti.com>
To: yuhang wang <wangyuhang2014@gmail.com>,
	<Thomas.Betker@rohde-schwarz.com>
Cc: linux-mtd <linux-mtd-bounces@lists.infradead.org>,
	Johannes Stezenbach <js@sig21.net>,
	Grant Likely <grant.likely@secretlab.ca>,
	Mark Brown <broonie@kernel.org>,
	linux-mtd@lists.infradead.org,
	spi-devel-general@lists.sourceforge.net,
	linux-arm-kernel@lists.infradead.org
Subject: Re: SPI: DUAL/QUAD support
Date: Fri, 5 Jul 2013 13:10:01 +0530	[thread overview]
Message-ID: <51D67851.8020402@ti.com> (raw)
In-Reply-To: <CAHSAbzOg+uHndydSC43moF7pijc67pqzB2rPnY69ynXHEzw79g@mail.gmail.com>

On Friday 05 July 2013 11:55 AM, yuhang wang wrote:
> Hi Thomas:
>
>>> Well, there's two bits here.  One is the support in the client drivers
>>> for using the extra data lines and the other is the support in the SPI
>>> core for telling controllers to do this.  We need that second bit in
>>> place before the first one can be implemented.
>> I am not sure if we do. In the system I am working on, the QSPI controller
>> recognizes the quad mode commands from the Tx data and automatically
>> switches modes; no manual intervention by the flash driver is needed.
>>
>> I agree that this may not be the case for all SPI controllers. Yuhang, can
>> you tell us what your controller will do?
> OK, well my spi controller just sets the certain transfer mode in the register
> to make it in that mode(single,dual,quad). Then it will send and receive datas
> with the specific lines. As master, it should be told the transfer lines by the
> slave. Thus I need some members to deliver the information.
>

To add to all the discussion going on,
I am using a qspi controller with a spansion flash device.
I tried using quad read mode bit, and what is required to change in
my case is the following:

1. enable quad mode in flash configuration register.
2. change my read opcode to QUAD READ opcode according to flash datasheet.
3. Configure my qspi controller cmd reg to use 6 PIN whenever quad mode 
is used.

So,  I don't need to change things in spi framework to get
quad working. Though, as thomas also pointed out, it might
vary from controller to controller.

> But what you said "QSPI controller recognizes the quad mode commands
> from the Tx data and automatically switches modes;"  I can not figure out.
> The communication is launched by SPI master, so how can the controller
> recognizes the Tx data in the first transmission.
>
>> Yes, there are usually different opcodes, and as far as I know, they are
>> not supported by the m25p80 driver. It seems we are missing some
>> background info here.
>> My guess is that the flash chip in question is configured to treat single
>> mode opcodes as dual or quad mode commands (some chips support this), and
>> that the SPI controller needs to be told, for each transfer, which mode to
>> use.
> Just as Johannes said. In my patch m25p80's changes is incomplete.
> Because my inicial aim is to add the transfer width member to tell controller
> the mode flash in. And I will attach new patch about m25p80 later.
> Also you are right. There are really series of flashes do not support dual/quad
> transfer. So I don't know whether there are any standard for serial-flash just
> like the CFI for parallel-flash. Personally, to make a general standard and
> a general code for serial-flash is necessary. So that we do not need to add
> special function in m25p80.c.
>
> Thanks,
> yuhang
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Sourav Poddar <sourav.poddar-l0cyMroinI0@public.gmane.org>
To: yuhang wang
	<wangyuhang2014-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	<Thomas.Betker-Bf/A/FSCP0w3s4ca2cGeAgC/G2K4zDHf@public.gmane.org>
Cc: linux-mtd
	<linux-mtd-bounces-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Johannes Stezenbach <js-FF7aIK3TAVNeoWH0uzbU5w@public.gmane.org>,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: SPI: DUAL/QUAD support
Date: Fri, 5 Jul 2013 13:10:01 +0530	[thread overview]
Message-ID: <51D67851.8020402@ti.com> (raw)
In-Reply-To: <CAHSAbzOg+uHndydSC43moF7pijc67pqzB2rPnY69ynXHEzw79g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Friday 05 July 2013 11:55 AM, yuhang wang wrote:
> Hi Thomas:
>
>>> Well, there's two bits here.  One is the support in the client drivers
>>> for using the extra data lines and the other is the support in the SPI
>>> core for telling controllers to do this.  We need that second bit in
>>> place before the first one can be implemented.
>> I am not sure if we do. In the system I am working on, the QSPI controller
>> recognizes the quad mode commands from the Tx data and automatically
>> switches modes; no manual intervention by the flash driver is needed.
>>
>> I agree that this may not be the case for all SPI controllers. Yuhang, can
>> you tell us what your controller will do?
> OK, well my spi controller just sets the certain transfer mode in the register
> to make it in that mode(single,dual,quad). Then it will send and receive datas
> with the specific lines. As master, it should be told the transfer lines by the
> slave. Thus I need some members to deliver the information.
>

To add to all the discussion going on,
I am using a qspi controller with a spansion flash device.
I tried using quad read mode bit, and what is required to change in
my case is the following:

1. enable quad mode in flash configuration register.
2. change my read opcode to QUAD READ opcode according to flash datasheet.
3. Configure my qspi controller cmd reg to use 6 PIN whenever quad mode 
is used.

So,  I don't need to change things in spi framework to get
quad working. Though, as thomas also pointed out, it might
vary from controller to controller.

> But what you said "QSPI controller recognizes the quad mode commands
> from the Tx data and automatically switches modes;"  I can not figure out.
> The communication is launched by SPI master, so how can the controller
> recognizes the Tx data in the first transmission.
>
>> Yes, there are usually different opcodes, and as far as I know, they are
>> not supported by the m25p80 driver. It seems we are missing some
>> background info here.
>> My guess is that the flash chip in question is configured to treat single
>> mode opcodes as dual or quad mode commands (some chips support this), and
>> that the SPI controller needs to be told, for each transfer, which mode to
>> use.
> Just as Johannes said. In my patch m25p80's changes is incomplete.
> Because my inicial aim is to add the transfer width member to tell controller
> the mode flash in. And I will attach new patch about m25p80 later.
> Also you are right. There are really series of flashes do not support dual/quad
> transfer. So I don't know whether there are any standard for serial-flash just
> like the CFI for parallel-flash. Personally, to make a general standard and
> a general code for serial-flash is necessary. So that we do not need to add
> special function in m25p80.c.
>
> Thanks,
> yuhang
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

WARNING: multiple messages have this Message-ID (diff)
From: sourav.poddar@ti.com (Sourav Poddar)
To: linux-arm-kernel@lists.infradead.org
Subject: SPI: DUAL/QUAD support
Date: Fri, 5 Jul 2013 13:10:01 +0530	[thread overview]
Message-ID: <51D67851.8020402@ti.com> (raw)
In-Reply-To: <CAHSAbzOg+uHndydSC43moF7pijc67pqzB2rPnY69ynXHEzw79g@mail.gmail.com>

On Friday 05 July 2013 11:55 AM, yuhang wang wrote:
> Hi Thomas:
>
>>> Well, there's two bits here.  One is the support in the client drivers
>>> for using the extra data lines and the other is the support in the SPI
>>> core for telling controllers to do this.  We need that second bit in
>>> place before the first one can be implemented.
>> I am not sure if we do. In the system I am working on, the QSPI controller
>> recognizes the quad mode commands from the Tx data and automatically
>> switches modes; no manual intervention by the flash driver is needed.
>>
>> I agree that this may not be the case for all SPI controllers. Yuhang, can
>> you tell us what your controller will do?
> OK, well my spi controller just sets the certain transfer mode in the register
> to make it in that mode(single,dual,quad). Then it will send and receive datas
> with the specific lines. As master, it should be told the transfer lines by the
> slave. Thus I need some members to deliver the information.
>

To add to all the discussion going on,
I am using a qspi controller with a spansion flash device.
I tried using quad read mode bit, and what is required to change in
my case is the following:

1. enable quad mode in flash configuration register.
2. change my read opcode to QUAD READ opcode according to flash datasheet.
3. Configure my qspi controller cmd reg to use 6 PIN whenever quad mode 
is used.

So,  I don't need to change things in spi framework to get
quad working. Though, as thomas also pointed out, it might
vary from controller to controller.

> But what you said "QSPI controller recognizes the quad mode commands
> from the Tx data and automatically switches modes;"  I can not figure out.
> The communication is launched by SPI master, so how can the controller
> recognizes the Tx data in the first transmission.
>
>> Yes, there are usually different opcodes, and as far as I know, they are
>> not supported by the m25p80 driver. It seems we are missing some
>> background info here.
>> My guess is that the flash chip in question is configured to treat single
>> mode opcodes as dual or quad mode commands (some chips support this), and
>> that the SPI controller needs to be told, for each transfer, which mode to
>> use.
> Just as Johannes said. In my patch m25p80's changes is incomplete.
> Because my inicial aim is to add the transfer width member to tell controller
> the mode flash in. And I will attach new patch about m25p80 later.
> Also you are right. There are really series of flashes do not support dual/quad
> transfer. So I don't know whether there are any standard for serial-flash just
> like the CFI for parallel-flash. Personally, to make a general standard and
> a general code for serial-flash is necessary. So that we do not need to add
> special function in m25p80.c.
>
> Thanks,
> yuhang
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2013-07-05  7:40 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04 11:36 SPI: DUAL/QUAD support yuhang wang
2013-07-04 11:36 ` yuhang wang
2013-07-04 11:36 ` yuhang wang
2013-07-04 13:00 ` Johannes Stezenbach
2013-07-04 13:00   ` Johannes Stezenbach
2013-07-04 13:00   ` Johannes Stezenbach
2013-07-04 14:58   ` Thomas.Betker
2013-07-04 14:58     ` Thomas.Betker at rohde-schwarz.com
2013-07-04 14:58     ` Thomas.Betker-Bf/A/FSCP0w3s4ca2cGeAgC/G2K4zDHf
2013-07-04 15:49     ` Mark Brown
2013-07-04 15:49       ` Mark Brown
2013-07-04 15:49       ` Mark Brown
2013-07-04 16:04       ` Thomas.Betker
2013-07-04 16:04         ` Thomas.Betker at rohde-schwarz.com
2013-07-04 16:04         ` Thomas.Betker-Bf/A/FSCP0w3s4ca2cGeAgC/G2K4zDHf
2013-07-05  6:25         ` yuhang wang
2013-07-05  6:25           ` yuhang wang
2013-07-05  6:25           ` yuhang wang
2013-07-05  6:45           ` Gupta, Pekon
2013-07-05  6:45             ` Gupta, Pekon
2013-07-05  6:45             ` Gupta, Pekon
2013-07-05  7:35             ` Johannes Stezenbach
2013-07-05  7:35               ` Johannes Stezenbach
2013-07-05  7:35               ` Johannes Stezenbach
2013-07-05  7:41               ` Sourav Poddar
2013-07-05  7:41                 ` Sourav Poddar
2013-07-05  7:41                 ` Sourav Poddar
2013-07-05  8:04               ` Gupta, Pekon
2013-07-05  8:04                 ` Gupta, Pekon
2013-07-05  8:04                 ` Gupta, Pekon
2013-07-05  7:40           ` Sourav Poddar [this message]
2013-07-05  7:40             ` Sourav Poddar
2013-07-05  7:40             ` Sourav Poddar
2013-07-05  8:48             ` yuhang wang
2013-07-05  8:48               ` yuhang wang
2013-07-05  8:48               ` yuhang wang
2013-07-05  8:55               ` Sourav Poddar
2013-07-05  8:55                 ` Sourav Poddar
2013-07-05  9:07                 ` yuhang wang
2013-07-05  9:07                   ` yuhang wang
2013-07-05  9:07                   ` yuhang wang
2013-07-05  9:08                   ` Sourav Poddar
2013-07-05  9:08                     ` Sourav Poddar
2013-07-05  9:08                     ` Sourav Poddar
2013-07-05  9:17                     ` yuhang wang
2013-07-05  9:17                       ` yuhang wang
2013-07-05  9:17                       ` yuhang wang
2013-07-05  9:27                       ` Sourav Poddar
2013-07-05  9:27                         ` Sourav Poddar
2013-07-05  9:27                         ` Sourav Poddar
2013-07-05 10:24                         ` yuhang wang
2013-07-05 10:24                           ` yuhang wang
2013-07-05 10:24                           ` yuhang wang
2013-07-05 14:34                           ` Johannes Stezenbach
2013-07-05 14:34                             ` Johannes Stezenbach
2013-07-05 14:34                             ` Johannes Stezenbach
2013-07-05 15:41                             ` yuhang wang
2013-07-05 15:41                               ` yuhang wang
2013-07-05 15:41                               ` yuhang wang
2013-07-04 14:36 ` Mark Brown
2013-07-04 14:36   ` Mark Brown
2013-07-04 14:36   ` Mark Brown
2013-07-04 18:06   ` Johannes Stezenbach
2013-07-04 18:06     ` Johannes Stezenbach
2013-07-04 18:06     ` Johannes Stezenbach
2013-07-04 19:12     ` Mark Brown
2013-07-04 19:12       ` Mark Brown
2013-07-04 19:12       ` Mark Brown
2013-07-05  9:41       ` yuhang wang
2013-07-05  9:41         ` yuhang wang
2013-07-05  9:41         ` yuhang wang
2013-07-05 10:12         ` Mark Brown
2013-07-05 10:12           ` Mark Brown
2013-07-05 10:12           ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2013-07-04  7:07 SPI : " 王宇航
2013-07-04  7:07 ` 王宇航
2013-07-04  7:07 ` 王宇航
2013-07-04  9:00 ` Mark Brown
2013-07-04  9:00   ` Mark Brown
2013-07-04  9:00   ` Mark Brown

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=51D67851.8020402@ti.com \
    --to=sourav.poddar@ti.com \
    --cc=Thomas.Betker@rohde-schwarz.com \
    --cc=broonie@kernel.org \
    --cc=grant.likely@secretlab.ca \
    --cc=js@sig21.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd-bounces@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=wangyuhang2014@gmail.com \
    /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.