mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] Add MDSS_CORE reset for SM6350 MDSS
@ 2025-09-19  9:57 Luca Weiss
  2025-09-19  9:57 ` [PATCH 1/3] dt-bindings: clock: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets Luca Weiss
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Luca Weiss @ 2025-09-19  9:57 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
	devicetree, linux-kernel, Luca Weiss

With v6.17-rc kernel, the display stack needs reference to the
MDSS_CORE, otherwise display init becomes quite broken.

Add the resets into the dispcc driver and add a reference to the dts.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Luca Weiss (3):
      dt-bindings: clock: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets
      clk: qcom: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets
      arm64: dts: qcom: sm6350: Add MDSS_CORE reset to mdss

 arch/arm64/boot/dts/qcom/sm6350.dtsi           | 2 ++
 drivers/clk/qcom/dispcc-sm6350.c               | 7 +++++++
 include/dt-bindings/clock/qcom,dispcc-sm6350.h | 4 ++++
 3 files changed, 13 insertions(+)
---
base-commit: f83ec76bf285bea5727f478a68b894f5543ca76e
change-id: 20250919-sm6350-mdss-reset-d7ab412d170a

Best regards,
-- 
Luca Weiss <luca.weiss@fairphone.com>


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

* [PATCH 1/3] dt-bindings: clock: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets
  2025-09-19  9:57 [PATCH 0/3] Add MDSS_CORE reset for SM6350 MDSS Luca Weiss
@ 2025-09-19  9:57 ` Luca Weiss
  2025-09-22 19:18   ` Rob Herring (Arm)
  2025-09-19  9:57 ` [PATCH 2/3] clk: qcom: " Luca Weiss
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Luca Weiss @ 2025-09-19  9:57 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
	devicetree, linux-kernel, Luca Weiss

Add the indexes for two resets inside the dispcc on SM6350 SoC.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 include/dt-bindings/clock/qcom,dispcc-sm6350.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/dt-bindings/clock/qcom,dispcc-sm6350.h b/include/dt-bindings/clock/qcom,dispcc-sm6350.h
index cb54aae2723e8f20ff3eebde3e15e862be750712..61426a80e620ac795b6f0ccda173654d7e47e59d 100644
--- a/include/dt-bindings/clock/qcom,dispcc-sm6350.h
+++ b/include/dt-bindings/clock/qcom,dispcc-sm6350.h
@@ -42,6 +42,10 @@
 #define DISP_CC_SLEEP_CLK			31
 #define DISP_CC_XO_CLK				32
 
+/* Resets */
+#define DISP_CC_MDSS_CORE_BCR			0
+#define DISP_CC_MDSS_RSCC_BCR			1
+
 /* GDSCs */
 #define MDSS_GDSC				0
 

-- 
2.51.0


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

