Subject: [PATCH 1/3] nvmem: zynqmp_nvmem: Correct error message for PUF user fuse

From: Harsh Jain <[email-masked]>
Date: Thu, 28 May 2026 12:13:21 +0530

From: Harish Ediga <[email-masked]>

P_USER_0_64_UPPER_MASK is defined as GENMASK(31, 16), which masks the
upper 16 bits (2 bytes), so the old "lower 4 bytes" wording was
incorrect -- only the lower 2 bytes (bits 15:0) are programmable.

Fixes: 737c0c8d07b5 ("nvmem: zynqmp_nvmem: Add support to access efuse")
Signed-off-by: Harish Ediga <[email-masked]>
Co-developed-by: Harsh Jain <[email-masked]>
Signed-off-by: Harsh Jain <[email-masked]>
---
 drivers/nvmem/zynqmp_nvmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/zynqmp_nvmem.c b/drivers/nvmem/zynqmp_nvmem.c
index d297ff150dc0..6be00a2be9e4 100644
--- a/drivers/nvmem/zynqmp_nvmem.c
+++ b/drivers/nvmem/zynqmp_nvmem.c
@@ -84,7 +84,7 @@ static int zynqmp_efuse_access(void *context, unsigned int offset,
 		if ((offset == EFUSE_PUF_START_OFFSET ||
 		     offset == EFUSE_PUF_MID_OFFSET) &&
 		    value & P_USER_0_64_UPPER_MASK) {
-			dev_err(dev, "Only lower 4 bytes are allowed to be programmed in P_USER_0 & P_USER_64\n");
+			dev_err(dev, "Only lower 2 bytes are allowed to be programmed in P_USER_0 & P_USER_64\n");
 			return -EOPNOTSUPP;
 		}
 
-- 
2.34.1