All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: sdm845: Add iommus property to qup
@ 2020-11-22  3:41 Bjorn Andersson
  2020-11-23 17:14 ` Vinod Koul
  2020-11-24 14:10 ` patchwork-bot+linux-arm-msm
  0 siblings, 2 replies; 4+ messages in thread
From: Bjorn Andersson @ 2020-11-22  3:41 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring
  Cc: linux-arm-msm, devicetree, linux-kernel

From: Stephen Boyd <swboyd@chromium.org>

The SMMU that sits in front of the QUP needs to be programmed properly
so that the i2c geni driver can allocate DMA descriptors. Failure to do
this leads to faults when using devices such as an i2c touchscreen where
the transaction is larger than 32 bytes and we use a DMA buffer.

arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
arm-smmu 15000000.iommu:         GFSR 0x00000002, GFSYNR0 0x00000002, GFSYNR1 0x000006c0, GFSYNR2 0x00000000

Add the right SID and mask so this works.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
[bjorn: Define for second QUP as well, be more specific in sdm845.dtsi]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 2 ++
 arch/arm64/boot/dts/qcom/sdm845.dtsi       | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
index 39f23cdcbd02..216a74f0057c 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
@@ -653,10 +653,12 @@ &pm8998_pwrkey {
 
 &qupv3_id_0 {
 	status = "okay";
+	iommus = <&apps_smmu 0x0 0x3>;
 };
 
 &qupv3_id_1 {
 	status = "okay";
+	iommus = <&apps_smmu 0x6c0 0x3>;
 };
 
 &sdhc_2 {
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 6465a6653ad9..d6b7b1bfa202 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -1120,6 +1120,7 @@ qupv3_id_0: geniqup@8c0000 {
 			clock-names = "m-ahb", "s-ahb";
 			clocks = <&gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>,
 				 <&gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>;
+			iommus = <&apps_smmu 0x3 0x0>;
 			#address-cells = <2>;
 			#size-cells = <2>;
 			ranges;
@@ -1460,6 +1461,7 @@ qupv3_id_1: geniqup@ac0000 {
 			clock-names = "m-ahb", "s-ahb";
 			clocks = <&gcc GCC_QUPV3_WRAP_1_M_AHB_CLK>,
 				 <&gcc GCC_QUPV3_WRAP_1_S_AHB_CLK>;
+			iommus = <&apps_smmu 0x6c3 0x0>;
 			#address-cells = <2>;
 			#size-cells = <2>;
 			ranges;
-- 
2.28.0


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

* Re: [PATCH v2] arm64: dts: sdm845: Add iommus property to qup
  2020-11-22  3:41 [PATCH v2] arm64: dts: sdm845: Add iommus property to qup Bjorn Andersson
@ 2020-11-23 17:14 ` Vinod Koul
  2020-11-24 14:10 ` patchwork-bot+linux-arm-msm
  1 sibling, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2020-11-23 17:14 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Rob Herring, linux-arm-msm, devicetree, linux-kernel

On 21-11-20, 19:41, Bjorn Andersson wrote:
> From: Stephen Boyd <swboyd@chromium.org>
> 
> The SMMU that sits in front of the QUP needs to be programmed properly
> so that the i2c geni driver can allocate DMA descriptors. Failure to do
> this leads to faults when using devices such as an i2c touchscreen where
> the transaction is larger than 32 bytes and we use a DMA buffer.
> 
> arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
> arm-smmu 15000000.iommu:         GFSR 0x00000002, GFSYNR0 0x00000002, GFSYNR1 0x000006c0, GFSYNR2 0x00000000
> 
> Add the right SID and mask so this works.

Reviewed-by: Vinod Koul <vkoul@kernel.org>

on DB845c with GSI DMA:
Tested-by: Vinod Koul <vkoul@kernel.org>

-- 
~Vinod

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

* Re: [PATCH v2] arm64: dts: sdm845: Add iommus property to qup
  2020-11-22  3:41 [PATCH v2] arm64: dts: sdm845: Add iommus property to qup Bjorn Andersson
  2020-11-23 17:14 ` Vinod Koul
@ 2020-11-24 14:10 ` patchwork-bot+linux-arm-msm
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2020-11-24 14:10 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm

Hello:

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

On Sat, 21 Nov 2020 19:41:49 -0800 you wrote:
> From: Stephen Boyd <swboyd@chromium.org>
> 
> The SMMU that sits in front of the QUP needs to be programmed properly
> so that the i2c geni driver can allocate DMA descriptors. Failure to do
> this leads to faults when using devices such as an i2c touchscreen where
> the transaction is larger than 32 bytes and we use a DMA buffer.
> 
> [...]

Here is the summary with links:
  - [v2] arm64: dts: sdm845: Add iommus property to qup
    https://git.kernel.org/qcom/c/4785cff7cb9c

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

* Re: [PATCH v2] arm64: dts: sdm845: Add iommus property to qup
@ 2020-11-23  5:16 Caleb Connolly
  0 siblings, 0 replies; 4+ messages in thread
From: Caleb Connolly @ 2020-11-23  5:16 UTC (permalink / raw)
  To: Bjorn Andersson, Andy Gross, Rob Herring
  Cc: linux-arm-msm, devicetree, linux-kernel

On 2020-11-22 03:41, Bjorn Andersson wrote:
> From: Stephen Boyd <swboyd@chromium.org>
>
> The SMMU that sits in front of the QUP needs to be programmed properly
> so that the i2c geni driver can allocate DMA descriptors. Failure to do
> this leads to faults when using devices such as an i2c touchscreen where
> the transaction is larger than 32 bytes and we use a DMA buffer.
>
> arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
> arm-smmu 15000000.iommu:         GFSR 0x00000002, GFSYNR0 0x00000002, GFSYNR1 0x000006c0, GFSYNR2 0x00000000
>
> Add the right SID and mask so this works.
>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> [bjorn: Define for second QUP as well, be more specific in sdm845.dtsi]
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>   arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 2 ++
>   arch/arm64/boot/dts/qcom/sdm845.dtsi       | 2 ++
>   2 files changed, 4 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
> index 39f23cdcbd02..216a74f0057c 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
> @@ -653,10 +653,12 @@ &pm8998_pwrkey {
>   
>   &qupv3_id_0 {
>   	status = "okay";
> +	iommus = <&apps_smmu 0x0 0x3>;
>   };
>   
>   &qupv3_id_1 {
>   	status = "okay";
> +	iommus = <&apps_smmu 0x6c0 0x3>;
>   };
>   
>   &sdhc_2 {
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index 6465a6653ad9..d6b7b1bfa202 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -1120,6 +1120,7 @@ qupv3_id_0: geniqup@8c0000 {
>   			clock-names = "m-ahb", "s-ahb";
>   			clocks = <&gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>,
>   				 <&gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>;
> +			iommus = <&apps_smmu 0x3 0x0>;
>   			#address-cells = <2>;
>   			#size-cells = <2>;
>   			ranges;
> @@ -1460,6 +1461,7 @@ qupv3_id_1: geniqup@ac0000 {
>   			clock-names = "m-ahb", "s-ahb";
>   			clocks = <&gcc GCC_QUPV3_WRAP_1_M_AHB_CLK>,
>   				 <&gcc GCC_QUPV3_WRAP_1_S_AHB_CLK>;
> +			iommus = <&apps_smmu 0x6c3 0x0>;
>   			#address-cells = <2>;
>   			#size-cells = <2>;
>   			ranges;

Tested-By: Caleb Connolly <caleb@connolly.tech>

Works on the OnePlus 6.



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

end of thread, other threads:[~2020-11-24 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-22  3:41 [PATCH v2] arm64: dts: sdm845: Add iommus property to qup Bjorn Andersson
2020-11-23 17:14 ` Vinod Koul
2020-11-24 14:10 ` patchwork-bot+linux-arm-msm
2020-11-23  5:16 Caleb Connolly

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.