All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiayu Du <duge1256@gmail.com>
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 <duge1256@gmail.com>
Subject: [PATCH v3 0/3] Add read-only SpacemiT K3 eFuse support
Date: Mon, 23 Nov 2026 01:38:07 +0800	[thread overview]
Message-ID: <20261122173810.2409146-1-duge1256@gmail.com> (raw)

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 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             | 205 ++++++++++++++++++
 6 files changed, 309 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


WARNING: multiple messages have this Message-ID (diff)
From: Jiayu Du <duge1256@gmail.com>
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 <duge1256@gmail.com>
Subject: [PATCH v3 0/3] Add read-only SpacemiT K3 eFuse support
Date: Mon, 23 Nov 2026 01:38:07 +0800	[thread overview]
Message-ID: <20261122173810.2409146-1-duge1256@gmail.com> (raw)

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 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             | 205 ++++++++++++++++++
 6 files changed, 309 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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2026-11-22 17:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22 17:38 Jiayu Du [this message]
2026-11-22 17:38 ` [PATCH v3 0/3] Add read-only SpacemiT K3 eFuse support Jiayu Du
2026-11-22 17:38 ` [PATCH v3 1/3] dt-bindings: nvmem: Add SpacemiT K3 eFuse controller Jiayu Du
2026-11-22 17:38   ` Jiayu Du
2026-11-22 17:38 ` [PATCH v3 2/3] nvmem: Add read-only SpacemiT K3 eFuse support Jiayu Du
2026-11-22 17:38   ` Jiayu Du
2026-11-23  9:24   ` Troy Mitchell
2026-11-23  9:24     ` Troy Mitchell
2026-11-23 12:47     ` Jiayu Du
2026-11-23 12:47       ` Jiayu Du
2026-11-24 21:52   ` Aurelien Jarno
2026-11-24 21:52     ` Aurelien Jarno
2026-11-25  8:50     ` Jiayu Du
2026-11-25  8:50       ` Jiayu Du
2026-11-22 17:38 ` [PATCH v3 3/3] riscv: dts: spacemit: Add K3 eFuse and temperature trim cells Jiayu Du
2026-11-22 17:38   ` Jiayu Du
2026-11-24 21:56   ` Aurelien Jarno
2026-11-24 21:56     ` Aurelien Jarno
2026-11-25  8:49     ` Jiayu Du
2026-11-25  8:49       ` Jiayu Du

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261122173810.2409146-1-duge1256@gmail.com \
    --to=duge1256@gmail.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=aurelien@aurel32.net \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=me@ziyao.cc \
    --cc=p.zabel@pengutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=robh@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=srini@kernel.org \
    --cc=troy.mitchell@linux.spacemit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.