From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795963414; b=WCzie1peT15vgE0Qp1M7c3jc5D0xikY+Q/yx4krA6tlwy2CCyGb/+TejMDgb9BnG2xV/ jYd1FicMlscfbe69d4i72zet+ySO5ZL0kJM4QcTCAkRxE7O5gruX6dCPEYBD9H5MRwcLX PJ4TTzRUduwUs5xK4Vn25fcmGO6/yCsxWsm3EJjHq2VK321uvvRNC+KdDFjXm+tP/TcRG jbSQgzIzPBaSuXlI9TFLoL6cuzvuX0GBbKN3ghsKOqJMz5d3yhTeUNvgw306eRXit37eN jxmLHjNmC9KFA+KGA3ZD1YWfOpzfQUN+x9WvIG9ZTVqAaqcg0SjmoD01ypXhw4NdPWg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795963414; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=82JBmQGWkNqLfVOPZN9HYSTLoUh+g11sNZnNKTMRfmY=; b=hyjdPxABRQGLIcdwNAbaFOHODI65furKLhynkZFGJSK6MOMW3EPui8nV4ykyA+KXkc4z xzjuoMI+u74mYQHDWYsBvYtjMxr2WGD46UqM6YFfhd6peXa3hmJwWjF2QW1L+JaJ3GG0B vo70uV5waz8CAnvGbsHCP8oEkJ4HfFHNbLDEK9WJxb0wLtKE8q59FYKc5cBc6RgjID1en gnEbB8IkhQvNZ1H9rTx3BU6L9IXdeSeW3T7Va32hbowRIvRCRJovI65WYPn5uGF+mSwdM d80VJrmKBvIubRJgnXq6Au/d3WEFAPp/LkecKu9O9cDYzUs0GdTY/fXn4WBzHH6Ki4A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hev9dvju; arc=none smtp.remote-ip=74.125.82.179 Received: from mail-dy1-f179.google.com (mail-dy1-f179.google.com [74.125.82.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5418D606A329 for ; Sun, 29 Nov 2026 14:43:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5418D606A329 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.a=rsa-sha256 header.s=20260707 header.b=hev9dvju Received: by mail-dy1-f179.google.com with SMTP id 5a478bee46e88-385d8a00598so16161628eec.1 for ; Sun, 29 Nov 2026 06:43:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795963412; x=1796568212; 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:content-type; bh=82JBmQGWkNqLfVOPZN9HYSTLoUh+g11sNZnNKTMRfmY=; b=hev9dvjuqsaH9CCGY8XL20oflCaoeQ+7GfRqPjfUQQjMCpONr+uBH8rO4aiEHa6xZL bGItHab7hnR/QlMkP9fyqJsZlbuj7Yx6OLbaR5AgVdF8ZTxGHz/JdmykmekQebdnfZVZ tp3r5xWJxb5cNPMjvq3JmMY8FsCMATcnNyHpUXJFWWgC6cLnLhqYPtUf61atwaUm3VHx WBUVE9z/ZPBGbm6CUKnN4YoGmnt5QXp+mmivv0SOP2VSChAQXLU640gK5YI3dLTd0UO6 xgGrTs3V8xo/EuaEoqC9Hm9JwSxIhsWd6nC3Dah/wzPpylKW17X+qTVmPbi6Q4sStY2y W4vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795963412; x=1796568212; 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:content-type; bh=82JBmQGWkNqLfVOPZN9HYSTLoUh+g11sNZnNKTMRfmY=; b=UD6iHD7/z12m0Ea0UAhd/8hPodOzPtPEEHfDGskJ3NMzNjbMLe8SCactzNGhc+jGav gC+dkXY8+5Uch9QGIPmc8/nU8ivK5siStloPSy2hDCz9Nsg5qy0tmR37kU/S9bxOgIIG p16NZZZCQOxZVEl6xYgSG/mYQg5pIooH56z+TytASjZCb87+Ija3sJnRbKiwfe5q1coN vSuiEZ2htUhROZtINVLtokuass7Ym4mmG6HPkD+0Lthtz1QXpqJELP2DkqhVn33k7QGz +RjnXCMgdg+jkTgSF5i3x/ebIMfyMsUpWZNr6PLaXpTsgVyUiX0PEqN4UAHm85L8/HuJ TKUg== X-Forwarded-Encrypted: i=1; AL+hErEEIJr8f9JOliDvw/z9zFRHwNg6XRFyYghuXj7iu2ZBw9Pz5zHfItBI1Eq3bpvKRdJnakM3HPaWEvrVFSA=@vger.kernel.org X-Gm-Message-State: APuU4Z/iZN82blqWcsUa46ICB7xZLxIMi4ltTkRfvM9VYJFv81G6HiVT 9n0vSubOsAjHW4kV7Mys9sZW3SwE6So0zmbfw1okGojXCvVobn0Ok2xi X-Gm-Gg: AZFdTZf9Kd1HZFdyikggrhSQeqlS3wmVd7eIe1cZ8GbTrJj11U19m8jLLTYcunnofEA vRPaZ2QnwjsTIQ7SdMhf91cCcMZwHraLNm3LoFvkWid2CKyMo9hJGWVUxNraR1FNHII9FIK3sQn pJbAE/yG++ILC9JqMvCVKwhOCdp09sBmKFMGDKEGJLeDOE+30tsk5WyRgNYn+mAr00+jVCQ52fQ /xNo9O0ZFi6SgnwOfJRFGQ/Ad6scFwlCk4WaVDJ+/MRJMZo5R0wUenMGUsJX6sKxgWQhbgVM39s HLXT9H8vcxA1bAtGN46yR/nHj+ctRqNrUAE0vaOTph+XkQ9KgvfwTFgxDt/OsNoBNUVP9USlZ7/ wGgJmI7CafvRSVggkCvQX+wXxIM9qdKE8VYa1CKl9e8qOFValNpwyWU6DtDQ+bmGUJYtYHb+VmB 7j5qNjcHEVW1i/cfdl/J7WsIW/jQbKwbVVIQxNK3Ox+3C4Cxc13/fR21O4fPVSPMUg3MwzYEz5c k+A7geiz6ejS2bzVMHe2n77ZrG8mpC3b8zA913WrcAq2U/kB6+13gj3NjVLjgVZZSNYbRPR0exD /vXCE6iXgA92EGRtmtz6jhHwCYyMPsE= X-Received: by 2002:a05:7300:7316:b0:386:c5d3:7300 with SMTP id 5a478bee46e88-386c5d37603mr22967841eec.12.1795963412243; Sun, 29 Nov 2026 06:43:32 -0800 (PST) Received: from duge-G3-3500.lan ([138.199.21.246]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-386f6651e2asm17465018eec.27.2026.11.29.06.43.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 06:43:31 -0800 (PST) From: Jiayu Du To: srini@kernel.org Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, dlan@kernel.org, troy.mitchell@linux.spacemit.com, me@ziyao.cc, aurelien@aurel32.net, pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org, Jiayu Du Subject: [PATCH v4 0/3] Add read-only SpacemiT K3 eFuse support Date: Sun, 29 Nov 2026 22:42:47 +0800 Message-ID: <20261129144250.3212056-1-duge1256@gmail.com> X-Mailer: git-send-email 2.43.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series adds read-only NVMEM access to bank 0 and bank 7 of the SpacemiT K3 eFuse controller. These banks contain temperature calibration parameters and other configuration data. Tested on a SpacemiT K3 COM260 Kit. Both banks returned the same data across repeated reads and five unbind/rebind cycles. Reads from the other banks returned zeros. With the separate K3 thermal series applied, all seven temperature channels resumed reporting after each rebind. Changes in v4: - Restore the explanation for excluding the root key and SSK banks in the driver comment and commit message. - Collect Tested-by tags for the driver and DTS, and Reviewed-by for the DTS. v3: https://lore.kernel.org/all/20261122173810.2409146-1-duge1256@gmail.com/ Changes in v3: - Use an exclusive, managed reset and assert it on detach or a subsequent probe failure. - Use a 512-byte NVMEM space with bank 0 at 0x000 and bank 7 at 0x0e0; cover the other banks with keepouts. - Update the binding and DT calibration cell offsets to 0x1c and 0xea. - Clarify the shadow reload names and remove the incorrect reset comment. - Drop Conor's Acked-by from the binding patch after changing the NVMEM address layout. v2: https://lore.kernel.org/all/20261116075423.1519438-1-duge1256@gmail.com/ Changes in v2: - Trigger a shadow reload before polling FUSE_READY; fail probe on timeout. - Enable the clock only while accessing hardware and leave the shared reset deasserted on teardown. - Explain why the root key and SSK registers are excluded. - Use an aligned __le32 cache instead of put_unaligned_le32(). - Drop unnecessary Kconfig dependencies and the bootloader initialization requirement. - Use devm_platform_ioremap_resource() and align the register definitions. - Enable the eFuse node by default in k3.dtsi. - Add Conor's Acked-by to the binding patch. v1: https://lore.kernel.org/all/20261106060525.346873-1-duge1256@gmail.com/ Jiayu Du (3): dt-bindings: nvmem: Add SpacemiT K3 eFuse controller nvmem: Add read-only SpacemiT K3 eFuse support riscv: dts: spacemit: Add K3 eFuse and temperature trim cells .../bindings/nvmem/spacemit,k3-efuse.yaml | 63 ++++++ MAINTAINERS | 6 + arch/riscv/boot/dts/spacemit/k3.dtsi | 23 ++ drivers/nvmem/Kconfig | 11 + drivers/nvmem/Makefile | 1 + drivers/nvmem/spacemit-k3-efuse.c | 206 ++++++++++++++++++ 6 files changed, 310 insertions(+) create mode 100644 Documentation/devicetree/bindings/nvmem/spacemit,k3-efuse.yaml create mode 100644 drivers/nvmem/spacemit-k3-efuse.c base-commit: d6bcfc94eb4da6e089c5473970cd96727292fd97 -- 2.43.0