devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties
@ 2023-02-07 10:03 Neil Armstrong
  2023-02-07 10:32 ` Dmitry Baryshkov
  2023-02-08  8:58 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 10+ messages in thread
From: Neil Armstrong @ 2023-02-07 10:03 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul,
	Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel,
	Neil Armstrong

Recents SoCs like the SM8450 or SM8550 requires memory interconnect
in order to have functional DMA.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml b/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
index 003098caf709..e922fafca833 100644
--- a/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
+++ b/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
@@ -36,6 +36,12 @@ properties:
   interrupts:
     maxItems: 1
 
+  interconnects:
+    description: Path leading to system memory
+
+  interconnect-names:
+    const: memory
+
   iommus:
     minItems: 1
     maxItems: 4

---
base-commit: 49a8133221c71b935f36a7c340c0271c2a9ee2db
change-id: 20230207-topic-sm8550-upstream-bam-dma-bindings-fix-81929c3bea5c

Best regards,
-- 
Neil Armstrong <neil.armstrong@linaro.org>


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

* Re: [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties
  2023-02-07 10:03 [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties Neil Armstrong
@ 2023-02-07 10:32 ` Dmitry Baryshkov
  2023-02-07 13:35   ` Neil Armstrong
  2023-02-08  8:58 ` Krzysztof Kozlowski
  1 sibling, 1 reply; 10+ messages in thread
From: Dmitry Baryshkov @ 2023-02-07 10:32 UTC (permalink / raw)
  To: Neil Armstrong, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel

On 07/02/2023 12:03, Neil Armstrong wrote:
> Recents SoCs like the SM8450 or SM8550 requires memory interconnect
> in order to have functional DMA.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>   Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml | 6 ++++++
>   1 file changed, 6 insertions(+)

I suspect this will not work without a change for a driver.

-- 
With best wishes
Dmitry


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

