From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.forwardemail.net (smtp.forwardemail.net [121.127.44.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE023358D32 for ; Sat, 13 Jun 2026 07:40:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=121.127.44.66 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781336459; cv=none; b=d6uai75mzBX9Y1a/j/f9lUn75a/Ohl2DAVDobOKQ3qXibsVyFXnJE8sJNi/vSc4uazlkGs8eZwux5CNRulzcdvg4fTpncTVZ/ulaeuBA7r0cClHm4yJg2dXbF/DdsXRAFCtfhEev/ciJd6ooM09Ke5U/HS1YHEe8uXtin9q3ziA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781336459; c=relaxed/simple; bh=vKxsuOnHElxYLABaCL+A4fJkjVhRZLYiku7c7WLPJOM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HYnN8dI435M/Z1SZxRpszbcAs/eXtEfH3y89u6EMaZjpZe2qjKHSWXFiwwof1g26qryjHvHLYoMVVkvej7dQ+5M3vfP8BKIRdeXWibcwMns6GonpbYnA+W6taEjmZtXN4VhT1lnnRVCsWyBQ2n3rQxqzUDljeGdxInRVn01y5bw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kwiboo.se; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b=izYoQy9t; arc=none smtp.client-ip=121.127.44.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kwiboo.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b="izYoQy9t" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: From: References: Cc: To: Subject: MIME-Version: Date: Message-ID; q=dns/txt; s=fe-e1b5cab7be; t=1781336457; bh=qHK4xcuZuyY3VWkKdAkc6bfYV2q4RPDKWtvw4p7wT+w=; b=izYoQy9tka7D95JBeXUBaGij0aYBCXQjYJNKT8Bezea1Qhfd4ABk/TVnW4QAvkAM3ZPmnjeGs JievOJnC4fZeyec9iG4rZmFOEEV+jGvfsfNjE6+q18F2NybRH7P2cfAdgAKh259aMUujPvSpQlZ lOL9l0+1DcjmCv2BvYPFEMoPeDCj3RvgAXDwwfHIDGMStDZ5cj2+v4e9W50wr81veRuiAxhw41o MhNTU7oVwjRoCjpHot7Art/3M6sBJHzxBywOadGqfR2MlZ64fikqQ+A2NM+az8SfdtykvmLhrvK TlQdn/q8aZ0hfDGvHw2xuNdQ8cBq7k50UvleoSXQR0sg== X-Forward-Email-ID: 6a2d09837f2a6d9c19af5dbd X-Forward-Email-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net, 121.127.44.66 X-Forward-Email-Version: 2.8.26 X-Forward-Email-Website: https://forwardemail.net X-Complaints-To: abuse@forwardemail.net X-Report-Abuse: abuse@forwardemail.net X-Report-Abuse-To: abuse@forwardemail.net Message-ID: Date: Sat, 13 Jun 2026 09:40:46 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v4 8/9] arm64: dts: rockchip: rk3568-rock-3b: Enable the NPU To: MidG971 Cc: "tomeu@tomeuvizoso.net" , "ogabbay@kernel.org" , "heiko@sntech.de" , "robh@kernel.org" , "krzk+dt@kernel.org" , "conor+dt@kernel.org" , "ulf.hansson@linaro.org" , "dri-devel@lists.freedesktop.org" , "linux-rockchip@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" , "iommu@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "xxm@rock-chips.com" , "chaoyi.chen@rock-chips.com" , "finley.xiao@rock-chips.com" , "diederik@cknow-tech.com" References: <20260613070116.438906-1-midgy971@gmail.com> <20260613070116.438906-9-midgy971@gmail.com> Content-Language: en-US From: Jonas Karlman In-Reply-To: <20260613070116.438906-9-midgy971@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Midgy, On 6/13/2026 9:01 AM, MidG971 wrote: > From: Midgy BALON > > Enable the NPU and its IOMMU on ROCK 3B and wire vdd_npu as the NPU > power domain's domain-supply, so genpd brings the rail up and down with > the domain (the domain is marked need_regulator). The PVTPLL compute > clock is brought up later by the driver. > > The rail is no longer kept always-on, so pin it to 1000 mV (the NPU's > 1 GHz operating voltage; the driver runs a fixed compute rate with no > devfreq voltage scaling) and mark it boot-on, so it is up before the > power domain de-idles the NPU NoC at power-on. > > Signed-off-by: Midgy BALON > --- > .../arm64/boot/dts/rockchip/rk3568-rock-3b.dts | 18 ++++++++++++++++-- > 1 file changed, 16 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts > index 69001e453732e..d3f9776c2bdc3 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts > +++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts > @@ -330,9 +330,10 @@ regulator-state-mem { > > vdd_npu: DCDC_REG4 { > regulator-name = "vdd_npu"; > + regulator-boot-on; There is no need for the NPU in the bootloader, do not use DT as a workaround for software issues. This series mention the PVTPLL NPU clk and seem to contains some workarounds related to how the PVTPLL clock is handled in TF-A. The PVTPLL block typically require the pclk and power domain enabled to function, and this series seem to add workarounds to try and ensure this, e.g. with noc_init to activate PVTPLL usage. I would suggest that you do not involve the PVTPLL clock in this initial NPU support for RK3568, set CLK_NPU to 400 MHz and use it instead of the SCMI clock, or keep SCMI clk rate less than or equal to 400 MHz to disable PVTPLL_NEED mode in TF-A. In a future series you can extend Linux with a proper PVTPLL clk driver and OPP support for the rocket driver to correctly ensure pclk and pd is enabled when a PVTPLL clock is managed. > regulator-initial-mode = <0x2>; > - regulator-min-microvolt = <500000>; > - regulator-max-microvolt = <1350000>; > + regulator-min-microvolt = <1000000>; > + regulator-max-microvolt = <1000000>; Please describe the HW, do not add workarounds for software issues or shortcomings. Regards, Jonas > regulator-ramp-delay = <6001>; > > regulator-state-mem { > @@ -787,3 +788,16 @@ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { > remote-endpoint = <&hdmi_in_vp0>; > }; > }; > + > +&pd_npu { > + domain-supply = <&vdd_npu>; > +}; > + > +&rknn_core_0 { > + npu-supply = <&vdd_npu>; > + status = "okay"; > +}; > + > +&rknn_mmu_0 { > + status = "okay"; > +};