devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND v2 0/6] RK3576 OTP support
@ 2025-02-10 22:45 Heiko Stuebner
  2025-02-10 22:45 ` [PATCH RESEND v2 1/6] clk: rockchip: rk3576: define clk_otp_phy_g Heiko Stuebner
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Heiko Stuebner @ 2025-02-10 22:45 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: robh, krzk+dt, conor+dt, heiko, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel

This enables OTP support in the nvmem driver for rk3576.

I expect to pick the clock patch (patch1) and the arm64-dts patch (patch6)
myself, after the nvmem-driver and -binding patches have been applied
(patches 2-5).

But kept them together for people wanting to try this series.

changes in v2:
- fix register constant in clock definition (Diederik)
- add patch to set limits on variant-specific clock-names
- use correct limits for clocks + resets on rk3576 binding


RESEND, because I messed up my git-send-email which caused it to include
the list of patches 2 times, duplicating everything :-( .

Heiko Stuebner (6):
  clk: rockchip: rk3576: define clk_otp_phy_g
  nvmem: rockchip-otp: Move read-offset into variant-data
  dt-bindings: nvmem: rockchip,otp: add missing limits for clock-names
  dt-bindings: nvmem: rockchip,otp: Add compatible for RK3576
  nvmem: rockchip-otp: add rk3576 variant data
  arm64: dts: rockchip: add rk3576 otp node

 .../bindings/nvmem/rockchip,otp.yaml          | 25 ++++++++++++
 arch/arm64/boot/dts/rockchip/rk3576.dtsi      | 39 +++++++++++++++++++
 drivers/clk/rockchip/clk-rk3576.c             |  2 +
 drivers/nvmem/rockchip-otp.c                  | 17 +++++++-
 4 files changed, 81 insertions(+), 2 deletions(-)

-- 
2.47.2


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

* [PATCH RESEND v2 1/6] clk: rockchip: rk3576: define clk_otp_phy_g
  2025-02-10 22:45 [PATCH RESEND v2 0/6] RK3576 OTP support Heiko Stuebner
@ 2025-02-10 22:45 ` Heiko Stuebner
  2025-02-10 22:45 ` [PATCH RESEND v2 2/6] nvmem: rockchip-otp: Move read-offset into variant-data Heiko Stuebner
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Heiko Stuebner @ 2025-02-10 22:45 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: robh, krzk+dt, conor+dt, heiko, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel

The phy clock of the OTP block is also present, but was not defined
so far. Though its clk-id already existed, so just define its location.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/clk/rockchip/clk-rk3576.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/rockchip/clk-rk3576.c b/drivers/clk/rockchip/clk-rk3576.c
index 595e010341f7..be703f250197 100644
--- a/drivers/clk/rockchip/clk-rk3576.c
+++ b/drivers/clk/rockchip/clk-rk3576.c
@@ -541,6 +541,8 @@ static struct rockchip_clk_branch rk3576_clk_branches[] __initdata = {
 			RK3576_CLKGATE_CON(5), 14, GFLAGS),
 	GATE(CLK_OTPC_AUTO_RD_G, "clk_otpc_auto_rd_g", "xin24m", 0,
 			RK3576_CLKGATE_CON(5), 15, GFLAGS),
+	GATE(CLK_OTP_PHY_G, "clk_otp_phy_g", "xin24m", 0,
+			RK3576_CLKGATE_CON(6), 0, GFLAGS),
 	COMPOSITE(CLK_MIPI_CAMERAOUT_M0, "clk_mipi_cameraout_m0", mux_24m_spll_gpll_cpll_p, 0,
 			RK3576_CLKSEL_CON(38), 8, 2, MFLAGS, 0, 8, DFLAGS,
 			RK3576_CLKGATE_CON(6), 3, GFLAGS),
-- 
2.47.2


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

* [PATCH RESEND v2 2/6] nvmem: rockchip-otp: Move read-offset into variant-data
  2025-02-10 22:45 [PATCH RESEND v2 0/6] RK3576 OTP support Heiko Stuebner
  2025-02-10 22:45 ` [PATCH RESEND v2 1/6] clk: rockchip: rk3576: define clk_otp_phy_g Heiko Stuebner
