Skip to content

Add read-only SpacemiT K3 eFuse support

Jiayu Du linux-devicetree linux-riscv lkml spacemit 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 2 repliesIn review
  2. v23 patches 5 repliesSuperseded
  3. v13 patches 9 repliesSuperseded

Changes in v3 from the cover letter

- 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.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dt-bindings: nvmem: Add SpacemiT K3 eFuse controllerDocumentation/devicetree/bindings/nvmem/spacemit,k3-efuse.yaml MAINTAINERS+68 -00 replies
2/3nvmem: Add read-only SpacemiT K3 eFuse supportMAINTAINERS drivers/nvmem/Kconfig drivers/nvmem/Makefile +1 more+218 -02 replies
3/3riscv: dts: spacemit: Add K3 eFuse and temperature trim cellsarch/riscv/boot/dts/spacemit/k3.dtsi+23 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] Add read-only SpacemiT K3 eFuse support

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/[email protected]/

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/[email protected]/

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

Signature · 1 line
2.43.0