Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jonas Karlman <jonas@kwiboo.se>
To: Srinivas Kandagatla <srini@kernel.org>, Heiko Stuebner <heiko@sntech.de>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Jonas Karlman <jonas@kwiboo.se>
Subject: [PATCH 2/3] nvmem: rockchip-otp: Add support for RK3506
Date: Sat, 28 Nov 2026 22:17:11 +0000	[thread overview]
Message-ID: <20261128221713.47445-3-jonas@kwiboo.se> (raw)
In-Reply-To: <20261128221713.47445-1-jonas@kwiboo.se>

Add support for the OTP controller in RK3506. The OTPC is similar to the
OTP controller in RK3528, except that reading from the last 8 bytes,
offset 120-127, fails ECC on RK3506.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
 drivers/nvmem/rockchip-otp.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/nvmem/rockchip-otp.c b/drivers/nvmem/rockchip-otp.c
index 7eb834516ab4..3422017d391e 100644
--- a/drivers/nvmem/rockchip-otp.c
+++ b/drivers/nvmem/rockchip-otp.c
@@ -345,6 +345,14 @@ static const char * const rk3528_otp_clocks[] = {
 	"otp", "apb_pclk", "sbpi",
 };
 
+static const struct rockchip_data rk3506_data = {
+	.size = 0x78,
+	.word_size = sizeof(u16),
+	.clks = rk3528_otp_clocks,
+	.num_clks = ARRAY_SIZE(rk3528_otp_clocks),
+	.reg_read = rk3568_otp_read,
+};
+
 static const struct rockchip_data rk3528_data = {
 	.size = 0x80,
 	.word_size = sizeof(u16),
@@ -396,6 +404,10 @@ static const struct of_device_id rockchip_otp_match[] = {
 		.compatible = "rockchip,rk3308-otp",
 		.data = &px30_data,
 	},
+	{
+		.compatible = "rockchip,rk3506-otp",
+		.data = &rk3506_data,
+	},
 	{
 		.compatible = "rockchip,rk3528-otp",
 		.data = &rk3528_data,
-- 
2.56.1



           reply	other threads:[~2026-11-28 22:17 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20261128221713.47445-1-jonas@kwiboo.se>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261128221713.47445-3-jonas@kwiboo.se \
    --to=jonas@kwiboo.se \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh@kernel.org \
    --cc=srini@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox