From patchwork Thu Dec 22 19:32:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 636003 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91E05C4167B for ; Thu, 22 Dec 2022 19:33:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235681AbiLVTdd (ORCPT ); Thu, 22 Dec 2022 14:33:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235680AbiLVTd2 (ORCPT ); Thu, 22 Dec 2022 14:33:28 -0500 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [IPv6:2001:4b7a:2000:18::163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83D8118397; Thu, 22 Dec 2022 11:33:26 -0800 (PST) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 45D8620176; Thu, 22 Dec 2022 20:33:24 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Will Deacon , Joerg Roedel , Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Lux Aliaga , Robin Murphy , Rob Herring , Krzysztof Kozlowski , Andy Gross , Konrad Dybcio , Dmitry Baryshkov , Thierry Reding , Melody Olvera , Bhupesh Sharma , Douglas Anderson , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v5 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125 Date: Thu, 22 Dec 2022 20:32:51 +0100 Message-Id: <20221222193254.126925-2-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221222193254.126925-1-marijn.suijten@somainline.org> References: <20221222193254.126925-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Martin Botka Document smmu-500 compatibility with the SM6125 SoC. Signed-off-by: Martin Botka [Marijn: Move compatible to the new, generic, qcom,smmu-500 list] Signed-off-by: Marijn Suijten Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml index 124253e84c02..9b4520aff92a 100644 --- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml @@ -43,6 +43,7 @@ properties: - qcom,sdm670-smmu-500 - qcom,sdm845-smmu-500 - qcom,sm6115-smmu-500 + - qcom,sm6125-smmu-500 - qcom,sm6350-smmu-500 - qcom,sm6375-smmu-500 - qcom,sm8150-smmu-500 @@ -334,6 +335,7 @@ allOf: - qcom,sdx55-smmu-500 - qcom,sdx65-smmu-500 - qcom,sm6115-smmu-500 + - qcom,sm6125-smmu-500 - qcom,sm6350-smmu-500 - qcom,sm6375-smmu-500 - qcom,sm8350-smmu-500 From patchwork Thu Dec 22 19:32:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 636355 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6629DC3DA7C for ; Thu, 22 Dec 2022 19:33:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235791AbiLVTdp (ORCPT ); Thu, 22 Dec 2022 14:33:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235694AbiLVTd3 (ORCPT ); Thu, 22 Dec 2022 14:33:29 -0500 Received: from relay04.th.seeweb.it (relay04.th.seeweb.it [5.144.164.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D2A319001 for ; Thu, 22 Dec 2022 11:33:27 -0800 (PST) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 4A421201A2; Thu, 22 Dec 2022 20:33:25 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Will Deacon , Joerg Roedel , Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Lux Aliaga , Robin Murphy , Rob Herring , Krzysztof Kozlowski , Andy Gross , Konrad Dybcio , Dmitry Baryshkov , Thierry Reding , Melody Olvera , Bhupesh Sharma , Douglas Anderson , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v5 2/4] arm64: dts: qcom: sm6125: Configure APPS SMMU Date: Thu, 22 Dec 2022 20:32:52 +0100 Message-Id: <20221222193254.126925-3-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221222193254.126925-1-marijn.suijten@somainline.org> References: <20221222193254.126925-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Martin Botka Add a node for the APPS SMMU, to which various devices such as USB and storage nodes are connected. Signed-off-by: Martin Botka [Marijn: add the new, generic, "qcom,smmu-500" compatible, add patch description, reorder # properties] Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm6125.dtsi | 73 ++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi index bf9e8d45ee44..347665c2067c 100644 --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi @@ -573,6 +573,79 @@ spmi_bus: spmi@1c40000 { cell-index = <0>; }; + apps_smmu: iommu@c600000 { + compatible = "qcom,sm6125-smmu-500", "qcom,smmu-500", "arm,mmu-500"; + reg = <0xc600000 0x80000>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + + #global-interrupts = <1>; + #iommu-cells = <2>; + }; + apcs_glb: mailbox@f111000 { compatible = "qcom,sm6125-apcs-hmss-global"; reg = <0x0f111000 0x1000>; From patchwork Thu Dec 22 19:32:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 636002 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2B76C001B2 for ; Thu, 22 Dec 2022 19:33:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230440AbiLVTds (ORCPT ); Thu, 22 Dec 2022 14:33:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235711AbiLVTdc (ORCPT ); Thu, 22 Dec 2022 14:33:32 -0500 Received: from relay04.th.seeweb.it (relay04.th.seeweb.it [IPv6:2001:4b7a:2000:18::165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8963A17A80; Thu, 22 Dec 2022 11:33:28 -0800 (PST) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 4C0642021C; Thu, 22 Dec 2022 20:33:26 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Will Deacon , Joerg Roedel , Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Lux Aliaga , Robin Murphy , Rob Herring , Krzysztof Kozlowski , Andy Gross , Konrad Dybcio , Dmitry Baryshkov , Thierry Reding , Melody Olvera , Bhupesh Sharma , Douglas Anderson , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v5 3/4] arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2 nodes Date: Thu, 22 Dec 2022 20:32:53 +0100 Message-Id: <20221222193254.126925-4-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221222193254.126925-1-marijn.suijten@somainline.org> References: <20221222193254.126925-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org When enabling the APPS SMMU the mainline driver reconfigures the SMMU from its bootloader configuration, losing the stream mapping for (among which) the SDHCI hardware and breaking its ADMA feature. This feature can be disabled with: sdhci.debug_quirks=0x40 But it is of course desired to have this feature enabled and working through the SMMU. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Martin Botka --- arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi index 347665c2067c..32dd172ea104 100644 --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi @@ -468,6 +468,7 @@ sdhc_1: mmc@4744000 { <&gcc GCC_SDCC1_APPS_CLK>, <&xo_board>; clock-names = "iface", "core", "xo"; + iommus = <&apps_smmu 0x160 0x0>; power-domains = <&rpmpd SM6125_VDDCX>; @@ -494,6 +495,7 @@ sdhc_2: mmc@4784000 { <&gcc GCC_SDCC2_APPS_CLK>, <&xo_board>; clock-names = "iface", "core", "xo"; + iommus = <&apps_smmu 0x180 0x0>; pinctrl-0 = <&sdc2_on_state>; pinctrl-1 = <&sdc2_off_state>; From patchwork Thu Dec 22 19:32:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 636354 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DB5AC4167B for ; Thu, 22 Dec 2022 19:33:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235836AbiLVTdu (ORCPT ); Thu, 22 Dec 2022 14:33:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235754AbiLVTdn (ORCPT ); Thu, 22 Dec 2022 14:33:43 -0500 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [IPv6:2001:4b7a:2000:18::163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C58A1A80F; Thu, 22 Dec 2022 11:33:29 -0800 (PST) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 47C382021E; Thu, 22 Dec 2022 20:33:27 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Will Deacon , Joerg Roedel , Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Lux Aliaga , Robin Murphy , Rob Herring , Krzysztof Kozlowski , Andy Gross , Konrad Dybcio , Dmitry Baryshkov , Thierry Reding , Melody Olvera , Bhupesh Sharma , Douglas Anderson , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v5 4/4] arm64: dts: qcom: sm6125: Add IOMMU context to DWC3 Date: Thu, 22 Dec 2022 20:32:54 +0100 Message-Id: <20221222193254.126925-5-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221222193254.126925-1-marijn.suijten@somainline.org> References: <20221222193254.126925-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: AngeloGioacchino Del Regno Add an IOMMU context to the USB DWC3 controller, required to get USB functionality upon enablement of apps_smmu. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Martin Botka --- arch/arm64/boot/dts/qcom/sm6125.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi index 32dd172ea104..7c326368e30d 100644 --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi @@ -542,6 +542,7 @@ usb3_dwc3: usb@4e00000 { compatible = "snps,dwc3"; reg = <0x04e00000 0xcd00>; interrupts = ; + iommus = <&apps_smmu 0x100 0x0>; phys = <&hsusb_phy1>; phy-names = "usb2-phy"; snps,dis_u2_susphy_quirk;