@ 2025-02-10 22:45 ` Heiko Stuebner
  2025-02-10 22:45 ` [PATCH RESEND v2 3/6] dt-bindings: nvmem: rockchip,otp: add missing limits for clock-names Heiko Stuebner
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Heiko Stuebner @ 2025-02-10 22:45 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: robh, krzk+dt, conor+dt, heiko, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel

The RK3588 has an offset into the OTP area where the readable area begins
and automatically adds this to the start address.
Other variants are very much similar to rk3588, just with a different
offset, so move that value into variant-data.

To match the size in bytes, store this value also in bytes and not in
number of blocks.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/nvmem/rockchip-otp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/nvmem/rockchip-otp.c b/drivers/nvmem/rockchip-otp.c
index ebc3f0b24166..3edfbfc2d722 100644
--- a/drivers/nvmem/rockchip-otp.c
+++ b/drivers/nvmem/rockchip-otp.c
@@ -59,7 +59,6 @@
 #define RK3588_OTPC_AUTO_EN		0x08
 #define RK3588_OTPC_INT_ST		0x84
 #define RK3588_OTPC_DOUT0		0x20
-#define RK3588_NO_SECURE_OFFSET		0x300
 #define RK3588_NBYTES			4
 #define RK3588_BURST_NUM		1
 #define RK3588_BURST_SHIFT		8
