rockchip: otp: Add support for RK3576
authorHeiko Stuebner <heiko@sntech.de>
Tue, 15 Apr 2025 21:51:21 +0000 (23:51 +0200)
committerKever Yang <kever.yang@rock-chips.com>
Wed, 23 Apr 2025 14:12:05 +0000 (22:12 +0800)
Add support for RK3576 compatible.
The RK3576 OTP uses the same read mechanism as the RK3588, just
with different values for offset and size.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
drivers/misc/rockchip-otp.c

index b5597de..4682042 100644 (file)
@@ -361,6 +361,13 @@ static const struct rockchip_otp_data rk3568_data = {
        .block_size = 2,
 };
 
+static const struct rockchip_otp_data rk3576_data = {
+       .read = rockchip_rk3588_otp_read,
+       .offset = 0x700,
+       .size = 0x100,
+       .block_size = 4,
+};
+
 static const struct rockchip_otp_data rk3588_data = {
        .read = rockchip_rk3588_otp_read,
        .offset = 0xC00,
@@ -391,6 +398,10 @@ static const struct udevice_id rockchip_otp_ids[] = {
                .compatible = "rockchip,rk3568-otp",
                .data = (ulong)&rk3568_data,
        },
+       {
+               .compatible = "rockchip,rk3576-otp",
+               .data = (ulong)&rk3576_data,
+       },
        {
                .compatible = "rockchip,rk3588-otp",
                .data = (ulong)&rk3588_data,