Devicetree
 help / color / mirror / Atom feed
* [PATCH v6 0/2] arm64: dts: qcom: fix power domain handling on SM8250
@ 2026-05-12 13:14 Dmitry Baryshkov
  2026-05-12 13:14 ` [PATCH v6 1/2] arm64: dts: qcom: sm8250: sort out Iris power domains Dmitry Baryshkov
  2026-05-12 13:14 ` [PATCH v6 2/2] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table Dmitry Baryshkov
  0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2026-05-12 13:14 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
	Rafael J. Wysocki, Bryan O'Donoghue, Vikash Garodia,
	Dikshita Agarwal, Mauro Carvalho Chehab, Stanimir Varbanov,
	Abhinav Kumar, Hans Verkuil, Stefan Schmidt, Konrad Dybcio,
	Bryan O'Donoghue, Dikshita Agarwal, Ulf Hansson
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
	linux-media, Mauro Carvalho Chehab, Konrad Dybcio

As pointed out by Konrad during the review of SM8350 / SC8280XP
patchset, Iris aka Venus description has several flows. It doesn't scale
MMCX, the frequencies in the OPP table are wrong, etc.

Let's correct the Iris/Venus enablement for SM8250 (unfortunately also
stopping it from being overclocked).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Changes in v6:
- Dropped patces, applied to media tree
- Corrected levels for MX rail. Dropped the review tags from the patch
  to enforce the review of MX levels.
- Link to v5: https://lore.kernel.org/r/20260209-iris-venus-fix-sm8250-v5-0-0a22365d3585@oss.qualcomm.com

Changes in v5:
- Fixed maxItemx -> maxItems typo
- Link to v4: https://lore.kernel.org/r/20260209-iris-venus-fix-sm8250-v4-0-9662a0471d82@oss.qualcomm.com

Changes in v4:
- Dropped MX voting by videocc: it's almost-always-on (Krzysztof)
- Restored minItems for the venus device, preserving the ABI (Krzysztof)
- Link to v3: https://lore.kernel.org/r/20260204-iris-venus-fix-sm8250-v3-0-70fa68e57f96@oss.qualcomm.com

Changes in v3:
- Dropped applied patch
- Fixed typos in the commit messages (Dikshita, Konrad)
- Corrected MX OPP levels (Dikshita)
- Switched Konrad from Suggested-by to Reported-by (Konrad)
- Link to v2: https://lore.kernel.org/r/20260201-iris-venus-fix-sm8250-v2-0-6f40d2605c89@oss.qualcomm.com

Changes in v2:
- Fixed example in the new sm8250-videocc schema
- Link to v1: https://lore.kernel.org/r/20260131-iris-venus-fix-sm8250-v1-0-b635ee66284c@oss.qualcomm.com

---
Dmitry Baryshkov (2):
      arm64: dts: qcom: sm8250: sort out Iris power domains
      arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table

 arch/arm64/boot/dts/qcom/sm8250.dtsi | 36 ++++++++++++++++++++++--------------
 1 file changed, 22 insertions(+), 14 deletions(-)
---
base-commit: e98d21c170b01ddef366f023bbfcf6b31509fa83
change-id: 20260131-iris-venus-fix-sm8250-f938e29e7497

Best regards,
--  
With best wishes
Dmitry


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

* [PATCH v6 1/2] arm64: dts: qcom: sm8250: sort out Iris power domains
  2026-05-12 13:14 [PATCH v6 0/2] arm64: dts: qcom: fix power domain handling on SM8250 Dmitry Baryshkov
