From patchwork Fri Nov 17 14:33:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 13459006 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D163C197A0 for ; Fri, 17 Nov 2023 14:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vRyO0Bba66AHe0F+6ABuf1dQsnUxKpgxUFqEHT8200s=; b=UVHTBBbFNJl3PE eqWJG9stii5EEck9kluYckEalL2XO4YGx3GOJCQkndSjxPPC469mZJg0k7V23QwobDFgWSY7kAyco 9XZGVnHKFdwBFgn+9DjMMNsZC2rBYo0gmQMNiuKIihH/AURO9nA93vdCwehpOWiEkY7kteTSYEcAb ugXcVSptIloPJfc0wt3ksFbX1nQTnIK79FcklWE2uTKfOeWIi5nDxFdA4tqDdq6/kTIVJ4RnYi7pw 7+e3oLXCG7i1g9+ccfBbPk7OeWBt3mLX7kRoie8MAB0I5QMjnKkS0T4LVFlE8egajFdwfPk8o02+R LOU/bFYGYNVyRJEIEfdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3zvL-006kW1-1y; Fri, 17 Nov 2023 14:34:23 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3zvG-006kSs-1Q for linux-arm-kernel@lists.infradead.org; Fri, 17 Nov 2023 14:34:19 +0000 Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 3AHBMVhP011100; Fri, 17 Nov 2023 15:34:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=selector1; bh=8xdj8SH PK8NulxaFgQvXVA78MnGud+kVb8iCWdM/E9g=; b=Tz6QUcA4VJLYeONM5WzysQY QlED5ROx7HvSoiDqkWKoYlAj+1P3bi39M4jlXnZbOQESzK/Wz5B7xCiX67CYpUmS Zmd6h7SYj4oyWrydcCqj774qcp3pLlvdlYHK5QW7sjDwYb8u9xZ4Giae9Yg+Hf8u pXkQHuNUzua73agN+gHmdbdXrk+cl+Sa7b+4B0KlnyCQJe6be4a7TySaw2gUh+Ur H1hMjQBjmnF7E1kp1H8woyHh7ygPTz71HX7XjU4NrHN3aCTd8TIO+rmxhiWYYRo2 QWGpVOVZOjme/eD3Jf2r5/84G4SkcMRr9Se2xL19Ld6o9FlBTB6iFRXUIIQhbVQ= = Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3uanep98k6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Nov 2023 15:34:05 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id EE4F410002A; Fri, 17 Nov 2023 15:33:46 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id C06F12309EB; Fri, 17 Nov 2023 15:33:46 +0100 (CET) Received: from localhost (10.201.22.165) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 17 Nov 2023 15:33:46 +0100 From: Patrick Delaunay To: Alexandre TORGUE , Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Catalin Marinas , Will Deacon , Fabrice Gasnier CC: Patrick Delaunay , Arnd Bergmann , Bjorn Andersson , Dmitry Baryshkov , Geert Uytterhoeven , Konrad Dybcio , Krzysztof Kozlowski , Marek Szyprowski , Neil Armstrong , =?utf-8?b?TsOtY29sYXMgRi4gUi4g?= =?utf-8?b?QS4gUHJhZG8=?= , Peng Fan , Udit Kumar , , , , Subject: [PATCH 0/4] stm32: add support for STM32MP25 BSEC to control OTP data Date: Fri, 17 Nov 2023 15:33:33 +0100 Message-ID: <20231117143338.1173475-1-patrick.delaunay@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.201.22.165] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-17_13,2023-11-17_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231117_063418_758644_45A0B32B X-CRM114-Status: UNSURE ( 9.86 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Non volatile memory area is available on STM32MP25 with OTP in BSEC. The 12 Kbits of OTP (effective) for STM32MP25x SoC Family are organized into the following regions: - lower OTP (OTP0 to OTP127) = 4096 lower OTP bits, bitwise (1-bit) programmable - mid OTP (OTP128 to OTP255) = 4096 middle OTP bits, bulk (32-bit) programmable - upper OTP (OTP256 to OTP383) = 4096 upper OTP bits, bulk (32-bit) programmable, only accessible when BSEC is in closed state. BSEC is only accessible by secure world, so the OTP access is done by driver with OP-TEE TA, as on STM32MP13x family. Patrick Delaunay (4): dt-bindings: nvmem: add new stm32mp25 compatible for stm32-romem nvmem: stm32: add support for STM32MP25 BSEC to control OTP data arm64: defconfig: enable NVMEM STM32 ROMEM for stm32mp25 nvmem: add bsec support to stm32mp25 .../bindings/nvmem/st,stm32-romem.yaml | 1 + arch/arm64/boot/dts/st/stm32mp251.dtsi | 16 ++++++++++++++++ arch/arm64/configs/defconfig | 1 + drivers/nvmem/stm32-romem.c | 16 ++++++++++++++++ 4 files changed, 34 insertions(+)