Skip to content

Add the Quadspi driver for vf610-twr

Huang Shijie linux-arm-kernel linux-devicetree linux-mtd 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest posting 4/40 of 8 patches 0 repliesNew
  2. v3 posting 3/40 of 8 patches 0 repliesSuperseded
  3. v3 posting 2/40 of 8 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v3 posting 1/40 of 8 patches0 repliesSuperseded

Patches in v3 posting 4/4 No applies recorded yet

None of the 8 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/8] Add the Quadspi driver for vf610-twr
Quoted 9 lines · David Woodhouse
Quoted 5 lines · Huang Shijie

But for the quadspi driver, it does not need this information.

When the drivers knows that it is a Quad-read transaction, it will uses the relative LUT sequence which uses the 4 lines.

But the controller driver shouldn't *have* that incestuous knowledge of the command set of the chip that happens to be connected to it.

I think the controller is designed for the NOR flash, yes, a little strange.

Quoted 5 lines

That's what we're *complaining* about.

It *should* "need this information", and should just do what it's *told* to do by the slave device driver.

I can add the lines info in the m25p80_read() for the quad-read, but the lines information is redundant to this Quadspi driver.

I will send you the datasheet tomorrow.

Mark and you want to create the LUT instruction sequence at the runtime, But there is some disadvantage if we do so:
[1] low efficiency:
If you want to change the LUT regitster, you should unlock the LUT register, and change the LUT regitsters, and lock the LUT regitsters again.

[2] we may can not create all the LUT instruction sequence at the runtime. For example, the buffer program(OPCODE_PP):
the m25p80_write() may write 256bytes at a time, but the Quadspi controller only has a 64-byte TX-FIFO, so the controller should write a 64bytes firstly, then sends to the NOR with a read-status command. Do you want to create a read-status LUT instruction sequence at run time? This is not good solution, we should pre-populate the read-status LUT information.

[3] We may can not create the LUT instruction sequence at the runtime, since we can not get enough information from the spi_transfer{}. A whole LUT instruction sequence may needs the following info:
1.) spi command.
2.) lines info: single line, dual lines, quad lines. 3.) Address width: 3 bytes address or 4 bytes address. 4.) instruction type: Read or write or other.
5.) length info: how many bytes for this transaction . 6.) dummy info: how many dummy is needed for this transaction.

We can not get the dummy info from the spi_transfer{}

I may still miss something. But If we want to create a LUT instruction sequence at the runtime, we should _PARSE_ out the SPI NOR command firstly. If we parse out the SPI nor commands, there is no difference between the pre-populete-LUT and create-LUT-at-runtime.

thanks
Huang Shijie