All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: sdm850-yoga: Reshuffle IPA memory mappings
@ 2021-09-16 20:05 Amit Pundir
  2021-09-17 15:16 ` Steev Klimaszewski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Amit Pundir @ 2021-09-16 20:05 UTC (permalink / raw)
  To: Bjorn Andersson, Andy Gross, Alex Elder, Rob Herring
  Cc: linux-arm-msm, dt, lkml

Upstream commit 2e01e0c21459 ("arm64: dts: qcom: sdm850-yoga:
Enable IPA") shuffled reserved memory regions in sdm845.dtsi
to make firmware loading succeed and enable the ipa device on
sdm845-yoga but it broke the other common users of those
memory regions like Xiaomi Pocophone F1.

So this patch effectively revert those upstream commit changes
and move all the relevant changes to sdm850-lenovo-yoga-c630.dts
instead.

Fixes: 2e01e0c21459 ("arm64: dts: qcom: sdm850-yoga: Enable IPA")
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
---
Smoke tested on PocoF1 and not on Yoga-C630.

 arch/arm64/boot/dts/qcom/sdm845.dtsi          | 21 +++++++-----
 .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 34 +++++++++++++++++++
 2 files changed, 47 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 6d7172e6f4c3..b3b911926184 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -128,23 +128,28 @@ camera_mem: memory@8bf00000 {
 			no-map;
 		};
 
-		wlan_msa_mem: memory@8c400000 {
-			reg = <0 0x8c400000 0 0x100000>;
+		ipa_fw_mem: memory@8c400000 {
+			reg = <0 0x8c400000 0 0x10000>;
 			no-map;
 		};
 
-		gpu_mem: memory@8c515000 {
-			reg = <0 0x8c515000 0 0x2000>;
+		ipa_gsi_mem: memory@8c410000 {
+			reg = <0 0x8c410000 0 0x5000>;
 			no-map;
 		};
 
-		ipa_fw_mem: memory@8c517000 {
-			reg = <0 0x8c517000 0 0x5a000>;
+		gpu_mem: memory@8c415000 {
+			reg = <0 0x8c415000 0 0x2000>;
 			no-map;
 		};
 
-		adsp_mem: memory@8c600000 {
-			reg = <0 0x8c600000 0 0x1a00000>;
+		adsp_mem: memory@8c500000 {
+			reg = <0 0x8c500000 0 0x1a00000>;
+			no-map;
+		};
+
+		wlan_msa_mem: memory@8df00000 {
+			reg = <0 0x8df00000 0 0x100000>;
 			no-map;
 		};
 
diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
index 385e5029437d..2ba23aa582a1 100644
--- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
+++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
@@ -16,6 +16,17 @@
 #include "sdm850.dtsi"
 #include "pm8998.dtsi"
 
+/*
+ * Update following upstream (sdm845.dtsi) reserved
+ * memory mappings for firmware loading to succeed
+ * and enable the IPA device.
+ */
+/delete-node/ &ipa_fw_mem;
+/delete-node/ &ipa_gsi_mem;
+/delete-node/ &gpu_mem;
+/delete-node/ &adsp_mem;
+/delete-node/ &wlan_msa_mem;
+
 / {
 	model = "Lenovo Yoga C630";
 	compatible = "lenovo,yoga-c630", "qcom,sdm845";
@@ -58,6 +69,29 @@ panel_in_edp: endpoint {
 		};
 	};
 
+	/* Reserved memory changes for IPA */
+	reserved-memory {
+		wlan_msa_mem: memory@8c400000 {
+			reg = <0 0x8c400000 0 0x100000>;
+			no-map;
+		};
+
+		gpu_mem: memory@8c515000 {
+			reg = <0 0x8c515000 0 0x2000>;
+			no-map;
+		};
+
+		ipa_fw_mem: memory@8c517000 {
+			reg = <0 0x8c517000 0 0x5a000>;
+			no-map;
+		};
+
+		adsp_mem: memory@8c600000 {
+			reg = <0 0x8c600000 0 0x1a00000>;
+			no-map;
+		};
+	};
+
 	sn65dsi86_refclk: sn65dsi86-refclk {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
-- 
2.25.1


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

* Re: [PATCH] arm64: dts: qcom: sdm850-yoga: Reshuffle IPA memory mappings
  2021-09-16 20:05 [PATCH] arm64: dts: qcom: sdm850-yoga: Reshuffle IPA memory mappings Amit Pundir
@ 2021-09-17 15:16 ` Steev Klimaszewski
  2021-09-20  0:23 ` Bjorn Andersson
  2021-09-20  0:30 ` patchwork-bot+linux-arm-msm
  2 siblings, 0 replies; 4+ messages in thread