@@ -69,6 +68,7 @@
 
 struct rockchip_data {
 	int size;
+	int read_offset;
 	const char * const *clks;
 	int num_clks;
 	nvmem_reg_read_t reg_read;
@@ -196,7 +196,7 @@ static int rk3588_otp_read(void *context, unsigned int offset,
 	addr_start = round_down(offset, RK3588_NBYTES) / RK3588_NBYTES;
 	addr_end = round_up(offset + bytes, RK3588_NBYTES) / RK3588_NBYTES;
 	addr_len = addr_end - addr_start;
-	addr_start += RK3588_NO_SECURE_OFFSET;
+	addr_start += otp->data->read_offset / RK3588_NBYTES;
 
 	buf = kzalloc(array_size(addr_len, RK3588_NBYTES), GFP_KERNEL);
 	if (!buf)
@@ -280,6 +280,7 @@ static const char * const rk3588_otp_clocks[] = {
 
 static const struct rockchip_data rk3588_data = {
 	.size = 0x400,
+	.read_offset = 0xc00,
 	.clks = rk3588_otp_clocks,
 	.num_clks = ARRAY_SIZE(rk3588_otp_clocks),
 	.reg_read = rk3588_otp_read,
-- 
2.47.2


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

* [PATCH RESEND v2 3/6] dt-bindings: nvmem: rockchip,otp: add missing limits for clock-names
  2025-02-10 22:45 [PATCH RESEND v2 0/6] RK3576 OTP support Heiko Stuebner
  2025-02-10 22:45 ` [PATCH RESEND v2 1/6] clk: rockchip: rk3576: define clk_otp_phy_g Heiko Stuebner
  2025-02-10 22:45 ` [PATCH RESEND v2 2/6] nvmem: rockchip-otp: Move read-offset into variant-data Heiko Stuebner
@ 2025-02-10 22:45 ` Heiko Stuebner
  2025-02-11 17:56   ` Conor Dooley
  2025-02-10 22:45 ` [PATCH RESEND v2 4/6] dt-bindings: nvmem: rockchip,otp: Add compatible for RK3576 Heiko Stuebner
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Heiko Stuebner @ 2025-02-10 22:45 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: robh, krzk+dt, conor+dt, heiko, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel, Krzysztof Kozlowski

The clocks property correctly declares minItems and maxItems for its
variants, but clock-names does not. Both properties are always used
together, so should declare the same limits.

Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml b/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml
index a44d44b32809..3201ff8f9334 100644
--- a/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml
+++ b/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml
@@ -62,6 +62,8 @@ allOf:
       properties:
         clocks:
           maxItems: 3
+        clock-names:
+          maxItems: 3
         resets:
           maxItems: 1
         reset-names:
@@ -78,6 +80,8 @@ allOf:
       properties:
         clocks:
           minItems: 4
+        clock-names:
+          minItems: 4
         resets:
           minItems: 3
         reset-names:
-- 
2.47.2


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

* [PATCH RESEND v2 4/6] dt-bindings: nvmem: rockchip,otp: Add compatible for RK3576
  2025-02-10 22:45 [PATCH RESEND v2 0/6] RK3576 OTP support Heiko Stuebner
                   ` (2 preceding siblings ...)
  2025-02-10 22:45 ` [PATCH RESEND v2 3/6] dt-bindings: nvmem: rockchip,otp: add missing limits for clock-names Heiko Stuebner
@ 2025-02-10 22:45 ` Heiko Stuebner
  2025-02-11 17:55   ` Conor Dooley
  2025-02-10 22:45 ` [PATCH RESEND v2 5/6] nvmem: rockchip-otp: add rk3576 variant data Heiko Stuebner
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Heiko Stuebner @ 2025-02-10 22:45 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: robh, krzk+dt, conor+dt, heiko, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel

Document the OTP memory found on Rockchip RK3576 SoC.

The RK3576 uses the same set of clocks as the px30/rk3308
but has one reset more, so adapt the binding to handle this
variant as well.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 .../bindings/nvmem/rockchip,otp.yaml          | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml b/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml
index 3201ff8f9334..dc89020b0950 100644
--- a/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml
+++ b/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml
@@ -14,6 +14,7 @@ properties:
     enum:
       - rockchip,px30-otp
       - rockchip,rk3308-otp
+      - rockchip,rk3576-otp
       - rockchip,rk3588-otp
 
   reg:
@@ -70,6 +71,26 @@ allOf:
           items:
             - const: phy
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - rockchip,rk3576-otp
+    then:
+      properties:
+        clocks:
+          maxItems: 3
+        clock-names:
+          maxItems: 3
+        resets:
+          minItems: 2
+          maxItems: 2
+        reset-names:
+          items:
+            - const: otp
+            - const: apb
+
   - if:
       properties:
         compatible:
-- 
2.47.2


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

* [PATCH RESEND v2 5/6] nvmem: rockchip-otp: add rk3576 variant data
  2025-02-10 22:45 [PATCH RESEND v2 0/6] RK3576 OTP support Heiko Stuebner
                   ` (3 preceding siblings ...)
  2025-02-10 22:45 ` [PATCH RESEND v2 4/6] dt-bindings: nvmem: rockchip,otp: Add compatible for RK3576 Heiko Stuebner
@ 2025-02-10 22:45 ` Heiko Stuebner
  2025-02-10 22:45 ` [PATCH RESEND v2 6/6] arm64: dts: rockchip: add rk3576 otp node Heiko Stuebner
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Heiko Stuebner @ 2025-02-10 22:45 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: robh, krzk+dt, conor+dt, heiko, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel

The variant works very similar to the rk3588, just with a different
read-offset and size.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 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 3edfbfc2d722..d88f12c53242 100644
--- a/drivers/nvmem/rockchip-otp.c
+++ b/drivers/nvmem/rockchip-otp.c
@@ -274,6 +274,14 @@ static const struct rockchip_data px30_data = {
 	.reg_read = px30_otp_read,
 };
 
+static const struct rockchip_data rk3576_data = {
+	.size = 0x100,
+	.read_offset = 0x700,
+	.clks = px30_otp_clocks,
+	.num_clks = ARRAY_SIZE(px30_otp_clocks),
+	.reg_read = rk3588_otp_read,
+};
+
 static const char * const rk3588_otp_clocks[] = {
 	"otp", "apb_pclk", "phy", "arb",
 };
@@ -295,6 +303,10 @@ static const struct of_device_id rockchip_otp_match[] = {
 		.compatible = "rockchip,rk3308-otp",
 		.data = &px30_data,
 	},
+	{
+		.compatible = "rockchip,rk3576-otp",
+		.data = &rk3576_data,
+	},
 	{
 		.compatible = "rockchip,rk3588-otp",
 		.data = &rk3588_data,
-- 
2.47.2


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

* [PATCH RESEND v2 6/6] arm64: dts: rockchip: add rk3576 otp node
  2025-02-10 22:45 [PATCH RESEND v2 0/6] RK3576 OTP support Heiko Stuebner
                   ` (4 preceding siblings ...)
  2025-02-10 22:45 ` [PATCH RESEND v2 5/6] nvmem: rockchip-otp: add rk3576 variant data Heiko Stuebner
@ 2025-02-10 22:45 ` Heiko Stuebner
  2025-02-12 12:44 ` [PATCH RESEND v2 0/6] RK3576 OTP support Nicolas Frattaroli
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Heiko Stuebner @ 2025-02-10 22:45 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: robh, krzk+dt, conor+dt, heiko, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel

This adds the otp node to the rk3576 soc devicetree including the
individual fields we know about.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm64/boot/dts/rockchip/rk3576.dtsi | 39 ++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
index 4dde954043ef..29b47799849a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
@@ -1260,6 +1260,45 @@ sdhci: mmc@2a330000 {
 			status = "disabled";
 		};
 
+		otp: otp@2a580000 {
+			compatible = "rockchip,rk3576-otp";
+			reg = <0x0 0x2a580000 0x0 0x400>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			clocks = <&cru CLK_OTPC_NS>, <&cru PCLK_OTPC_NS>,
+				 <&cru CLK_OTP_PHY_G>;
+			clock-names = "otp", "apb_pclk", "phy";
+			resets = <&cru SRST_OTPC_NS>, <&cru SRST_P_OTPC_NS>;
+			reset-names = "otp", "apb";
+
+			/* Data cells */
+			cpu_code: cpu-code@2 {
+				reg = <0x02 0x2>;
+			};
+			otp_cpu_version: cpu-version@5 {
+				reg = <0x05 0x1>;
+				bits = <3 3>;
+			};
+			otp_id: id@a {
+				reg = <0x0a 0x10>;
+			};
+			cpub_leakage: cpub-leakage@1e {
+				reg = <0x1e 0x1>;
+			};
+			cpul_leakage: cpul-leakage@1f {
+				reg = <0x1f 0x1>;
+			};
+			npu_leakage: npu-leakage@20 {
+				reg = <0x20 0x1>;
+			};
+			gpu_leakage: gpu-leakage@21 {
+				reg = <0x21 0x1>;
+			};
+			log_leakage: log-leakage@22 {
+				reg = <0x22 0x1>;
+			};
+		};
+
 		gic: interrupt-controller@2a701000 {
 			compatible = "arm,gic-400";
 			reg = <0x0 0x2a701000 0 0x10000>,
-- 
2.47.2


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

* Re: [PATCH RESEND v2 4/6] dt-bindings: nvmem: rockchip,otp: Add compatible for RK3576
  2025-02-10 22:45 ` [PATCH RESEND v2 4/6] dt-bindings: nvmem: rockchip,otp: Add compatible for RK3576 Heiko Stuebner
@ 2025-02-11 17:55   ` Conor Dooley
  0 siblings, 0 replies; 15+ messages in thread
From: Conor Dooley @ 2025-02-11 17:55 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: srinivas.kandagatla, robh, krzk+dt, conor+dt, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel, linux-clk,
	detlev.casanova, sebastian.reichel

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

On Mon, Feb 10, 2025 at 11:45:08PM +0100, Heiko Stuebner wrote:
> Document the OTP memory found on Rockchip RK3576 SoC.
> 
> The RK3576 uses the same set of clocks as the px30/rk3308
> but has one reset more, so adapt the binding to handle this
> variant as well.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH RESEND v2 3/6] dt-bindings: nvmem: rockchip,otp: add missing limits for clock-names
  2025-02-10 22:45 ` [PATCH RESEND v2 3/6] dt-bindings: nvmem: rockchip,otp: add missing limits for clock-names Heiko Stuebner
@ 2025-02-11 17:56   ` Conor Dooley
  0 siblings, 0 replies; 15+ messages in thread
From: Conor Dooley @ 2025-02-11 17:56 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: srinivas.kandagatla, robh, krzk+dt, conor+dt, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel, linux-clk,
	detlev.casanova, sebastian.reichel, Krzysztof Kozlowski

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

On Mon, Feb 10, 2025 at 11:45:07PM +0100, Heiko Stuebner wrote:
> The clocks property correctly declares minItems and maxItems for its
> variants, but clock-names does not. Both properties are always used
> together, so should declare the same limits.
> 
> Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH RESEND v2 0/6] RK3576 OTP support
  2025-02-10 22:45 [PATCH RESEND v2 0/6] RK3576 OTP support Heiko Stuebner
                   ` (5 preceding siblings ...)
  2025-02-10 22:45 ` [PATCH RESEND v2 6/6] arm64: dts: rockchip: add rk3576 otp node Heiko Stuebner
@ 2025-02-12 12:44 ` Nicolas Frattaroli
  2025-02-12 12:56   ` Heiko Stübner
  2025-02-17  9:53 ` (subset) " Srinivas Kandagatla
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Nicolas Frattaroli @ 2025-02-12 12:44 UTC (permalink / raw)
  To: srinivas.kandagatla, linux-rockchip
  Cc: robh, krzk+dt, conor+dt, heiko, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel, Heiko Stuebner

On Monday, 10 February 2025 23:45:04 Central European Standard Time Heiko 
Stuebner wrote:
> This enables OTP support in the nvmem driver for rk3576.
> 
> I expect to pick the clock patch (patch1) and the arm64-dts patch (patch6)
> myself, after the nvmem-driver and -binding patches have been applied
> (patches 2-5).
> 
> But kept them together for people wanting to try this series.
> 
> changes in v2:
> - fix register constant in clock definition (Diederik)
> - add patch to set limits on variant-specific clock-names
> - use correct limits for clocks + resets on rk3576 binding
> 
> 
> RESEND, because I messed up my git-send-email which caused it to include
> the list of patches 2 times, duplicating everything :-( .
> 
> Heiko Stuebner (6):
>   clk: rockchip: rk3576: define clk_otp_phy_g
>   nvmem: rockchip-otp: Move read-offset into variant-data
>   dt-bindings: nvmem: rockchip,otp: add missing limits for clock-names
>   dt-bindings: nvmem: rockchip,otp: Add compatible for RK3576
>   nvmem: rockchip-otp: add rk3576 variant data
>   arm64: dts: rockchip: add rk3576 otp node
> 
>  .../bindings/nvmem/rockchip,otp.yaml          | 25 ++++++++++++
>  arch/arm64/boot/dts/rockchip/rk3576.dtsi      | 39 +++++++++++++++++++
>  drivers/clk/rockchip/clk-rk3576.c             |  2 +
>  drivers/nvmem/rockchip-otp.c                  | 17 +++++++-
>  4 files changed, 81 insertions(+), 2 deletions(-)

Hi Heiko,

for the entire series:

Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>

OTPs show up on my Sige5 RK3576 board and read fine. Also compared the OTP 
nodes to downstream and the values look consistent with that. The OTPs aren't 
documented in the TRM I have, so unfortunately I can't cross-reference that.

NB: patchwork's "Series" download for this series somehow lacks patch 2/6, 
which tripped me up at first. Not sure if that's a problem with patchwork or 
with how you sent the series out, but I thought I'd let others know who run 
into this.

Regards,
Nicolas Frattaroli




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

* Re: [PATCH RESEND v2 0/6] RK3576 OTP support
  2025-02-12 12:44 ` [PATCH RESEND v2 0/6] RK3576 OTP support Nicolas Frattaroli
@ 2025-02-12 12:56   ` Heiko Stübner
  0 siblings, 0 replies; 15+ messages in thread
From: Heiko Stübner @ 2025-02-12 12:56 UTC (permalink / raw)
  To: srinivas.kandagatla, linux-rockchip, Nicolas Frattaroli
  Cc: robh, krzk+dt, conor+dt, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel

Am Mittwoch, 12. Februar 2025, 13:44:15 MEZ schrieb Nicolas Frattaroli:
> On Monday, 10 February 2025 23:45:04 Central European Standard Time Heiko 
> Stuebner wrote:
> > This enables OTP support in the nvmem driver for rk3576.
> > 
> > I expect to pick the clock patch (patch1) and the arm64-dts patch (patch6)
> > myself, after the nvmem-driver and -binding patches have been applied
> > (patches 2-5).
> > 
> > But kept them together for people wanting to try this series.
> > 
> > changes in v2:
> > - fix register constant in clock definition (Diederik)
> > - add patch to set limits on variant-specific clock-names
> > - use correct limits for clocks + resets on rk3576 binding
> > 
> > 
> > RESEND, because I messed up my git-send-email which caused it to include
> > the list of patches 2 times, duplicating everything :-( .
> > 
> > Heiko Stuebner (6):
> >   clk: rockchip: rk3576: define clk_otp_phy_g
> >   nvmem: rockchip-otp: Move read-offset into variant-data
> >   dt-bindings: nvmem: rockchip,otp: add missing limits for clock-names
> >   dt-bindings: nvmem: rockchip,otp: Add compatible for RK3576
> >   nvmem: rockchip-otp: add rk3576 variant data
> >   arm64: dts: rockchip: add rk3576 otp node
> > 
> >  .../bindings/nvmem/rockchip,otp.yaml          | 25 ++++++++++++
> >  arch/arm64/boot/dts/rockchip/rk3576.dtsi      | 39 +++++++++++++++++++
> >  drivers/clk/rockchip/clk-rk3576.c             |  2 +
> >  drivers/nvmem/rockchip-otp.c                  | 17 +++++++-
> >  4 files changed, 81 insertions(+), 2 deletions(-)
> 
> Hi Heiko,
> 
> for the entire series:
> 
> Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> 
> OTPs show up on my Sige5 RK3576 board and read fine. Also compared the OTP 
> nodes to downstream and the values look consistent with that. The OTPs aren't 
> documented in the TRM I have, so unfortunately I can't cross-reference that.

thanks a lot for the testing :-)

> NB: patchwork's "Series" download for this series somehow lacks patch 2/6, 
> which tripped me up at first. Not sure if that's a problem with patchwork or 
> with how you sent the series out, but I thought I'd let others know who run 
> into this.

It looks like patchwork had a bigger hickup with my series.
Looking at the cover-letter in the Rockchip area of patchwork, it is
missing _all_ patches attached to it [0].

At least on the mainling list, everything seems to have arrived ok [1],
so would assume that's a patchwork thing.


[0] https://patchwork.kernel.org/project/linux-rockchip/cover/20250210224510.1194963-1-heiko@sntech.de/
[1] https://lore.kernel.org/all/20250210224510.1194963-1-heiko@sntech.de/



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

* Re: (subset) [PATCH RESEND v2 0/6] RK3576 OTP support
  2025-02-10 22:45 [PATCH RESEND v2 0/6] RK3576 OTP support Heiko Stuebner
                   ` (6 preceding siblings ...)
  2025-02-12 12:44 ` [PATCH RESEND v2 0/6] RK3576 OTP support Nicolas Frattaroli
@ 2025-02-17  9:53 ` Srinivas Kandagatla
  2025-03-18  9:15   ` Heiko Stübner
  2025-02-22 23:48 ` Heiko Stuebner
  2025-04-25 22:09 ` Heiko Stuebner
  9 siblings, 1 reply; 15+ messages in thread
From: Srinivas Kandagatla @ 2025-02-17  9:53 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: robh, krzk+dt, conor+dt, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel


On Mon, 10 Feb 2025 23:45:04 +0100, Heiko Stuebner wrote:
> This enables OTP support in the nvmem driver for rk3576.
> 
> I expect to pick the clock patch (patch1) and the arm64-dts patch (patch6)
> myself, after the nvmem-driver and -binding patches have been applied
> (patches 2-5).
> 
> But kept them together for people wanting to try this series.
> 
> [...]

Applied, thanks!

[1/6] clk: rockchip: rk3576: define clk_otp_phy_g
      commit: 3e081aa132bbefe31ac95dd6dfc8d787ffa83d0b
[2/6] nvmem: rockchip-otp: Move read-offset into variant-data
      commit: 024e21343f3cbcde0343473fcaf094d2c19cc7bf
[3/6] dt-bindings: nvmem: rockchip,otp: add missing limits for clock-names
      commit: a1bf00100d06ad69286154a63e548ae6f6ce8539
[4/6] dt-bindings: nvmem: rockchip,otp: Add compatible for RK3576
      commit: 8c94337ebbfb840944574f82df0cbe35930d8df8
[5/6] nvmem: rockchip-otp: add rk3576 variant data
      commit: c5ebefe4e20d9fd99ae49cbfd1c18632cf338fa5

Best regards,
-- 
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>


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

* Re: (subset) [PATCH RESEND v2 0/6] RK3576 OTP support
  2025-02-10 22:45 [PATCH RESEND v2 0/6] RK3576 OTP support Heiko Stuebner
                   ` (7 preceding siblings ...)
  2025-02-17  9:53 ` (subset) " Srinivas Kandagatla
@ 2025-02-22 23:48 ` Heiko Stuebner
  2025-04-25 22:09 ` Heiko Stuebner
  9 siblings, 0 replies; 15+ messages in thread
From: Heiko Stuebner @ 2025-02-22 23:48 UTC (permalink / raw)
  To: srinivas.kandagatla, Heiko Stuebner
  Cc: robh, krzk+dt, conor+dt, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel


On Mon, 10 Feb 2025 23:45:04 +0100, Heiko Stuebner wrote:
> This enables OTP support in the nvmem driver for rk3576.
> 
> I expect to pick the clock patch (patch1) and the arm64-dts patch (patch6)
> myself, after the nvmem-driver and -binding patches have been applied
> (patches 2-5).
> 
> But kept them together for people wanting to try this series.
> 
> [...]

Applied, thanks!

[6/6] arm64: dts: rockchip: add rk3576 otp node

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

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

* Re: (subset) [PATCH RESEND v2 0/6] RK3576 OTP support
  2025-02-17  9:53 ` (subset) " Srinivas Kandagatla
@ 2025-03-18  9:15   ` Heiko Stübner
  0 siblings, 0 replies; 15+ messages in thread
From: Heiko Stübner @ 2025-03-18  9:15 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: robh, krzk+dt, conor+dt, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel

Hi,

Am Montag, 17. Februar 2025, 10:53:16 MEZ schrieb Srinivas Kandagatla:
> 
> On Mon, 10 Feb 2025 23:45:04 +0100, Heiko Stuebner wrote:
> > This enables OTP support in the nvmem driver for rk3576.
> > 
> > I expect to pick the clock patch (patch1) and the arm64-dts patch (patch6)
> > myself, after the nvmem-driver and -binding patches have been applied
> > (patches 2-5).
> > 
> > But kept them together for people wanting to try this series.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/6] clk: rockchip: rk3576: define clk_otp_phy_g
>       commit: 3e081aa132bbefe31ac95dd6dfc8d787ffa83d0b

the applied message says you picked the clock patch, but it's not in your
tree - probably because you realized that it's a clock patch? :-)

So just to make sure it doesn't land in two trees, I should probably pick
up the patch for the Rockchip clock driver, right?


Thanks a lot
Heiko


> [2/6] nvmem: rockchip-otp: Move read-offset into variant-data
>       commit: 024e21343f3cbcde0343473fcaf094d2c19cc7bf
> [3/6] dt-bindings: nvmem: rockchip,otp: add missing limits for clock-names
>       commit: a1bf00100d06ad69286154a63e548ae6f6ce8539
> [4/6] dt-bindings: nvmem: rockchip,otp: Add compatible for RK3576
>       commit: 8c94337ebbfb840944574f82df0cbe35930d8df8
> [5/6] nvmem: rockchip-otp: add rk3576 variant data
>       commit: c5ebefe4e20d9fd99ae49cbfd1c18632cf338fa5
> 
> Best regards,
> 





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

* Re: (subset) [PATCH RESEND v2 0/6] RK3576 OTP support
  2025-02-10 22:45 [PATCH RESEND v2 0/6] RK3576 OTP support Heiko Stuebner
                   ` (8 preceding siblings ...)
  2025-02-22 23:48 ` Heiko Stuebner
@ 2025-04-25 22:09 ` Heiko Stuebner
  9 siblings, 0 replies; 15+ messages in thread
From: Heiko Stuebner @ 2025-04-25 22:09 UTC (permalink / raw)
  To: srinivas.kandagatla, Heiko Stuebner
  Cc: robh, krzk+dt, conor+dt, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, linux-clk, detlev.casanova,
	sebastian.reichel


On Mon, 10 Feb 2025 23:45:04 +0100, Heiko Stuebner wrote:
> This enables OTP support in the nvmem driver for rk3576.
> 
> I expect to pick the clock patch (patch1) and the arm64-dts patch (patch6)
> myself, after the nvmem-driver and -binding patches have been applied
> (patches 2-5).
> 
> But kept them together for people wanting to try this series.
> 
> [...]

Applied, thanks!

[1/6] clk: rockchip: rk3576: define clk_otp_phy_g
      commit: d934a93bbcccd551c142206b8129903d18126261

While the original nvmem applied message [0] listed the clock patch,
it was in fact not applied there - probable for being a clock patch.

So I've done that now, hopefully as fix for 6.15 to make the
nvmem work in this timeframe.


[0] https://lore.kernel.org/linux-arm-kernel/173978599692.25901.15315285566342669137.b4-ty@linaro.org/

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

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

end of thread, other threads:[~2025-04-25 22:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 22:45 [PATCH RESEND v2 0/6] RK3576 OTP support Heiko Stuebner
2025-02-10 22:45 ` [PATCH RESEND v2 1/6] clk: rockchip: rk3576: define clk_otp_phy_g Heiko Stuebner
2025-02-10 22:45 ` [PATCH RESEND v2 2/6] nvmem: rockchip-otp: Move read-offset into variant-data Heiko Stuebner
2025-02-10 22:45 ` [PATCH RESEND v2 3/6] dt-bindings: nvmem: rockchip,otp: add missing limits for clock-names Heiko Stuebner
2025-02-11 17:56   ` Conor Dooley
2025-02-10 22:45 ` [PATCH RESEND v2 4/6] dt-bindings: nvmem: rockchip,otp: Add compatible for RK3576 Heiko Stuebner
2025-02-11 17:55   ` Conor Dooley
2025-02-10 22:45 ` [PATCH RESEND v2 5/6] nvmem: rockchip-otp: add rk3576 variant data Heiko Stuebner
2025-02-10 22:45 ` [PATCH RESEND v2 6/6] arm64: dts: rockchip: add rk3576 otp node Heiko Stuebner
2025-02-12 12:44 ` [PATCH RESEND v2 0/6] RK3576 OTP support Nicolas Frattaroli
2025-02-12 12:56   ` Heiko Stübner
2025-02-17  9:53 ` (subset) " Srinivas Kandagatla
2025-03-18  9:15   ` Heiko Stübner
2025-02-22 23:48 ` Heiko Stuebner
2025-04-25 22:09 ` Heiko Stuebner

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).