linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Small changes for Rockchip NVMEM drivers
@ 2024-05-07 12:22 Heiko Stuebner
  2024-05-07 12:22 ` [PATCH 1/3] nvmem: rockchip-otp: set add_legacy_fixed_of_cells config option Heiko Stuebner
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Heiko Stuebner @ 2024-05-07 12:22 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: heiko, linux-arm-kernel, linux-rockchip, linux-kernel, quentin.schulz

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


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] nvmem: rockchip-otp: set add_legacy_fixed_of_cells config option
  2024-05-07 12:22 [PATCH 0/3] Small changes for Rockchip NVMEM drivers Heiko Stuebner
@ 2024-05-07 12:22 ` Heiko Stuebner
  2024-05-07 12:22 ` [PATCH 2/3] nvmem: rockchip-otp: Set type to OTP Heiko Stuebner
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2024-05-07 12:22 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: heiko, linux-arm-kernel, linux-rockchip, linux-kernel,
	quentin.schulz, Heiko Stuebner

From: Heiko Stuebner <heiko.stuebner@cherry.de>

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 <heiko.stuebner@cherry.de>
---
 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


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] nvmem: rockchip-otp: Set type to OTP
  2024-05-07 12:22 [PATCH 0/3] Small changes for Rockchip NVMEM drivers Heiko Stuebner
  2024-05-07 12:22 ` [PATCH 1/3] nvmem: rockchip-otp: set add_legacy_fixed_of_cells config option Heiko Stuebner
@ 2024-05-07 12:22 ` Heiko Stuebner
  2024-05-07 12:22 ` [PATCH 3/3] nvmem: rockchip-efuse: set " Heiko Stuebner
  2024-05-07 12:42 ` [PATCH 0/3] Small changes for Rockchip NVMEM drivers Quentin Schulz
  3 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2024-05-07 12:22 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: heiko, linux-arm-kernel, linux-rockchip, linux-kernel,
	quentin.schulz, Heiko Stuebner

From: Heiko Stuebner <heiko.stuebner@cherry.de>

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

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
---
 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 7107d68a2f8c7..ebc3f0b24166b 100644
--- a/drivers/nvmem/rockchip-otp.c
+++ b/drivers/nvmem/rockchip-otp.c
@@ -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,
-- 
2.39.2


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] nvmem: rockchip-efuse: set type to OTP
  2024-05-07 12:22 [PATCH 0/3] Small changes for Rockchip NVMEM drivers Heiko Stuebner
  2024-05-07 12:22 ` [PATCH 1/3] nvmem: rockchip-otp: set add_legacy_fixed_of_cells config option Heiko Stuebner
  2024-05-07 12:22 ` [PATCH 2/3] nvmem: rockchip-otp: Set type to OTP Heiko Stuebner
@ 2024-05-07 12:22 ` Heiko Stuebner
  2024-05-07 12:42 ` [PATCH 0/3] Small changes for Rockchip NVMEM drivers Quentin Schulz
  3 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2024-05-07 12:22 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: heiko, linux-arm-kernel, linux-rockchip, linux-kernel,
	quentin.schulz, Heiko Stuebner

From: Heiko Stuebner <heiko.stuebner@cherry.de>

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 <heiko.stuebner@cherry.de>
---
 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


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] Small changes for Rockchip NVMEM drivers
  2024-05-07 12:22 [PATCH 0/3] Small changes for Rockchip NVMEM drivers Heiko Stuebner
                   ` (2 preceding siblings ...)
  2024-05-07 12:22 ` [PATCH 3/3] nvmem: rockchip-efuse: set " Heiko Stuebner
@ 2024-05-07 12:42 ` Quentin Schulz
  3 siblings, 0 replies; 5+ messages in thread
From: Quentin Schulz @ 2024-05-07 12:42 UTC (permalink / raw)
  To: Heiko Stuebner, srinivas.kandagatla
  Cc: linux-arm-kernel, linux-rockchip, linux-kernel

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 <quentin.schulz@cherry.de>

Thanks!
Quentin

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-07 12:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07 12:22 [PATCH 0/3] Small changes for Rockchip NVMEM drivers Heiko Stuebner
2024-05-07 12:22 ` [PATCH 1/3] nvmem: rockchip-otp: set add_legacy_fixed_of_cells config option Heiko Stuebner
2024-05-07 12:22 ` [PATCH 2/3] nvmem: rockchip-otp: Set type to OTP Heiko Stuebner
2024-05-07 12:22 ` [PATCH 3/3] nvmem: rockchip-efuse: set " Heiko Stuebner
2024-05-07 12:42 ` [PATCH 0/3] Small changes for Rockchip NVMEM drivers Quentin Schulz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).