[PATCH 2/2] nvmem: rockchip-otp: Add support for RV1106
Weihong Guan
weihong.guan at gmail.com
Thu Dec 3 04:24:12 PST 2026
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 at 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
More information about the linux-arm-kernel
mailing list