From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (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 8790625A642 for ; Wed, 25 Feb 2026 01:59:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771984746; cv=none; b=rSE34LX/tUaMzlfYX907VzV6T00DOUksZ6bPHhBB2dg9BoFAXVhScCAVOuhYMB0rjDQwER8r1VWg7x2oi7/oqCU/mZVTOnV+UmDXDLF8jwp4L8XgjVKBucKi2eEr3ieEWc+XHqkfRC9ZsNbM9Om8tEjg5kW3+8i16fTueVTvGfI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771984746; c=relaxed/simple; bh=+BTlo82bOP/foze/gQeON8U8aTkxMyzFjbZtn96P+d4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RB37I7qk/56WKW1haRnRwdJ0JYpx+X99jsgm0nPu0NoGvUyzAA570y1DB1w75mZanKE2V48BW9EVNIe6nmDCL9burXIKLKB+CKt7Fsyt2Eu5Q6vwIlbrdslXi4IX9HT/TScSWxod3iM99YJhtAm242N0haK6CyMFUWJ9sOGFQGk= 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=nJhIegNO; arc=none smtp.client-ip=209.85.210.169 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="nJhIegNO" Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-82728e5680cso3354b3a.0 for ; Tue, 24 Feb 2026 17:59:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771984745; x=1772589545; 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=3zvwKD7V2YKpGMLkJEO1tU3ZqnJ4SfaB+coADDuVirU=; b=nJhIegNOHpNIjkHyY0JX0Ua07WUUBuqTtv3jxZVVbhT6lH6+hUKr/qc7aDYBhI0AgW baPLhUF7PFsu9dO5bAz+nwHdC+wMjmKerqk3IdaBDM/vTN1Jwrv5DJ6CM6ugNqjA3WYc VUA0mWtwmc3nmSCZ8wzCZJp4gAbjQSYVHtr0HNT/nGPyZ2WuGTZR0f32Zg+Zjq4Lj2BZ 8KdKojVnz7uTQ6GEX9qUPXKfBln6BlaWJBfL39E03dvo5EcGsqWigUXrZc++VwPXuKGc naadoQxl3rVuxwaiXv4TuM1+B70mX8g2iXy0j8cPoVvQBq4Fmh3I8ueM4oK+n4SNmSIV woFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771984745; x=1772589545; 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=3zvwKD7V2YKpGMLkJEO1tU3ZqnJ4SfaB+coADDuVirU=; b=KZelLcBfGPfMK1F1tWF4pLyB9TEtgHviv2o1AOYnBoymptiM1mF566/6u/kF0qgm+F f70BCeNTZUdlMJzXJYFP64ijc+m3QTrmrgR6vPCxlpnt7/YOtWwi4f1RLNI1hFRNiKSl 3XIiloxdmtauUdysbvJT5wjo35mo4F2Y44TYkXjIrK1nzC32Ib0YTboz0RahQYhzKD8N 2kjfSN/24yVEQBR2D4/+kc57Z+uGSzjYQiqKhWn1+ShX48ApiVuMWq2RCnVF2VIRqmIU hw9NO7VdD7AlcLE38JLga596souDc/gnKj5HbAHl4abRAGGQJFhMXmSxOz3Ba0lPYfDx 9ycQ== X-Forwarded-Encrypted: i=1; AJvYcCXC3r3vfZihKYd4tm6x6cWmBnteowHTFXZ3c9ItRQYmVEJCx+YknrB5IXoKVnGmibdoxqj8D3t3xDTm7sc=@vger.kernel.org X-Gm-Message-State: AOJu0YyVe0kjwKp4++njxE4X21p2AdElbfiGtHWDk1q3LSZWqEQRNhfW a1koumguiqPUKIJ8FLreDxiLbYinVUy1ImArMZQ4dhvnh1EH8uyUYEFB X-Gm-Gg: ATEYQzwt4KEScGzoChHhq3R6T8tftb9w0RGXE7jBOXOSOdiAAcN+m+iPsvou+YVSEq8 sueLgrNAODWPRvw/P5wnlXXWRCWvwza8xn+oFeXzmFMSvV/V87LbpSs2PDq+61FbE6UBOxNqT8Y EH9d7wcC38hL7EJaiqmbr5eClfjIihu8TDXaR0tZ8Yuguat1A7oGaGBKsVgUL2QZiOattuz5GDJ PE8pbQMr5B6eGvQHjMa8t+5MU+XXW5pP1Rdam7dRRvnerIjz4wWMY1ArGP2PxKw090z/sCrMKLq Osl8SaTWqjgq/YRjclO5UQliXkNccpE4RIPhYzwzBIQbVR5piz4Js104QqTRKhnl1luF1MCkijT T4G/tw935m4ZeKcnCi2RfR+b7nOERXeDhjdILT5VruC01R65VmsKbs3gZWoqLYCUkfH9OSaGQz7 GxL5EURIPyKy7S4Ti5PzClDQwzud7eLop1E+8KTF/SGVPTvA== X-Received: by 2002:a05:6a21:898b:b0:34f:ec81:bc3d with SMTP id adf61e73a8af0-39545f7a3bamr11523634637.44.1771984744888; Tue, 24 Feb 2026 17:59:04 -0800 (PST) Received: from twhmp6px (mxsmtp211.mxic.com.tw. [211.75.127.162]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-35900700e69sm1002312a91.0.2026.02.24.17.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Feb 2026 17:59:04 -0800 (PST) Received: from hqs-appsw-a2o.mp600.macronix.com (unknown [172.17.236.67]) by twhmp6px (Postfix) with ESMTPS id 8DB204136074; Wed, 25 Feb 2026 09:59:02 +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 v7 1/3] dt-bindings: mtd: spinand: Add randomizer enable/disable properties Date: Wed, 25 Feb 2026 09:57:03 +0800 Message-Id: <20260225015705.1113199-2-linchengming884@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260225015705.1113199-1-linchengming884@gmail.com> References: <20260225015705.1113199-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: 8bit 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. Please refer to the following link for randomizer feature: Link: https://www.mxic.com.tw/Lists/ApplicationNote/Attachments/2151/AN1051V1-The%20Introduction%20of%20Randomizer%20Feature%20on%20MX30xFxG28AD_MX35xFxG24AD. 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/Documentation/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 + 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 -- 2.25.1