From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92710C44539 for ; Wed, 22 Jul 2026 11:50:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C24C480C3F; Wed, 22 Jul 2026 11:50:02 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Za1O2TRnXu_9; Wed, 22 Jul 2026 11:50:01 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A8A7480C45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org ; s=default; t=1784721001; bh=YrZJEPFFueSu4kifYaOI+3zENCm1QybQkX0dg33HHrs=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=fZOOCRUuFbl7wj2peiX7PB7I6lOQmYs5rOnJlzg6ovJPQQWFD5GwmRFnLvPoGutGw 5Pa4SuYVXJyS+5wDenaGnsM2V8uplwLQ3r1CihNoEiEDQPqBOvodnRAGPGgldhdQDx BeiuiV7Sj32Kw0yZ7WaAfjZZxxNlpke2dsLgPxjfe3HFM4+CbYpbtyLZTTjDn4BuTU SAMFDnCasA1xMczd624j46YTRaSgecHxGM6i/DDy/8iROArWnNI1gzESaLYUh9torr xrqlO2DybQsrCCHf/P6rQIhJC7jrMJ9TUNNJC6OEzLWd+MQ12QnDwMXKAmjDg0U/Z3 Jq0XUmJpa7yTw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id A8A7480C45; Wed, 22 Jul 2026 11:50:01 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists1.osuosl.org (Postfix) with ESMTP id 5145C224 for ; Wed, 22 Jul 2026 11:50:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 42E9B6063F for ; Wed, 22 Jul 2026 11:50:01 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id drEJkQKZwHX9 for ; Wed, 22 Jul 2026 11:50:00 +0000 (UTC) Received-SPF: Permerror (mailfrom) identity=mailfrom; client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=boogiepop@gmx.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org C95C5605F4 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org C95C5605F4 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by smtp3.osuosl.org (Postfix) with ESMTPS id C95C5605F4 for ; Wed, 22 Jul 2026 11:49:57 +0000 (UTC) Received: by phobos.denx.de (Postfix, from userid 109) id 7FC01848BA; Wed, 22 Jul 2026 13:49:56 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2017E803F6 for ; Wed, 22 Jul 2026 13:49:54 +0200 (CEST) X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from client.hidden.invalid by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MoO6C-1xJLF60p3o-00lVBc; Wed, 22 Jul 2026 13:49:32 +0200 Message-ID: <4ca92082-7d8a-48bd-8f23-e448d4b59210@gmx.com> Date: Wed, 22 Jul 2026 13:49:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] mtd: nand: raw: rockchip_nfc: fix ecc setup To: Johan Jonker , u-boot@0leil.net Cc: kever.yang@rock-chips.com, sjg@chromium.org, dario.binacchi@amarulasolutions.com, michael@amarulasolutions.com, trini@konsulko.com, u-boot@lists.denx.de, quentin.schulz@cherry.de, Miquel Raynal , richard@nod.at References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:/wDXO0w3NZ9JmQaGLJkv0GLw/cL5POGuqfAOOhdI3hsF+lFKhgq HE0nI0NJfLgmxUe4V1FR2YCFioZOnx6t1DPe4oQ29FWHOa+icDTIrNMARqnxjhb/MS3i0XA rg4dAjv4rMD3Y91g3Tvk0u6LLAHw9VxGpHUwbsR6MxERcBvWo2FvftJwpqvSYynTr9PXlq2 gCI3BrbnQlaNFdiaum9XA== UI-OutboundReport: notjunk:1;M01:P0:R9cc152Op6w=;nuMI+XV7Yp8qN+/sRgv4/mRFfNu 8q8srPnw7+N711LDsyVf8D2lD9E16hKSEp+iiyk1xDaSb71wDJ/8r4Vnlnmx32jozY1xFStvT 6y8IxrNSpl0qzBo29uU1Xxs23Z1+I/gEVDmY9TU60xeHFtMJ3NM27FujtrpIPRZx4xZRf/wC9 GyGxvIjSh4Lpod0kxR1oEvVxjyuqw8+YTMYYztyri8/O5wu14OQCzPZfdqOeXNBRflY87clwu CcDVeku8FkfUKH84Tro35jyBNxGTHeP7kFU1P+9X0o0f2MR6AdlcE2i/BnUvYUSGN+XlZP8UN hVR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qpWz+xwjGBHHi1yqOQYD/sIGxRYWOpDjtUNXNw5hHMJSh+faYlBfA8PBZVd3IcReY 53mGB3ZHOJjdYb6kVW1pAyG0HZyQZyF9m+LY4im0m4B02m/TJWXWB8cX8nwZWwQLX6gQJHEkh E8KYOyX8YPT9lckoubWYSP8i3pAIO0LjNQO0/kX9VHhCz8zqg30YbvvHhnW1X1JqBD8ZxA0mg = X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.com; s=s31663417; t=1784720972; x=1785325772; i=boogiepop@gmx.com; bh=YrZJEPFFueSu4kifYaOI+3zENCm1QybQkX0dg33HHrs=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=N6CfUvScu9oLeJbmrXfTPaqiggZF39Taqjc0jxiJenVwQrEIGWKKLaeNnmEaYd0S hgFxXLPDC/rjGV/tKnuPajqSqRbpYCKBifePDppm6DYWgX15B6GjaD4OAxNx9Fu4w 66K7gTdeZH7Y/tzagCxNSiy46yuPQ3boWzwgb5aNjCfB0MvLeHW1JcaA0OqQfvuk6 NRX0R60odxpx0WyQ8e8qtRX6H+lu7nrkv5628l6E3g7Ca6o6lytT2PmFt55lmVnWP aIpsmc/aLC1gUDr/JSbgFhQUa0fJhGwIvZ4g0wG8J16CFA5r/c+n51GIhO1El+kic buQW4ibAOmZvrqxP0A== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.com X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=gmx.com header.i=boogiepop@gmx.com header.a=rsa-sha256 header.s=s31663417 header.b=N6CfUvSc X-Mailman-Original-Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=gmx.com X-Mailman-Original-Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=boogiepop@gmx.com X-Mailman-Original-Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=gmx.com header.i=boogiepop@gmx.com header.b="N6CfUvSc"; dkim-atps=neutral X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Boogie via U-Boot Reply-To: Boogie Errors-To: u-boot-bounces@lists.u-boot-project.org Sender: "U-Boot" Hi Johan On 7/22/26 11:16, Johan Jonker wrote: > Changed References: > Added Linux MTD maintainers. Question below. >=20 > Hi, >=20 > On 7/22/26 00:56, Boogie wrote: >> Hello Quentin >> >> I had reported this bug to Johan so i can give detailed explanation. >> >> The bug was really the lock of "&& nfc->selected_bank =3D=3D 0" not exi= sting for write_page_* variants. >> >> When rockchip nfc was reading, it required bootblks to be a part of the= first nand chip only with the condition "nfc->selected_bank =3D=3D 0". Bu= t when writing it interpreted 'all' nand chips first boot_blks as boot blo= cks. >> >> The practical problem. I had mentioned this in V1 and give more explici= t details here. >> >> I have 2 nand chips, and a partition (linux below) starts in nand chip = 1 (CS=3D0 in below) and ends in chip2 (CS=3D2 below). And i am using UBI o= n top of that mtd. >> >> nand@0 { >> =C2=A0=C2=A0=C2=A0 reg =3D <0>, <2>; >> =C2=A0=C2=A0=C2=A0 label =3D "rk-nand-0"; >> =C2=A0=C2=A0=C2=A0 nand-bus-width =3D <8>; >> =C2=A0=C2=A0=C2=A0 nand-ecc-mode =3D "hw"; >> =C2=A0=C2=A0=C2=A0 nand-ecc-step-size =3D <1024>; >> =C2=A0=C2=A0=C2=A0 nand-ecc-strength =3D <40>; >=20 >> =C2=A0=C2=A0=C2=A0 nand-is-boot-medium; >=20 > This property was introduced during review, but can't find the reason. > https://lore.kernel.org/linux-rockchip/20200426100250.14678-1-yifeng.zha= o@rock-chips.com/ >=20 >> =C2=A0=C2=A0=C2=A0 rockchip,boot-blks =3D <8>; >> =C2=A0=C2=A0=C2=A0 rockchip,boot-ecc-strength =3D <24>; >=20 > Describing 2 nands with 1 node also exposes properties to a second nand = that result in reduced ecc strength in both. >=20 >> >=20 >> =C2=A0=C2=A0=C2=A0 // block 14 - end >> =C2=A0=C2=A0=C2=A0 linux@1C00000 { >=20 > The binding puts the partitions under 1 nand node, but says nothing abou= t a partition across 2 or more nands. > Could the MTD maintainers inform us the support status of this 'feature'= in Linux and U-Boot. >=20 > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree= /Documentation/devicetree/bindings/mtd/mtd.yaml#n39 >=20 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 label =3D "linux"; >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 reg =3D <0x0 0x1C00000 0x3 = 0xFE400000>; >> =C2=A0=C2=A0=C2=A0 }; >> }; >=20 > I would like to produce a patch with "&& nfc->selected_bank =3D=3D 0" fo= r Linux. > Not sure if they are willing to merge. >=20 > Depending on the output/feedback put this patch on hold till I know more= . This current version in mainline linux (and your patch) also works, may=20 be it is better to leave it so (at least for me), because adding "&&=20 nfc->selected_bank =3D=3D 0" will break existing devices, which is not=20 always worth it specially for legacy devices like ones using this driver. >=20 > Johan >=20 >> >> When i create the UBI volume the middle of this partition where the blo= cks are at 2nd chip block0-7, will be written in boot block strength [ECC:= 1024/24] but will be read with normal strength [ECC:1024/40]. >> >> This causes first UBI creation to be successful, and next scan to fail = due to written strength is different that read. >> >> You dont actually need to use UBI at all, any time you write those sect= ors, you wont be able to read them. A workaround it to mark them bad, but = this is not nice, since the blocks are completely fine. >> >> Rockchip NFC technically as minimum needs to know rockchip,boot-blks, &= rockchip,boot-ecc-strength props only. Currently the checking condition i= s rockchip,boot-blks & applied affect is rockchip,boot-ecc-strength. >> >> The bug is this is only applicable to first chip not all chips. >> >> NAND_IS_BOOT_MEDIUM is actually coming from mainline linux. Similar boo= trom tricks are also available in other socs. And detection of boot rom bl= ocks is not always straight forward as rockchip's rockchip,boot-blks, they= have to do some "if" case acrobatics to detect those. For simplicity reas= ons mainline linux introduced a global flag NAND_IS_BOOT_MEDIUM and it is = applied to other socs as well. >> >> Since this "&& nfc->selected_bank =3D=3D 0" fix is exactly at the same = line with mainline changes of NAND_IS_BOOT_MEDIUM check, i think Johan als= o integrated both at the same line. >> >> In u-boot only mk808 is using nfc with boot blocks and it is already ma= rking the nand device as boot medium, so the code change should not break = existing devices. >> >> Additional note: Linux mainline also is lacking the "nfc->selected_bank= =3D=3D 0" check, so i think similar patch should got to linux as well. >> >> @johan if anything i am missing feel free to correct me. >> >> h=C3=BCseyin >> >> On 7/20/26 20:25, Quentin Schulz via U-Boot wrote: >>> Hi Johan, >>> >>> Resending because the ML rejected my mail sent from my other address..= . >>> I have to figure out what I set up wrong to trigger the spam filter :) >>> >>> On 7/14/26 8:39 AM, Johan Jonker wrote: >>> =C2=A0 > The Rockchip boot ROM only checks for NAND chip 0 and with >>> =C2=A0 > reduced ECC strength. Currently only the read page functions >>> =C2=A0 > have this condition check added. >>> =C2=A0 > >>> =C2=A0 > Fix by adding the same condition to all read and write page >>> =C2=A0 > functions by dropping the existing 'selected_bank =3D=3D 0' = check >>> =C2=A0 > and use the NAND_IS_BOOT_MEDIUM option that was introduced t= o >>> =C2=A0 > U-Boot more recently than this driver to behave >>> =C2=A0 > identically to the Linux driver. >>> =C2=A0 > >>> =C2=A0 > It is now the users responsibility to apply the device tree >>> =C2=A0 > property "nand-is-boot-medium" to only NAND chip 0. >>> =C2=A0 > >>> =C2=A0 > Fixes: b12dc5d6fa76 ("mtd: nand: NFC drivers for RK3308, RK2= 928 and >>> others") >>> =C2=A0 > Signed-off-by: Johan Jonker >>> =C2=A0 > Tested-by: H=C3=BCseyin BIYIK >>> =C2=A0 > Reviewed-by: Simon Glass >>> >>> You don't explain how the bug can be triggered. It'd be nice to provid= e >>> the usecase when this is an issue so that other people looking on the >>> Internet for bug reports could somehow stumble upon this patch. >>> >>> I'm thinking the issue is that we currently verify all NAND chips use >>> the boot_blks and boot_ecc from the boot medium whereas they might not >>> be used as a boot medium (they are missing the nand-is-boot-medium >>> property) so we cannot actually make use of them. Is that correct? >>> >>> Considering boot_blks is 0 if rockchip,boot-blks property isn't set, >>> we'll never be able to meet the page < pages_per_blk * 0) condition >>> anyway so we would never enter the if block... or can page actually be >>> negative???? >>> >>> To be clear, I don't disagree with the fix, I just am missing a lot of >>> information that should be in the commit log. >>> >>> Cheers, >>> Quentin >> >=20