Skip to contentSkip to conversation

Small changes for Rockchip NVMEM drivers

PATCH Applied Heiko Stuebner 3 participants 6 messages May 7, 2024 – Jun 11, 2024

Subsystems (2)
lore
Share & tools
lore

Heiko Stuebner

author maintainer
#0 lore raw

cover 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(+)
Signature · 1 line
2.39.2
author maintainer
#1 lore raw

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")
---
 drivers/nvmem/rockchip-otp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvmem/rockchip-otp.c +1 -0
index cb9aa5428350a..7107d68a2f8c7 100644
@@ -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,
Signature · 1 line
2.39.2
author maintainer
#2 lore raw

PATCH 2/3 nvmem: rockchip-otp: Set type to OTP

In reply to Heiko Stuebner

From: Heiko Stuebner <[email protected]>

The Rockchip OTP is obviously an OTP memory, so document this fact.

---
 drivers/nvmem/rockchip-otp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvmem/rockchip-otp.c +1 -0
index 7107d68a2f8c7..ebc3f0b24166b 100644
@@ -256,6 +256,7 @@ static struct nvmem_config otp_config = {
 	.name = "rockchip-otp",
 	.owner = THIS_MODULE,
 	.add_legacy_fixed_of_cells = true,
+	.type = NVMEM_TYPE_OTP,
 	.read_only = true,
 	.stride = 1,
 	.word_size = 1,
Signature · 1 line
2.39.2
author maintainer
#3 lore raw

PATCH 3/3 nvmem: rockchip-efuse: set type to OTP

In reply to Heiko Stuebner

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.

---
 drivers/nvmem/rockchip-efuse.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvmem/rockchip-efuse.c +1 -0
index 2b40978ddb18c..013e67136f3b9 100644
@@ -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,
Signature · 1 line
2.39.2
Reviewed-by on the v1 series
#4 lore raw
In reply to Heiko Stuebner

Hi Heiko,

Quoted 6 lines · Heiko Stuebner

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:

Thanks!
Quentin

#5 lore raw
In reply to Heiko Stuebner
Quoted 4 lines · Heiko Stuebner

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.

Quoted 8 lines

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,

Signature · 1 line
Srinivas Kandagatla <[email protected]>