From nobody Mon Apr 6 12:16:58 2026 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E76BC329C67 for ; Thu, 5 Mar 2026 07:12:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772694775; cv=none; b=Sqr8M3lpj0G+IDWXs3AGKvdG8oYu3uJEcEsMLguYjpPRu7B9Y2h8WOKz4XOFkLhlKO7mJFhyVbbN38jK1dyYsr7TH1Y4DFfNMoLxZtfRdN0TWdbbwXrTmbvHitHwyurQtzKY46cEMCR8ellJiO//ChjKAHM5SG0luZb69dkLecY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772694775; c=relaxed/simple; bh=KK/RfrneX26MbnhhIHZJrPe9nQFBKGB8P79R9Zne4HA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=F71wh5FlBOn/9pedK6otzD0yNC0+yAqAjPkNYp6UYJnxNscrhEHFgHdL3s3a6OsCyx4TxpHXfWnVgm3pbkfLFatBeTOWlUi9ozFFz5E+SbXGrdb1JidzI48oLwwcEaiqeWqYCG2ugJBNOPpXsj8rPKyAAxmcNezLNRkMoVnfbdQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AUIomeja; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AUIomeja" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2a8fba3f769so34079055ad.2 for ; Wed, 04 Mar 2026 23:12:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772694773; x=1773299573; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ajhw8hYpqHjqV3r6yWVus18nRMpwuD8YgLrA+5qE4SA=; b=AUIomejak5dmqxZ0xhKYTm4dlZkIcDmW/TSR5WYQOQc5uj71bwh9RhdeR/nw9uWFMn u9+wxbH05Ui5uNvM/ZInnBdWyPjcFua3frNaVhVY+1+PW+kb/tAF+XfZx+K3PtDeMASG kxRqRwXYRizMDoThiMh78awVHJBdiMymZKUPbSielPzhz+ceAGa7IYad4/yytTzhdpv7 KmYyQa1vcOL+SM7ozz1ChwkE0Q+xb7AFmDK10bueN3MtaL84WzdaSQC3mSQ+22fM2AAc eD4jKo1NsJ0B/rxEY1OAalp41+XD6/oapfjArsPBBtCVwI8oT2hIw/pdgih2PftCSoWd 2lzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772694773; x=1773299573; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ajhw8hYpqHjqV3r6yWVus18nRMpwuD8YgLrA+5qE4SA=; b=jslw+luuCyZJnZ9tAhmhhUOxdh8g2oqTC3f3aRt45Xvvi6Sn6DglRetR7J5KeqLhmq oZ9nu/76t39k1j36jmHssX/TAYK3D22R+b+DsT0OYkcvZWolf5hbykxr6e7MI9OiRPwv 4CJ3IuM05swhwh3NemenYSvPGSR3ErgHdOC8836TeMot2L/xGLiJn+XfPYiwBTcaVdiz GLqJcvtYPrrc+HdJ3Ef72Kc6DNo5ChyZUCVa5WURmlGppJb2HSnSymafl1zEW3ciUhoS f18jS5mm1OVs6k/Rp1AlAlJKoXKN8M2HqoRt1TgmAlTzCOV/uRdU7mcxO78iAmN6GFOu qANw== X-Forwarded-Encrypted: i=1; AJvYcCUc7gIv5JE4aUFCCz+9qZRODxzS+ngDTmMRuQWcBDkto8LIWPfWB6mnawb9RO1QBtHCmYKqhkIc5lJxkK4=@vger.kernel.org X-Gm-Message-State: AOJu0YylOrxN23tE7jdkZA9iLclEalkl2Mxg590RZdvT7GaSrZ8pgTcI lErFxfyQy0tOxHryu/LosKyPVgf/Z5I9PtpaJv3U8SgD8RjDgXK/A5LR X-Gm-Gg: ATEYQzwgtiiQMD/P7tuy/jBlt9sL2bJTT8XB2xqVTHaAgdhEhKdWyFCCkV+XD3IXe4S SOzVtIwIj16+p8bVf2b79trRDu9784zeA8ixmMtOG/j47NjRveOG39G5f26zOSX0fmoQRLN1vTD hFLUbIwRb8zOum/Iw7erC8KixuF01qJ3zw7RlnV7DJW6FAEvATn0GjZKG0tFvxO3UnZPZCy8NIN VT9CixzfY9PT6uMPs8um6NDyyV0LTqOXmXFehp51/uaWnWPyYhMDvDWKAWquv56GA7q9GGH5Mh8 /UsmqcV4qgM4Nl9NIQW/07Jp4vhyYtS1Kig4xngzoADITMkHpqtfEFAZFAbqVWqKYx3dLWWc4za 4HzxH65Op3AAXLohV/IcROLTAYEUNPc9ZGWKv9FGuQVEy32f/JnHup0aZf5YfxINATURqmMCUv8 977Pu5Q2kOVN9DLHp6VQpy9mA2cds2HyztuSIlW2KBVeyPDw== X-Received: by 2002:a17:902:c94a:b0:2ad:ca65:a398 with SMTP id d9443c01a7336-2ae6abe7cd8mr42850435ad.57.1772694773349; Wed, 04 Mar 2026 23:12:53 -0800 (PST) Received: from twhmp6px (mxsmtp211.mxic.com.tw. [211.75.127.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2adfb6a03fbsm283865575ad.43.2026.03.04.23.12.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2026 23:12:52 -0800 (PST) Received: from hqs-appsw-a2o.mp600.macronix.com (unknown [172.17.236.67]) by twhmp6px (Postfix) with ESMTPS id B62F94163B6B; Thu, 5 Mar 2026 15:12:50 +0800 (CST) From: Cheng Ming Lin To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Tudor Ambarus , Mikhail Kshevetskiy , Pablo Martin-Gomez , Tianling Shen , Pratyush Yadav , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alvinzhou@mxic.com.tw, Cheng Ming Lin Subject: [PATCH v8 1/3] dt-bindings: mtd: spinand: Add randomizer enable/disable properties Date: Thu, 5 Mar 2026 15:10:40 +0800 Message-Id: <20260305071042.1193522-2-linchengming884@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260305071042.1193522-1-linchengming884@gmail.com> References: <20260305071042.1193522-1-linchengming884@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Cheng Ming Lin Add "nand-randomizer-enable" and "nand-randomizer-disable" boolean properties. These properties allow enabling or disabling the randomizer feature via the device tree. According to JEDEC standard JESD22-A117E, no single data pattern represents a universal worst-case for all NAND flash failure mechanisms. Different patterns, such as fully programmed, checkerboard, or mostly erased, can disproportionately stress specific cells (e.g., programmed, erased, or those influenced by adjacent states). Given that no fixed pattern can cover all scenarios, the use of a randomized data pattern is a practical and effective mitigation strategy. Our hardware implements a randomizer feature that scrambles user data before it is written to the flash and restores the original data upon read. This ensures the data stored on the media is more evenly distributed, thus reducing pattern-dependent degradation. This is especially crucial for preventing errors caused by unbalanced data (e.g., all zeros or all ones) in blocks with high program/erase (P/E) cycle counts. Ultimately, the randomizer improves the long-term reliability and endurance of the flash device. Signed-off-by: Cheng Ming Lin --- .../devicetree/bindings/mtd/nand-chip.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/nand-chip.yaml b/Documen= tation/devicetree/bindings/mtd/nand-chip.yaml index 609d4a4ddd80..2559cd97ccc5 100644 --- a/Documentation/devicetree/bindings/mtd/nand-chip.yaml +++ b/Documentation/devicetree/bindings/mtd/nand-chip.yaml @@ -67,6 +67,24 @@ properties: the secure regions present. $ref: /schemas/types.yaml#/definitions/uint64-matrix =20 + nand-randomizer-enable: + description: + Enable the randomizer feature. This property is mutually-exclusive + with nand-randomizer-disable. + type: boolean + + nand-randomizer-disable: + description: + Disable the randomizer feature. This property is mutually-exclusive + with nand-randomizer-enable. + type: boolean + +dependencies: + nand-randomizer-enable: + not: + required: + - nand-randomizer-disable + required: - reg =20 --=20 2.25.1