Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH 1/2] clk: qcom: gcc-sdm660: Add missing SDCC block resets
@ 2025-01-29 17:18 Alexey Minnekhanov
  2025-01-29 17:18 ` [PATCH 2/2] arm64: dts: qcom: sdm630: Add missing resets to mmc blocks Alexey Minnekhanov
  2025-01-29 19:06 ` [PATCH 1/2] clk: qcom: gcc-sdm660: Add missing SDCC block resets Krzysztof Kozlowski
  0 siblings, 2 replies; 5+ messages in thread
From: Alexey Minnekhanov @ 2025-01-29 17:18 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Taniya Das, Craig Tatlor,
	linux-arm-msm, linux-clk, linux-kernel, devicetree
  Cc: ~postmarketos/upstreaming, phone-devel, Alexey Minnekhanov

This will allow linux to properly reset eMMC/SD blocks.

Fixes: f2a76a2955c0 ("clk: qcom: Add Global Clock controller (GCC) driver for SDM660")

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
---
 drivers/clk/qcom/gcc-sdm660.c               | 2 ++
 include/dt-bindings/clock/qcom,gcc-sdm660.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/clk/qcom/gcc-sdm660.c b/drivers/clk/qcom/gcc-sdm660.c
index df79298a1a25..1856a2d96dde 100644
--- a/drivers/clk/qcom/gcc-sdm660.c
+++ b/drivers/clk/qcom/gcc-sdm660.c
@@ -2420,6 +2420,8 @@ static struct gdsc *gcc_sdm660_gdscs[] = {
 static const struct qcom_reset_map gcc_sdm660_resets[] = {
 	[GCC_QUSB2PHY_PRIM_BCR] = { 0x12000 },
 	[GCC_QUSB2PHY_SEC_BCR] = { 0x12004 },
+	[GCC_SDCC1_BCR] = { 0x16000 },
+	[GCC_SDCC2_BCR] = { 0x14000 },
 	[GCC_UFS_BCR] = { 0x75000 },
 	[GCC_USB3_DP_PHY_BCR] = { 0x50028 },
 	[GCC_USB3_PHY_BCR] = { 0x50020 },
diff --git a/include/dt-bindings/clock/qcom,gcc-sdm660.h b/include/dt-bindings/clock/qcom,gcc-sdm660.h
index df8a6f3d367e..74c22f67da21 100644
--- a/include/dt-bindings/clock/qcom,gcc-sdm660.h
+++ b/include/dt-bindings/clock/qcom,gcc-sdm660.h
@@ -153,5 +153,7 @@
 #define GCC_USB_30_BCR			7
 #define GCC_USB_PHY_CFG_AHB2PHY_BCR	8
 #define GCC_MSS_RESTART			9
+#define GCC_SDCC1_BCR			10
+#define GCC_SDCC2_BCR			11
 
 #endif
-- 
2.45.3


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

* [PATCH 2/2] arm64: dts: qcom: sdm630: Add missing resets to mmc blocks
  2025-01-29 17:18 [PATCH 1/2] clk: qcom: gcc-sdm660: Add missing SDCC block resets Alexey Minnekhanov
@ 2025-01-29 17:18 ` Alexey Minnekhanov
  2025-01-29 19:06 ` [PATCH 1/2] clk: qcom: gcc-sdm660: Add missing SDCC block resets Krzysztof Kozlowski
  1 sibling, 0 replies; 5+ messages in thread
From: Alexey Minnekhanov @ 2025-01-29 17:18 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Alexey Minnekhanov

Add resets to eMMC/SD card blocks so linux can properly reset
them during initialization.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
---
 arch/arm64/boot/dts/qcom/sdm630.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi
index a2c079bac1a7..3722e405a97c 100644
--- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
@@ -1379,6 +1379,7 @@ sdhc_2: mmc@c084000 {
 					<&xo_board>;
 			clock-names = "iface", "core", "xo";
 
+			resets = <&gcc GCC_SDCC2_BCR>;
 
 			interconnects = <&a2noc 3 &a2noc 10>,
 					<&gnoc 0 &cnoc 28>;
@@ -1433,6 +1434,8 @@ sdhc_1: mmc@c0c4000 {
 				 <&gcc GCC_SDCC1_ICE_CORE_CLK>;
 			clock-names = "iface", "core", "xo", "ice";
 
+			resets = <&gcc GCC_SDCC1_BCR>;
+
 			interconnects = <&a2noc 2 &a2noc 10>,
 					<&gnoc 0 &cnoc 27>;
 			interconnect-names = "sdhc-ddr", "cpu-sdhc";
-- 
2.45.3


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

* Re: [PATCH 1/2] clk: qcom: gcc-sdm660: Add missing SDCC block resets
  2025-01-29 17:18 [PATCH 1/2] clk: qcom: gcc-sdm660: Add missing SDCC block resets Alexey Minnekhanov
  2025-01-29 17:18 ` [PATCH 2/2] arm64: dts: qcom: sdm630: Add missing resets to mmc blocks Alexey Minnekhanov
@ 2025-01-29 19:06 ` Krzysztof Kozlowski
  2025-01-29 20:52   ` Alexey Minnekhanov
  1 sibling, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-29 19:06 UTC (permalink / raw)
  To: Alexey Minnekhanov, Bjorn Andersson, Michael Turquette,
	Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Taniya Das, Craig Tatlor, linux-arm-msm, linux-clk, linux-kernel,
	devicetree
  Cc: ~postmarketos/upstreaming, phone-devel

On 29/01/2025 18:18, Alexey Minnekhanov wrote:
> This will allow linux to properly reset eMMC/SD blocks.
> 
> Fixes: f2a76a2955c0 ("clk: qcom: Add Global Clock controller (GCC) driver for SDM660")
> 

No line breaks between tags (see `git log`).

> Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
> ---

>  include/dt-bindings/clock/qcom,gcc-sdm660.h | 2 ++

That's a separate patch. Always.

Best regards,
Krzysztof

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

* Re: [PATCH 1/2] clk: qcom: gcc-sdm660: Add missing SDCC block resets
  2025-01-29 19:06 ` [PATCH 1/2] clk: qcom: gcc-sdm660: Add missing SDCC block resets Krzysztof Kozlowski
@ 2025-01-29 20:52   ` Alexey Minnekhanov
  2025-01-30  7:35     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey Minnekhanov @ 2025-01-29 20:52 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Michael Turquette,
	Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Taniya Das, Craig Tatlor, linux-arm-msm, linux-clk, linux-kernel,
	devicetree
  Cc: ~postmarketos/upstreaming, phone-devel

On 1/29/25 10:06 PM, Krzysztof Kozlowski wrote:
> 
> No line breaks between tags (see `git log`).
> 

Will fix in v2.

> 
>>   include/dt-bindings/clock/qcom,gcc-sdm660.h | 2 ++
> 
> That's a separate patch. Always.
> 

No big deal, but I've looked at git log and found previous commit 
b538304da785 ("clk: qcom: gcc-sdm660: Add missing modem reset") [1] that 
did similar things, but in a single patch, so I did the same.

Will fix in v2.

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b538304da7855f4e31f91f915f259936eb67a1e6

--
Regards,
Alexey

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

* Re: [PATCH 1/2] clk: qcom: gcc-sdm660: Add missing SDCC block resets
  2025-01-29 20:52   ` Alexey Minnekhanov
@ 2025-01-30  7:35     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-30  7:35 UTC (permalink / raw)
  To: Alexey Minnekhanov, Bjorn Andersson, Michael Turquette,
	Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Taniya Das, Craig Tatlor, linux-arm-msm, linux-clk, linux-kernel,
	devicetree
  Cc: ~postmarketos/upstreaming, phone-devel

On 29/01/2025 21:52, Alexey Minnekhanov wrote:
> On 1/29/25 10:06 PM, Krzysztof Kozlowski wrote:
>>
>> No line breaks between tags (see `git log`).
>>
> 
> Will fix in v2.
> 
>>
>>>   include/dt-bindings/clock/qcom,gcc-sdm660.h | 2 ++
>>
>> That's a separate patch. Always.
>>
> 
> No big deal, but I've looked at git log and found previous commit 
> b538304da785 ("clk: qcom: gcc-sdm660: Add missing modem reset") [1] that 
> did similar things, but in a single patch, so I did the same.
> 
> Will fix in v2.

Is there DT Ack for that commit? No.

You also marked this commit as fixes, so explain in commit msg
user-observable bug being fixed here.

Best regards,
Krzysztof

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

end of thread, other threads:[~2025-01-30  7:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-29 17:18 [PATCH 1/2] clk: qcom: gcc-sdm660: Add missing SDCC block resets Alexey Minnekhanov
2025-01-29 17:18 ` [PATCH 2/2] arm64: dts: qcom: sdm630: Add missing resets to mmc blocks Alexey Minnekhanov
2025-01-29 19:06 ` [PATCH 1/2] clk: qcom: gcc-sdm660: Add missing SDCC block resets Krzysztof Kozlowski
2025-01-29 20:52   ` Alexey Minnekhanov
2025-01-30  7:35     ` Krzysztof Kozlowski

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