Re: [PATCH v2] spi: add Renesas RPC-IF driver

Sergei Shtylyov
2020-02-10T18:43:48Z

Hello!

On 02/08/2020 01:36 AM, Chris Brandt wrote:

>> Add the SPI driver for the Renesas RPC-IF. It's the "front end" driver
>> using the "back end" APIs in the main driver to talk to the real hardware.
>> We only implement the 'spi-mem' interface -- there's no need to implemebt
>> the usual SPI driver methods...
>
> I tried these patches on an RZ/A1H RSK board.
>
> At first, things were looking good. It would probe the SPI flash correctly
> and I could read out data.
>
> But, when I went to try and do an erase, it all went bad.
> Looking at the actual SPI lines, the commands coming out don't look like what
> I would expect from an MTD device.
>
> For example, I do a
> $ flash_eraseall /dev/mtd3
> and all that comes out are Read Status commands (0x05).
> All the write enables and erase commands are missing.

Well, I have warned that writes don't work.

> So, it looks like any command that is a write-only never actually sends
> anything.
>
> I did try and do a page program command:
> $ echo hello > /dev/mtd3
> It sent the page program command (0x12), but in this case, it still didn't work
> because a write enable command was not sent first.
> I assume the MTD layer is requesting the correct sequence of commands, but
> Somehow this new driver is dropping of them.

Would explain what I saw (writes not surviving a JFFS2 remount)...

> Chris

MBR, Sergei