diff mbox series

[16/20] rockchip: otp: Add support for RK3576

Message ID 20241121142731.1202209-17-heiko@sntech.de
State New
Delegated to: Kever Yang
Headers show
Series Support for the RK3576 | expand

Commit Message

Heiko Stübner Nov. 21, 2024, 2:27 p.m. UTC
Add support for RK3588 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>
---
 drivers/misc/rockchip-otp.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Quentin Schulz Nov. 26, 2024, 6:37 p.m. UTC | #1
Hi Heiko,

On 11/21/24 3:27 PM, Heiko Stuebner wrote:
> Add support for RK3588 compatible.

RK3576?

Cheers,
Quentin
diff mbox series

Patch

diff --git a/drivers/misc/rockchip-otp.c b/drivers/misc/rockchip-otp.c
index 2123c31038f..8c8715e6412 100644
--- a/drivers/misc/rockchip-otp.c
+++ b/drivers/misc/rockchip-otp.c
@@ -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,
@@ -387,6 +394,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,