devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Edwards <cfsworks@gmail.com>
To: Heiko Stuebner <heiko@sntech.de>
Cc: "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Ondrej Jirman" <megi@xff.cz>,
	"Chris Morgan" <macromorgan@hotmail.com>,
	"Alex Zhao" <zzc@rock-chips.com>,
	"Dragan Simic" <dsimic@manjaro.org>,
	"FUKAUMI Naoki" <naoki@radxa.com>,
	"Sebastian Reichel" <sebastian.reichel@collabora.com>,
	"Jing Luo" <jing@jing.rocks>,
	"Kever Yang" <kever.yang@rock-chips.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Daniel Kukieła" <daniel@kukiela.pl>,
	"Joshua Riek" <jjriek@verizon.net>,
	"Sam Edwards" <CFSworks@gmail.com>
Subject: [PATCH 5/5] arm64: dts: rockchip: Enable GPU on Turing RK1
Date: Wed, 11 Sep 2024 19:50:34 -0700	[thread overview]
Message-ID: <20240912025034.180233-6-CFSworks@gmail.com> (raw)
In-Reply-To: <20240912025034.180233-1-CFSworks@gmail.com>

Enable the Mali GPU in the Turing RK1.

This patch also sets the external GPU voltage regulator in the RK806-1
to "always-on" because it is necessary for this regulator to be active
when enabling the GPU power domain or the kernel will fail with:

rockchip-pm-domain fd8d8000.power-management:power-controller: \
    failed to set domain 'gpu', val=0
rockchip-pm-domain fd8d8000.power-management:power-controller: \
    failed to get ack on domain 'gpu', val=0x1bffff

...followed by a panic when it attempts to access unavailable QoS
registers.

Since there is currently no `domain-supply` or similar to express this
dependency, the only way to ensure that the regulator is never off when
the GPU power domain is brought up is to ensure that the regulator is
never off.

Signed-off-by: Sam Edwards <CFSworks@gmail.com>

---

Hi list,

This particular patch will probably need to be revisited once something
like [1] lands. I'm completely unable to get the GPU up and running
without some kind of solution to the power dependency issue, but it's
possible that this is because I'm just particularly unlucky in the
timing department.

Cheers,
Sam

[1]: https://lore.kernel.org/lkml/20240910180530.47194-7-sebastian.reichel@collabora.com/T/
---
 .../boot/dts/rockchip/rk3588-turing-rk1.dtsi     | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
index 6036c4fe6727..dedfb9ede4a3 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
@@ -116,6 +116,11 @@ &gmac1_rgmii_clk
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&vdd_gpu_s0>;
+	status = "okay";
+};
+
 &i2c0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c0m2_xfer>;
@@ -386,6 +391,17 @@ rk806_dvs3_null: dvs3-null-pins {
 
 		regulators {
 			vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
+				/*
+				 * RK3588's GPU power domain cannot be enabled
+				 * without this regulator active, but it
+				 * doesn't have to be on when the GPU PD is
+				 * disabled.  Because the PD binding does not
+				 * currently allow us to express this
+				 * relationship, we have no choice but to do
+				 * this instead:
+				 */
+				regulator-always-on;
+
 				regulator-boot-on;
 				regulator-min-microvolt = <550000>;
 				regulator-max-microvolt = <950000>;
-- 
2.44.2


  parent reply	other threads:[~2024-09-12  2:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12  2:50 [PATCH 0/5] Turing RK1 SoM DT updates Sam Edwards
2024-09-12  2:50 ` [PATCH 1/5] arm64: dts: rockchip: Split up RK3588's PCIe pinctrls Sam Edwards
2024-09-12  2:50 ` [PATCH 2/5] arm64: dts: rockchip: Fix Turing RK1 PCIe3 hang Sam Edwards
2024-09-12  2:50 ` [PATCH 3/5] arm64: dts: rockchip: Enable automatic fan control on Turing RK1 Sam Edwards
2024-09-12  2:50 ` [PATCH 4/5] arm64: dts: rockchip: Enable all 3 USBs " Sam Edwards
2024-09-12 19:53   ` Jonas Karlman
2024-09-12 21:06     ` Sam Edwards
2024-09-12 22:35       ` Jonas Karlman
2024-09-12 23:20         ` Sam Edwards
2024-09-12  2:50 ` Sam Edwards [this message]
2024-09-30 10:55 ` (subset) [PATCH 0/5] Turing RK1 SoM DT updates 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=20240912025034.180233-6-CFSworks@gmail.com \
    --to=cfsworks@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel@kukiela.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=dsimic@manjaro.org \
    --cc=heiko@sntech.de \
    --cc=jing@jing.rocks \
    --cc=jjriek@verizon.net \
    --cc=kever.yang@rock-chips.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=macromorgan@hotmail.com \
    --cc=megi@xff.cz \
    --cc=naoki@radxa.com \
    --cc=robh@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=zzc@rock-chips.com \
    /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).