* [PATCH 2/3] clk: qcom: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets
  2025-09-19  9:57 [PATCH 0/3] Add MDSS_CORE reset for SM6350 MDSS Luca Weiss
  2025-09-19  9:57 ` [PATCH 1/3] dt-bindings: clock: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets Luca Weiss
@ 2025-09-19  9:57 ` Luca Weiss
  2025-09-19 17:24   ` Dmitry Baryshkov
  2025-09-24 10:29   ` Konrad Dybcio
  2025-09-19  9:57 ` [PATCH 3/3] arm64: dts: qcom: sm6350: Add MDSS_CORE reset to mdss Luca Weiss
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 10+ messages in thread
From: Luca Weiss @ 2025-09-19  9:57 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
	devicetree, linux-kernel, Luca Weiss

Add the offsets for two resets inside the dispcc on SM6350 SoC.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 drivers/clk/qcom/dispcc-sm6350.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/clk/qcom/dispcc-sm6350.c b/drivers/clk/qcom/dispcc-sm6350.c
index b0bd163a449ccd2b27751e32eb17a982facf07d8..5b1d8f86515f251d90e01a4f3cb3b5582b5db683 100644
--- a/drivers/clk/qcom/dispcc-sm6350.c
+++ b/drivers/clk/qcom/dispcc-sm6350.c
@@ -679,6 +679,11 @@ static struct clk_branch disp_cc_xo_clk = {
 	},
 };
 
+static const struct qcom_reset_map disp_cc_sm6350_resets[] = {
+	[DISP_CC_MDSS_CORE_BCR] = { 0x1000 },
+	[DISP_CC_MDSS_RSCC_BCR] = { 0x2000 },
+};
+
 static struct gdsc mdss_gdsc = {
 	.gdscr = 0x1004,
 	.en_rest_wait_val = 0x2,
@@ -746,6 +751,8 @@ static const struct qcom_cc_desc disp_cc_sm6350_desc = {
 	.num_clks = ARRAY_SIZE(disp_cc_sm6350_clocks),
 	.gdscs = disp_cc_sm6350_gdscs,
 	.num_gdscs = ARRAY_SIZE(disp_cc_sm6350_gdscs),
+	.resets = disp_cc_sm6350_resets,
+	.num_resets = ARRAY_SIZE(disp_cc_sm6350_resets),
 };
 
 static const struct of_device_id disp_cc_sm6350_match_table[] = {

-- 
2.51.0


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

* [PATCH 3/3] arm64: dts: qcom: sm6350: Add MDSS_CORE reset to mdss
  2025-09-19  9:57 [PATCH 0/3] Add MDSS_CORE reset for SM6350 MDSS Luca Weiss
  2025-09-19  9:57 ` [PATCH 1/3] dt-bindings: clock: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets Luca Weiss
  2025-09-19  9:57 ` [PATCH 2/3] clk: qcom: " Luca Weiss
@ 2025-09-19  9:57 ` Luca Weiss
  2025-09-19 17:24   ` Dmitry Baryshkov
  2025-10-27 14:09 ` (subset) [PATCH 0/3] Add MDSS_CORE reset for SM6350 MDSS Bjorn Andersson
  2025-10-27 22:37 ` Bjorn Andersson
  4 siblings, 1 reply; 10+ messages in thread
From: Luca Weiss @ 2025-09-19  9:57 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
	devicetree, linux-kernel, Luca Weiss

Like on other platforms, if the OS does not support recovering the state
left by the bootloader it needs access to MDSS_CORE, so that it can
clear the MDSS configuration. Add a reference to the relevant reset.

This also fixes display init on Linux v6.17.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index ff1eb2c53e7b865350d00ffbfa82d7d1e3cc5aa0..929c8a8b2d446505228531bfc55f3350ef2980b7 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -2150,6 +2150,8 @@ &clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ALWAYS>,
 			power-domains = <&dispcc MDSS_GDSC>;
 			iommus = <&apps_smmu 0x800 0x2>;
 
+			resets = <&dispcc DISP_CC_MDSS_CORE_BCR>;
+
 			#address-cells = <2>;
 			#size-cells = <2>;
 			ranges;

-- 
2.51.0


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

* Re: [PATCH 2/3] clk: qcom: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets
  2025-09-19  9:57 ` [PATCH 2/3] clk: qcom: " Luca Weiss
@ 2025-09-19 17:24   ` Dmitry Baryshkov
  2025-09-24 10:29   ` Konrad Dybcio
  1 sibling, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2025-09-19 17:24 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
	devicetree, linux-kernel

On Fri, Sep 19, 2025 at 11:57:24AM +0200, Luca Weiss wrote:
> Add the offsets for two resets inside the dispcc on SM6350 SoC.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>  drivers/clk/qcom/dispcc-sm6350.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/clk/qcom/dispcc-sm6350.c b/drivers/clk/qcom/dispcc-sm6350.c
> index b0bd163a449ccd2b27751e32eb17a982facf07d8..5b1d8f86515f251d90e01a4f3cb3b5582b5db683 100644
> --- a/drivers/clk/qcom/dispcc-sm6350.c
> +++ b/drivers/clk/qcom/dispcc-sm6350.c
> @@ -679,6 +679,11 @@ static struct clk_branch disp_cc_xo_clk = {
>  	},
>  };
>  

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

* Re: [PATCH 3/3] arm64: dts: qcom: sm6350: Add MDSS_CORE reset to mdss
  2025-09-19  9:57 ` [PATCH 3/3] arm64: dts: qcom: sm6350: Add MDSS_CORE reset to mdss Luca Weiss
@ 2025-09-19 17:24   ` Dmitry Baryshkov
  0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2025-09-19 17:24 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
	devicetree, linux-kernel

On Fri, Sep 19, 2025 at 11:57:25AM +0200, Luca Weiss wrote:
> Like on other platforms, if the OS does not support recovering the state
> left by the bootloader it needs access to MDSS_CORE, so that it can
> clear the MDSS configuration. Add a reference to the relevant reset.
> 
> This also fixes display init on Linux v6.17.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

