All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Nyekjaer <sean@geanix.com>
To: "han.xu" <han.xu@nxp.com>
Cc: peng.fan@nxp.com, ye.li@nxp.com, alice.guo@nxp.com,
	sjg@chromium.org, seanga2@gmail.com, u-boot@lists.denx.de,
	miquel.raynal@bootlin.com,
	linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: [EXT] [PATCH] mtd: mxs_nand: default to legacy bch and rename to modern bch option
Date: Thu, 20 May 2021 11:09:44 +0200	[thread overview]
Message-ID: <edd64777-ff6a-82fd-63bb-7b2f31f63f44@geanix.com> (raw)
In-Reply-To: <20210513200242.fxvfvwgua35hbqvr@umbrella>

On 13/05/2021 22.02, han.xu wrote:
> On 21/05/11 07:08AM, Sean Nyekjaer wrote:
>> Caution: EXT Email
>>
>> On 11/05/2021 04.49, han.xu wrote:
>>> On 21/05/10 12:00PM, Sean Nyekjaer wrote:
>>>> Caution: EXT Email
>>>>
>>>> Linux kernel defaults to use legacy bch setting, this was creating a
>>>> mismatch between U-boot and Linux default settings.
>>> Kernel uses the NAND chip specified minimum ecc strength and steps by default
>>> not the legacy bch setting, unless users enable it in DT file.
>>>
>>
>> Hi,
>>
>> Adding, mtd-list and Miquel
>>
>> With u-boot dtb:
>> &gpmi {
>>         pinctrl-names = "default";
>>         pinctrl-0 = <&pinctrl_gpmi_nand1>;
>>         compatible = "fsl,imx7d-gpmi-nand";
>>         nand-on-flash-bbt;
>>         status = "okay";
>> };
>>
>> With linux dtb (mainline 5.10):
>> &gpmi {
>>         pinctrl-names = "default";
>>         pinctrl-0 = <&pinctrl_gpmi_nand1>;
>>         nand-on-flash-bbt;
>>         status = "okay";
>> };
>>
>> U-boot prior to commit 51cdf83eea selected 18 bit ECC, after that commit it selects 8 bits.
>> With legacy option it selects 18.
>> Linux is selecting 18 bits ;) So now we have a mismatch.
>>
>> I have been searching for the legacy option in the mainline kernel can't find it ;)
>> Please show me where it is (is it in the NXP fork?)
> 
> You are right, it's only fixed in NXP fork, with kernel driver modification. We
> prefer the current u-boot bch geometry, so I will send out a kernel patch to
> make them align.
> 
Any progress on this?

I see your patch in:
https://source.codeaurora.org/external/imx/linux-imx/commit/drivers/mtd/nand/raw/gpmi-nand?h=imx_5.4.70_2.3.0&id=ae980dccc6189956fab047958ad0a70ec4951439

But I can't find the option for selecting legacy mode in the devicetree...

/Sean

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Sean Nyekjaer <sean@geanix.com>
To: u-boot@lists.denx.de
Subject: [EXT] [PATCH] mtd: mxs_nand: default to legacy bch and rename to modern bch option
Date: Thu, 20 May 2021 11:09:44 +0200	[thread overview]
Message-ID: <edd64777-ff6a-82fd-63bb-7b2f31f63f44@geanix.com> (raw)
In-Reply-To: <20210513200242.fxvfvwgua35hbqvr@umbrella>

On 13/05/2021 22.02, han.xu wrote:
> On 21/05/11 07:08AM, Sean Nyekjaer wrote:
>> Caution: EXT Email
>>
>> On 11/05/2021 04.49, han.xu wrote:
>>> On 21/05/10 12:00PM, Sean Nyekjaer wrote:
>>>> Caution: EXT Email
>>>>
>>>> Linux kernel defaults to use legacy bch setting, this was creating a
>>>> mismatch between U-boot and Linux default settings.
>>> Kernel uses the NAND chip specified minimum ecc strength and steps by default
>>> not the legacy bch setting, unless users enable it in DT file.
>>>
>>
>> Hi,
>>
>> Adding, mtd-list and Miquel
>>
>> With u-boot dtb:
>> &gpmi {
>>         pinctrl-names = "default";
>>         pinctrl-0 = <&pinctrl_gpmi_nand1>;
>>         compatible = "fsl,imx7d-gpmi-nand";
>>         nand-on-flash-bbt;
>>         status = "okay";
>> };
>>
>> With linux dtb (mainline 5.10):
>> &gpmi {
>>         pinctrl-names = "default";
>>         pinctrl-0 = <&pinctrl_gpmi_nand1>;
>>         nand-on-flash-bbt;
>>         status = "okay";
>> };
>>
>> U-boot prior to commit 51cdf83eea selected 18 bit ECC, after that commit it selects 8 bits.
>> With legacy option it selects 18.
>> Linux is selecting 18 bits ;) So now we have a mismatch.
>>
>> I have been searching for the legacy option in the mainline kernel can't find it ;)
>> Please show me where it is (is it in the NXP fork?)
> 
> You are right, it's only fixed in NXP fork, with kernel driver modification. We
> prefer the current u-boot bch geometry, so I will send out a kernel patch to
> make them align.
> 
Any progress on this?

I see your patch in:
https://source.codeaurora.org/external/imx/linux-imx/commit/drivers/mtd/nand/raw/gpmi-nand?h=imx_5.4.70_2.3.0&id=ae980dccc6189956fab047958ad0a70ec4951439

But I can't find the option for selecting legacy mode in the devicetree...

/Sean

  reply	other threads:[~2021-05-20  9:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 10:00 [PATCH] mtd: mxs_nand: default to legacy bch and rename to modern bch option Sean Nyekjaer
2021-05-11  2:49 ` [EXT] " han.xu
2021-05-11  5:08   ` Sean Nyekjaer
2021-05-11  5:08     ` Sean Nyekjaer
2021-05-13 20:02     ` han.xu
2021-05-13 20:02       ` han.xu
2021-05-20  9:09       ` Sean Nyekjaer [this message]
2021-05-20  9:09         ` Sean Nyekjaer
2022-03-17 13:24         ` Frieder Schrempf
2022-03-17 13:24           ` Frieder Schrempf
2022-03-17 13:33           ` Han Xu
2022-03-17 13:54             ` Frieder Schrempf
2022-03-17 13:54               ` Frieder Schrempf
2022-03-21  8:34               ` Frieder Schrempf
2022-03-21 19:42                 ` Tim Harvey
2022-03-21 19:42                   ` Tim Harvey
2022-03-22 17:13                   ` Tim Harvey
2022-03-22 17:13                     ` Tim Harvey
2022-03-22 17:48                     ` Tim Harvey
2022-03-22 17:48                       ` Tim Harvey
2022-03-22 10:26           ` Stefano Babic
2022-03-22 10:26             ` Stefano Babic

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=edd64777-ff6a-82fd-63bb-7b2f31f63f44@geanix.com \
    --to=sean@geanix.com \
    --cc=alice.guo@nxp.com \
    --cc=han.xu@nxp.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=peng.fan@nxp.com \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=ye.li@nxp.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.