devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] IPA support on qcm2290
@ 2024-12-20  7:35 Wojciech Slenska
  2024-12-20  7:35 ` [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible Wojciech Slenska
  2024-12-20  7:35 ` [PATCH 2/2] arm64: dts: qcom: qcm2290: Add IPA nodes Wojciech Slenska
  0 siblings, 2 replies; 12+ messages in thread
From: Wojciech Slenska @ 2024-12-20  7:35 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alex Elder, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, netdev, Wojciech Slenska

Patches added IPA support for qcm2290.
Configuration is based on sc7180, becouse both has the same
IPA version 4.2.

Wojciech Slenska (2):
  dt-bindings: net: qcom,ipa: document qcm2290 compatible
  arm64: dts: qcom: qcm2290: Add IPA nodes

 .../devicetree/bindings/net/qcom,ipa.yaml     |  4 ++
 arch/arm64/boot/dts/qcom/qcm2290.dtsi         | 52 +++++++++++++++++++
 2 files changed, 56 insertions(+)

-- 
2.34.1


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

* [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible
  2024-12-20  7:35 [PATCH 0/2] IPA support on qcm2290 Wojciech Slenska
@ 2024-12-20  7:35 ` Wojciech Slenska
  2024-12-20 13:25   ` Konrad Dybcio
  2024-12-21 20:44   ` Krzysztof Kozlowski
  2024-12-20  7:35 ` [PATCH 2/2] arm64: dts: qcom: qcm2290: Add IPA nodes Wojciech Slenska
  1 sibling, 2 replies; 12+ messages in thread
From: Wojciech Slenska @ 2024-12-20  7:35 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alex Elder, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, netdev, Wojciech Slenska

Document that ipa on qcm2290 uses version 4.2, the same
as sc7180.

Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com>
---
 Documentation/devicetree/bindings/net/qcom,ipa.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
index 53cae71d9957..ea44d02d1e5c 100644
--- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml
+++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
@@ -58,6 +58,10 @@ properties:
           - enum:
               - qcom,sm8650-ipa
           - const: qcom,sm8550-ipa
+      - items:
+          - enum:
+              - qcom,qcm2290-ipa
+          - const: qcom,sc7180-ipa
 
   reg:
     items:
-- 
2.34.1


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

* [PATCH 2/2] arm64: dts: qcom: qcm2290: Add IPA nodes
  2024-12-20  7:35 [PATCH 0/2] IPA support on qcm2290 Wojciech Slenska
  2024-12-20  7:35 ` [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible Wojciech Slenska
@ 2024-12-20  7:35 ` Wojciech Slenska
  2025-05-23 19:39   ` Konrad Dybcio
  1 sibling, 1 reply; 12+ messages in thread
From: Wojciech Slenska @ 2024-12-20  7:35 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alex Elder, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, netdev, Wojciech Slenska

Added IPA nodes and definitions.

Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com>
---
 arch/arm64/boot/dts/qcom/qcm2290.dtsi | 52 +++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
index 79bc42ffb6a1..0d39fd73888a 100644
--- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
@@ -428,6 +428,17 @@ wlan_smp2p_in: wlan-wpss-to-ap {
 			interrupt-controller;
 			#interrupt-cells = <2>;
 		};
+
+		ipa_smp2p_out: ipa-ap-to-modem {
+			qcom,entry-name = "ipa";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		ipa_smp2p_in: ipa-modem-to-ap {
+			qcom,entry-name = "ipa";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
 	};
 
 	soc: soc@0 {
@@ -1431,6 +1442,47 @@ usb_dwc3_ss: endpoint {
 			};
 		};
 
+		ipa: ipa@5840000 {
+			compatible = "qcom,qcm2290-ipa", "qcom,sc7180-ipa";
+
+			iommus = <&apps_smmu 0x140 0x0>;
+			reg = <0x0 0x5840000 0x0 0x7000>,
+			      <0x0 0x5847000 0x0 0x2000>,
+			      <0x0 0x5804000 0x0 0x2c000>;
+			reg-names = "ipa-reg",
+				    "ipa-shared",
+				    "gsi";
+
+			interrupts-extended = <&intc GIC_SPI 257 IRQ_TYPE_EDGE_RISING>,
+					      <&intc GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>,
+					      <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+					      <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "ipa",
+					  "gsi",
+					  "ipa-clock-query",
+					  "ipa-setup-ready";
+
+			clocks = <&rpmcc RPM_SMD_IPA_CLK>;
+			clock-names = "core";
+
+			interconnects = <&system_noc MASTER_IPA RPM_ALWAYS_TAG
+					 &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>,
+					<&system_noc MASTER_IPA RPM_ALWAYS_TAG
+					 &system_noc SLAVE_IMEM RPM_ALWAYS_TAG>,
+					<&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+					 &config_noc SLAVE_IPA_CFG RPM_ALWAYS_TAG>;
+			interconnect-names = "memory",
+					     "imem",
+					     "config";
+
+			qcom,smem-states = <&ipa_smp2p_out 0>,
+					   <&ipa_smp2p_out 1>;
+			qcom,smem-state-names = "ipa-clock-enabled-valid",
+						"ipa-clock-enabled";
+
+			status = "disabled";
+		};
+
 		gpu: gpu@5900000 {
 			compatible = "qcom,adreno-07000200", "qcom,adreno";
 			reg = <0x0 0x05900000 0x0 0x40000>;
-- 
2.34.1


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

* Re: [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible
  2024-12-20  7:35 ` [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible Wojciech Slenska
@ 2024-12-20 13:25   ` Konrad Dybcio
  2024-12-24 15:11     ` Alex Elder
  2025-05-23 18:58     ` Alex Elder
  2024-12-21 20:44   ` Krzysztof Kozlowski
  1 sibling, 2 replies; 12+ messages in thread
From: Konrad Dybcio @ 2024-12-20 13:25 UTC (permalink / raw)
  To: Wojciech Slenska, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alex Elder, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, netdev

On 20.12.2024 8:35 AM, Wojciech Slenska wrote:
> Document that ipa on qcm2290 uses version 4.2, the same
> as sc7180.
> 
> Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com>
> ---

FWIW this needs some more work on the Linux side, the IPA driver
currently hardcodes a reference to IMEM, which has a different
base between these two SoCs.

The IMEM region doesn't seem to be used as of current, but things
will explode the second it is.

A long overdue update would be to make the IPA driver consume
a syscon/memory-region-like property pointing to IMEM (or a slice
of it, maybe Alex knows what it was supposed to be used for).

Konrad

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

* Re: [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible
  2024-12-20  7:35 ` [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible Wojciech Slenska
  2024-12-20 13:25   ` Konrad Dybcio
@ 2024-12-21 20:44   ` Krzysztof Kozlowski
  2025-05-22 23:30     ` Konrad Dybcio
  1 sibling, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-21 20:44 UTC (permalink / raw)
  To: Wojciech Slenska, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alex Elder, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, netdev

On 20/12/2024 08:35, Wojciech Slenska wrote:
> Document that ipa on qcm2290 uses version 4.2, the same
> as sc7180.
> 
> Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com>
> ---
>  Documentation/devicetree/bindings/net/qcom,ipa.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
> index 53cae71d9957..ea44d02d1e5c 100644
> --- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml
> +++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
> @@ -58,6 +58,10 @@ properties:
>            - enum:
>                - qcom,sm8650-ipa
>            - const: qcom,sm8550-ipa
> +      - items:
> +          - enum:
> +              - qcom,qcm2290-ipa
> +          - const: qcom,sc7180-ipa
>  
We usually keep such lists between each other ordered by fallback, so
this should go before sm8550-fallback-list.

With that change:

Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible
  2024-12-20 13:25   ` Konrad Dybcio
@ 2024-12-24 15:11     ` Alex Elder
  2025-05-23 18:58     ` Alex Elder
  1 sibling, 0 replies; 12+ messages in thread
From: Alex Elder @ 2024-12-24 15:11 UTC (permalink / raw)
  To: Konrad Dybcio, Wojciech Slenska, Andrew Lunn, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Alex Elder, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, netdev

On 12/20/24 7:25 AM, Konrad Dybcio wrote:
> On 20.12.2024 8:35 AM, Wojciech Slenska wrote:
>> Document that ipa on qcm2290 uses version 4.2, the same
>> as sc7180.
>>
>> Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com>
>> ---
> 
> FWIW this needs some more work on the Linux side, the IPA driver
> currently hardcodes a reference to IMEM, which has a different
> base between these two SoCs.

I have only glanced at this so far.  At the moment I don't
know whether this device uses a different range in IMEM, but
Konrad's message suggests it does.  And if so, he's correct:
the IMEM range needs to be defined differently (perhaps in
Device Tree) so that different SoCs using the same version
of IPA but different IMEM ranges can function correctly.

Downstream code should be consulted to determine this, and
as of now I have not done that.

					-Alex

> The IMEM region doesn't seem to be used as of current, but things
> will explode the second it is.
> 
> A long overdue update would be to make the IPA driver consume
> a syscon/memory-region-like property pointing to IMEM (or a slice
> of it, maybe Alex knows what it was supposed to be used for).
> 
> Konrad


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

* Re: [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible
  2024-12-21 20:44   ` Krzysztof Kozlowski
@ 2025-05-22 23:30     ` Konrad Dybcio
  2025-05-23  6:51       ` Wojciech Sleńska
  2025-05-26 19:39       ` Wojciech Sleńska
  0 siblings, 2 replies; 12+ messages in thread
From: Konrad Dybcio @ 2025-05-22 23:30 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Wojciech Slenska, Andrew Lunn,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alex Elder,
	Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, netdev

On 12/21/24 9:44 PM, Krzysztof Kozlowski wrote:
> On 20/12/2024 08:35, Wojciech Slenska wrote:
>> Document that ipa on qcm2290 uses version 4.2, the same
>> as sc7180.
>>
>> Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com>
>> ---
>>  Documentation/devicetree/bindings/net/qcom,ipa.yaml | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
>> index 53cae71d9957..ea44d02d1e5c 100644
>> --- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml
>> +++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
>> @@ -58,6 +58,10 @@ properties:
>>            - enum:
>>                - qcom,sm8650-ipa
>>            - const: qcom,sm8550-ipa
>> +      - items:
>> +          - enum:
>> +              - qcom,qcm2290-ipa
>> +          - const: qcom,sc7180-ipa
>>  
> We usually keep such lists between each other ordered by fallback, so
> this should go before sm8550-fallback-list.
> 
> With that change:
> 
> Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

(half a year later)

I've now sent a series that resolves the issue described in the
other branch of this thread. Feel free to pick up this binding
Krzysztof/Rob/Kuba.



Patch 2 will need an update and some prerequisite changes.
Wojciech, you'll need:

https://lore.kernel.org/linux-arm-msm/20250523-topic-ipa_imem-v1-0-b5d536291c7f@oss.qualcomm.com
https://lore.kernel.org/linux-arm-msm/20250523-topic-ipa_mem_dts-v1-0-f7aa94fac1ab@oss.qualcomm.com
https://github.com/quic-kdybcio/linux/commits/topic/ipa_qcm2290

and a snippet like 

-----------o<-----------------------------------
 			qcom,smem-state-names = "ipa-clock-enabled-valid",
 						"ipa-clock-enabled";
 
+			sram = <&ipa_modem_tables>;
+
 			status = "disabled";
-----------o<-----------------------------------

added to your DT change

please let me know if it works with the above

if you're not interested anymore or don't have the board on hand,
I can take up your patch, preserving your authorship ofc

Konrad

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

* Re: [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible
  2025-05-22 23:30     ` Konrad Dybcio
@ 2025-05-23  6:51       ` Wojciech Sleńska
  2025-05-26 19:39       ` Wojciech Sleńska
  1 sibling, 0 replies; 12+ messages in thread
From: Wojciech Sleńska @ 2025-05-23  6:51 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Krzysztof Kozlowski, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alex Elder, Bjorn Andersson, Konrad Dybcio,
	linux-arm-msm, devicetree, linux-kernel, netdev

pt., 23 maj 2025 o 01:30 Konrad Dybcio
<konrad.dybcio@oss.qualcomm.com> napisał(a):
>
> On 12/21/24 9:44 PM, Krzysztof Kozlowski wrote:
> > On 20/12/2024 08:35, Wojciech Slenska wrote:
> >> Document that ipa on qcm2290 uses version 4.2, the same
> >> as sc7180.
> >>
> >> Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com>
> >> ---
> >>  Documentation/devicetree/bindings/net/qcom,ipa.yaml | 4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
> >> index 53cae71d9957..ea44d02d1e5c 100644
> >> --- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml
> >> +++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
> >> @@ -58,6 +58,10 @@ properties:
> >>            - enum:
> >>                - qcom,sm8650-ipa
> >>            - const: qcom,sm8550-ipa
> >> +      - items:
> >> +          - enum:
> >> +              - qcom,qcm2290-ipa
> >> +          - const: qcom,sc7180-ipa
> >>
> > We usually keep such lists between each other ordered by fallback, so
> > this should go before sm8550-fallback-list.
> >
> > With that change:
> >
> > Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> (half a year later)
>
> I've now sent a series that resolves the issue described in the
> other branch of this thread. Feel free to pick up this binding
> Krzysztof/Rob/Kuba.
>
>
>
> Patch 2 will need an update and some prerequisite changes.
> Wojciech, you'll need:
>
> https://lore.kernel.org/linux-arm-msm/20250523-topic-ipa_imem-v1-0-b5d536291c7f@oss.qualcomm.com
> https://lore.kernel.org/linux-arm-msm/20250523-topic-ipa_mem_dts-v1-0-f7aa94fac1ab@oss.qualcomm.com
> https://github.com/quic-kdybcio/linux/commits/topic/ipa_qcm2290
>
> and a snippet like
>
> -----------o<-----------------------------------
>                         qcom,smem-state-names = "ipa-clock-enabled-valid",
>                                                 "ipa-clock-enabled";
>
> +                       sram = <&ipa_modem_tables>;
> +
>                         status = "disabled";
> -----------o<-----------------------------------
>
> added to your DT change
>
> please let me know if it works with the above
>
> if you're not interested anymore or don't have the board on hand,
> I can take up your patch, preserving your authorship ofc
>
> Konrad

Hello Konrad,

Thank you very much for your input.

IPA is working stable and without any issues in my project, which is
using the QCM2290.

I will integrate and test your changes, and once they are submitted, I
will resend my patch.

Wojtek

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

* Re: [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible
  2024-12-20 13:25   ` Konrad Dybcio
  2024-12-24 15:11     ` Alex Elder
@ 2025-05-23 18:58     ` Alex Elder
  1 sibling, 0 replies; 12+ messages in thread
From: Alex Elder @ 2025-05-23 18:58 UTC (permalink / raw)
  To: Konrad Dybcio, Wojciech Slenska, Andrew Lunn, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Alex Elder, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, netdev

On 12/20/24 7:25 AM, Konrad Dybcio wrote:
> On 20.12.2024 8:35 AM, Wojciech Slenska wrote:
>> Document that ipa on qcm2290 uses version 4.2, the same
>> as sc7180.
>>
>> Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com>
>> ---
> 
> FWIW this needs some more work on the Linux side, the IPA driver
> currently hardcodes a reference to IMEM, which has a different
> base between these two SoCs.

Everything currently assumes the IPA version dictates many things.
That works, so far.  But a lot of these fixed/hard-coded definitions
(per version) could be changed for specific implementations--they
just haven't needed to be.

> The IMEM region doesn't seem to be used as of current, but things
> will explode the second it is.
> 
> A long overdue update would be to make the IPA driver consume
> a syscon/memory-region-like property pointing to IMEM (or a slice
> of it, maybe Alex knows what it was supposed to be used for).

Yes, we talked about this last year, or the year before.

Konrad's patches to put this in DT is the right solution.
It doesn't matter that it's six months later.  I really
appreciate the improvement.

					-Alex

> 
> Konrad


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

* Re: [PATCH 2/2] arm64: dts: qcom: qcm2290: Add IPA nodes
  2024-12-20  7:35 ` [PATCH 2/2] arm64: dts: qcom: qcm2290: Add IPA nodes Wojciech Slenska
@ 2025-05-23 19:39   ` Konrad Dybcio
  0 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2025-05-23 19:39 UTC (permalink / raw)
  To: Wojciech Slenska, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alex Elder, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, netdev

On 12/20/24 8:35 AM, Wojciech Slenska wrote:
> Added IPA nodes and definitions.
> 
> Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com>
> ---
>  arch/arm64/boot/dts/qcom/qcm2290.dtsi | 52 +++++++++++++++++++++++++++
>  1 file changed, 52 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
> index 79bc42ffb6a1..0d39fd73888a 100644
> --- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi
> +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
> @@ -428,6 +428,17 @@ wlan_smp2p_in: wlan-wpss-to-ap {
>  			interrupt-controller;
>  			#interrupt-cells = <2>;
>  		};
> +
> +		ipa_smp2p_out: ipa-ap-to-modem {
> +			qcom,entry-name = "ipa";
> +			#qcom,smem-state-cells = <1>;
> +		};
> +
> +		ipa_smp2p_in: ipa-modem-to-ap {
> +			qcom,entry-name = "ipa";
> +			interrupt-controller;
> +			#interrupt-cells = <2>;
> +		};
>  	};
>  
>  	soc: soc@0 {
> @@ -1431,6 +1442,47 @@ usb_dwc3_ss: endpoint {
>  			};
>  		};
>  
> +		ipa: ipa@5840000 {
> +			compatible = "qcom,qcm2290-ipa", "qcom,sc7180-ipa";
> +
> +			iommus = <&apps_smmu 0x140 0x0>;
> +			reg = <0x0 0x5840000 0x0 0x7000>,
> +			      <0x0 0x5847000 0x0 0x2000>,
> +			      <0x0 0x5804000 0x0 0x2c000>;

Please pad the address parts to 8 hex digits with leading zeroes

> +			reg-names = "ipa-reg",
> +				    "ipa-shared",
> +				    "gsi";
> +
> +			interrupts-extended = <&intc GIC_SPI 257 IRQ_TYPE_EDGE_RISING>,
> +					      <&intc GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>,
> +					      <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
> +					      <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
> +			interrupt-names = "ipa",
> +					  "gsi",
> +					  "ipa-clock-query",
> +					  "ipa-setup-ready";
> +
> +			clocks = <&rpmcc RPM_SMD_IPA_CLK>;
> +			clock-names = "core";
> +
> +			interconnects = <&system_noc MASTER_IPA RPM_ALWAYS_TAG
> +					 &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>,
> +					<&system_noc MASTER_IPA RPM_ALWAYS_TAG
> +					 &system_noc SLAVE_IMEM RPM_ALWAYS_TAG>,
> +					<&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
> +					 &config_noc SLAVE_IPA_CFG RPM_ALWAYS_TAG>;

this last path should be RPM_ACTIVE_TAG - that makes paths involving the
CPU automatically collapse (as per the power management uC's decision)
whenever it's possible


Konrad

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

* Re: [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible
  2025-05-22 23:30     ` Konrad Dybcio
  2025-05-23  6:51       ` Wojciech Sleńska
@ 2025-05-26 19:39       ` Wojciech Sleńska
  2025-05-27 13:41         ` Konrad Dybcio
  1 sibling, 1 reply; 12+ messages in thread
From: Wojciech Sleńska @ 2025-05-26 19:39 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Krzysztof Kozlowski, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alex Elder, Bjorn Andersson, Konrad Dybcio,
	linux-arm-msm, devicetree, linux-kernel, netdev

pt., 23 maj 2025 o 01:30 Konrad Dybcio
<konrad.dybcio@oss.qualcomm.com> napisał(a):
>
> On 12/21/24 9:44 PM, Krzysztof Kozlowski wrote:
> > On 20/12/2024 08:35, Wojciech Slenska wrote:
> >> Document that ipa on qcm2290 uses version 4.2, the same
> >> as sc7180.
> >>
> >> Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com>
> >> ---
> >>  Documentation/devicetree/bindings/net/qcom,ipa.yaml | 4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
> >> index 53cae71d9957..ea44d02d1e5c 100644
> >> --- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml
> >> +++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
> >> @@ -58,6 +58,10 @@ properties:
> >>            - enum:
> >>                - qcom,sm8650-ipa
> >>            - const: qcom,sm8550-ipa
> >> +      - items:
> >> +          - enum:
> >> +              - qcom,qcm2290-ipa
> >> +          - const: qcom,sc7180-ipa
> >>
> > We usually keep such lists between each other ordered by fallback, so
> > this should go before sm8550-fallback-list.
> >
> > With that change:
> >
> > Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> (half a year later)
>
> I've now sent a series that resolves the issue described in the
> other branch of this thread. Feel free to pick up this binding
> Krzysztof/Rob/Kuba.
>
>
>
> Patch 2 will need an update and some prerequisite changes.
> Wojciech, you'll need:
>
> https://lore.kernel.org/linux-arm-msm/20250523-topic-ipa_imem-v1-0-b5d536291c7f@oss.qualcomm.com
> https://lore.kernel.org/linux-arm-msm/20250523-topic-ipa_mem_dts-v1-0-f7aa94fac1ab@oss.qualcomm.com
> https://github.com/quic-kdybcio/linux/commits/topic/ipa_qcm2290
>
> and a snippet like
>
> -----------o<-----------------------------------
>                         qcom,smem-state-names = "ipa-clock-enabled-valid",
>                                                 "ipa-clock-enabled";
>
> +                       sram = <&ipa_modem_tables>;
> +
>                         status = "disabled";
> -----------o<-----------------------------------
>
> added to your DT change
>
> please let me know if it works with the above
>
> if you're not interested anymore or don't have the board on hand,
> I can take up your patch, preserving your authorship ofc
>
> Konrad

Hello Konrad,

I have applied your patches on top of the 6.15 kernel.
I used the following:
Konrad Dybcio: arm64: dts: qcom: qcm2290: Explicitly describe the IPA IMEM slice
Konrad Dybcio: dt-bindings: sram: qcom,imem: Document QCM2290 IMEM
Konrad Dybcio: net: ipa: Grab IMEM slice base/size from DTS
Konrad Dybcio: dt-bindings: net: qcom,ipa: Add sram property for
describing IMEM slice
Konrad Dybcio: dt-bindings: sram: qcom,imem: Allow modem-tables
Konrad Dybcio: net: ipa: Make the SMEM item ID constant

Two corrections were needed:
1. A small change in the DTS:
-                       reg = <0x0c100000 0x2a000>;
-                       ranges = <0x0 0x0c100000 0x2a000>;
+                       reg = <0 0x0c100000 0 0x2a000>;
+                       ranges = <0 0 0x0c100000 0x2a000>;

This was necessary because, in the original version, the following line:
ret = of_address_to_resource(ipa_slice_np, 0, res);
returns -22

2. I also made a small modification here, because local variables were
not used in the function call. However, this issue has already been
reported.
-       ret = ipa_imem_init(ipa, mem_data->imem_addr, mem_data->imem_size);
+       dev_err(dev, "ipa_imem_init %0x %0x\n", imem_base, imem_size);
+       ret = ipa_imem_init(ipa, imem_base, imem_size);

Results
With these corrections, everything works perfectly.
dmesg:
[    0.832180] platform 5840000.ipa: Adding to iommu group 3
[    5.798469] ipa 5840000.ipa: ipa_imem_init c123000 2000
[    5.829216] ipa 5840000.ipa: IPA driver initialized
[    5.929674] ipa 5840000.ipa: IPA driver setup completed successfully
[    8.039075] ipa 5840000.ipa: received modem starting event
[    8.374774] ipa 5840000.ipa: received modem running event

Ipa is visible in ifaces:
5: qmapmux0.0@rmnet_ipa0: <UP,LOWER_UP> mtu 1496 qdisc pfifo_fast
state UNKNOWN group default qlen 1000
    link/[519]
    inet 10.86.101.79/27 brd 10.86.101.95 scope global qmapmux0.0
       valid_lft forever preferred_lft forever
    inet6 fe80::a8dc:ccff:feb3:e683/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever

Speedtest is also working fine:
$ speedtest
...
Testing download
speed................................................................................
Download: 8.62 Mbit/s
Testing upload speed......................................................................................................
Upload: 0.42 Mbit/s

Once your changes have been integrated, I will resubmit my patches.

BR
Wojtek

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

* Re: [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible
  2025-05-26 19:39       ` Wojciech Sleńska
@ 2025-05-27 13:41         ` Konrad Dybcio
  0 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2025-05-27 13:41 UTC (permalink / raw)
  To: Wojciech Sleńska
  Cc: Krzysztof Kozlowski, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alex Elder, Bjorn Andersson, Konrad Dybcio,
	linux-arm-msm, devicetree, linux-kernel, netdev

On 5/26/25 9:39 PM, Wojciech Sleńska wrote:
> pt., 23 maj 2025 o 01:30 Konrad Dybcio
> <konrad.dybcio@oss.qualcomm.com> napisał(a):
>>
>> On 12/21/24 9:44 PM, Krzysztof Kozlowski wrote:
>>> On 20/12/2024 08:35, Wojciech Slenska wrote:
>>>> Document that ipa on qcm2290 uses version 4.2, the same
>>>> as sc7180.
>>>>
>>>> Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com>
>>>> ---
>>>>  Documentation/devicetree/bindings/net/qcom,ipa.yaml | 4 ++++
>>>>  1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
>>>> index 53cae71d9957..ea44d02d1e5c 100644
>>>> --- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml
>>>> +++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
>>>> @@ -58,6 +58,10 @@ properties:
>>>>            - enum:
>>>>                - qcom,sm8650-ipa
>>>>            - const: qcom,sm8550-ipa
>>>> +      - items:
>>>> +          - enum:
>>>> +              - qcom,qcm2290-ipa
>>>> +          - const: qcom,sc7180-ipa
>>>>
>>> We usually keep such lists between each other ordered by fallback, so
>>> this should go before sm8550-fallback-list.
>>>
>>> With that change:
>>>
>>> Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
>>
>> (half a year later)
>>
>> I've now sent a series that resolves the issue described in the
>> other branch of this thread. Feel free to pick up this binding
>> Krzysztof/Rob/Kuba.
>>
>>
>>
>> Patch 2 will need an update and some prerequisite changes.
>> Wojciech, you'll need:
>>
>> https://lore.kernel.org/linux-arm-msm/20250523-topic-ipa_imem-v1-0-b5d536291c7f@oss.qualcomm.com
>> https://lore.kernel.org/linux-arm-msm/20250523-topic-ipa_mem_dts-v1-0-f7aa94fac1ab@oss.qualcomm.com
>> https://github.com/quic-kdybcio/linux/commits/topic/ipa_qcm2290
>>
>> and a snippet like
>>
>> -----------o<-----------------------------------
>>                         qcom,smem-state-names = "ipa-clock-enabled-valid",
>>                                                 "ipa-clock-enabled";
>>
>> +                       sram = <&ipa_modem_tables>;
>> +
>>                         status = "disabled";
>> -----------o<-----------------------------------
>>
>> added to your DT change
>>
>> please let me know if it works with the above
>>
>> if you're not interested anymore or don't have the board on hand,
>> I can take up your patch, preserving your authorship ofc
>>
>> Konrad
> 
> Hello Konrad,
> 
> I have applied your patches on top of the 6.15 kernel.
> I used the following:
> Konrad Dybcio: arm64: dts: qcom: qcm2290: Explicitly describe the IPA IMEM slice
> Konrad Dybcio: dt-bindings: sram: qcom,imem: Document QCM2290 IMEM
> Konrad Dybcio: net: ipa: Grab IMEM slice base/size from DTS
> Konrad Dybcio: dt-bindings: net: qcom,ipa: Add sram property for
> describing IMEM slice
> Konrad Dybcio: dt-bindings: sram: qcom,imem: Allow modem-tables
> Konrad Dybcio: net: ipa: Make the SMEM item ID constant
> 
> Two corrections were needed:
> 1. A small change in the DTS:
> -                       reg = <0x0c100000 0x2a000>;
> -                       ranges = <0x0 0x0c100000 0x2a000>;
> +                       reg = <0 0x0c100000 0 0x2a000>;
> +                       ranges = <0 0 0x0c100000 0x2a000>;
> 
> This was necessary because, in the original version, the following line:
> ret = of_address_to_resource(ipa_slice_np, 0, res);
> returns -22

Ouch! thanks for noticing this and for all the testing

Konrad

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

end of thread, other threads:[~2025-05-27 13:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20  7:35 [PATCH 0/2] IPA support on qcm2290 Wojciech Slenska
2024-12-20  7:35 ` [PATCH 1/2] dt-bindings: net: qcom,ipa: document qcm2290 compatible Wojciech Slenska
2024-12-20 13:25   ` Konrad Dybcio
2024-12-24 15:11     ` Alex Elder
2025-05-23 18:58     ` Alex Elder
2024-12-21 20:44   ` Krzysztof Kozlowski
2025-05-22 23:30     ` Konrad Dybcio
2025-05-23  6:51       ` Wojciech Sleńska
2025-05-26 19:39       ` Wojciech Sleńska
2025-05-27 13:41         ` Konrad Dybcio
2024-12-20  7:35 ` [PATCH 2/2] arm64: dts: qcom: qcm2290: Add IPA nodes Wojciech Slenska
2025-05-23 19:39   ` Konrad Dybcio

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