* Re: [PATCH 1/3] dt-bindings: clock: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets
  2025-09-19  9:57 ` [PATCH 1/3] dt-bindings: clock: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets Luca Weiss
@ 2025-09-22 19:18   ` Rob Herring (Arm)
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring (Arm) @ 2025-09-22 19:18 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Konrad Dybcio, Michael Turquette, Stephen Boyd, Conor Dooley,
	Bjorn Andersson, Krzysztof Kozlowski, ~postmarketos/upstreaming,
	phone-devel, linux-clk, linux-arm-msm, linux-kernel, devicetree


On Fri, 19 Sep 2025 11:57:23 +0200, Luca Weiss wrote:
> Add the indexes for two resets inside the dispcc on SM6350 SoC.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>  include/dt-bindings/clock/qcom,dispcc-sm6350.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH 2/3] clk: qcom: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets
  2025-09-19  9:57 ` [PATCH 2/3] clk: qcom: " Luca Weiss
  2025-09-19 17:24   ` Dmitry Baryshkov
@ 2025-09-24 10:29   ` Konrad Dybcio
  1 sibling, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2025-09-24 10:29 UTC (permalink / raw)
  To: Luca Weiss, Bjorn Andersson, Michael Turquette, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
	devicetree, linux-kernel

On 9/19/25 11:57 AM, Luca Weiss wrote:
> Add the offsets for two resets inside the dispcc on SM6350 SoC.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: (subset) [PATCH 0/3] Add MDSS_CORE reset for SM6350 MDSS
  2025-09-19  9:57 [PATCH 0/3] Add MDSS_CORE reset for SM6350 MDSS Luca Weiss
                   ` (2 preceding siblings ...)
  2025-09-19  9:57 ` [PATCH 3/3] arm64: dts: qcom: sm6350: Add MDSS_CORE reset to mdss Luca Weiss
@ 2025-10-27 14:09 ` Bjorn Andersson
  2025-10-27 22:37 ` Bjorn Andersson
  4 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2025-10-27 14:09 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Luca Weiss
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
	devicetree, linux-kernel


On Fri, 19 Sep 2025 11:57:22 +0200, Luca Weiss wrote:
> With v6.17-rc kernel, the display stack needs reference to the
> MDSS_CORE, otherwise display init becomes quite broken.
> 
> Add the resets into the dispcc driver and add a reference to the dts.
> 
> 

Applied, thanks!

[2/3] clk: qcom: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets
      commit: 502099e9c832c95b485835ff58a5f735d9d956a1

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

* Re: (subset) [PATCH 0/3] Add MDSS_CORE reset for SM6350 MDSS
  2025-09-19  9:57 [PATCH 0/3] Add MDSS_CORE reset for SM6350 MDSS Luca Weiss
                   ` (3 preceding siblings ...)
  2025-10-27 14:09 ` (subset) [PATCH 0/3] Add MDSS_CORE reset for SM6350 MDSS Bjorn Andersson
@ 2025-10-27 22:37 ` Bjorn Andersson
  4 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2025-10-27 22:37 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Luca Weiss
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
	devicetree, linux-kernel


On Fri, 19 Sep 2025 11:57:22 +0200, Luca Weiss wrote:
> With v6.17-rc kernel, the display stack needs reference to the
> MDSS_CORE, otherwise display init becomes quite broken.
> 
> Add the resets into the dispcc driver and add a reference to the dts.
> 
> 

Applied, thanks!

[3/3] arm64: dts: qcom: sm6350: Add MDSS_CORE reset to mdss
      commit: f618fef3f1a97395f73d028d925b021b0b204bea

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2025-10-27 22:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-19  9:57 [PATCH 0/3] Add MDSS_CORE reset for SM6350 MDSS Luca Weiss
2025-09-19  9:57 ` [PATCH 1/3] dt-bindings: clock: dispcc-sm6350: Add MDSS_CORE & MDSS_RSCC resets Luca Weiss
2025-09-22 19:18   ` Rob Herring (Arm)
2025-09-19  9:57 ` [PATCH 2/3] clk: qcom: " Luca Weiss
2025-09-19 17:24   ` Dmitry Baryshkov
2025-09-24 10:29   ` Konrad Dybcio
2025-09-19  9:57 ` [PATCH 3/3] arm64: dts: qcom: sm6350: Add MDSS_CORE reset to mdss Luca Weiss
2025-09-19 17:24   ` Dmitry Baryshkov
2025-10-27 14:09 ` (subset) [PATCH 0/3] Add MDSS_CORE reset for SM6350 MDSS Bjorn Andersson
2025-10-27 22:37 ` Bjorn Andersson

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

all inboxes | Powered by JetHome®