@ 2026-05-12 13:14 ` Dmitry Baryshkov
  2026-05-13 21:42   ` sashiko-bot
  2026-05-12 13:14 ` [PATCH v6 2/2] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table Dmitry Baryshkov
  1 sibling, 1 reply; 4+ messages in thread
From: Dmitry Baryshkov @ 2026-05-12 13:14 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
	Rafael J. Wysocki, Bryan O'Donoghue, Vikash Garodia,
	Dikshita Agarwal, Mauro Carvalho Chehab, Stanimir Varbanov,
	Abhinav Kumar, Hans Verkuil, Stefan Schmidt, Konrad Dybcio,
	Bryan O'Donoghue, Dikshita Agarwal, Ulf Hansson
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
	linux-media, Mauro Carvalho Chehab, Konrad Dybcio

On SM8250 Iris core requires two power rails to function, MX (for PLLs)
and MMCX (for everything else). The commit fa245b3f06cd ("arm64: dts:
qcom: sm8250: Add venus DT node") added only MX power rail, but omitted
MMCX voltage levels.

Add MMCX domain to the Iris device node.

Fixes: fa245b3f06cd ("arm64: dts: qcom: sm8250: Add venus DT node")
Reported-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 7076720413ab..1fcbd400a3be 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -4326,8 +4326,12 @@ venus: video-codec@aa00000 {
 			interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
 			power-domains = <&videocc MVS0C_GDSC>,
 					<&videocc MVS0_GDSC>,
-					<&rpmhpd RPMHPD_MX>;
-			power-domain-names = "venus", "vcodec0", "mx";
+					<&rpmhpd RPMHPD_MX>,
+					<&rpmhpd RPMHPD_MMCX>;
+			power-domain-names = "venus",
+					     "vcodec0",
+					     "mx",
+					     "mmcx";
 			operating-points-v2 = <&venus_opp_table>;
 
 			clocks = <&gcc GCC_VIDEO_AXI0_CLK>,
@@ -4353,22 +4357,26 @@ venus_opp_table: opp-table {
 
 				opp-720000000 {
 					opp-hz = /bits/ 64 <720000000>;
-					required-opps = <&rpmhpd_opp_low_svs>;
+					required-opps = <&rpmhpd_opp_low_svs>,
+							<&rpmhpd_opp_low_svs>;
 				};
 
 				opp-1014000000 {
 					opp-hz = /bits/ 64 <1014000000>;
-					required-opps = <&rpmhpd_opp_svs>;
+					required-opps = <&rpmhpd_opp_svs>,
+							<&rpmhpd_opp_svs>;
 				};
 
 				opp-1098000000 {
 					opp-hz = /bits/ 64 <1098000000>;
-					required-opps = <&rpmhpd_opp_svs_l1>;
+					required-opps = <&rpmhpd_opp_svs_l1>,
+							<&rpmhpd_opp_svs_l1>;
 				};
 
 				opp-1332000000 {
 					opp-hz = /bits/ 64 <1332000000>;
-					required-opps = <&rpmhpd_opp_nom>;
+					required-opps = <&rpmhpd_opp_nom>,
+							<&rpmhpd_opp_nom>;
 				};
 			};
 		};

-- 
2.47.3


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

* [PATCH v6 2/2] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table
  2026-05-12 13:14 [PATCH v6 0/2] arm64: dts: qcom: fix power domain handling on SM8250 Dmitry Baryshkov
  2026-05-12 13:14 ` [PATCH v6 1/2] arm64: dts: qcom: sm8250: sort out Iris power domains Dmitry Baryshkov
@ 2026-05-12 13:14 ` Dmitry Baryshkov
  1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2026-05-12 13:14 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
	Rafael J. Wysocki, Bryan O'Donoghue, Vikash Garodia,
	Dikshita Agarwal, Mauro Carvalho Chehab, Stanimir Varbanov,
	Abhinav Kumar, Hans Verkuil, Stefan Schmidt, Konrad Dybcio,
	Bryan O'Donoghue, Dikshita Agarwal, Ulf Hansson
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
	linux-media, Mauro Carvalho Chehab, Konrad Dybcio

The OPP table for the Iris core is wrong, it copies the VDD table from
the downstream kernel, but that table is written for the
video_cc_mvs0_clk_src, while the upstream uses video_cc_mvs0_clk for OPP
rate setting (which is clk_src divided by 3). Specify correct
frequencies in the OPP table.

Fixes: fa245b3f06cd ("arm64: dts: qcom: sm8250: Add venus DT node")
Reported-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 1fcbd400a3be..9ef6f3df2d48 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -4355,26 +4355,26 @@ venus: video-codec@aa00000 {
 			venus_opp_table: opp-table {
 				compatible = "operating-points-v2";
 
-				opp-720000000 {
-					opp-hz = /bits/ 64 <720000000>;
+				opp-240000000 {
+					opp-hz = /bits/ 64 <240000000>;
 					required-opps = <&rpmhpd_opp_low_svs>,
 							<&rpmhpd_opp_low_svs>;
 				};
 
-				opp-1014000000 {
-					opp-hz = /bits/ 64 <1014000000>;
+				opp-338000000 {
+					opp-hz = /bits/ 64 <338000000>;
 					required-opps = <&rpmhpd_opp_svs>,
 							<&rpmhpd_opp_svs>;
 				};
 
-				opp-1098000000 {
-					opp-hz = /bits/ 64 <1098000000>;
+				opp-366000000 {
+					opp-hz = /bits/ 64 <366000000>;
 					required-opps = <&rpmhpd_opp_svs_l1>,
 							<&rpmhpd_opp_svs_l1>;
 				};
 
-				opp-1332000000 {
-					opp-hz = /bits/ 64 <1332000000>;
+				opp-444000000 {
+					opp-hz = /bits/ 64 <444000000>;
 					required-opps = <&rpmhpd_opp_nom>,
 							<&rpmhpd_opp_nom>;
 				};

-- 
2.47.3


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

* Re: [PATCH v6 1/2] arm64: dts: qcom: sm8250: sort out Iris power domains
  2026-05-12 13:14 ` [PATCH v6 1/2] arm64: dts: qcom: sm8250: sort out Iris power domains Dmitry Baryshkov
