diff mbox series

[v8,10/11] arm64: dts: qcom: sm8350: Add Crypto Engine support

Message ID 20230526192210.3146896-11-bhupesh.sharma@linaro.org
State Accepted
Commit f1040a7fe8f069d2259ab3dab9190210005ceb33
Headers show
Series arm64: qcom: Enable Crypto Engine for a few Qualcomm SoCs | expand

Commit Message

Bhupesh Sharma May 26, 2023, 7:22 p.m. UTC
Add crypto engine (CE) and CE BAM related nodes and definitions to
'sm8350.dtsi'.

Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Co-developed-by and Signed-off-by: Robert Foss <rfoss@kernel.org>
[Bhupesh: Switch to '#interconnect-cells = <2>', available since commit 4f287e31ff5f]
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Krzysztof Kozlowski June 17, 2023, 7:28 a.m. UTC | #1
On 17/06/2023 01:33, Konrad Dybcio wrote:
> On 16.06.2023 19:36, Krzysztof Kozlowski wrote:
>> On 26/05/2023 21:22, Bhupesh Sharma wrote:
>>> Add crypto engine (CE) and CE BAM related nodes and definitions to
>>> 'sm8350.dtsi'.
>>>
>>> Tested-by: Anders Roxell <anders.roxell@linaro.org>
>>> Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
>>> Co-developed-by and Signed-off-by: Robert Foss <rfoss@kernel.org>
>>> [Bhupesh: Switch to '#interconnect-cells = <2>', available since commit 4f287e31ff5f]
>>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
>>> ---
>>
>> #regzbot introduced: f1040a7fe8f069d2259ab3dab9190210005ceb33
>> #regzbot title: HDK8350 silently crashes early on boot
>>
>> Hi, this landed in the next but unfortunately it causes silent crash
>> (and reboot) of HDK8350. Reverting this commit helps.
> Downstream also references the following SIDs:
> 
> iommus = <&apps_smmu 0x592 0>,
> 	 <&apps_smmu 0x598 0>,
> 	 <&apps_smmu 0x599 0>,
> 	 <&apps_smmu 0x59F 0>;

I already tried iommus from downstream from:
1. qcrypto node (0x584, 0x594)
2. qcedev (0x586, 0x596)
3. qcom_cedev_ns_cb (0x592, 0x598, 0x599, 0x59F), although with 0x0011
last argument.

Same results, but indeed iommu would be nice reason here.

I also double checked the version of block (BAM DMA is v1.7.4) and other
properties. When I disabled crypto but left BAM DMA, the result was the
same, thus it is maybe the BAM who causes abort.


Best regards,
Krzysztof
Linux regression tracking (Thorsten Leemhuis) June 26, 2023, 10:51 a.m. UTC | #2
[TLDR: This mail in primarily relevant for Linux kernel regression
tracking. See link in footer if these mails annoy you.]

On 16.06.23 19:36, Krzysztof Kozlowski wrote:
> On 26/05/2023 21:22, Bhupesh Sharma wrote:
>> Add crypto engine (CE) and CE BAM related nodes and definitions to
>> 'sm8350.dtsi'.
>>
>> Tested-by: Anders Roxell <anders.roxell@linaro.org>
>> Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
>> Co-developed-by and Signed-off-by: Robert Foss <rfoss@kernel.org>
>> [Bhupesh: Switch to '#interconnect-cells = <2>', available since commit 4f287e31ff5f]
>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
>> ---
> 
> #regzbot introduced: f1040a7fe8f069d2259ab3dab9190210005ceb33
> #regzbot title: HDK8350 silently crashes early on boot
> 
> Hi, this landed in the next but unfortunately it causes silent crash
> (and reboot) of HDK8350. Reverting this commit helps.

#regzbot fix: arm64: dts: qcom: sm8350: fix BAM DMA crash and reboot
#regzbot monitor:
https://lore.kernel.org/all/20230621143627.189134-1-krzysztof.kozlowski@linaro.org/
#regzbot ignore-activity

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index d9aa591dccf8..52afdf26b2bf 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -1735,6 +1735,28 @@  ufs_mem_phy_lanes: phy@1d87400 {
 			};
 		};
 
+		cryptobam: dma-controller@1dc4000 {
+			compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
+			reg = <0 0x01dc4000 0 0x24000>;
+			interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
+			#dma-cells = <1>;
+			qcom,ee = <0>;
+			qcom,controlled-remotely;
+			iommus = <&apps_smmu 0x594 0x0011>,
+				 <&apps_smmu 0x596 0x0011>;
+		};
+
+		crypto: crypto@1dfa000 {
+			compatible = "qcom,sm8350-qce", "qcom,sm8150-qce", "qcom,qce";
+			reg = <0 0x01dfa000 0 0x6000>;
+			dmas = <&cryptobam 4>, <&cryptobam 5>;
+			dma-names = "rx", "tx";
+			iommus = <&apps_smmu 0x594 0x0011>,
+				 <&apps_smmu 0x596 0x0011>;
+			interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>;
+			interconnect-names = "memory";
+		};
+
 		ipa: ipa@1e40000 {
 			compatible = "qcom,sm8350-ipa";