From: Weihong Guan <weihong.guan@gmail.com>
To: Srinivas Kandagatla <srini@kernel.org>
Cc: Weihong Guan <weihong.guan@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>, Ondrej Jirman <megi@xff.cz>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org
Subject: [PATCH 2/2] nvmem: rockchip-otp: Add support for RV1106
Date: Thu, 3 Dec 2026 12:24:12 +0000 [thread overview]
Message-ID: <20261203122416.682071-3-weihong.guan@gmail.com> (raw)
In-Reply-To: <20261203122416.682071-1-weihong.guan@gmail.com>
The RV1106's OTP is read as the RK3568's: 16-bit words through the same
user-mode sequence, 0x80 bytes, as in Rockchip's own driver for it. It
only needs two more clocks, so add its data with its six clocks and the
compatible. The RV1103 uses the same block and compatible.
Tested on a Luckfox Pico Plus (RV1103), the node as in the binding: the
OTP reads "RV" 0x1103 at offset 0 and again at 0x68.
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Weihong Guan <weihong.guan@gmail.com>
---
drivers/nvmem/rockchip-otp.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/nvmem/rockchip-otp.c b/drivers/nvmem/rockchip-otp.c
index 7eb834516..43712b6f0 100644
--- a/drivers/nvmem/rockchip-otp.c
+++ b/drivers/nvmem/rockchip-otp.c
@@ -387,6 +387,18 @@ static const struct rockchip_data rk3588_data = {
.reg_read = rk3588_otp_read,
};
+static const char * const rv1106_otp_clocks[] = {
+ "otp", "apb_pclk", "phy", "sbpi", "arb", "pmc",
+};
+
+static const struct rockchip_data rv1106_data = {
+ .size = 0x80,
+ .word_size = sizeof(u16),
+ .clks = rv1106_otp_clocks,
+ .num_clks = ARRAY_SIZE(rv1106_otp_clocks),
+ .reg_read = rk3568_otp_read,
+};
+
static const struct of_device_id rockchip_otp_match[] = {
{
.compatible = "rockchip,px30-otp",
@@ -416,6 +428,10 @@ static const struct of_device_id rockchip_otp_match[] = {
.compatible = "rockchip,rk3588-otp",
.data = &rk3588_data,
},
+ {
+ .compatible = "rockchip,rv1106-otp",
+ .data = &rv1106_data,
+ },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, rockchip_otp_match);
--
2.47.3
next prev parent reply other threads:[~2026-12-03 12:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 12:24 [PATCH 0/2] nvmem: rockchip-otp: Add support for the RV1106 Weihong Guan
2026-12-03 12:24 ` [PATCH 1/2] dt-bindings: nvmem: rockchip,otp: Add RV1106 Weihong Guan
2026-12-03 12:48 ` sashiko-bot
2026-12-03 12:24 ` Weihong Guan [this message]
2026-12-03 13:06 ` [PATCH 2/2] nvmem: rockchip-otp: Add support for RV1106 sashiko-bot
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=20261203122416.682071-3-weihong.guan@gmail.com \
--to=weihong.guan@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=megi@xff.cz \
--cc=robh@kernel.org \
--cc=srini@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