linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: sdm850-yoga: Enable IPA
@ 2021-06-15 23:28 Bjorn Andersson
  2021-07-25  6:55 ` Steev Klimaszewski
  2021-09-16 10:52 ` Amit Pundir
  0 siblings, 2 replies; 5+ messages in thread
From: Bjorn Andersson @ 2021-06-15 23:28 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Alex Elder
  Cc: linux-arm-msm, devicetree, linux-kernel

Shuffle memory regions to make firmware loading succeed and then enable
the ipa device.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi          | 21 +++++++------------
 .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts |  5 +++++
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 1796ae8372be..49624eadce84 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -128,28 +128,23 @@ camera_mem: memory@8bf00000 {
 			no-map;
 		};
 
-		ipa_fw_mem: memory@8c400000 {
-			reg = <0 0x8c400000 0 0x10000>;
+		wlan_msa_mem: memory@8c400000 {
+			reg = <0 0x8c400000 0 0x100000>;
 			no-map;
 		};
 
-		ipa_gsi_mem: memory@8c410000 {
-			reg = <0 0x8c410000 0 0x5000>;
+		gpu_mem: memory@8c515000 {
+			reg = <0 0x8c515000 0 0x2000>;
 			no-map;
 		};
 
-		gpu_mem: memory@8c415000 {
-			reg = <0 0x8c415000 0 0x2000>;
+		ipa_fw_mem: memory@8c517000 {
+			reg = <0 0x8c517000 0 0x5a000>;
 			no-map;
 		};
 
-		adsp_mem: memory@8c500000 {
-			reg = <0 0x8c500000 0 0x1a00000>;
-			no-map;
-		};
-
-		wlan_msa_mem: memory@8df00000 {
-			reg = <0 0x8df00000 0 0x100000>;
+		adsp_mem: memory@8c600000 {
+			reg = <0 0x8c600000 0 0x1a00000>;
 			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 c2a709a384e9..3eaa42dc3794 100644
--- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
+++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
@@ -415,6 +415,11 @@ ecsh: hid@5c {
 	};
 };
 
+&ipa {
+	status = "okay";
+	memory-region = <&ipa_fw_mem>;
+};
+
 &mdss {
 	status = "okay";
 };
-- 
2.31.0


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

* Re: [PATCH] arm64: dts: qcom: sdm850-yoga: Enable IPA
  2021-06-15 23:28 [PATCH] arm64: dts: qcom: sdm850-yoga: Enable IPA Bjorn Andersson
@ 2021-07-25  6:55 ` Steev Klimaszewski
  2021-09-16 10:52 ` Amit Pundir
  1 sibling, 0 replies; 5+ messages in thread
From: Steev Klimaszewski @ 2021-07-25  6:55 UTC (permalink / raw)
  To: Bjorn Andersson, Andy Gross, Rob Herring, Alex Elder
  Cc: linux-arm-msm, devicetree, linux-kernel


On 6/15/21 6:28 PM, Bjorn Andersson wrote:
> Shuffle memory regions to make firmware loading succeed and then enable
> the ipa device.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sdm845.dtsi          | 21 +++++++------------
>  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts |  5 +++++
>  2 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index 1796ae8372be..49624eadce84 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -128,28 +128,23 @@ camera_mem: memory@8bf00000 {
>  			no-map;
>  		};
>  
> -		ipa_fw_mem: memory@8c400000 {
> -			reg = <0 0x8c400000 0 0x10000>;
> +		wlan_msa_mem: memory@8c400000 {
> +			reg = <0 0x8c400000 0 0x100000>;
>  			no-map;
>  		};
>  
> -		ipa_gsi_mem: memory@8c410000 {
> -			reg = <0 0x8c410000 0 0x5000>;
> +		gpu_mem: memory@8c515000 {
> +			reg = <0 0x8c515000 0 0x2000>;
>  			no-map;
>  		};
>  
> -		gpu_mem: memory@8c415000 {
> -			reg = <0 0x8c415000 0 0x2000>;
> +		ipa_fw_mem: memory@8c517000 {
> +			reg = <0 0x8c517000 0 0x5a000>;
>  			no-map;
>  		};
>  
> -		adsp_mem: memory@8c500000 {
> -			reg = <0 0x8c500000 0 0x1a00000>;
> -			no-map;
> -		};
> -
> -		wlan_msa_mem: memory@8df00000 {
> -			reg = <0 0x8df00000 0 0x100000>;
> +		adsp_mem: memory@8c600000 {
> +			reg = <0 0x8c600000 0 0x1a00000>;
>  			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 c2a709a384e9..3eaa42dc3794 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> @@ -415,6 +415,11 @@ ecsh: hid@5c {
>  	};
>  };
>  
> +&ipa {
> +	status = "okay";
> +	memory-region = <&ipa_fw_mem>;
> +};
> +
>  &mdss {
>  	status = "okay";
>  };


Hi,

Thank you for this!

Tested - one thing that end users/distro packagers may need to be aware
of, if the module is loaded in an initramfs, the firmware file also
needs to be loaded in the initramfs.  If the module is in an initramfs
and the firmware is not, the module will need to be removed and
re-inserted for the device to come up.

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


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

* Re: [PATCH] arm64: dts: qcom: sdm850-yoga: Enable IPA
  2021-06-15 23:28 [PATCH] arm64: dts: qcom: sdm850-yoga: Enable IPA Bjorn Andersson
  2021-07-25  6:55 ` Steev Klimaszewski
@ 2021-09-16 10:52 ` Amit Pundir
  2021-09-16 14:58   ` Bjorn Andersson
  1 sibling, 1 reply; 5+ messages in thread
From: Amit Pundir @ 2021-09-16 10:52 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Alex Elder, linux-arm-msm, dt, lkml

Hi Bjorn,

On Wed, 16 Jun 2021 at 04:58, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> Shuffle memory regions to make firmware loading succeed and then enable
> the ipa device.

Just a heads-up, this reserved memory region shuffling in sdm845.dtsi
broke PocoF1 and may be other devices too(?) which do not override
these regions.

IIRC you once had a patch to move the reserved memory regions to board
specific dts files, is it still on the cards so that we don't run into
breakages like this?

Meanwhile I'll go and add these regions in sdm845-xiaomi-beryllium.dts.

Regards,
Amit Pundir



>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sdm845.dtsi          | 21 +++++++------------
>  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts |  5 +++++
>  2 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index 1796ae8372be..49624eadce84 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -128,28 +128,23 @@ camera_mem: memory@8bf00000 {
>                         no-map;
>                 };
>
> -               ipa_fw_mem: memory@8c400000 {
> -                       reg = <0 0x8c400000 0 0x10000>;
> +               wlan_msa_mem: memory@8c400000 {
> +                       reg = <0 0x8c400000 0 0x100000>;
>                         no-map;
>                 };
>
> -               ipa_gsi_mem: memory@8c410000 {
> -                       reg = <0 0x8c410000 0 0x5000>;
> +               gpu_mem: memory@8c515000 {
> +                       reg = <0 0x8c515000 0 0x2000>;
>                         no-map;
>                 };
>
> -               gpu_mem: memory@8c415000 {
> -                       reg = <0 0x8c415000 0 0x2000>;
> +               ipa_fw_mem: memory@8c517000 {
> +                       reg = <0 0x8c517000 0 0x5a000>;
>                         no-map;
>                 };
>
> -               adsp_mem: memory@8c500000 {
> -                       reg = <0 0x8c500000 0 0x1a00000>;
> -                       no-map;
> -               };
> -
> -               wlan_msa_mem: memory@8df00000 {
> -                       reg = <0 0x8df00000 0 0x100000>;
> +               adsp_mem: memory@8c600000 {
> +                       reg = <0 0x8c600000 0 0x1a00000>;
>                         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 c2a709a384e9..3eaa42dc3794 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> @@ -415,6 +415,11 @@ ecsh: hid@5c {
>         };
>  };
>
> +&ipa {
> +       status = "okay";
> +       memory-region = <&ipa_fw_mem>;
> +};
> +
>  &mdss {
>         status = "okay";
>  };
> --
> 2.31.0
>

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

* Re: [PATCH] arm64: dts: qcom: sdm850-yoga: Enable IPA
  2021-09-16 10:52 ` Amit Pundir
@ 2021-09-16 14:58   ` Bjorn Andersson
  2021-09-16 20:10     ` Amit Pundir
  0 siblings, 1 reply; 5+ messages in thread
From: Bjorn Andersson @ 2021-09-16 14:58 UTC (permalink / raw)
  To: Amit Pundir; +Cc: Andy Gross, Rob Herring, Alex Elder, linux-arm-msm, dt, lkml

On Thu 16 Sep 03:52 PDT 2021, Amit Pundir wrote:

> Hi Bjorn,
> 
> On Wed, 16 Jun 2021 at 04:58, Bjorn Andersson
> <bjorn.andersson@linaro.org> wrote:
> >
> > Shuffle memory regions to make firmware loading succeed and then enable
> > the ipa device.
> 
> Just a heads-up, this reserved memory region shuffling in sdm845.dtsi
> broke PocoF1 and may be other devices too(?) which do not override
> these regions.
> 

Thanks for the report!

> IIRC you once had a patch to move the reserved memory regions to board
> specific dts files, is it still on the cards so that we don't run into
> breakages like this?
> 

As you might remember the feedback I got was to not move the regions to
the individual devices and it was better to just deal with the problem
this way...

But apparently I was too optimistic and should have played the usual
game of deleting the inherited nodes and made the changes in the yoga
dts...

> Meanwhile I'll go and add these regions in sdm845-xiaomi-beryllium.dts.
> 

Let's prepare a fix that moves this change into the yoga.dts and get
that landed asap.

Regards,
Bjorn

> Regards,
> Amit Pundir
> 
> 
> 
> >
> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > ---
> >  arch/arm64/boot/dts/qcom/sdm845.dtsi          | 21 +++++++------------
> >  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts |  5 +++++
> >  2 files changed, 13 insertions(+), 13 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > index 1796ae8372be..49624eadce84 100644
> > --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > @@ -128,28 +128,23 @@ camera_mem: memory@8bf00000 {
> >                         no-map;
> >                 };
> >
> > -               ipa_fw_mem: memory@8c400000 {
> > -                       reg = <0 0x8c400000 0 0x10000>;
> > +               wlan_msa_mem: memory@8c400000 {
> > +                       reg = <0 0x8c400000 0 0x100000>;
> >                         no-map;
> >                 };
> >
> > -               ipa_gsi_mem: memory@8c410000 {
> > -                       reg = <0 0x8c410000 0 0x5000>;
> > +               gpu_mem: memory@8c515000 {
> > +                       reg = <0 0x8c515000 0 0x2000>;
> >                         no-map;
> >                 };
> >
> > -               gpu_mem: memory@8c415000 {
> > -                       reg = <0 0x8c415000 0 0x2000>;
> > +               ipa_fw_mem: memory@8c517000 {
> > +                       reg = <0 0x8c517000 0 0x5a000>;
> >                         no-map;
> >                 };
> >
> > -               adsp_mem: memory@8c500000 {
> > -                       reg = <0 0x8c500000 0 0x1a00000>;
> > -                       no-map;
> > -               };
> > -
> > -               wlan_msa_mem: memory@8df00000 {
> > -                       reg = <0 0x8df00000 0 0x100000>;
> > +               adsp_mem: memory@8c600000 {
> > +                       reg = <0 0x8c600000 0 0x1a00000>;
> >                         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 c2a709a384e9..3eaa42dc3794 100644
> > --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> > +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> > @@ -415,6 +415,11 @@ ecsh: hid@5c {
> >         };
> >  };
> >
> > +&ipa {
> > +       status = "okay";
> > +       memory-region = <&ipa_fw_mem>;
> > +};
> > +
> >  &mdss {
> >         status = "okay";
> >  };
> > --
> > 2.31.0
> >

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

* Re: [PATCH] arm64: dts: qcom: sdm850-yoga: Enable IPA
  2021-09-16 14:58   ` Bjorn Andersson
@ 2021-09-16 20:10     ` Amit Pundir
  0 siblings, 0 replies; 5+ messages in thread
From: Amit Pundir @ 2021-09-16 20:10 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Alex Elder, linux-arm-msm, dt, lkml

On Thu, 16 Sept 2021 at 20:27, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> On Thu 16 Sep 03:52 PDT 2021, Amit Pundir wrote:
>
> > Hi Bjorn,
> >
> > On Wed, 16 Jun 2021 at 04:58, Bjorn Andersson
> > <bjorn.andersson@linaro.org> wrote:
> > >
> > > Shuffle memory regions to make firmware loading succeed and then enable
> > > the ipa device.
> >
> > Just a heads-up, this reserved memory region shuffling in sdm845.dtsi
> > broke PocoF1 and may be other devices too(?) which do not override
> > these regions.
> >
>
> Thanks for the report!
>
> > IIRC you once had a patch to move the reserved memory regions to board
> > specific dts files, is it still on the cards so that we don't run into
> > breakages like this?
> >
>
> As you might remember the feedback I got was to not move the regions to
> the individual devices and it was better to just deal with the problem
> this way...
>
> But apparently I was too optimistic and should have played the usual
> game of deleting the inherited nodes and made the changes in the yoga
> dts...
>
> > Meanwhile I'll go and add these regions in sdm845-xiaomi-beryllium.dts.
> >
>
> Let's prepare a fix that moves this change into the yoga.dts and get
> that landed asap.

Done https://patchwork.kernel.org/project/linux-arm-msm/patch/20210916200554.2434439-1-amit.pundir@linaro.org/

Smoke tested on PocoF1 only.

>
> Regards,
> Bjorn
>
> > Regards,
> > Amit Pundir
> >
> >
> >
> > >
> > > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > > ---
> > >  arch/arm64/boot/dts/qcom/sdm845.dtsi          | 21 +++++++------------
> > >  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts |  5 +++++
> > >  2 files changed, 13 insertions(+), 13 deletions(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > > index 1796ae8372be..49624eadce84 100644
> > > --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > > @@ -128,28 +128,23 @@ camera_mem: memory@8bf00000 {
> > >                         no-map;
> > >                 };
> > >
> > > -               ipa_fw_mem: memory@8c400000 {
> > > -                       reg = <0 0x8c400000 0 0x10000>;
> > > +               wlan_msa_mem: memory@8c400000 {
> > > +                       reg = <0 0x8c400000 0 0x100000>;
> > >                         no-map;
> > >                 };
> > >
> > > -               ipa_gsi_mem: memory@8c410000 {
> > > -                       reg = <0 0x8c410000 0 0x5000>;
> > > +               gpu_mem: memory@8c515000 {
> > > +                       reg = <0 0x8c515000 0 0x2000>;
> > >                         no-map;
> > >                 };
> > >
> > > -               gpu_mem: memory@8c415000 {
> > > -                       reg = <0 0x8c415000 0 0x2000>;
> > > +               ipa_fw_mem: memory@8c517000 {
> > > +                       reg = <0 0x8c517000 0 0x5a000>;
> > >                         no-map;
> > >                 };
> > >
> > > -               adsp_mem: memory@8c500000 {
> > > -                       reg = <0 0x8c500000 0 0x1a00000>;
> > > -                       no-map;
> > > -               };
> > > -
> > > -               wlan_msa_mem: memory@8df00000 {
> > > -                       reg = <0 0x8df00000 0 0x100000>;
> > > +               adsp_mem: memory@8c600000 {
> > > +                       reg = <0 0x8c600000 0 0x1a00000>;
> > >                         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 c2a709a384e9..3eaa42dc3794 100644
> > > --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> > > +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> > > @@ -415,6 +415,11 @@ ecsh: hid@5c {
> > >         };
> > >  };
> > >
> > > +&ipa {
> > > +       status = "okay";
> > > +       memory-region = <&ipa_fw_mem>;
> > > +};
> > > +
> > >  &mdss {
> > >         status = "okay";
> > >  };
> > > --
> > > 2.31.0
> > >

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 23:28 [PATCH] arm64: dts: qcom: sdm850-yoga: Enable IPA Bjorn Andersson
2021-07-25  6:55 ` Steev Klimaszewski
2021-09-16 10:52 ` Amit Pundir
2021-09-16 14:58   ` Bjorn Andersson
2021-09-16 20:10     ` Amit Pundir

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).