linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Schrempf Frieder <frieder.schrempf@kontron.de>
To: Peng Fan <peng.fan@nxp.com>, Abel Vesa <abel.vesa@nxp.com>,
	Mike Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <kernel@pengutronix.de>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Anson Huang <anson.huang@nxp.com>, Jacky Bai <ping.bai@nxp.com>
Cc: dl-linux-imx <linux-imx@nxp.com>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>
Subject: Re: [PATCH v2] clk: imx8mm: Switch to platform driver
Date: Tue, 17 Mar 2020 10:45:40 +0000	[thread overview]
Message-ID: <4cdbd500-2199-762c-43d9-2a49bd8e2414@kontron.de> (raw)
In-Reply-To: <AM0PR04MB4481780CEA5A8A7DB87C7D9F88F60@AM0PR04MB4481.eurprd04.prod.outlook.com>

Hi Peng,

On 17.03.20 04:56, Peng Fan wrote:
>> Subject: Re: [PATCH v2] clk: imx8mm: Switch to platform driver
>>
>> On 06.02.20 11:37, Frieder Schrempf wrote:
>>> On 06.02.20 11:34, Schrempf Frieder wrote:
>>>> Hi,
>>>>
>>>> On 09.07.19 16:20, Abel Vesa wrote:
>>>>> There is no strong reason for this to use CLK_OF_DECLARE instead of
>>>>> being a platform driver. Plus, this will now be aligned with the
>>>>> other i.MX8M clock drivers which are platform drivers.
>>>>>
>>>>> In order to make the clock provider a platform driver all the data
>>>>> and code needs to be outside of .init section.
>>>>>
>>>>> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
>>>>> Acked-by: Stephen Boyd <sboyd@kernel.org>
>>>>
>>>> This has been upstream for quite some time now, but somehow I have an
>>>> issue with SPI on the i.MX8MM that gets resolved when I revert this
>>>> patch.
>>>>
>>>> When I try to probe an SPI NOR flash with latest 5.4 or even 5.5:
>>>>
>>>>      spi_imx 30820000.spi: dma setup error -19, use pio
>>>>      spi-nor spi0.0: unrecognized JEDEC id bytes: 00 00 00 00 00 00
>>>>      spi_imx 30820000.spi: probed
>>>>
>>>> When I revert this patch:
>>>>
>>>>      spi_imx 30820000.spi: dma setup error -19, use pio
>>>>      spi-nor spi0.0: mx25r1635f (2048 Kbytes)
>>>>      spi_imx 30820000.spi: probed
>>>>
>>>> Please note, that in both cases I have disabled DMA, as this causes
>>>> even more trouble (see [1]). But even with DMA enabled and ignoring
>>>> the DMA errors, the issue described above occurs.
>>>>
>>>> Does someone have an idea what's wrong?
>>>> Am I the only user of SPI on i.MX8MM as this issue seems to exist
>>>> upstream since v5.4-rc1?
>>
>> This issue still persists in v5.6-rc6. Can someone please have a look?
> 
> Would you post your full boot log somewhere?

Sure, the two bootlogs are here: https://paste.ee/p/8uDwd.
The only difference is that in the OK case this patch is applied: 
https://paste.ee/p/xUBrO

> 
> With success/fail case, are there any differences in spi controller registers?
> I suppose no.

No, they are the same, except for BURST_LENGTH in ECSPI1_CONREG, which 
is 0x2F in case of failure and 0x3F in case it is working. But I guess 
that's a result of the failed/successful transfers.

> 
> Did you measure the signal saying data in when cs is low?

It's a bit difficult to access the signals on the board so I didn't 
check the signals, yet.

> 
> Anyway it is a bit wired since this patch just delayed the probe for a while.

Yes, it's really weird and it's very unfortunate that the EVK does not 
have a SPI device onboard. I guess that would have helped to prevent 
regressions due to better testing.

If you have any suggestions, please let me know.

Thanks,
Frieder

      reply	other threads:[~2020-03-17 10:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1562682003-20951-1-git-send-email-abel.vesa@nxp.com>
2020-02-06 10:34 ` [PATCH v2] clk: imx8mm: Switch to platform driver Schrempf Frieder
     [not found]   ` <2df024c3-ab46-4e33-f961-5ef994aea145-2UyDCMiLNfiELgA04lAiVw@public.gmane.org>
2020-02-06 10:37     ` Schrempf Frieder
2020-03-16 13:23       ` Schrempf Frieder
2020-03-17  3:56         ` Peng Fan
2020-03-17 10:45           ` Schrempf Frieder [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=4cdbd500-2199-762c-43d9-2a49bd8e2414@kontron.de \
    --to=frieder.schrempf@kontron.de \
    --cc=abel.vesa@nxp.com \
    --cc=anson.huang@nxp.com \
    --cc=fabio.estevam@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=peng.fan@nxp.com \
    --cc=ping.bai@nxp.com \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@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;
as well as URLs for NNTP newsgroup(s).