From: Link Mauve <linkmauve@linkmauve.fr>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: "Link Mauve" <linkmauve@linkmauve.fr>,
"Michael Garofalo" <officialTechflashYT@gmail.com>,
"Ash Logan" <ash@heyquark.com>,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2] powerpc: wii: Add the fixed OTP layout
Date: Thu, 30 Jul 2026 00:50:08 +0200 [thread overview]
Message-ID: <20260729225010.838760-1-linkmauve@linkmauve.fr> (raw)
These 128 bytes have a known fixed layout, so we can expose those as
cells for either kernel or userspace consumption.
Signed-off-by: Link Mauve <linkmauve@linkmauve.fr>
---
arch/powerpc/boot/dts/wii.dts | 42 +++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
Changes since v1:
- Link to v1:
https://lore.kernel.org/lkml/20260726181921.16269-1-linkmauve@linkmauve.fr/T/
- Switch to using hyphens instead of underscores as it is preferred in
device-trees.
- Extend device-private-key@28 to 0x1e bytes instead of 0x1c, which is
its correct size.
- Document that this cell and the next one overlap for two bytes, and
it’s expected.
diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts
index 473d9feb9cdb..d3a94d94e9e1 100644
--- a/arch/powerpc/boot/dts/wii.dts
+++ b/arch/powerpc/boot/dts/wii.dts
@@ -233,6 +233,48 @@ control@d800100 {
otp@d8001ec {
compatible = "nintendo,hollywood-otp";
reg = <0x0d8001ec 0x8>;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ boot1-sha1@0 {
+ reg = <0x00 0x14>;
+ };
+
+ common-key@14 {
+ reg = <0x14 0x10>;
+ };
+
+ device-id@24 {
+ reg = <0x24 0x4>;
+ };
+
+ /*
+ * device-private-key@28 and nand-hmac-key@44
+ * overlap on two bytes, that’s expected.
+ */
+ device-private-key@28 {
+ reg = <0x28 0x1e>;
+ };
+
+ nand-hmac-key@44 {
+ reg = <0x44 0x14>;
+ };
+
+ nand-key@58 {
+ reg = <0x58 0x10>;
+ };
+
+ backup-key@68 {
+ reg = <0x68 0x10>;
+ };
+
+ unknown@78 {
+ reg = <0x78 0x8>;
+ };
+ };
};
disk@d806000 {
base-commit: 78bc8af4affb9a732504eb22eeac7d1e50883853
--
2.55.0
reply other threads:[~2026-07-29 22:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260729225010.838760-1-linkmauve@linkmauve.fr \
--to=linkmauve@linkmauve.fr \
--cc=ash@heyquark.com \
--cc=chleroy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=j.neuschaefer@gmx.net \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=officialTechflashYT@gmail.com \
--cc=robh@kernel.org \
/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