* Re: [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties
  2023-02-07 10:32 ` Dmitry Baryshkov
@ 2023-02-07 13:35   ` Neil Armstrong
  2023-02-07 15:27     ` Dmitry Baryshkov
  0 siblings, 1 reply; 10+ messages in thread
From: Neil Armstrong @ 2023-02-07 13:35 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel

On 07/02/2023 11:32, Dmitry Baryshkov wrote:
> On 07/02/2023 12:03, Neil Armstrong wrote:
>> Recents SoCs like the SM8450 or SM8550 requires memory interconnect
>> in order to have functional DMA.
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>>   Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml | 6 ++++++
>>   1 file changed, 6 insertions(+)
> 
> I suspect this will not work without a change for a driver.
> 

I had the impression single interconnect entries would be taken in account
by the platform core, but it doesn't seem to be the case, anyway I can;t find
any code doing that.

I'll resend with a driver change.

Neil

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

* Re: [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties
  2023-02-07 13:35   ` Neil Armstrong
@ 2023-02-07 15:27     ` Dmitry Baryshkov
  2023-02-08  9:03       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Baryshkov @ 2023-02-07 15:27 UTC (permalink / raw)
  To: neil.armstrong, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel

On 07/02/2023 15:35, Neil Armstrong wrote:
> On 07/02/2023 11:32, Dmitry Baryshkov wrote:
>> On 07/02/2023 12:03, Neil Armstrong wrote:
>>> Recents SoCs like the SM8450 or SM8550 requires memory interconnect
>>> in order to have functional DMA.
>>>
>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>> ---
>>>   Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>>
>> I suspect this will not work without a change for a driver.
>>
> 
> I had the impression single interconnect entries would be taken in account
> by the platform core, but it doesn't seem to be the case, anyway I can;t 
> find
> any code doing that.

Probably you mixed interconnects and power-domains here.

> I'll resend with a driver change.

Thanks!

-- 
With best wishes
Dmitry


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

* Re: [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties
  2023-02-07 10:03 [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties Neil Armstrong
  2023-02-07 10:32 ` Dmitry Baryshkov
@ 2023-02-08  8:58 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-08  8:58 UTC (permalink / raw)
  To: Neil Armstrong, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel

On 07/02/2023 11:03, Neil Armstrong wrote:
> Recents SoCs like the SM8450 or SM8550 requires memory interconnect
> in order to have functional DMA.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties
  2023-02-07 15:27     ` Dmitry Baryshkov
@ 2023-02-08  9:03       ` Krzysztof Kozlowski
  2023-02-08  9:08         ` neil.armstrong
  0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-08  9:03 UTC (permalink / raw)
  To: Dmitry Baryshkov, neil.armstrong, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Vinod Koul, Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel

On 07/02/2023 16:27, Dmitry Baryshkov wrote:
> On 07/02/2023 15:35, Neil Armstrong wrote:
>> On 07/02/2023 11:32, Dmitry Baryshkov wrote:
>>> On 07/02/2023 12:03, Neil Armstrong wrote:
>>>> Recents SoCs like the SM8450 or SM8550 requires memory interconnect
>>>> in order to have functional DMA.
>>>>
>>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>>> ---
>>>>   Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml | 6 ++++++
>>>>   1 file changed, 6 insertions(+)
>>>
>>> I suspect this will not work without a change for a driver.
>>>
>>
>> I had the impression single interconnect entries would be taken in account
>> by the platform core, but it doesn't seem to be the case, anyway I can;t 
>> find
>> any code doing that.
> 
> Probably you mixed interconnects and power-domains here.
> 

The driver change was submitted some time ago:
https://lore.kernel.org/all/20210505213731.538612-10-bhupesh.sharma@linaro.org/

There is already DTS user of it and we expect driver to be resubmitted
at some point.

What I don't really get is that crypto driver sets bandwidth for
interconnects, not the BAM. Why BAM needs interconnect? Usually you do
not need to initialize some middle paths. Getting the final interconnect
path (e.g. crypto-memory) is enough, because it includes everything in
between.

Maybe my review tag was a bit premature...

Best regards,
Krzysztof


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

* Re: [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties
  2023-02-08  9:03       ` Krzysztof Kozlowski
@ 2023-02-08  9:08         ` neil.armstrong
  2023-02-09  8:25           ` Bhupesh Sharma
  0 siblings, 1 reply; 10+ messages in thread
From: neil.armstrong @ 2023-02-08  9:08 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Dmitry Baryshkov, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Vinod Koul, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel

On 08/02/2023 10:03, Krzysztof Kozlowski wrote:
> On 07/02/2023 16:27, Dmitry Baryshkov wrote:
>> On 07/02/2023 15:35, Neil Armstrong wrote:
>>> On 07/02/2023 11:32, Dmitry Baryshkov wrote:
>>>> On 07/02/2023 12:03, Neil Armstrong wrote:
>>>>> Recents SoCs like the SM8450 or SM8550 requires memory interconnect
>>>>> in order to have functional DMA.
>>>>>
>>>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>>>> ---
>>>>>    Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml | 6 ++++++
>>>>>    1 file changed, 6 insertions(+)
>>>>
>>>> I suspect this will not work without a change for a driver.
>>>>
>>>
>>> I had the impression single interconnect entries would be taken in account
>>> by the platform core, but it doesn't seem to be the case, anyway I can;t
>>> find
>>> any code doing that.
>>
>> Probably you mixed interconnects and power-domains here.
>>
> 
> The driver change was submitted some time ago:
> https://lore.kernel.org/all/20210505213731.538612-10-bhupesh.sharma@linaro.org/
> 
> There is already DTS user of it and we expect driver to be resubmitted
> at some point.
> 
> What I don't really get is that crypto driver sets bandwidth for
> interconnects, not the BAM. Why BAM needs interconnect? Usually you do
> not need to initialize some middle paths. Getting the final interconnect
> path (e.g. crypto-memory) is enough, because it includes everything in
> between.

Indeed the interconnect on BAM may be redundant since QCE sets the BW,
I'll investigate to understand if it's also necessary on BAM.

Neil

> 
> Maybe my review tag was a bit premature...
> 
> Best regards,
> Krzysztof
> 


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

* Re: [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties
  2023-02-08  9:08         ` neil.armstrong
@ 2023-02-09  8:25           ` Bhupesh Sharma
  2023-02-09  8:27             ` neil.armstrong
  2023-02-10  5:43             ` Vinod Koul
  0 siblings, 2 replies; 10+ messages in thread
From: Bhupesh Sharma @ 2023-02-09  8:25 UTC (permalink / raw)
  To: neil.armstrong, Krzysztof Kozlowski, Dmitry Baryshkov, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Vinod Koul, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel

On 2/8/23 2:38 PM, neil.armstrong@linaro.org wrote:
> On 08/02/2023 10:03, Krzysztof Kozlowski wrote:
>> On 07/02/2023 16:27, Dmitry Baryshkov wrote:
>>> On 07/02/2023 15:35, Neil Armstrong wrote:
>>>> On 07/02/2023 11:32, Dmitry Baryshkov wrote:
>>>>> On 07/02/2023 12:03, Neil Armstrong wrote:
>>>>>> Recents SoCs like the SM8450 or SM8550 requires memory interconnect
>>>>>> in order to have functional DMA.
>>>>>>
>>>>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>>>>> ---
>>>>>>    Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml | 6 ++++++
>>>>>>    1 file changed, 6 insertions(+)
>>>>>
>>>>> I suspect this will not work without a change for a driver.
>>>>>
>>>>
>>>> I had the impression single interconnect entries would be taken in 
>>>> account
>>>> by the platform core, but it doesn't seem to be the case, anyway I 
>>>> can;t
>>>> find
>>>> any code doing that.
>>>
>>> Probably you mixed interconnects and power-domains here.
>>>
>>
>> The driver change was submitted some time ago:
>> https://lore.kernel.org/all/20210505213731.538612-10-bhupesh.sharma@linaro.org/
>>
>> There is already DTS user of it and we expect driver to be resubmitted
>> at some point.
>>
>> What I don't really get is that crypto driver sets bandwidth for
>> interconnects, not the BAM. Why BAM needs interconnect? Usually you do
>> not need to initialize some middle paths. Getting the final interconnect
>> path (e.g. crypto-memory) is enough, because it includes everything in
>> between.
> 
> Indeed the interconnect on BAM may be redundant since QCE sets the BW,
> I'll investigate to understand if it's also necessary on BAM.

Since we are already doing this via QCE driver (since crypto block on 
qcom SoCs employs BAM DMA services) via [1], this change is not needed 
for sm8150, sm8250, sm8350 and subsequent qcom SoCs (available 
presently), so this patch can be dropped.

[1]. https://www.spinics.net/lists/linux-arm-msm/msg142957.html

Thanks,
Bhupesh

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

* Re: [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties
  2023-02-09  8:25           ` Bhupesh Sharma
@ 2023-02-09  8:27             ` neil.armstrong
  2023-02-10  5:43             ` Vinod Koul
  1 sibling, 0 replies; 10+ messages in thread
From: neil.armstrong @ 2023-02-09  8:27 UTC (permalink / raw)
  To: Bhupesh Sharma, Krzysztof Kozlowski, Dmitry Baryshkov, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Vinod Koul, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, dmaengine, devicetree, linux-kernel

On 09/02/2023 09:25, Bhupesh Sharma wrote:
> On 2/8/23 2:38 PM, neil.armstrong@linaro.org wrote:
>> On 08/02/2023 10:03, Krzysztof Kozlowski wrote:
>>> On 07/02/2023 16:27, Dmitry Baryshkov wrote:
>>>> On 07/02/2023 15:35, Neil Armstrong wrote:
>>>>> On 07/02/2023 11:32, Dmitry Baryshkov wrote:
>>>>>> On 07/02/2023 12:03, Neil Armstrong wrote:
>>>>>>> Recents SoCs like the SM8450 or SM8550 requires memory interconnect
>>>>>>> in order to have functional DMA.
>>>>>>>
>>>>>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>>>>>> ---
>>>>>>>    Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml | 6 ++++++
>>>>>>>    1 file changed, 6 insertions(+)
>>>>>>
>>>>>> I suspect this will not work without a change for a driver.
>>>>>>
>>>>>
>>>>> I had the impression single interconnect entries would be taken in account
>>>>> by the platform core, but it doesn't seem to be the case, anyway I can;t
>>>>> find
>>>>> any code doing that.
>>>>
>>>> Probably you mixed interconnects and power-domains here.
>>>>
>>>
>>> The driver change was submitted some time ago:
>>> https://lore.kernel.org/all/20210505213731.538612-10-bhupesh.sharma@linaro.org/
>>>
>>> There is already DTS user of it and we expect driver to be resubmitted
>>> at some point.
>>>
>>> What I don't really get is that crypto driver sets bandwidth for
>>> interconnects, not the BAM. Why BAM needs interconnect? Usually you do
>>> not need to initialize some middle paths. Getting the final interconnect
>>> path (e.g. crypto-memory) is enough, because it includes everything in
>>> between.
>>
>> Indeed the interconnect on BAM may be redundant since QCE sets the BW,
>> I'll investigate to understand if it's also necessary on BAM.
> 
> Since we are already doing this via QCE driver (since crypto block on qcom SoCs employs BAM DMA services) via [1], this change is not needed for sm8150, sm8250, sm8350 and subsequent qcom SoCs (available presently), so this patch can be dropped.

Ack, I'll push a patch to remove the interconnect properties from the BAM node in sm8550.

Neil

> 
> [1]. https://www.spinics.net/lists/linux-arm-msm/msg142957.html
> 
> Thanks,
> Bhupesh


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

* Re: [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties
  2023-02-09  8:25           ` Bhupesh Sharma
  2023-02-09  8:27             ` neil.armstrong
@ 2023-02-10  5:43             ` Vinod Koul
  1 sibling, 0 replies; 10+ messages in thread
From: Vinod Koul @ 2023-02-10  5:43 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: neil.armstrong, Krzysztof Kozlowski, Dmitry Baryshkov, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, dmaengine, devicetree, linux-kernel

On 09-02-23, 13:55, Bhupesh Sharma wrote:
> On 2/8/23 2:38 PM, neil.armstrong@linaro.org wrote:
> > On 08/02/2023 10:03, Krzysztof Kozlowski wrote:

> > > What I don't really get is that crypto driver sets bandwidth for
> > > interconnects, not the BAM. Why BAM needs interconnect? Usually you do
> > > not need to initialize some middle paths. Getting the final interconnect
> > > path (e.g. crypto-memory) is enough, because it includes everything in
> > > between.
> > 
> > Indeed the interconnect on BAM may be redundant since QCE sets the BW,
> > I'll investigate to understand if it's also necessary on BAM.
> 
> Since we are already doing this via QCE driver (since crypto block on qcom
> SoCs employs BAM DMA services) via [1], this change is not needed for
> sm8150, sm8250, sm8350 and subsequent qcom SoCs (available presently), so
> this patch can be dropped.

Is that the right approach, should the dma consumers request the
bandwidth or the dma driver. I am kind of leaning on the former

-- 
~Vinod

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

end of thread, other threads:[~2023-02-10  5:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-07 10:03 [PATCH] dt-bindings: dma: qcom,bam-dma: add optional memory interconnect properties Neil Armstrong
2023-02-07 10:32 ` Dmitry Baryshkov
2023-02-07 13:35   ` Neil Armstrong
2023-02-07 15:27     ` Dmitry Baryshkov
2023-02-08  9:03       ` Krzysztof Kozlowski
2023-02-08  9:08         ` neil.armstrong
2023-02-09  8:25           ` Bhupesh Sharma
2023-02-09  8:27             ` neil.armstrong
2023-02-10  5:43             ` Vinod Koul
2023-02-08  8:58 ` Krzysztof Kozlowski

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