From: Sean Nyekjaer Date: Thu, 20 May 2021 11:09:44 +0200 Subject: [EXT] [PATCH] mtd: mxs_nand: default to legacy bch and rename to modern bch option In-Reply-To: <20210513200242.fxvfvwgua35hbqvr@umbrella> References: <20210510100043.449294-1-sean@geanix.com> <20210511024926.t6kunesknbwe7k2x@umbrella> <20210513200242.fxvfvwgua35hbqvr@umbrella> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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