From: Finley Xiao <finley.xiao@rock-chips.com>
This adds the necessary data for handling otp on the rk3562.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---
Changes in v3:
- Use rk3568 data structure for rk3562
Changes in v2: None
drivers/nvmem/rockchip-otp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/nvmem/rockchip-otp.c b/drivers/nvmem/rockchip-otp.c
index cfb69bc58869..62ce22d72586 100644
--- a/drivers/nvmem/rockchip-otp.c
+++ b/drivers/nvmem/rockchip-otp.c
@@ -376,6 +376,10 @@ static const struct of_device_id rockchip_otp_match[] = {
.compatible = "rockchip,rk3308-otp",
.data = &px30_data,
},
+ {
+ .compatible = "rockchip,rk3562-otp",
+ .data = &rk3568_data,
+ },
{
.compatible = "rockchip,rk3568-otp",
.data = &rk3568_data,
--
2.25.1
On Tue, Apr 15, 2025 at 06:32:03PM +0800, Kever Yang wrote: > From: Finley Xiao <finley.xiao@rock-chips.com> > > This adds the necessary data for handling otp on the rk3562. > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Successfully tested with Jonas' patches on top of it on my Radxa E20C (RK3528): Tested-by: Willy Tarreau <w@1wt.eu> Willy
Hi Willy, Am Montag, 28. Juli 2025, 21:01:54 Mitteleuropäische Normalzeit schrieb Willy Tarreau: > On Tue, Apr 15, 2025 at 06:32:03PM +0800, Kever Yang wrote: > > From: Finley Xiao <finley.xiao@rock-chips.com> > > > > This adds the necessary data for handling otp on the rk3562. > > > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> > > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> > > Successfully tested with Jonas' patches on top of it on my > Radxa E20C (RK3528): > > Tested-by: Willy Tarreau <w@1wt.eu> as you replied to the rk3562 variant, does that mean the rk3528 uses the same variant data? Thanks Heiko
Hi Heiko,
On Thu, Feb 05, 2026 at 01:50:34PM +0100, Heiko Stübner wrote:
> Hi Willy,
>
> Am Montag, 28. Juli 2025, 21:01:54 Mitteleuropäische Normalzeit schrieb Willy Tarreau:
> > On Tue, Apr 15, 2025 at 06:32:03PM +0800, Kever Yang wrote:
> > > From: Finley Xiao <finley.xiao@rock-chips.com>
> > >
> > > This adds the necessary data for handling otp on the rk3562.
> > >
> > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
> > > Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> >
> > Successfully tested with Jonas' patches on top of it on my
> > Radxa E20C (RK3528):
> >
> > Tested-by: Willy Tarreau <w@1wt.eu>
>
> as you replied to the rk3562 variant, does that mean the rk3528
> uses the same variant data?
Now you make me doubt, I'll have to recheck the original message
in its series and the patches that I had applied. I seem to
rememeber there were certain common patches between the two but
I don't remember which ones, and it's also possibly that I replied
by accident to the wrong message in the series or that I mistook
one patch for another when comparing them :-/
Ah, I seem to have found it, there's indeed the 3562 in my local
patches and the 3528 as well, both of which rely on the 3568 one:
commit a68433c468c8a9d4789641eb6a40ae571fb7f01f
Author: Finley Xiao <finley.xiao@rock-chips.com>
Date: Tue Apr 15 18:32:03 2025 +0800
nvmem: rockchip-otp: Add support for RK3562
This adds the necessary data for handling otp on the rk3562.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
and:
commit 249b07e24d3d1d47b7ec23d5f09a56837b66d7f5
Author: Jonas Karlman <jonas@kwiboo.se>
Date: Sun Mar 16 00:05:45 2025 +0000
nvmem: rockchip-otp: Add support for RK3528
Add support for the OTP controller in RK3528. The OTPC is similar to the
OTPC in RK3562 and RK3568, exept for a missing phy clock and reset.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
It's very possible that I visually mistook one for the other when
responding to the series, and if so, I'm really sorry about that!
The former relies on rk3568_data and the latter on rk3528_data, which
is defined like this:
+static const char * const rk3528_otp_clocks[] = {
+ "otp", "apb_pclk", "sbpi",
+};
+
+static const struct rockchip_data rk3528_data = {
+ .size = 0x80,
+ .word_size = sizeof(u16),
+ .clks = rk3528_otp_clocks,
+ .num_clks = ARRAY_SIZE(rk3528_otp_clocks),
+ .reg_read = rk3568_otp_read,
+};
Looks like the patches originally come from this branch that I
manually cherry-picked:
https://github.com/Kwiboo/linux-rockchip/commits/next-20250620-rk3528
I have one extra E20C that's not yet in prod if you're interested in
me running some specific tests. It will not happen quickly but just let
me know if I can help, as it's a nice little machine.
Willy
Hi Willy, Am Donnerstag, 5. Februar 2026, 16:36:33 Mitteleuropäische Normalzeit schrieb Willy Tarreau: > On Thu, Feb 05, 2026 at 01:50:34PM +0100, Heiko Stübner wrote: > > Am Montag, 28. Juli 2025, 21:01:54 Mitteleuropäische Normalzeit schrieb Willy Tarreau: > > > On Tue, Apr 15, 2025 at 06:32:03PM +0800, Kever Yang wrote: > > > > From: Finley Xiao <finley.xiao@rock-chips.com> > > > > > > > > This adds the necessary data for handling otp on the rk3562. > > > > > > > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> > > > > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> > > > > > > Successfully tested with Jonas' patches on top of it on my > > > Radxa E20C (RK3528): > > > > > > Tested-by: Willy Tarreau <w@1wt.eu> > > > > as you replied to the rk3562 variant, does that mean the rk3528 > > uses the same variant data? [...] > It's very possible that I visually mistook one for the other when > responding to the series, and if so, I'm really sorry about that! Really, no worries ... it just confused me a bit, while I was resurrecting the whole thing :-) [...] > I have one extra E20C that's not yet in prod if you're interested in > me running some specific tests. It will not happen quickly but just let > me know if I can help, as it's a nice little machine. With Jonas' blessing I added his patches for the RK3528 and send the driver thing rebased onto a recent kernel just now [0] with you in Cc. I've also send in the corresponding DTS patches for all 3 [1], again with you in Cc :-) . So if you can give them a spin on your RK3528 board, that would be great. Because I need to find my RK3528 board first :-) . Thanks a lot Heiko [0] https://lore.kernel.org/linux-rockchip/20260205211901.490181-1-heiko@sntech.de/T/#t [1] https://lore.kernel.org/linux-rockchip/20260205212347.490636-1-heiko@sntech.de/T/#t
Am Dienstag, 15. April 2025, 12:32:03 Mitteleuropäische Sommerzeit schrieb Kever Yang: > From: Finley Xiao <finley.xiao@rock-chips.com> > > This adds the necessary data for handling otp on the rk3562. > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
© 2016 - 2026 Red Hat, Inc.