From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 D0D56350A09 for ; Wed, 11 Feb 2026 10:07:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770804440; cv=none; b=r8nr7ab8jLq10WEjj9Xy8HK7Fs6+ybnQaH4aD8t6H85x8JVyXL5vqRRa+o1+HaOXWehzrnkSCoLftVd2rWnfL1FoqEMZv4OBAVl3/hlNPwOmD8kjbTD3RsyGlM/yrpHbhY/BEz2cK6DyhbqJU89I3JX9tO+IKvVB3i3acMYF2L8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770804440; c=relaxed/simple; bh=5l89L1ul8yQIPOLJ2ih74T807RtJjfRQ3fbLN4OtxQQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=USsvmeXlVaAY3wAkjDZkhcz3oBPH1Npf/Oeqq6HeUr6sivHqBz8QIngYAPTSThITP14EhnIvJHU8VifDalpcqJSBKUCB/J60O+j2UZHDRYWaMufmqx4i1NGLB+07kNRAQjtJ3hSl1K78iuXOdHJFKYQI0zsnNjD9FTU4bAHhsj4= 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=LWzuU0Br; arc=none smtp.client-ip=209.85.214.179 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="LWzuU0Br" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2a962230847so14058075ad.3 for ; Wed, 11 Feb 2026 02:07:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770804439; x=1771409239; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=KciIN1xTZfLpfJqvrrNWWVt3Y9r9TXbxsa4mxWX9G/c=; b=LWzuU0BrphaI/OEHY/vjKwa7PX5GTIl4mCnRD1ALEkIiIyR6ErWmXFculZ7Zjq5IFY 9wRedYNMwOYwLWzUIx2ULUfmz2nJNHGzssx4RyVigacF75fnr0b6KmICqe1d6AjF/zox zUKI9e/ZJQyQejPQ1i33LEdlzf2gNETU2XM+OKf+y4HMC3aBF+ziZRvR2RjbdxT93Le2 II9j8f5Wo2cu4i6NtxFqqfRC+oEGV6/1h/z+LEsBA6QsizBVhnc4BIcdxdeYf2KzaQIM OfhYDV+GK226oc2N1fUuNFEosCN9JhcGNMzijkZT+C0UY4jwe4BhO+PPyiNrvdrvxkBH hcbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770804439; x=1771409239; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KciIN1xTZfLpfJqvrrNWWVt3Y9r9TXbxsa4mxWX9G/c=; b=tg9j9GY0XCmXF6nEF047IdzWQ2R/lqpGjc9KUEtH34vCCTQuF+oh1w5ycGjARogYL4 3D1meOUUmreARv8LaDuCpKbSHcvP/6Btly6uVMmiyt55HhdbW6EzXnpsxwv1bvL0lnwK YSk9edwlNL4PQ2wfHr6XaZETNxXO5NZX+feSn3alpqr7ALoDsJ8IuUCm/rQyJOOMtVR+ Ko4UoNCJyBo5WFFMlLNJo4a4mMetDu7dTfWUEtp7ur0jgFvAih8Ypry513VpAGGGZFyS WP2RgTTGSSfrb8LkuoXc/xSsJnrMsUNuO6oXkztGRZnpajeWLLgHMZUbLbGcoZJVdSdi Bbbg== X-Forwarded-Encrypted: i=1; AJvYcCWll0/JtMO8RKJLQpiEqvahL/5wzQ7Qva1LqC0VOkEJy2q8C49S/6NTiT4fUQPu8m0DXAmzKrxQtqK3m0Y=@vger.kernel.org X-Gm-Message-State: AOJu0Yxs3NXKVpEYWAH8BOwSHBgBfAxV7ecHx4ndg7Cb0R50f0ND3y87 F/3W9mfRPGgIyZzYIwSEaVlpL838G1gyStBL8HNV0xXS5imf+XUH7AI1 X-Gm-Gg: AZuq6aJGPMPNiimOeygu0NvIbvQA3eg7gy3GpiIjPM1tHj2M//utUSpAPjKS3HX93Vc 8vyPbC27mtWDX9fnoEb4hsFxiUXzvegaev+QxsN3obJyTdLJ0isOcfIsuL48j02ksd8vABOwrgm R8kwhHcSYfnXKD8yAap27pcPb9Msmi7zNOXAvo9ZdaFTfIh9WZ3iPXRRIwKRZgudtMh0SVJ7sKM AQ25mZ9fKJFqHhOyj0usL4BwPlzedscpps6gyn+dK1SBryDS7DrjoIdpBIe3Ei867ROuLSpkegx BS/eQJSS/SIfesvXmMfVJ2wEFIdG/Q1Bal91x/kYZhsICcNc9nUvGJAI2vm6MzSFHyAm+oltqoS 1oNJVcpBAnJarKJwSpgfLunq1zNKRVvrWFdB1dy9Pv4ZjSKYxh+XAitsStYFdhLzLRvkO7mvSh/ rt386S57s7nzC746ewOplp4qjik/xe8uWm0BJE7YKKRHtM5A== X-Received: by 2002:a17:902:d588:b0:295:96bc:8699 with SMTP id d9443c01a7336-2a9516c84b4mr160482535ad.20.1770804439178; Wed, 11 Feb 2026 02:07:19 -0800 (PST) Received: from twhmp6px (mxsmtp211.mxic.com.tw. [211.75.127.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ab2997bc2fsm18729385ad.76.2026.02.11.02.07.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Feb 2026 02:07:18 -0800 (PST) Received: from hqs-appsw-a2o.mp600.macronix.com (unknown [172.17.236.67]) by twhmp6px (Postfix) with ESMTPS id E128A4136071; Wed, 11 Feb 2026 18:07:16 +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 v5 0/3] mtd: spi-nand: Add support for randomizer feature Date: Wed, 11 Feb 2026 18:05:50 +0800 Message-Id: <20260211100553.907585-1-linchengming884@gmail.com> X-Mailer: git-send-email 2.25.1 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 This patch series introduces randomizer support for SPI NAND devices. - Patch 1: add the nand-randomizer-enable and nand-randomizer-disable boolean properties to the generic nand-chip.yaml bindings. - Patch 2: add the initialization logic and the set_randomizer callback to the core framework. The core will now parse the device tree properties and enable or disable the randomizer accordingly during spinand_init. - Patch 3: implement the set_randomizer callback specifically for Macronix chips (MX35LF/UF series) to handle the vendor-specific register operations. v5: * Promoted the randomizer configuration to use generic NAND properties (nand-randomizer-enable and nand-randomizer-disable) instead of vendor-specific bindings. * Refactored the initialization architecture in core.c. The core framework is now responsible for parsing the device tree properties and deciding whether to enable or disable the randomizer. v4: * Fix a build error in spinand_randomizer_init() where a value was returned from a void function. (Reported by kernel test robot) * Update the return type to int. v3: * Revert the device tree property to the vendor-specific "mxic,randomizer-enable" to strictly follow vendor-specific bindings. * Update the 'set_randomizer' callback signature to accept a boolean 'enable' argument, allowing the feature to be explicitly enabled or disabled. * Switch the implementation to use the standard SET_FEATURE command to modify the Configuration Register (0x10), replacing the previous special program command method. v2: * Create a global NAND DT property Cheng Ming Lin (3): dt-bindings: mtd: spinand: Add randomizer enable/disable properties mtd: spi-nand: Add support for randomizer mtd: spi-nand: macronix: Enable randomizer support .../devicetree/bindings/mtd/nand-chip.yaml | 8 ++++ drivers/mtd/nand/spi/core.c | 27 +++++++++++ drivers/mtd/nand/spi/macronix.c | 46 ++++++++++++++----- include/linux/mtd/spinand.h | 9 ++++ 4 files changed, 79 insertions(+), 11 deletions(-) -- 2.25.1