From: Steev Klimaszewski @ 2021-09-17 15:16 UTC (permalink / raw)
  To: Amit Pundir, Bjorn Andersson, Andy Gross, Alex Elder, Rob Herring
  Cc: linux-arm-msm, dt, lkml


On 9/16/21 3:05 PM, Amit Pundir wrote:
> Upstream commit 2e01e0c21459 ("arm64: dts: qcom: sdm850-yoga:
> Enable IPA") shuffled reserved memory regions in sdm845.dtsi
> to make firmware loading succeed and enable the ipa device on
> sdm845-yoga but it broke the other common users of those
> memory regions like Xiaomi Pocophone F1.
>
> So this patch effectively revert those upstream commit changes
> and move all the relevant changes to sdm850-lenovo-yoga-c630.dts
> instead.
>
> Fixes: 2e01e0c21459 ("arm64: dts: qcom: sdm850-yoga: Enable IPA")
> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
> ---
> Smoke tested on PocoF1 and not on Yoga-C630.
>
>  arch/arm64/boot/dts/qcom/sdm845.dtsi          | 21 +++++++-----
>  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 34 +++++++++++++++++++
>  2 files changed, 47 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index 6d7172e6f4c3..b3b911926184 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -128,23 +128,28 @@ camera_mem: memory@8bf00000 {
>  			no-map;
>  		};
>  
> -		wlan_msa_mem: memory@8c400000 {
> -			reg = <0 0x8c400000 0 0x100000>;
> +		ipa_fw_mem: memory@8c400000 {
> +			reg = <0 0x8c400000 0 0x10000>;
>  			no-map;
>  		};
>  
> -		gpu_mem: memory@8c515000 {
> -			reg = <0 0x8c515000 0 0x2000>;
> +		ipa_gsi_mem: memory@8c410000 {
> +			reg = <0 0x8c410000 0 0x5000>;
>  			no-map;
>  		};
>  
> -		ipa_fw_mem: memory@8c517000 {
> -			reg = <0 0x8c517000 0 0x5a000>;
> +		gpu_mem: memory@8c415000 {
> +			reg = <0 0x8c415000 0 0x2000>;
>  			no-map;
>  		};
>  
> -		adsp_mem: memory@8c600000 {
> -			reg = <0 0x8c600000 0 0x1a00000>;
> +		adsp_mem: memory@8c500000 {
> +			reg = <0 0x8c500000 0 0x1a00000>;
> +			no-map;
> +		};
> +
> +		wlan_msa_mem: memory@8df00000 {
> +			reg = <0 0x8df00000 0 0x100000>;
>  			no-map;
>  		};
>  
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> index 385e5029437d..2ba23aa582a1 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> @@ -16,6 +16,17 @@
>  #include "sdm850.dtsi"
>  #include "pm8998.dtsi"
>  
> +/*
> + * Update following upstream (sdm845.dtsi) reserved
> + * memory mappings for firmware loading to succeed
> + * and enable the IPA device.
> + */
> +/delete-node/ &ipa_fw_mem;
> +/delete-node/ &ipa_gsi_mem;
> +/delete-node/ &gpu_mem;
> +/delete-node/ &adsp_mem;
> +/delete-node/ &wlan_msa_mem;
> +
>  / {
>  	model = "Lenovo Yoga C630";
>  	compatible = "lenovo,yoga-c630", "qcom,sdm845";
> @@ -58,6 +69,29 @@ panel_in_edp: endpoint {
>  		};
>  	};
>  
> +	/* Reserved memory changes for IPA */
> +	reserved-memory {
> +		wlan_msa_mem: memory@8c400000 {
> +			reg = <0 0x8c400000 0 0x100000>;
> +			no-map;
> +		};
> +
> +		gpu_mem: memory@8c515000 {
> +			reg = <0 0x8c515000 0 0x2000>;
> +			no-map;
> +		};
> +
> +		ipa_fw_mem: memory@8c517000 {
> +			reg = <0 0x8c517000 0 0x5a000>;
> +			no-map;
> +		};
> +
> +		adsp_mem: memory@8c600000 {
> +			reg = <0 0x8c600000 0 0x1a00000>;
> +			no-map;
> +		};
> +	};
> +
>  	sn65dsi86_refclk: sn65dsi86-refclk {
>  		compatible = "fixed-clock";
>  		#clock-cells = <0>;

Tested on the Lenovo Yoga C630 I have.  I get the ipa modem device, so it looks like it does the correct thing.  I don't have a SIM card to test actual connectivity though.

Tested-By: Steev Klimaszewski <steev@kali.org>


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

* Re: [PATCH] arm64: dts: qcom: sdm850-yoga: Reshuffle IPA memory mappings
  2021-09-16 20:05 [PATCH] arm64: dts: qcom: sdm850-yoga: Reshuffle IPA memory mappings Amit Pundir
  2021-09-17 15:16 ` Steev Klimaszewski
@ 2021-09-20  0:23 ` Bjorn Andersson
  2021-09-20  0:30 ` patchwork-bot+linux-arm-msm
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2021-09-20  0:23 UTC (permalink / raw)
  To: Amit Pundir; +Cc: Andy Gross, Alex Elder, Rob Herring, linux-arm-msm, dt, lkml

On Thu 16 Sep 13:05 PDT 2021, Amit Pundir wrote:

> Upstream commit 2e01e0c21459 ("arm64: dts: qcom: sdm850-yoga:
> Enable IPA") shuffled reserved memory regions in sdm845.dtsi
> to make firmware loading succeed and enable the ipa device on
> sdm845-yoga but it broke the other common users of those
> memory regions like Xiaomi Pocophone F1.
> 
> So this patch effectively revert those upstream commit changes
> and move all the relevant changes to sdm850-lenovo-yoga-c630.dts
> instead.
> 
> Fixes: 2e01e0c21459 ("arm64: dts: qcom: sdm850-yoga: Enable IPA")
> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

Thanks for the report and fix Amit, I verified that this works fine on
my Yoga as well.

Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
> Smoke tested on PocoF1 and not on Yoga-C630.
> 
>  arch/arm64/boot/dts/qcom/sdm845.dtsi          | 21 +++++++-----
>  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 34 +++++++++++++++++++
>  2 files changed, 47 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index 6d7172e6f4c3..b3b911926184 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -128,23 +128,28 @@ camera_mem: memory@8bf00000 {
>  			no-map;
>  		};
>  
> -		wlan_msa_mem: memory@8c400000 {
> -			reg = <0 0x8c400000 0 0x100000>;
> +		ipa_fw_mem: memory@8c400000 {
> +			reg = <0 0x8c400000 0 0x10000>;
>  			no-map;
>  		};
>  
> -		gpu_mem: memory@8c515000 {
> -			reg = <0 0x8c515000 0 0x2000>;
> +		ipa_gsi_mem: memory@8c410000 {
> +			reg = <0 0x8c410000 0 0x5000>;
>  			no-map;
>  		};
>  
> -		ipa_fw_mem: memory@8c517000 {
> -			reg = <0 0x8c517000 0 0x5a000>;
> +		gpu_mem: memory@8c415000 {
> +			reg = <0 0x8c415000 0 0x2000>;
>  			no-map;
>  		};
>  
> -		adsp_mem: memory@8c600000 {
> -			reg = <0 0x8c600000 0 0x1a00000>;
> +		adsp_mem: memory@8c500000 {
> +			reg = <0 0x8c500000 0 0x1a00000>;
> +			no-map;
> +		};
> +
> +		wlan_msa_mem: memory@8df00000 {
> +			reg = <0 0x8df00000 0 0x100000>;
>  			no-map;
>  		};
>  
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> index 385e5029437d..2ba23aa582a1 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> @@ -16,6 +16,17 @@
>  #include "sdm850.dtsi"
>  #include "pm8998.dtsi"
>  
> +/*
> + * Update following upstream (sdm845.dtsi) reserved
> + * memory mappings for firmware loading to succeed
> + * and enable the IPA device.
> + */
> +/delete-node/ &ipa_fw_mem;
> +/delete-node/ &ipa_gsi_mem;
> +/delete-node/ &gpu_mem;
> +/delete-node/ &adsp_mem;
> +/delete-node/ &wlan_msa_mem;
> +
>  / {
>  	model = "Lenovo Yoga C630";
>  	compatible = "lenovo,yoga-c630", "qcom,sdm845";
> @@ -58,6 +69,29 @@ panel_in_edp: endpoint {
>  		};
>  	};
>  
> +	/* Reserved memory changes for IPA */
> +	reserved-memory {
> +		wlan_msa_mem: memory@8c400000 {
> +			reg = <0 0x8c400000 0 0x100000>;
> +			no-map;
> +		};
> +
> +		gpu_mem: memory@8c515000 {
> +			reg = <0 0x8c515000 0 0x2000>;
> +			no-map;
> +		};
> +
> +		ipa_fw_mem: memory@8c517000 {
> +			reg = <0 0x8c517000 0 0x5a000>;
> +			no-map;
> +		};
> +
> +		adsp_mem: memory@8c600000 {
> +			reg = <0 0x8c600000 0 0x1a00000>;
> +			no-map;
> +		};
> +	};
> +
>  	sn65dsi86_refclk: sn65dsi86-refclk {
>  		compatible = "fixed-clock";
>  		#clock-cells = <0>;
> -- 
> 2.25.1
> 

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

* Re: [PATCH] arm64: dts: qcom: sdm850-yoga: Reshuffle IPA memory mappings
  2021-09-16 20:05 [PATCH] arm64: dts: qcom: sdm850-yoga: Reshuffle IPA memory mappings Amit Pundir
  2021-09-17 15:16 ` Steev Klimaszewski
  2021-09-20  0:23 ` Bjorn Andersson
@ 2021-09-20  0:30 ` patchwork-bot+linux-arm-msm
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-09-20  0:30 UTC (permalink / raw)
  To: Amit Pundir; +Cc: linux-arm-msm

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Fri, 17 Sep 2021 01:35:54 +0530 you wrote:
> Upstream commit 2e01e0c21459 ("arm64: dts: qcom: sdm850-yoga:
> Enable IPA") shuffled reserved memory regions in sdm845.dtsi
> to make firmware loading succeed and enable the ipa device on
> sdm845-yoga but it broke the other common users of those
> memory regions like Xiaomi Pocophone F1.
> 
> So this patch effectively revert those upstream commit changes
> and move all the relevant changes to sdm850-lenovo-yoga-c630.dts
> instead.
> 
> [...]

Here is the summary with links:
  - arm64: dts: qcom: sdm850-yoga: Reshuffle IPA memory mappings
    https://git.kernel.org/qcom/c/4420a0dec794

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-09-20  0:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 20:05 [PATCH] arm64: dts: qcom: sdm850-yoga: Reshuffle IPA memory mappings Amit Pundir
2021-09-17 15:16 ` Steev Klimaszewski
2021-09-20  0:23 ` Bjorn Andersson
2021-09-20  0:30 ` patchwork-bot+linux-arm-msm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.