public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Diederik de Haas" <diederik@cknow-tech.com>
To: "Heiko Stuebner" <heiko@sntech.de>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-rockchip@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <kever.yang@rock-chips.com>,
	<finley.xiao@rock-chips.com>, <w@1wt.eu>, <jonas@kwiboo.se>
Subject: Re: [PATCH v2 2/3] arm64: dts: rockchip: Enable OTP controller for RK356x
Date: Mon, 16 Mar 2026 17:22:05 +0100	[thread overview]
Message-ID: <DH4CF5YNUZ6S.3DOP275H6TBVN@cknow-tech.com> (raw)
In-Reply-To: <DH4BCBM75EA1.3S6GHUO64SAMA@cknow-tech.com>

Hi Heiko,

On Thu Mar 12, 2026 at 10:30 PM CET, Heiko Stuebner wrote:
> Enable the One Time Programmable Controller (OTPC) in RK356x and add
> an initial nvmem fixed layout.

I build a kernel with the nvmem patches and your patches from this
series and tried it out on my NanoPi R5S with a RK3568 SoC.
Navigating to ``/sys/bus/nvmem/devices/rockchip-otp0/cells`` and then
doing ``hexdump <cell-name>`` showed all kind of values.

Then I did the same with my PineNote with a RK3566 SoC and that gave
different values, except for npu-leakage, which I guess is fine?
So feel free to include my

Tested-by: Diederik de Haas <diederik@cknow-tech.com>  # NanoPi R5S, PineNote

Cheers,
  Diederik

> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
>  arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 46 +++++++++++++++++++
>  1 file changed, 46 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk356x-base.dtsi b/arch/arm64/boot/dts/rockchip/rk356x-base.dtsi
> index 68b48606f601..c8321af7de7d 100644
> --- a/arch/arm64/boot/dts/rockchip/rk356x-base.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk356x-base.dtsi
> @@ -1123,6 +1123,52 @@ rng: rng@fe388000 {
>  		status = "disabled";
>  	};
>  
> +	otp: efuse@fe38c000 {
> +		compatible = "rockchip,rk3568-otp";
> +		reg = <0x0 0xfe38c000 0x0 0x4000>;
> +		clocks = <&cru CLK_OTPC_NS_USR>, <&cru PCLK_OTPC_NS>,
> +			 <&cru PCLK_OTPPHY>, <&cru CLK_OTPC_NS_SBPI>;
> +		clock-names = "otp", "apb_pclk", "phy", "sbpi";
> +		resets = <&cru SRST_OTPC_NS_USR>, <&cru SRST_P_OTPC_NS>,
> +			 <&cru SRST_OTPPHY>, <&cru SRST_OTPC_NS_SBPI>;
> +		reset-names = "otp", "apb", "phy", "sbpi";
> +
> +		nvmem-layout {
> +			compatible = "fixed-layout";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			cpu_code: cpu-code@2 {
> +				reg = <0x02 0x2>;
> +			};
> +
> +			otp_cpu_version: cpu-version@8 {
> +				reg = <0x08 0x1>;
> +				bits = <3 3>;
> +			};
> +
> +			otp_id: id@a {
> +				reg = <0x0a 0x10>;
> +			};
> +
> +			cpu_leakage: cpu-leakage@1a {
> +				reg = <0x1a 0x1>;
> +			};
> +
> +			log_leakage: log-leakage@1b {
> +				reg = <0x1b 0x1>;
> +			};
> +
> +			npu_leakage: npu-leakage@1c {
> +				reg = <0x1c 0x1>;
> +			};
> +
> +			gpu_leakage: gpu-leakage@1d {
> +				reg = <0x1d 0x1>;
> +			};
> +		};
> +	};
> +
>  	i2s0_8ch: i2s@fe400000 {
>  		compatible = "rockchip,rk3568-i2s-tdm";
>  		reg = <0x0 0xfe400000 0x0 0x1000>;



  parent reply	other threads:[~2026-03-16 16:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 21:30 [PATCH v2 0/3] Add devicetree nodes for RK3528, RK3562 and RK356x Heiko Stuebner
2026-03-12 21:30 ` [PATCH v2 1/3] arm64: dts: rockchip: Enable OTP controller for RK3562 Heiko Stuebner
2026-03-12 21:30 ` [PATCH v2 2/3] arm64: dts: rockchip: Enable OTP controller for RK356x Heiko Stuebner
     [not found]   ` <DH4BCBM75EA1.3S6GHUO64SAMA@cknow-tech.com>
2026-03-16 16:22     ` Diederik de Haas [this message]
2026-03-12 21:30 ` [PATCH v2 3/3] arm64: dts: rockchip: Enable OTP controller for RK3528 Heiko Stuebner
2026-03-24 19:53 ` [PATCH v2 0/3] Add devicetree nodes for RK3528, RK3562 and RK356x Heiko Stuebner

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=DH4CF5YNUZ6S.3DOP275H6TBVN@cknow-tech.com \
    --to=diederik@cknow-tech.com \
    --cc=finley.xiao@rock-chips.com \
    --cc=heiko@sntech.de \
    --cc=jonas@kwiboo.se \
    --cc=kever.yang@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=w@1wt.eu \
    /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