From nobody Sat Feb 7 21:08:14 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2582E3115A6 for ; Fri, 14 Nov 2025 11:06:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118409; cv=none; b=TYVCpfpVjw3Zjh3IckE1ZyDTYNFFWlxwE4Ne7yCJ9xgVozQlgfQrqgiYyuY+wb0yDE+88zUPm37KZtN+VHa/stzP4EhoR23eQnGr4IKXqFA+I+izp11/s3NrgQMgMleyizqze6Vcf+KQtkLi46Fs49Xa7j33A9R8qn+x0xYF/Gs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118409; c=relaxed/simple; bh=/bCvXvZM242ZpNIQAuZa3+0L6l1lqgzahnMGGIrHOlI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EzQjtOOUbzhgV6+7WjHc6xbV/5dU2VTG3c7hR5FRrzq1LvcddRtBurTcVXrVGLLG1qwgDb0qdVt0LNLE+jGeP5DyVvbuokXvyY+WTRddefjDiHzcYdfSry7mqsVnRuS+cWJEwje31SCmbUOGZmfs3uhwtK/4YUZZXWPVWSw7NWw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b6LCyHJk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b6LCyHJk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56CA2C4CEF8; Fri, 14 Nov 2025 11:06:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763118407; bh=/bCvXvZM242ZpNIQAuZa3+0L6l1lqgzahnMGGIrHOlI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b6LCyHJkkkIeM75FaC3ASNQaa76HD6PaPEr46KpDXE4zhCTRUnI2Nu62e297QmWjw OVSlrLIZt+ZwhNsgXKobY9gQHr9+s/hiyeGpHoBIT0yqGmywygxfUOBG2Q+CERfRTu EDyhA+2q/0wb08p7NJCMH3zXJDWmBJXigsSiNux5jquMLsnceYu4OVKs3UeoprliQd j7AOaj0CG8Z3wa82ANueFe/Sn7mf8OfH2hHVYJwuzJ9T9ExA29N4gBLi0LdrlWvy2q rMCnURTts9TB+nfWNYiycsqeBxgURxsl4MwcWCBHHetnUH+M6cGDQF3AzDoYZkkQ5c D4Nv+EEzgXDYg== From: srini@kernel.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Akhil P Oommen , Krzysztof Kozlowski , Srinivas Kandagatla , Srinivas Kandagatla Subject: [PATCH 1/8] dt-bindings: nvmem: qfprom: Add sa8775p compatible Date: Fri, 14 Nov 2025 11:06:29 +0000 Message-ID: <20251114110636.143268-2-srini@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251114110636.143268-1-srini@kernel.org> References: <20251114110636.143268-1-srini@kernel.org> 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: Akhil P Oommen Document compatible string for the QFPROM on Lemans platform. Acked-by: Krzysztof Kozlowski Acked-by: Srinivas Kandagatla Signed-off-by: Akhil P Oommen Signed-off-by: Srinivas Kandagatla --- Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Doc= umentation/devicetree/bindings/nvmem/qcom,qfprom.yaml index 3f6dc6a3a9f1..7d1612acca48 100644 --- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml +++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml @@ -39,6 +39,7 @@ properties: - qcom,qcs404-qfprom - qcom,qcs615-qfprom - qcom,qcs8300-qfprom + - qcom,sa8775p-qfprom - qcom,sar2130p-qfprom - qcom,sc7180-qfprom - qcom,sc7280-qfprom --=20 2.51.0 From nobody Sat Feb 7 21:08:14 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7D612C1786 for ; Fri, 14 Nov 2025 11:06:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118412; cv=none; b=s+uwnjKd7wcifpoj7pPvnFCPnuMOX0nDtLHQUdlLMX4zSsXo4O5iqrbldDDZk2t2ml1LWxIP6i7g7wNDUgXLGE4bbc6Qy0CinCshubZx7cCb1Fcqnbzw6ttOFMOSypC3SkJbQTkIaj9aTceEKHBr69yymSwDJC3gWH/o1IjMCvo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118412; c=relaxed/simple; bh=1/lPSh9fqv0QOqGSxnmjf8At/q7VxpBFpJipOOHAr5w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u0Gt0IAo1fZAGlkJ/KTfN0MpqpoypPdLJcc4/yuzPTAF5rDy+xnrwsLotZ4VvJ5oCxO3cMdEhbdslCRpbwyC72rwuv70zWqTF9Rx2lW9bVHyMCEIRM4xOl1KZ++04v2Liuh1mlgo46i2JhGrhr9PXmPz4yY+Tq+UgNobsLyPW5M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=C8ZRJVs8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="C8ZRJVs8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB111C4CEFB; Fri, 14 Nov 2025 11:06:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763118412; bh=1/lPSh9fqv0QOqGSxnmjf8At/q7VxpBFpJipOOHAr5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C8ZRJVs8xVWcRuDSLmMao/iXgHVKIx2biJ+5LKr1Fjaw7PUbbyPfQ+vRQR88Rgy6M oWAVr3KBNs8NXerARadiarxK7f7nRzzUPLIKUx74qsABpkI7Cqb7TrLZ7ASlxOuriI bS+edzrAO9dgzBU3zIEuNGlIKmZqVUz8ziHdMPuiuIlnJHfipuT83jBbW9eC3AUDBy 637+OISqClgwazeekAD0r0yQNN7sB16/vQHsEVPTWyXpWxb7c+PhHVbtiDZ0CKe5Cc Rpwo59FhV38g1Jo+XaSTim28KA3ges+wgQlkTYTIfHFGdTlNJz8OoQdfnVj2kZtZeb 2aLn/5yJ+ja7Q== From: srini@kernel.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Jack Hsu , Conor Dooley , Srinivas Kandagatla Subject: [PATCH 2/8] dt-bindings: nvmem: Support MediaTek MT8189 evb board efuse Date: Fri, 14 Nov 2025 11:06:30 +0000 Message-ID: <20251114110636.143268-3-srini@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251114110636.143268-1-srini@kernel.org> References: <20251114110636.143268-1-srini@kernel.org> 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: Jack Hsu add compatible string for mt8189 evb board dts node of efuse Signed-off-by: Jack Hsu Acked-by: Conor Dooley Signed-off-by: Srinivas Kandagatla --- Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml b/= Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml index 4dc0d42df3e6..9d52caaf3e5c 100644 --- a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml +++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml @@ -48,6 +48,7 @@ properties: - mediatek,mt7988-efuse - mediatek,mt8173-efuse - mediatek,mt8183-efuse + - mediatek,mt8189-efuse - mediatek,mt8192-efuse - mediatek,mt8195-efuse - mediatek,mt8516-efuse --=20 2.51.0 From nobody Sat Feb 7 21:08:14 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E8293101C5 for ; Fri, 14 Nov 2025 11:06:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118417; cv=none; b=r5MvK8DqDNQIVCevmaxAUyKyA6DbntkIK0V3bdNOUTz1OG1SN7Mh+/GXzzsgTPejmkIvuwrzLsQ4s8a4dMfZd67zzMzULTUNZBllolb4wNq81HDSfoCpazGNZu7C4TFYh6ydtWpxv5BMVSgfsgH6hWI1iSIyrGMKPy1jMr0ii6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118417; c=relaxed/simple; bh=SmiwaI1IjHVdq2bbxdPMGaPmELF2+waX60D7C94IQQw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ORV+oM531WjZeHCofacj44EXupFu3NI5iOMo+veoR8vH849QxB+qhdskGK74cfBfRHqdd9tzispqyCTvc9fFgHMiHQjd6uhNCBIcK0EF7kcfds9KEnW+EVKKxgAsQ2hzNlj0xjbPWnSlonglm9dAxM+SpwNJh0Xy7cSLHquGIpM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A2T7VyqH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A2T7VyqH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0ED13C4AF09; Fri, 14 Nov 2025 11:06:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763118417; bh=SmiwaI1IjHVdq2bbxdPMGaPmELF2+waX60D7C94IQQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A2T7VyqHleUj68/W6cnH5RXEZPhwz2yhKlsArNecI8M2D6+ow5zB7NHub1lkZguME Pd9MaoSFzQWfiVzzAuv4HVevrZSqB+dd36g3wsawlTN1zNZsuLd0WtlQ0w+p0zwvqI evu7e9XW4ivYb3mtKFE0jDrcFXMbw8cKbp3T9xsZJYrsnQQb8AENyPkCTXsf+sX8fN UFtny0GiclwWI8xUVniCzEf8jaX3XBmCs5GT9NhGSwAxzKIoIDoIdPcxCaE1BkmTkr 3hFTeiKZQWZZHXCNZDraO2i1tAwQFN0fRcdmXWjIQxKTTrrlQMaVYCNZEDp5WW5tir chZQvU+7tJgQA== From: srini@kernel.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Heiko Stuebner , Srinivas Kandagatla Subject: [PATCH 3/8] nvmem: Add driver for the eeprom in qnap-mcu controllers Date: Fri, 14 Nov 2025 11:06:31 +0000 Message-ID: <20251114110636.143268-4-srini@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251114110636.143268-1-srini@kernel.org> References: <20251114110636.143268-1-srini@kernel.org> 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: Heiko Stuebner The qnap-mcu also has an eeprom connected to it, that contains some specific product-information like the mac addresses for the network interfaces. Add a nvmem driver for it. Signed-off-by: Heiko Stuebner Acked-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/Kconfig | 9 +++ drivers/nvmem/Makefile | 2 + drivers/nvmem/qnap-mcu-eeprom.c | 111 ++++++++++++++++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 drivers/nvmem/qnap-mcu-eeprom.c diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig index e0d88d3199c1..bf47a982cf62 100644 --- a/drivers/nvmem/Kconfig +++ b/drivers/nvmem/Kconfig @@ -285,6 +285,15 @@ config NVMEM_QCOM_SEC_QFPROM This driver can also be built as a module. If so, the module wil= l be called nvmem_sec_qfprom. =20 +config NVMEM_QNAP_MCU_EEPROM + tristate "QNAP MCU EEPROM Support" + depends on MFD_QNAP_MCU + help + Say y here to enable support for accessing the EEPROM attached to + QNAP MCU devices. This EEPROM contains additional runtime device + information, like MAC addresses for ethernet devices that do not + contain their own mac storage. + config NVMEM_RAVE_SP_EEPROM tristate "Rave SP EEPROM Support" depends on RAVE_SP_CORE diff --git a/drivers/nvmem/Makefile b/drivers/nvmem/Makefile index 70a4464dcb1e..7252b8ec88d4 100644 --- a/drivers/nvmem/Makefile +++ b/drivers/nvmem/Makefile @@ -56,6 +56,8 @@ obj-$(CONFIG_NVMEM_QCOM_QFPROM) +=3D nvmem_qfprom.o nvmem_qfprom-y :=3D qfprom.o obj-$(CONFIG_NVMEM_QCOM_SEC_QFPROM) +=3D nvmem_sec_qfprom.o nvmem_sec_qfprom-y :=3D sec-qfprom.o +obj-$(CONFIG_NVMEM_QNAP_MCU_EEPROM) +=3D nvmem-qnap-mcu-eeprom.o +nvmem-qnap-mcu-eeprom-y :=3D qnap-mcu-eeprom.o obj-$(CONFIG_NVMEM_RAVE_SP_EEPROM) +=3D nvmem-rave-sp-eeprom.o nvmem-rave-sp-eeprom-y :=3D rave-sp-eeprom.o obj-$(CONFIG_NVMEM_RCAR_EFUSE) +=3D nvmem-rcar-efuse.o diff --git a/drivers/nvmem/qnap-mcu-eeprom.c b/drivers/nvmem/qnap-mcu-eepro= m.c new file mode 100644 index 000000000000..0b919895b3b2 --- /dev/null +++ b/drivers/nvmem/qnap-mcu-eeprom.c @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * ee1004 - driver for DDR4 SPD EEPROMs + * + * Copyright (C) 2017-2019 Jean Delvare + * + * Based on the at24 driver: + * Copyright (C) 2005-2007 David Brownell + * Copyright (C) 2008 Wolfram Sang, Pengutronix + */ + +#include +#include +#include +#include +#include + +/* Determined by trial and error until read anomalies appeared */ +#define QNAP_MCU_EEPROM_SIZE 256 +#define QNAP_MCU_EEPROM_BLOCK_SIZE 32 + +static int qnap_mcu_eeprom_read_block(struct qnap_mcu *mcu, unsigned int o= ffset, + void *val, size_t bytes) +{ + const u8 cmd[] =3D { 0xf7, 0xa1, offset, bytes }; + u8 *reply; + int ret =3D 0; + + reply =3D kzalloc(bytes + sizeof(cmd), GFP_KERNEL); + if (!reply) + return -ENOMEM; + + ret =3D qnap_mcu_exec(mcu, cmd, sizeof(cmd), reply, bytes + sizeof(cmd)); + if (ret) + goto out; + + /* First bytes must mirror the sent command */ + if (memcmp(cmd, reply, sizeof(cmd))) { + ret =3D -EIO; + goto out; + } + + memcpy(val, reply + sizeof(cmd), bytes); + +out: + kfree(reply); + return ret; +} + +static int qnap_mcu_eeprom_read(void *priv, unsigned int offset, void *val= , size_t bytes) +{ + struct qnap_mcu *mcu =3D priv; + int pos =3D 0, ret; + u8 *buf =3D val; + + if (unlikely(!bytes)) + return 0; + + while (bytes > 0) { + size_t to_read =3D (bytes > QNAP_MCU_EEPROM_BLOCK_SIZE) ? + QNAP_MCU_EEPROM_BLOCK_SIZE : bytes; + + ret =3D qnap_mcu_eeprom_read_block(mcu, offset + pos, &buf[pos], to_read= ); + if (ret < 0) + return ret; + + pos +=3D to_read; + bytes -=3D to_read; + } + + return 0; +} + +static int qnap_mcu_eeprom_probe(struct platform_device *pdev) +{ + struct qnap_mcu *mcu =3D dev_get_drvdata(pdev->dev.parent); + struct nvmem_config nvcfg =3D {}; + struct nvmem_device *ndev; + + nvcfg.dev =3D &pdev->dev; + nvcfg.of_node =3D pdev->dev.parent->of_node; + nvcfg.name =3D dev_name(&pdev->dev); + nvcfg.id =3D NVMEM_DEVID_NONE; + nvcfg.owner =3D THIS_MODULE; + nvcfg.type =3D NVMEM_TYPE_EEPROM; + nvcfg.read_only =3D true; + nvcfg.root_only =3D false; + nvcfg.reg_read =3D qnap_mcu_eeprom_read; + nvcfg.size =3D QNAP_MCU_EEPROM_SIZE, + nvcfg.word_size =3D 1, + nvcfg.stride =3D 1, + nvcfg.priv =3D mcu, + + ndev =3D devm_nvmem_register(&pdev->dev, &nvcfg); + if (IS_ERR(ndev)) + return PTR_ERR(ndev); + + return 0; +} + +static struct platform_driver qnap_mcu_eeprom_driver =3D { + .probe =3D qnap_mcu_eeprom_probe, + .driver =3D { + .name =3D "qnap-mcu-eeprom", + }, +}; +module_platform_driver(qnap_mcu_eeprom_driver); + +MODULE_AUTHOR("Heiko Stuebner "); +MODULE_DESCRIPTION("QNAP MCU EEPROM driver"); +MODULE_LICENSE("GPL"); --=20 2.51.0 From nobody Sat Feb 7 21:08:14 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 466CB3101C5 for ; Fri, 14 Nov 2025 11:07:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118423; cv=none; b=eP8+B584LPQ29twuoRLzh7Ux5wZ8uwpsyiJR1T9J9R4XnAx+U5XXX8bD/4Q/Lxsu7mm7APsqDpVf5aX9ZzbEFtOVTcghSTvpkukl6PvkNDBnF/D+0RbcfFCPKhSBr3ufz9Vk7rNLrTowQAvUVSQfUuBDYPLyY+Ts2P2k661FDp8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118423; c=relaxed/simple; bh=3zn898ph6csNAD4s2vNo4jJ+Nl98+U50PrFRSjm0sHA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BDgXtuaHKrYebalEJbmdURmYTUFlhGQIGdt6gclzP+wWkrx7nmbtUmxEOkxlPXF9c/xPa2OfGCrufxcS1ZEEwJLP91dEsxr7jded00ElNVQq2B4wJ4fHsxed2u/PEWKbQ4VsoCRb/xmOiBBMzNUuMGvMtHXhO3ObVg/pnHqsoxk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AcE/r09A; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AcE/r09A" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8BAEC4CEFB; Fri, 14 Nov 2025 11:06:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763118421; bh=3zn898ph6csNAD4s2vNo4jJ+Nl98+U50PrFRSjm0sHA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AcE/r09A5m7AkYjwqkDMVdbQncZidngct7tup++ud8CE1x7zCoIWZZ/gCuaBXhWgc 4I5w3BmgPV6KNs9ogHGCcza8OkZq/URYBWmMQbW1Yi1HtRidW6HLUnohw7+ece2x+8 2G4RkbwUQU3A4ftXZzhj9BsEm3pcVbc4MrNlBOlcnpZrY0vgG86XUfNTy8A455zJm0 RkT9Rae360XT91cgE44Qo78uTTSDze3g93VDa2ga393aXgatvU+8GtD4AkEK0xOZ9W mRjhjwLLE6tqtiKmAwfYdGVqSM/FZEvje66bFR8XoilHQ8DaDY5vFzGmzhaZ/AMo/E 7DVe/lcAdJYtQ== From: srini@kernel.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Jascha Sundaresan , "Rob Herring (Arm)" , Srinivas Kandagatla Subject: [PATCH 4/8] nvmem: layouts: u-boot-env: add optional "env-size" property Date: Fri, 14 Nov 2025 11:06:32 +0000 Message-ID: <20251114110636.143268-5-srini@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251114110636.143268-1-srini@kernel.org> References: <20251114110636.143268-1-srini@kernel.org> 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: Jascha Sundaresan Some devices reserve a larger NVMEM region for the U-Boot environment than the actual environment data length used by U-Boot itself. The CRC32 in the U-Boot header is calculated over the smaller data length, causing CRC validation to fail when Linux reads the full partition. Allow an optional device tree property "env-size" to specify the environment data size to use for CRC computation. v2: add missing $ref line to DT binding Signed-off-by: Jascha Sundaresan Reviewed-by: Rob Herring (Arm) Signed-off-by: Srinivas Kandagatla --- .../devicetree/bindings/nvmem/layouts/u-boot,env.yaml | 7 +++++++ drivers/nvmem/layouts/u-boot-env.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yam= l b/Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml index 56a8f55d4a09..e9e75c38bd11 100644 --- a/Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml +++ b/Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml @@ -46,6 +46,12 @@ properties: type: object description: Command to use for automatic booting =20 + env-size: + description: + Size in bytes of the environment data used by U-Boot for CRC + calculation. If omitted, the full NVMEM region size is used. + $ref: /schemas/types.yaml#/definitions/uint32 + ethaddr: type: object description: Ethernet interfaces base MAC address. @@ -104,6 +110,7 @@ examples: =20 partition-u-boot-env { compatible =3D "brcm,env"; + env-size =3D <0x20000>; =20 ethaddr { }; diff --git a/drivers/nvmem/layouts/u-boot-env.c b/drivers/nvmem/layouts/u-b= oot-env.c index a27eeb08146f..ab32bf1291af 100644 --- a/drivers/nvmem/layouts/u-boot-env.c +++ b/drivers/nvmem/layouts/u-boot-env.c @@ -99,10 +99,12 @@ int u_boot_env_parse(struct device *dev, struct nvmem_d= evice *nvmem, uint32_t crc32; uint32_t calc; uint8_t *buf; + u32 env_size; int bytes; int err; =20 - dev_size =3D nvmem_dev_size(nvmem); + dev_size =3D device_property_read_u32(dev, "env-size", &env_size) ? + nvmem_dev_size(nvmem) : (size_t)env_size; =20 buf =3D kzalloc(dev_size, GFP_KERNEL); if (!buf) { --=20 2.51.0 From nobody Sat Feb 7 21:08:14 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76C89313530 for ; Fri, 14 Nov 2025 11:07:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118426; cv=none; b=GMNre1R2wx4CuAczgOEyk0NW7O07OTjEYlJJ/NfgOHC4y4imtJOjriUjQSV8McerxnE+bu7DJXxHe+QfZgpy93dMXEvK9oMikhZRksco+4LEp+wDIkgZBum/CoAKlzXM2zWRAj4h/QtEgR1iEtdndTESth2MO7aRj2JF66TClW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118426; c=relaxed/simple; bh=+S30RZijZW6lIGeetOrKWLBCoYYjohKfEZONizSmiuo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ezmpkp6YRpGYQI6yV3MG0fpxNokYB1cN2bk8Ml53prlue2urCWWoVAw3MXF7C+ceknZBABizHOpvufQ9gEYwBLpjCq36b+JZmb4OgI8g6dcSaSDr1lwCacfIGS+TA0neIDHs2169KYkV/QxwxGY8MHiWR94H5SVkdODkTunPt+w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=g2f3PJ0a; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="g2f3PJ0a" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C003CC4CEF1; Fri, 14 Nov 2025 11:07:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763118426; bh=+S30RZijZW6lIGeetOrKWLBCoYYjohKfEZONizSmiuo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g2f3PJ0aPuhFvxf4WKSZhXv+N2a1KVPyrRQSvClCbj5a2bCNho08rzm0dWSG232vf npVvO+rVbhpNHhv6WqZEfNa0ICNO7TkRok5o7WH4RDgjQXXHHpPcRAcDInjKl0ghXi wJPP1rwgnwX0f+slMD7sZ8msS4XmOtn7uzEItpCx0yQBTc5wOGusaCWWA0SICz0zd9 I3NU7cgIkHtMQN57ATkpBCqp4RP+OkZsOYxYJtant08oqzWl7x1jZrNncaexndSJX3 7r0Eima8gA1he2CFKmObi2hyQEggEmbua3tmxUfqavk2oYDyqQOPgykoUjrZmWEV82 BqjXAdKqPL90g== From: srini@kernel.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Louis-Alexis Eyraud , AngeloGioacchino Del Regno , Conor Dooley , Srinivas Kandagatla Subject: [PATCH 5/8] dt-bindings: nvmem: mediatek: efuse: Add compatible for MT8189 SoC Date: Fri, 14 Nov 2025 11:06:33 +0000 Message-ID: <20251114110636.143268-6-srini@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251114110636.143268-1-srini@kernel.org> References: <20251114110636.143268-1-srini@kernel.org> 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: Louis-Alexis Eyraud Add compatible string for the eFuse layout on MT8189 SoC, that is compatible with MT8186. Signed-off-by: Louis-Alexis Eyraud Reviewed-by: AngeloGioacchino Del Regno Acked-by: Conor Dooley Signed-off-by: Srinivas Kandagatla --- Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml b/= Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml index 9d52caaf3e5c..c9bf34ee0efb 100644 --- a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml +++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml @@ -25,7 +25,9 @@ properties: compatible: oneOf: - items: - - const: mediatek,mt8188-efuse + - enum: + - mediatek,mt8188-efuse + - mediatek,mt8189-efuse - const: mediatek,mt8186-efuse - const: mediatek,mt8186-efuse =20 --=20 2.51.0 From nobody Sat Feb 7 21:08:14 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D17A1313530 for ; Fri, 14 Nov 2025 11:07:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118432; cv=none; b=Jo06Ll8mcxW69QB68yPfT2su7KReug8CQlCbf0NjOqQw/1VnwB7MVFhNJ0foRyeCgs0S2/Uwc1hnq4RuKfpkrebkBH2hXelASQBfkwK52Y0a/BpEsIZptFWuvWkYwyY3iXK8aYnxF0ySinNLiJMXXKTfkDBqU+6blMjXsUJuekM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118432; c=relaxed/simple; bh=AoinYHawQz4ZeP5U8nUiCxiUxiHcfQT1Ue7XJIM/+P0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V1nztvZHz3E8HcjgbbuS5tSOpH0Ixp8X1tq+eYmTiVPl20Q4UPXT7p4Yrc/GDMY9+WUrYqSwm3o1pTr5qzIfbc/fUp8VbPXX9btwVv8T6oOO7KqUVFcmLDPN1CftAhKNSBMJ1d/j6R5aZKXUt97FVw1zx4UL9RaZbgLo7K8LKY8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TNS8gHNx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TNS8gHNx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 603B7C4CEFB; Fri, 14 Nov 2025 11:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763118431; bh=AoinYHawQz4ZeP5U8nUiCxiUxiHcfQT1Ue7XJIM/+P0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TNS8gHNxzeYUNPpHJR4ks0xSteYyLqyght+hMEdAjcfaUSqDAtBTg21EPcpT0tr0W Qm9UjtXI7hvBT3l1HGJPBQLM7RFe4BMbLjs4A5I+JP5zy9OXrD1lCFqI3KYnb8bMWX D+vECMVoJCBYtlly8M04wgd45xAFULAqcGBpfWlnSAqFnsFgpMfOfsTKUH62SnnWwZ nd5JTH5YU+IuYGPaNTvhx18Zzgj0xyrFrJHCPWzM6hUsIRVNDfXE4GcaBywPAVWf8O GNSAPDu80G32PRfYLvLIk2QS28ma8CBDd/vxAlyrfEyO3GA7JKGvNPVYYCyZTnLcZL 6u5Q/Il18Huzg== From: srini@kernel.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Wolfram Sang , Conor Dooley , Srinivas Kandagatla Subject: [PATCH 6/8] dt-bindings: nvmem: don't check node names Date: Fri, 14 Nov 2025 11:06:34 +0000 Message-ID: <20251114110636.143268-7-srini@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251114110636.143268-1-srini@kernel.org> References: <20251114110636.143268-1-srini@kernel.org> 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: Wolfram Sang Node names are already and properly checked by the core schema. No need to do it again. Signed-off-by: Wolfram Sang Acked-by: Conor Dooley Signed-off-by: Srinivas Kandagatla --- Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml b/= Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml index 3b2aa605a551..ab4cdc4e3614 100644 --- a/Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml +++ b/Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml @@ -31,7 +31,7 @@ properties: maxItems: 1 =20 patternProperties: - "^.*@[0-9a-f]+$": + "@[0-9a-f]+$": type: object $ref: layouts/fixed-cell.yaml unevaluatedProperties: false --=20 2.51.0 From nobody Sat Feb 7 21:08:14 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C040312831 for ; Fri, 14 Nov 2025 11:07:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118436; cv=none; b=o+TzZHavn/KDlNhKDd/+VrvmaTZSEJsj9BTK7YcklHQ1WXfuA8fkgENC6So4YKjMJ5lG+V3nhzOYhKcXQA4FH9UIVPykCtBqpcGcYkf8zw/naiDT//tlU21d40mKyIhz93b4LbQaUEAJa6hyz/QaGrjPGsXikeIHKCCzlWiUqYU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118436; c=relaxed/simple; bh=WkuaE81enmZ7tfU2U1BNxb3uOL2KMtHLSB8k7XSKkzc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Hx1PpAx+NCGr4fZUh5XIsRnEeJF2JwoJjOtfrjN1MOWRuwpm9s02cc7L0onvtN5S0GTn1YIVp0vFYP7zNonuXrOckGBGOAOqXkMK2w2J550w9mB0cezE+wBu8xNseUw1txTIDcR3SWdTsgp0Y9i14K1J4Xg0nwWmlPegCWqTt1o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YGKxulIB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YGKxulIB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C60D0C116D0; Fri, 14 Nov 2025 11:07:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763118436; bh=WkuaE81enmZ7tfU2U1BNxb3uOL2KMtHLSB8k7XSKkzc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YGKxulIBWDqsVSc6lti0JYhwisx2GrazRH/VU7xMukavwfrg8wwi9wvJm2FwlJdmC X8P4BfdZOQoDaFwKweW/UjJrPfNODqlbjMqNOLYZT4C/UEpFGTi0/bb6ZpDX+y1jUN PiwMS+PFDN1lcXYihnwvJSiS3ZcVMr7LAgMjf05Z2s3ADNkvCkJucAsdJF6K493yBH zrMOnqoFX49sTQOuHhzb0LsxRqJpxMJ8D+4ZfCyu0h3BK65q3UyNwNUxPuOS+NSzcq KiXbVKW2tHY07i9FnjIEAbguDdxfuPrwsxAICCcMFDqMdoobbgn13mbQtae6n26SXP JTXFgtElajsiw== From: srini@kernel.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Alice Guo , Conor Dooley , Srinivas Kandagatla Subject: [PATCH 7/8] dt-bindings: nvmem: imx-ocotp: Add support for i.MX94 Date: Fri, 14 Nov 2025 11:06:35 +0000 Message-ID: <20251114110636.143268-8-srini@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251114110636.143268-1-srini@kernel.org> References: <20251114110636.143268-1-srini@kernel.org> 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: Alice Guo Add the compatible string "fsl,imx94-ocotp" to the imx-ocotp device tree binding documentation to support the i.MX94. Signed-off-by: Alice Guo Acked-by: Conor Dooley Signed-off-by: Srinivas Kandagatla --- Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml b/Docum= entation/devicetree/bindings/nvmem/imx-ocotp.yaml index b2cb76cf9053..a8076d0e2737 100644 --- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml +++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml @@ -14,7 +14,8 @@ maintainers: description: | This binding represents the on-chip eFuse OTP controller found on i.MX6Q/D, i.MX6DL/S, i.MX6SL, i.MX6SX, i.MX6UL, i.MX6ULL/ULZ, i.MX6SLL, - i.MX7D/S, i.MX7ULP, i.MX8MQ, i.MX8MM, i.MX8MN i.MX8MP and i.MX93/5 SoCs. + i.MX7D/S, i.MX7ULP, i.MX8MQ, i.MX8MM, i.MX8MN i.MX8MP, i.MX93, i.MX94, + and i.MX95. =20 allOf: - $ref: nvmem.yaml# @@ -36,6 +37,7 @@ properties: - fsl,imx8mq-ocotp - fsl,imx8mm-ocotp - fsl,imx93-ocotp + - fsl,imx94-ocotp - fsl,imx95-ocotp - const: syscon - items: --=20 2.51.0 From nobody Sat Feb 7 21:08:14 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF049312831 for ; Fri, 14 Nov 2025 11:07:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118446; cv=none; b=FLpX498DemCnX1XbivwZ+vXlBMVfgMyIss4Lcd0G2W9h2su6tQzZhJeNBRjtbzCCToAtqRMOuJWAuhhncZfp7FJYWj9ksEsQZwHdx/eqsj+VtvBF8HCDclcM9zHBU7PWzsaKPirorhoQbBJ0kSDckhQCU9Q/qAO3IARz0O9X/jc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118446; c=relaxed/simple; bh=ZI7vzj6jeyGcAH7XfySfKKRasSFDtt5a7nilRfYpudQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gCehwN9lRGUrCrfwiPqCxtLfu8Speh1M3LD3XA9HD2qkeSCzkCD8CV1r91tWdVrU5AL01myWeuQ99/DVi1lmEhH4DnVl6gLqSOoI7++2IlpWhJ1fxucNCXv3lONP6asIxrfMW6yKDFlyUWs4HSvxjwRoNySfbkgIN4hUBExQ9FU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Pdr+kWcS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Pdr+kWcS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FE41C16AAE; Fri, 14 Nov 2025 11:07:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763118445; bh=ZI7vzj6jeyGcAH7XfySfKKRasSFDtt5a7nilRfYpudQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pdr+kWcSymgvxe5jRKb0LCJljj9NcopEGOk6BGvGQz4GuL9vUjv/W5t8TfiNWd+p3 SXoR5TNLHa2YEBYmtPsM2SVz9TBVnlzpf2USQWGBdLLFLKWszFtlVwlR6MiBosDZwW dYRxFTeOt0FOfwdYHIPzWXoKC7FVWoL6oSzmqLXxIHwAUodXsvBoyC1wC8jFGt+Jwi BERBKKLIZO+klQGtNcCNa2cYOjmdTtaT9anwkk6EpcrmX3rS6E4nJuMJNuF84SUf7l 2bmpvv7RtXPWFWa1eNxmGFqg3VzVgOVWwC65uo0DHXcwqBWoiMijO1R07vxnjScTmZ azqAoDeJrl4mQ== From: srini@kernel.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Alice Guo , Peng Fan , Frank Li , Srinivas Kandagatla Subject: [PATCH 8/8] nvmem: imx-ocotp-ele: Add i.MX94 OCOTP support Date: Fri, 14 Nov 2025 11:06:36 +0000 Message-ID: <20251114110636.143268-9-srini@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251114110636.143268-1-srini@kernel.org> References: <20251114110636.143268-1-srini@kernel.org> 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: Alice Guo Add OCOTP device type for i.MX94, including register offset, total size, and fuse layout. This enables NVMEM access to the eFuse of i.MX94. Signed-off-by: Alice Guo Reviewed-by: Peng Fan Reviewed-by: Frank Li Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/imx-ocotp-ele.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/nvmem/imx-ocotp-ele.c b/drivers/nvmem/imx-ocotp-ele.c index 7807ec0e2d18..7cf7e809a8f5 100644 --- a/drivers/nvmem/imx-ocotp-ele.c +++ b/drivers/nvmem/imx-ocotp-ele.c @@ -186,6 +186,25 @@ static const struct ocotp_devtype_data imx93_ocotp_dat= a =3D { }, }; =20 +static const struct ocotp_devtype_data imx94_ocotp_data =3D { + .reg_off =3D 0x8000, + .reg_read =3D imx_ocotp_reg_read, + .size =3D 3296, /* 103 Banks */ + .num_entry =3D 10, + .entry =3D { + { 0, 1, FUSE_FSB | FUSE_ECC }, + { 7, 1, FUSE_FSB | FUSE_ECC }, + { 9, 3, FUSE_FSB | FUSE_ECC }, + { 12, 24, FUSE_FSB }, + { 36, 2, FUSE_FSB | FUSE_ECC }, + { 38, 14, FUSE_FSB }, + { 59, 1, FUSE_ELE }, + { 525, 2, FUSE_FSB | FUSE_ECC }, + { 528, 7, FUSE_FSB }, + { 536, 280, FUSE_FSB }, + }, +}; + static const struct ocotp_devtype_data imx95_ocotp_data =3D { .reg_off =3D 0x8000, .reg_read =3D imx_ocotp_reg_read, @@ -209,6 +228,7 @@ static const struct ocotp_devtype_data imx95_ocotp_data= =3D { =20 static const struct of_device_id imx_ele_ocotp_dt_ids[] =3D { { .compatible =3D "fsl,imx93-ocotp", .data =3D &imx93_ocotp_data, }, + { .compatible =3D "fsl,imx94-ocotp", .data =3D &imx94_ocotp_data, }, { .compatible =3D "fsl,imx95-ocotp", .data =3D &imx95_ocotp_data, }, {}, }; --=20 2.51.0