Skip to content

Commit 50d75a1

Browse files
mmindgregkh
authored andcommitted
nvmem: rockchip-otp: add rk3576 variant data
The variant works very similar to the rk3588, just with a different read-offset and size. Signed-off-by: Heiko Stuebner <[email protected]> Tested-by: Nicolas Frattaroli <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9165960 commit 50d75a1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/nvmem/rockchip-otp.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,14 @@ static const struct rockchip_data px30_data = {
274274
.reg_read = px30_otp_read,
275275
};
276276

277+
static const struct rockchip_data rk3576_data = {
278+
.size = 0x100,
279+
.read_offset = 0x700,
280+
.clks = px30_otp_clocks,
281+
.num_clks = ARRAY_SIZE(px30_otp_clocks),
282+
.reg_read = rk3588_otp_read,
283+
};
284+
277285
static const char * const rk3588_otp_clocks[] = {
278286
"otp", "apb_pclk", "phy", "arb",
279287
};
@@ -295,6 +303,10 @@ static const struct of_device_id rockchip_otp_match[] = {
295303
.compatible = "rockchip,rk3308-otp",
296304
.data = &px30_data,
297305
},
306+
{
307+
.compatible = "rockchip,rk3576-otp",
308+
.data = &rk3576_data,
309+
},
298310
{
299311
.compatible = "rockchip,rk3588-otp",
300312
.data = &rk3588_data,

0 commit comments

Comments
 (0)