2024-05-07 12:25:02

by Heiko Stuebner

[permalink] [raw]
Subject: [PATCH 0/3] Small changes for Rockchip NVMEM drivers

When the option for legacy cell dt layouts was added, the
Rockchip OTP driver seems to have been overlooked, so set
the necessary option to allow seeing the cells again.

And two patches set the nvmem-type option in the device config.

Heiko Stuebner (3):
nvmem: rockchip-otp: set add_legacy_fixed_of_cells config option
nvmem: rockchip-otp: Set type to OTP
nvmem: rockchip-efuse: set type to OTP

drivers/nvmem/rockchip-efuse.c | 1 +
drivers/nvmem/rockchip-otp.c | 2 ++
2 files changed, 3 insertions(+)

--
2.39.2



2024-05-07 12:25:20

by Heiko Stuebner

[permalink] [raw]
Subject: [PATCH 1/3] nvmem: rockchip-otp: set add_legacy_fixed_of_cells config option

From: Heiko Stuebner <[email protected]>

The Rockchip OTP describes its layout via devicetree subnodes,
so set the appropriate property.

Fixes: 2cc3b37f5b6d ("nvmem: add explicit config option to read old syntax fixed OF cells")
Signed-off-by: Heiko Stuebner <[email protected]>
---
drivers/nvmem/rockchip-otp.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/nvmem/rockchip-otp.c b/drivers/nvmem/rockchip-otp.c
index cb9aa5428350a..7107d68a2f8c7 100644
--- a/drivers/nvmem/rockchip-otp.c
+++ b/drivers/nvmem/rockchip-otp.c
@@ -255,6 +255,7 @@ static int rockchip_otp_read(void *context, unsigned int offset,
static struct nvmem_config otp_config = {
.name = "rockchip-otp",
.owner = THIS_MODULE,
+ .add_legacy_fixed_of_cells = true,
.read_only = true,
.stride = 1,
.word_size = 1,
--
2.39.2


2024-05-07 12:34:29

by Heiko Stuebner

[permalink] [raw]
Subject: [PATCH 3/3] nvmem: rockchip-efuse: set type to OTP

From: Heiko Stuebner <[email protected]>

This device currently reports an "Unknown" type in sysfs.
Since it is an eFuse hardware device, set its type to OTP.

Signed-off-by: Heiko Stuebner <[email protected]>
---
drivers/nvmem/rockchip-efuse.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index 2b40978ddb18c..013e67136f3b9 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -206,6 +206,7 @@ static int rockchip_rk3399_efuse_read(void *context, unsigned int offset,
static struct nvmem_config econfig = {
.name = "rockchip-efuse",
.add_legacy_fixed_of_cells = true,
+ .type = NVMEM_TYPE_OTP,
.stride = 1,
.word_size = 1,
.read_only = true,
--
2.39.2


2024-05-07 13:01:30

by Quentin Schulz

[permalink] [raw]
Subject: Re: [PATCH 0/3] Small changes for Rockchip NVMEM drivers

Hi Heiko,

On 5/7/24 2:22 PM, Heiko Stuebner wrote:
> When the option for legacy cell dt layouts was added, the
> Rockchip OTP driver seems to have been overlooked, so set
> the necessary option to allow seeing the cells again.
>
> And two patches set the nvmem-type option in the device config.
>

For the whole series:

Reviewed-by: Quentin Schulz <[email protected]>

Thanks!
Quentin

2024-06-11 09:31:05

by Srinivas Kandagatla

[permalink] [raw]
Subject: Re: [PATCH 0/3] Small changes for Rockchip NVMEM drivers


On Tue, 07 May 2024 14:22:53 +0200, Heiko Stuebner wrote:
> When the option for legacy cell dt layouts was added, the
> Rockchip OTP driver seems to have been overlooked, so set
> the necessary option to allow seeing the cells again.
>
> And two patches set the nvmem-type option in the device config.
>
> Heiko Stuebner (3):
> nvmem: rockchip-otp: set add_legacy_fixed_of_cells config option
> nvmem: rockchip-otp: Set type to OTP
> nvmem: rockchip-efuse: set type to OTP
>
> [...]

Applied, thanks!

[1/3] nvmem: rockchip-otp: set add_legacy_fixed_of_cells config option
commit: d4d688ed8f312dd1cf986c956251acf6176f5085
[2/3] nvmem: rockchip-otp: Set type to OTP
commit: ee65a6c12badd3e0891c9096d6db7a0dba655c1b
[3/3] nvmem: rockchip-efuse: set type to OTP
commit: bb503130de1212cac2c368b373b0192eb7c59ab6

Best regards,
--
Srinivas Kandagatla <[email protected]>