From: Vicente Bergas <vicencb@gmail.com>
To: Emil Renner Berthing <emil.renner.berthing@gmail.com>
Cc: "open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>, <linux-spi@vger.kernel.org>,
Mark Brown <broonie@kernel.org>, Heiko Stuebner <heiko@sntech.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [BUG] Rockchip SPI: long burst writes produce unexpected result
Date: Mon, 08 Apr 2019 13:19:14 +0200 [thread overview]
Message-ID: <1fcd4954-e0e8-4f93-80d3-8cbd169d0af9@gmail.com> (raw)
In-Reply-To: <CANBLGcyeroURDCHrBPRQ8bbhNsy9u0LkCq0MQmWUyvPR=p4b8w@mail.gmail.com>
On Sunday, April 7, 2019 9:55:10 PM CEST, Emil Renner Berthing wrote:
> Hi Vicente,
>
> On Sat, 6 Apr 2019 at 19:35, Vicente Bergas <vicencb@gmail.com> wrote:
>> Hi,
>> i have been experiencing issues writing to NOR-Flash SPI Memories
>> from two RK3399-based platforms: gru-kevin and sapphire board.
>> For kevin, this resulted in a bricked device because that memory
>> is the only boot device. ...
>
> Since you say reverting the "set min/max speed" patch fixes your issues
> could you try raising the spi clock like this and see if it works for you?
>
> + assigned-clocks = <&cru SCLK_SPI1>;
> + assigned-clock-rates = <400000000>;
>
> Of course the driver shouldn't let you configure the spi-controller in a way
> that makes it skip bytes, but if this works for you then I still think
> you're better off explicitly setting the spi clock speed rather than having
> the driver raise it for you. At least while it does it without
> checking for errors
> or having a way to lower it again as outlined in the commit message.
>
>> status = "okay";
>> spidev@0 {
>> compatible = "spidev";
>> reg = <0>;
>> spi-max-frequency = <50000000>;
>> };
>> };
>> ...
>
> /Emil
>
Hi Emil,
I've added both assigned-clocks properties to the spi1 node and tested
again. Unfortunately it still fails in a similar way:
Before the maximum write burst without errors was 47, now it is 33.
I've also tested it with an SPI bus speed of 100KHz to make sure the
external hardware is not overrun:
ioctl SPI_IOC_WR_MAX_SPEED_HZ 100000
Regards,
Vicenç.
prev parent reply other threads:[~2019-04-08 11:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-06 17:34 [BUG] Rockchip SPI: long burst writes produce unexpected result Vicente Bergas
2019-04-06 22:23 ` Vicente Bergas
2019-04-07 0:38 ` Vicente Bergas
2019-04-07 0:57 ` [PATCH] spi: rockchip: Revert "set min/max speed" Vicente Bergas
2019-04-08 22:35 ` Vicente Bergas
2019-04-07 19:55 ` [BUG] Rockchip SPI: long burst writes produce unexpected result Emil Renner Berthing
2019-04-08 11:19 ` Vicente Bergas [this message]
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=1fcd4954-e0e8-4f93-80d3-8cbd169d0af9@gmail.com \
--to=vicencb@gmail.com \
--cc=broonie@kernel.org \
--cc=emil.renner.berthing@gmail.com \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-spi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox