From: "Heiko Stübner" <heiko@sntech.de>
To: "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Oded Gabbay" <ogabbay@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
"Sebastian Reichel" <sebastian.reichel@collabora.com>,
"Kever Yang" <kever.yang@rock-chips.com>,
"Robin Murphy" <robin.murphy@arm.com>,
"Daniel Stone" <daniel@fooishbar.org>,
"Da Xue" <da@libre.computer>,
"Jeff Hugo" <jeff.hugo@oss.qualcomm.com>,
"Tomeu Vizoso" <tomeu@tomeuvizoso.net>,
"Nicolas Frattaroli" <nicolas.frattaroli@collabora.com>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org,
linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org,
Tomeu Vizoso <tomeu@tomeuvizoso.net>
Subject: Re: [PATCH v7 10/10] arm64: dts: rockchip: enable NPU on ROCK 5B
Date: Sat, 07 Jun 2025 14:24:12 +0200 [thread overview]
Message-ID: <10540765.0AQdONaE2F@diego> (raw)
In-Reply-To: <6946302.MhkbZ0Pkbq@workhorse>
Am Freitag, 6. Juni 2025, 11:20:32 Mitteleuropäische Sommerzeit schrieb Nicolas Frattaroli:
> Hi Tomeu,
>
> On Friday, 6 June 2025 08:28:30 Central European Summer Time Tomeu Vizoso wrote:
> > From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> >
> > The NPU on the ROCK5B uses the same regulator for both the sram-supply
> > and the npu's supply. Add this regulator, and enable all the NPU bits.
> > Also add the regulator as a domain-supply to the pd_npu power domain.
> >
> > Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> > Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
> > ---
> > arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 56 +++++++++++++++++++++++++
> > 1 file changed, 56 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > index d22068475c5dc6cb885f878f3f527a66edf1ba70..49500f7cbcb14af4919a6c1997e9e53a01d84973 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > @@ -316,6 +316,28 @@ regulator-state-mem {
> > };
> > };
> >
> > +&i2c1 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c1m2_xfer>;
> > + status = "okay";
> > +
> > + vdd_npu_s0: regulator@42 {
> > + compatible = "rockchip,rk8602";
> > + reg = <0x42>;
> > + fcs,suspend-voltage-selector = <1>;
> > + regulator-name = "vdd_npu_s0";
> > + regulator-boot-on;
> > + regulator-min-microvolt = <550000>;
> > + regulator-max-microvolt = <950000>;
> > + regulator-ramp-delay = <2300>;
> > + vin-supply = <&vcc5v0_sys>;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +};
> > +
> > &i2c6 {
> > status = "okay";
> >
> > @@ -440,6 +462,10 @@ &pd_gpu {
> > domain-supply = <&vdd_gpu_s0>;
> > };
> >
> > +&pd_npu {
> > + domain-supply = <&vdd_npu_s0>;
> > +};
> > +
> > &pinctrl {
> > hdmirx {
> > hdmirx_hpd: hdmirx-5v-detection {
> > @@ -500,6 +526,36 @@ &pwm1 {
> > status = "okay";
> > };
> >
> > +&rknn_core_top {
> > + npu-supply = <&vdd_npu_s0>;
> > + sram-supply = <&vdd_npu_s0>;
> > + status = "okay";
> > +};
> > +
> > +&rknn_core_1 {
> > + npu-supply = <&vdd_npu_s0>;
> > + sram-supply = <&vdd_npu_s0>;
> > + status = "okay";
> > +};
> > +
> > +&rknn_core_2 {
> > + npu-supply = <&vdd_npu_s0>;
> > + sram-supply = <&vdd_npu_s0>;
> > + status = "okay";
> > +};
> > +
> > +&rknn_mmu_top {
> > + status = "okay";
> > +};
> > +
> > +&rknn_mmu_1 {
> > + status = "okay";
> > +};
> > +
> > +&rknn_mmu_2 {
> > + status = "okay";
> > +};
> > +
> > &saradc {
> > vref-supply = <&avcc_1v8_s0>;
> > status = "okay";
> >
> >
>
> Feel free to replace this patch with the following, if your series is
> based on linux-next or v6.16. It moves the enablement into the new
> shared ROCK 5B/5B+ dtsi, and I've added a regulator-enable-ramp-delay
> while I was at it because I've run into hard-to-reproduce problems
> relating to it before that Heiko quickly identified and fixed in his
> recent series[1] for basically all already present regulators. Remains
> to be seen if the final patch lands in that form but this should make
> it easier for people to try out as it means a bad luck roll for the
> day won't make them run into as many weird issues.
>
> [1]: https://lore.kernel.org/all/20250605185001.377055-1-heiko@sntech.de/
Reading that just now reminds me to point to
https://lore.kernel.org/lkml/20250606190418.478633-1-heiko@sntech.de/
As Chen Yu pointed out in the reply to v2, this is more a property of the
regulator IC itself, so likely should go into the driver.
So with a bit of luck after 6.16-rc1 all the fan53555 clones should use
somewhat hardware-accurate enable-times.
> From ff1c370a158f4340aa5dfa4ed5034e815e5371be Mon Sep 17 00:00:00 2001
> From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> Date: Tue, 3 Jun 2025 17:03:10 +0200
> Subject: [PATCH] arm64: dts: rockchip: enable NPU on ROCK 5B/+
>
> The NPU on the ROCK5B uses the same regulator for both the sram-supply
> and the npu's supply. Add this regulator, and enable all the NPU bits.
> Also add the regulator as a domain-supply to the pd_npu power domain.
>
> The 5B+'s regulator setup is identical to the 5B in this regard, so it
> goes in the shared .dtsi.
>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> ---
> .../boot/dts/rockchip/rk3588-rock-5b.dtsi | 57 +++++++++++++++++++
> 1 file changed, 57 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi
> index 51e83f0ed809..5a20cc2555fb 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi
> @@ -332,6 +332,29 @@ regulator-state-mem {
> };
> };
>
> +&i2c1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c1m2_xfer>;
> + status = "okay";
> +
> + vdd_npu_s0: regulator@42 {
> + compatible = "rockchip,rk8602";
> + reg = <0x42>;
> + fcs,suspend-voltage-selector = <1>;
> + regulator-name = "vdd_npu_s0";
> + regulator-boot-on;
> + regulator-enable-ramp-delay = <500>;
> + regulator-min-microvolt = <550000>;
> + regulator-max-microvolt = <950000>;
> + regulator-ramp-delay = <2300>;
> + vin-supply = <&vcc5v0_sys>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +};
> +
> &i2c3 {
I think your patch here has some other dependency still?
Because in the rk3588-rock-5b.dtsi there is no i2c3 yet
In torvalds' branch from _just now_ ;-) .
Heiko
> status = "okay";
> };
> @@ -521,6 +544,10 @@ &pd_gpu {
> domain-supply = <&vdd_gpu_s0>;
> };
>
> +&pd_npu {
> + domain-supply = <&vdd_npu_s0>;
> +};
> +
> &pinctrl {
> hdmirx {
> hdmirx_hpd: hdmirx-5v-detection {
> @@ -585,6 +612,36 @@ &pwm1 {
> status = "okay";
> };
>
> +&rknn_core_top {
> + npu-supply = <&vdd_npu_s0>;
> + sram-supply = <&vdd_npu_s0>;
> + status = "okay";
> +};
> +
> +&rknn_core_1 {
> + npu-supply = <&vdd_npu_s0>;
> + sram-supply = <&vdd_npu_s0>;
> + status = "okay";
> +};
> +
> +&rknn_core_2 {
> + npu-supply = <&vdd_npu_s0>;
> + sram-supply = <&vdd_npu_s0>;
> + status = "okay";
> +};
> +
> +&rknn_mmu_top {
> + status = "okay";
> +};
> +
> +&rknn_mmu_1 {
> + status = "okay";
> +};
> +
> +&rknn_mmu_2 {
> + status = "okay";
> +};
> +
> &saradc {
> vref-supply = <&avcc_1v8_s0>;
> status = "okay";
>
next prev parent reply other threads:[~2025-06-07 12:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 6:28 [PATCH v7 00/10] New DRM accel driver for Rockchip's RKNN NPU Tomeu Vizoso
2025-06-06 6:28 ` [PATCH v7 01/10] accel/rocket: Add registers header Tomeu Vizoso
2025-06-19 8:39 ` Robert Foss
2025-06-06 6:28 ` [PATCH v7 02/10] accel/rocket: Add a new driver for Rockchip's NPU Tomeu Vizoso
2025-06-19 8:59 ` Robert Foss
2025-07-11 17:38 ` Andrew Davis
2025-07-12 8:10 ` Tomeu Vizoso
2025-06-06 6:28 ` [PATCH v7 03/10] accel/rocket: Add IOCTL for BO creation Tomeu Vizoso
2025-06-24 10:17 ` Robin Murphy
2025-07-01 19:31 ` Heiko Stübner
2025-07-11 17:40 ` Andrew Davis
2025-06-06 6:28 ` [PATCH v7 04/10] accel/rocket: Add job submission IOCTL Tomeu Vizoso
2025-06-24 13:50 ` Robin Murphy
2025-07-11 16:00 ` Tomeu Vizoso
2025-07-11 16:40 ` Robin Murphy
2025-07-11 16:45 ` Tomeu Vizoso
2025-06-30 20:56 ` Rob Herring
2025-06-06 6:28 ` [PATCH v7 05/10] accel/rocket: Add IOCTLs for synchronizing memory accesses Tomeu Vizoso
2025-06-24 16:52 ` Robin Murphy
2025-06-06 6:28 ` [PATCH v7 06/10] dt-bindings: npu: rockchip,rknn: Add bindings Tomeu Vizoso
2025-06-24 13:27 ` Robin Murphy
2025-07-11 16:02 ` Tomeu Vizoso
2025-06-06 6:28 ` [PATCH v7 07/10] arm64: dts: rockchip: add pd_npu label for RK3588 power domains Tomeu Vizoso
2025-06-06 6:28 ` [PATCH v7 08/10] arm64: dts: rockchip: Add nodes for NPU and its MMU to rk3588-base Tomeu Vizoso
2025-06-06 6:28 ` [PATCH v7 09/10] arm64: dts: rockchip: Enable the NPU on quartzpro64 Tomeu Vizoso
2025-06-06 6:28 ` [PATCH v7 10/10] arm64: dts: rockchip: enable NPU on ROCK 5B Tomeu Vizoso
2025-06-06 9:20 ` Nicolas Frattaroli
2025-06-07 12:24 ` Heiko Stübner [this message]
2025-06-19 9:01 ` [PATCH v7 00/10] New DRM accel driver for Rockchip's RKNN NPU Heiko Stuebner
2025-06-20 9:28 ` Heiko Stuebner
2025-06-24 5:03 ` Tomeu Vizoso
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=10540765.0AQdONaE2F@diego \
--to=heiko@sntech.de \
--cc=airlied@gmail.com \
--cc=christian.koenig@amd.com \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=da@libre.computer \
--cc=daniel@fooishbar.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=kever.yang@rock-chips.com \
--cc=krzk+dt@kernel.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nicolas.frattaroli@collabora.com \
--cc=ogabbay@kernel.org \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=sebastian.reichel@collabora.com \
--cc=simona@ffwll.ch \
--cc=sumit.semwal@linaro.org \
--cc=tomeu@tomeuvizoso.net \
--cc=tzimmermann@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).