From: Prasanth Kumar Padarthi <prasanth.padarthi10@gmail.com>
To: srini@kernel.org
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
joel@jms.id.au, andrew@codeconstruct.com.au,
ryan_chen@aspeedtech.com, billy_tsai@aspeedtech.com,
neal_liu@aspeedtech.com, tan.siewert@9elements.com,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Prasanth Kumar Padarthi <prasanth.padarthi10@gmail.com>
Subject: [PATCH v3 0/2] nvmem: aspeed: Add read-only AST2600 OTP support
Date: Sat, 21 Nov 2026 09:10:51 +0530 [thread overview]
Message-ID: <20261121034053.39878-1-prasanth.padarthi10@gmail.com> (raw)
Hi,
Add an NVMEM binding and read-only access to permitted AST2600 OTP words
for userspace BMC bring-up diagnostics.
AST2600 accesses OTP through shared command and result registers, so reads
must be serialized. Earlier firmware may leave the macro in programming
mode, requiring read-mode initialization. The protected prefix can grow
during operation, requiring live protection checks. A timeout leaves
command completion uncertain, so further commands are blocked because no
safe retry sequence is documented.
Supplementary design notes:
https://github.com/prasanthp20/asrock-b650d4u-bmc-support/blob/main/docs/security/ast2600-otp-nvmem-design.md
Changes since v2:
- Explain hardware constraints; put test results below the commit separator.
- Use generic ASPEED naming and named mode-register addresses.
- Share unlock/relock helpers without mixing scoped locking and goto.
- Return EIO for unlock failure; simplify pair copying and registration.
- Drop redundant MAINTAINERS matching, zero assignments and probe readback.
Changes since v1 (introduced in v2):
- Add the separate SBC/NVMEM binding patch; rename the source and module.
- Replace double polling with one bounded poll after an initial 1-us delay.
- Initialize read mode and read CONF0 once at probe; use a fixed keepout.
- Check the live SEC54 range on each hardware read in confirmed 128-byte units.
- Simplify word copying with unaligned-safe LE stores; accept empty reads.
- Adopt scoped mutex locking and managed initialization; simplify Kconfig.
Tested on B650D4U (AST2600 A3) with upstream-based Linux 7.4-rc1:
repeated reads, cross-pair/final-pair comparisons, 40 concurrent reads and
a 12-byte ASPEED-derived reference comparison passed. The RAM boot used
the working OpenBMC DTB and initramfs. The ARM kernel build used W=1.
The selected dt_binding_check target passed using dtschema 2026.4 with a
local diagnostic-crash fix; no checks were disabled. Two unrelated TI
type diagnostics remain, with no SBC errors. Host-model range, copying
and timeout checks also passed.
AI assistance was used for driver revisions, validation tooling and patch
text, based on the downstream driver, review comments and Neal's guidance.
Hardware tests were run by the submitter.
Previous revision (v2 cover letter):
https://lore.kernel.org/all/20261120174440.123487-1-prasanth.padarthi10@gmail.com/
Patch and review history:
v1 1/1 - original OTP driver and review:
https://patchwork.ozlabs.org/project/linux-aspeed/patch/20261113034213.158390-2-prasanth.padarthi10@gmail.com/
v2 1/2 - SBC/NVMEM binding:
https://patchwork.ozlabs.org/project/linux-aspeed/patch/20261120174440.123487-2-prasanth.padarthi10@gmail.com/
v2 2/2 - revised OTP driver and review:
https://patchwork.ozlabs.org/project/linux-aspeed/patch/20261120174440.123487-3-prasanth.padarthi10@gmail.com/
ASPEED hardware clarification - Neal Liu:
https://lore.kernel.org/linux-aspeed/KL1PR0601MB3986A356BD06F98D0FF9AD5E80792@KL1PR0601MB3986.apcprd06.prod.outlook.com/
Prasanth Kumar Padarthi (2):
dt-bindings: arm: aspeed: sbc: Describe OTP NVMEM provider
nvmem: aspeed: Add read-only AST2600 OTP support
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
next reply other threads:[~2026-11-21 3:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 3:40 Prasanth Kumar Padarthi [this message]
2026-11-21 3:40 ` [PATCH v3 1/2] dt-bindings: arm: aspeed: sbc: Describe OTP NVMEM provider Prasanth Kumar Padarthi
2026-11-21 3:40 ` [PATCH v3 2/2] nvmem: aspeed: Add read-only AST2600 OTP support Prasanth Kumar Padarthi
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=20261121034053.39878-1-prasanth.padarthi10@gmail.com \
--to=prasanth.padarthi10@gmail.com \
--cc=andrew@codeconstruct.com.au \
--cc=billy_tsai@aspeedtech.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=joel@jms.id.au \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neal_liu@aspeedtech.com \
--cc=robh@kernel.org \
--cc=ryan_chen@aspeedtech.com \
--cc=srini@kernel.org \
--cc=tan.siewert@9elements.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®