@ 2026-05-13 21:42   ` sashiko-bot
  0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-05-13 21:42 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: conor+dt, krzk+dt, robh, devicetree

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The Venus driver ignores the newly added 'mmcx' power domain, preventing its voltage levels from being scaled or enabled.
- [Low] The addition of a fourth power domain violates the existing device tree binding schema for the Venus node.
- [Low] Duplicate phandles to the same OPP table in `required-opps` violate the `opp-v2` device tree binding schema.
--

commit b2dff816f619c94b6f1db957c2bb928b6d9248f2
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

arm64: dts: qcom: sm8250: sort out Iris power domains

This commit adds the MMCX power domain to the Iris device node on SM8250
to support MMCX voltage levels. It updates the power-domains,
power-domain-names, and required-opps properties.

> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> index 7076720413ab2..1fcbd400a3be3 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> @@ -4326,8 +4326,12 @@ venus: video-codec@aa00000 {
>  			interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
>  			power-domains = <&videocc MVS0C_GDSC>,
>  					<&videocc MVS0_GDSC>,
> -					<&rpmhpd RPMHPD_MX>;
> -			power-domain-names = "venus", "vcodec0", "mx";
> +					<&rpmhpd RPMHPD_MX>,
> +					<&rpmhpd RPMHPD_MMCX>;
> +			power-domain-names = "venus",
> +					     "vcodec0",
> +					     "mx",
> +					     "mmcx";

Does this addition cause a device tree schema regression? The schema in
Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml currently
enforces maxItems: 3 for power-domains and restricts power-domain-names
to exactly "venus", "vcodec0", and "mx".

Will the qcom/venus driver actually attach to this new mmcx power domain?
Looking at drivers/media/platform/qcom/venus/pm_helpers.c,
vcodec_domains_get() initializes opp_pd_data with num_pd_names = 1, and the
hardware resource struct sm8250_res.opp_pmdomain in core.c only lists
{ "mx" }.

Since "mmcx" is not in this array, devm_pm_domain_attach_list() will only
attach "mx". This would cause opp_table->required_devs[1] to remain NULL,
and the OPP core might silently skip setting the performance state for MMCX.
Does the driver need an update to properly manage the MMCX rail?

[ ... ]

> @@ -4353,22 +4357,26 @@ venus_opp_table: opp-table {
>  
>  				opp-720000000 {
>  					opp-hz = /bits/ 64 <720000000>;
> -					required-opps = <&rpmhpd_opp_low_svs>;
> +					required-opps = <&rpmhpd_opp_low_svs>,
> +							<&rpmhpd_opp_low_svs>;

Could these duplicate phandles cause a schema validation regression?
The opp-v2 bindings in Documentation/devicetree/bindings/opp/opp-v2-base.yaml
explicitly state that required-opps should not contain multiple phandles to
the OPP nodes in the same OPP table.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260512-iris-venus-fix-sm8250-v6-0-51856dbef83c@oss.qualcomm.com?part=1

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

end of thread, other threads:[~2026-05-13 21:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 13:14 [PATCH v6 0/2] arm64: dts: qcom: fix power domain handling on SM8250 Dmitry Baryshkov
2026-05-12 13:14 ` [PATCH v6 1/2] arm64: dts: qcom: sm8250: sort out Iris power domains Dmitry Baryshkov
2026-05-13 21:42   ` sashiko-bot
2026-05-12 13:14 ` [PATCH v6 2/2] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox