From patchwork Fri Aug 12 08:27:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12942026 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 A234DC3F6B0 for ; Fri, 12 Aug 2022 08:28:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237334AbiHLI2I (ORCPT ); Fri, 12 Aug 2022 04:28:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237383AbiHLI2G (ORCPT ); Fri, 12 Aug 2022 04:28:06 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DB57A833D for ; Fri, 12 Aug 2022 01:28:04 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id y13so767803ejp.13 for ; Fri, 12 Aug 2022 01:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=/UoqSEAsTHkqoWWs7/M5jpw98+8CpunSRLbcHfAbHAI=; b=U1GHKKJ6mexj4ZkoYkCxMnXrayjvvJCSL9lpj1svT4E7titpWsDYjkI0nyKvAXDpqE uhkxhnWXKFd6yvnULVSpGC2wZTO70BklauX03huRyXaP5iDNGBtcu57x3YrwBoOZ2qHN x1UMLYcvHv06KWJZ47FGcyhXw6uU+e4dMugeuNrwCVW1wSQwHf3CVwRcKeo1h0vTPnOG MHjspl8jKP1S4RE4rpDcUMFKhkmp9ssjuf4gtDtucZu1BN0heayJw4a4vk+aWLCFz1+q wzrAo2qnv2B9TH3mdmAr8oka/cM0+YlI07rQZqbhN6l+YVwLaOQe53qMVR33n7pho3Zy DOrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=/UoqSEAsTHkqoWWs7/M5jpw98+8CpunSRLbcHfAbHAI=; b=v1aXvprXVMS4w8tLGC/IAucIttdcQfump9fLRql63lyhRoFLbhnyXa2hNeBjWA+UFa c+8ZcfjXoImppx9jfjEM4g4r0Cfx8HN6Y5f7EiPDclkNM+bsifkchqL2yLFD6TyNrO5x LZkNGTb0VNQN5tByu/RyGAuaM5+/QiXkTY5k5jGwWooe7xZ8w5UJ6vmrU4roMgg8nDk/ FC0t5ngP85R3CTYR1Eq5iq5OeyDYx7MqS6O0HTVhwTlDv2v5yUjkNlEKSIc9MBndGMEt xCZVgTAmnEs9mAodBFKUGXMX/UMjMAvivYZUnpbbkPR5yHJ2TMGDFzpwxnp3dh6w0XuF xThg== X-Gm-Message-State: ACgBeo2VJnUFVQoMEHi3kshVIjf3QmpzCGRIYGzbG9tupPSCahzcT8vb XnAwHvJEtMlG7D4LD206w0LDQGmYYL8jgw== X-Google-Smtp-Source: AA6agR4FXQQ4aqaIoLj1wXTkm1i8iEZPWyRrMq3qFrqX0RpW955wp6U4Qr94op3EwFQSIYy6fLHz/A== X-Received: by 2002:a17:907:2707:b0:730:af0b:3572 with SMTP id w7-20020a170907270700b00730af0b3572mr1896043ejk.411.1660292882373; Fri, 12 Aug 2022 01:28:02 -0700 (PDT) Received: from otso.arnhem.chello.nl (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id y6-20020a056402134600b0043cf1c6bb10sm971326edw.25.2022.08.12.01.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 01:28:02 -0700 (PDT) From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Rob Herring , Krzysztof Kozlowski , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: dmaengine: qcom: gpi: add compatible for SM6350 Date: Fri, 12 Aug 2022 10:27:19 +0200 Message-Id: <20220812082721.1125759-2-luca.weiss@fairphone.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220812082721.1125759-1-luca.weiss@fairphone.com> References: <20220812082721.1125759-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document the compatible for GPI DMA controller on SM6350 SoC. Signed-off-by: Luca Weiss Acked-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson --- Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/dma/qcom,gpi.yaml b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml index 7d2fc4eb5530..eabf8a76d3a0 100644 --- a/Documentation/devicetree/bindings/dma/qcom,gpi.yaml +++ b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml @@ -21,6 +21,7 @@ properties: enum: - qcom,sc7280-gpi-dma - qcom,sdm845-gpi-dma + - qcom,sm6350-gpi-dma - qcom,sm8150-gpi-dma - qcom,sm8250-gpi-dma - qcom,sm8350-gpi-dma From patchwork Fri Aug 12 08:27:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12942028 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 C9DC4C2BB43 for ; Fri, 12 Aug 2022 08:28:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237385AbiHLI2K (ORCPT ); Fri, 12 Aug 2022 04:28:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231637AbiHLI2G (ORCPT ); Fri, 12 Aug 2022 04:28:06 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA41EA8942 for ; Fri, 12 Aug 2022 01:28:04 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id gk3so794376ejb.8 for ; Fri, 12 Aug 2022 01:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=rbiT8abHpNIVTow1zJdQqE2vgvQ7Yb359Ee+AMPsAQA=; b=lT8dpsaErdbLV0K3ZLzhZfFSixtAMLiRDp5mJ9NboNobp+7usMGwPwJjB4q0aMakyU ry4SVlSx6L47BPSr3EOTiNVpI5nIHRsjcRaOIw0aPjt2W8iIfPrbrP1byYck1cI8S6UK ttHZlcJX6ky9FwZpdrwYKsRFhdxne3r5gqzXYQqhXtm+LgCXmylYP7BECHMUv00W7V12 g0TUmU1Z+LO/lQyFU8mM6ruYKDBEkkCb1SjP7mbvdzUnkCUnoItGZS3sFj+D/1NF5KnQ 044jD/Sh04ceAPHi7ad21iNLQCiytOQMrFoiIdjaGfcUrxocCpeCiIFwb6TDsE8iqfE9 UQ2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=rbiT8abHpNIVTow1zJdQqE2vgvQ7Yb359Ee+AMPsAQA=; b=6+ba3dodEtzQ2UamB85wsWN20kxGFtQRtLJhuv8+y9wjPAwogH9UcJa/N0rbVCTFGH QxOEjEIPVN/4DwQ7iKst+PTCOZDA1lCQyAu5u7+p9HzOEsay2Bbhp1ql4ysYHyocFCSq Ibh7k33nJ3L3kMPxKcKJ/v8z8XzZr0O6cCJd78qfbakXi8U1Tu4hvipXxo0f3YmAFZUF hIXtag3US9VYx+GAE7kiZhdc+mMQcMWeOtyHCJruS061WEELMaWgDPBXCOWzx2QcHII7 jAqeCYVLgy0Xi/EiAngHVOLIJ832264ulB7o/uLF5zPXWHpqItqyeIWX3ud02LiQPcjh S57A== X-Gm-Message-State: ACgBeo3cNfleQIjbcfyBymBuDaW9HwxJn746q8XuOtaQj3+95NgjPVIi lqUIs/ytDXDh+ktUhmSwKkckSD4BNRAJWg== X-Google-Smtp-Source: AA6agR4bCiFo6JQMxH4zL9Zl3l53OrKzev/JZxdFlwlvYbnIqEoTGJCeg6rFgWv9ULxwxa5Ng6IBng== X-Received: by 2002:a17:906:228a:b0:731:3a33:326 with SMTP id p10-20020a170906228a00b007313a330326mr1931777eja.253.1660292883160; Fri, 12 Aug 2022 01:28:03 -0700 (PDT) Received: from otso.arnhem.chello.nl (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id y6-20020a056402134600b0043cf1c6bb10sm971326edw.25.2022.08.12.01.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 01:28:02 -0700 (PDT) From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] dmaengine: qcom: gpi: Add SM6350 support Date: Fri, 12 Aug 2022 10:27:20 +0200 Message-Id: <20220812082721.1125759-3-luca.weiss@fairphone.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220812082721.1125759-1-luca.weiss@fairphone.com> References: <20220812082721.1125759-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The Qualcomm SM6350 platform does, like the SM8450, provide a set of GPI controllers with an ee-offset of 0x10000. Add this to the driver. Signed-off-by: Luca Weiss Reviewed-by: Bjorn Andersson --- drivers/dma/qcom/gpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c index 8f0c9c4e2efd..89839864b4ec 100644 --- a/drivers/dma/qcom/gpi.c +++ b/drivers/dma/qcom/gpi.c @@ -2288,6 +2288,7 @@ static int gpi_probe(struct platform_device *pdev) static const struct of_device_id gpi_of_match[] = { { .compatible = "qcom,sc7280-gpi-dma", .data = (void *)0x10000 }, { .compatible = "qcom,sdm845-gpi-dma", .data = (void *)0x0 }, + { .compatible = "qcom,sm6350-gpi-dma", .data = (void *)0x10000 }, { .compatible = "qcom,sm8150-gpi-dma", .data = (void *)0x0 }, { .compatible = "qcom,sm8250-gpi-dma", .data = (void *)0x0 }, { .compatible = "qcom,sm8350-gpi-dma", .data = (void *)0x10000 }, From patchwork Fri Aug 12 08:27:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12942029 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 05DCAC282E7 for ; Fri, 12 Aug 2022 08:28:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237024AbiHLI2L (ORCPT ); Fri, 12 Aug 2022 04:28:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237442AbiHLI2J (ORCPT ); Fri, 12 Aug 2022 04:28:09 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA36CA8944 for ; Fri, 12 Aug 2022 01:28:05 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id kb8so814290ejc.4 for ; Fri, 12 Aug 2022 01:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=YtXfWrLU1BZPc0rfRaWUKHk31M+JfVKZR86pVQ/2Egk=; b=UzrkX0IxhkIOXzUyXy0xY8Pll/YDDoDIG7iHl3U+UObYWU6CeqAZ3hcuERe48Eg4qj cV2/S/42bnyKsJY1Si7MlZEp5/u4Wrf87aCqSvdBIulw5gLv/3RRZ3uJZYOiJofkZ9Y2 KEhuG+yWXpjouBuYLYdfniUlwiOWgmCv6E00nCK+SPNXnWJ/sdthIkFtZTnhRkuzTBJz n0MPn7fLsJU7m2vNk/p07lG0AK1qejrV3+dRBJxRmDPU38AO3Ifuu7uVk4JARAkrruB8 3SBPXHwiQIkGe0dhUtIBBZWwFvkzYroUPIJcpzxCqd/9r13jF+8wFglO+UmMWtrGYEz9 kvKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=YtXfWrLU1BZPc0rfRaWUKHk31M+JfVKZR86pVQ/2Egk=; b=QZLTOATr2qXPhFKZOh6EYlCA11UjbhQJKqPjjEZ2kaonDnbF8NZ9sfNh0h3Wn+mGkt buZAczEA/r6eYE+W1LIHA8tKuOcuN27EehJnCJ9GiXKxm0W1bv5LiBfiY6UHq1fJfD+H 4WMza6BwLXKSbytU41C3GXOD2FmmoV6tnklQTqbhYw/18Iog1hkBazxhvdms4C/fsiaM czQJ/pQQvUFxY3So/+Q1wddRO65vHpfCdCE2CKVl6oe/6wqhT7OOFrOXkSo2Bm+PLhXh 4xAOtMj3GgJz2D4ap3+sARkn0s8O4KD7KvJIBt5et5p06grDMacxOvYGhByNRM127KZ5 zZ1g== X-Gm-Message-State: ACgBeo3mHSIrspQvs1P2uGg4LVWdXrlKpnMJV41gIW+WtnlBUS/g2kLW OPSauUxyxIFlvOROqSpo3MBHxBQMklfKCg== X-Google-Smtp-Source: AA6agR7S1IBFsA6x0Q1AZL0/ULItvXSqg/Ku54We6vkcsLprZSGLimKyiRcd6EL7RotjPHmIr9Qkow== X-Received: by 2002:a17:907:842:b0:731:3310:4187 with SMTP id ww2-20020a170907084200b0073133104187mr1879973ejb.578.1660292884039; Fri, 12 Aug 2022 01:28:04 -0700 (PDT) Received: from otso.arnhem.chello.nl (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id y6-20020a056402134600b0043cf1c6bb10sm971326edw.25.2022.08.12.01.28.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 01:28:03 -0700 (PDT) From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] arm64: dts: qcom: sm6350: Add GPI DMA nodes Date: Fri, 12 Aug 2022 10:27:21 +0200 Message-Id: <20220812082721.1125759-4-luca.weiss@fairphone.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220812082721.1125759-1-luca.weiss@fairphone.com> References: <20220812082721.1125759-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add nodes for the gpi_dma0 and gpi_dma1 which are (optionally) used for various i2c busses based on the qup firmware configuration. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/qcom/sm6350.dtsi | 59 ++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index 76f14d54ae1c..5de6eb26f904 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -517,6 +518,26 @@ opp-384000000 { }; }; + gpi_dma0: dma-controller@800000 { + compatible = "qcom,sm6350-gpi-dma"; + reg = <0 0x00800000 0 0x60000>; + interrupts = , + , + , + , + , + , + , + , + , + ; + dma-channels = <10>; + dma-channel-mask = <0x1f>; + iommus = <&apps_smmu 0x56 0x0>; + #dma-cells = <3>; + status = "disabled"; + }; + qupv3_id_0: geniqup@8c0000 { compatible = "qcom,geni-se-qup"; reg = <0x0 0x8c0000 0x0 0x2000>; @@ -537,6 +558,9 @@ i2c0: i2c@880000 { pinctrl-names = "default"; pinctrl-0 = <&qup_i2c0_default>; interrupts = ; + dmas = <&gpi_dma0 0 0 QCOM_GPI_I2C>, + <&gpi_dma0 1 0 QCOM_GPI_I2C>; + dma-names = "tx", "rx"; #address-cells = <1>; #size-cells = <0>; status = "disabled"; @@ -550,12 +574,35 @@ i2c2: i2c@888000 { pinctrl-names = "default"; pinctrl-0 = <&qup_i2c2_default>; interrupts = ; + dmas = <&gpi_dma0 0 2 QCOM_GPI_I2C>, + <&gpi_dma0 1 2 QCOM_GPI_I2C>; + dma-names = "tx", "rx"; #address-cells = <1>; #size-cells = <0>; status = "disabled"; }; }; + gpi_dma1: dma-controller@900000 { + compatible = "qcom,sm6350-gpi-dma"; + reg = <0 0x00900000 0 0x60000>; + interrupts = , + , + , + , + , + , + , + , + , + ; + dma-channels = <10>; + dma-channel-mask = <0x3f>; + iommus = <&apps_smmu 0x4d6 0x0>; + #dma-cells = <3>; + status = "disabled"; + }; + qupv3_id_1: geniqup@9c0000 { compatible = "qcom,geni-se-qup"; reg = <0x0 0x9c0000 0x0 0x2000>; @@ -576,6 +623,9 @@ i2c6: i2c@980000 { pinctrl-names = "default"; pinctrl-0 = <&qup_i2c6_default>; interrupts = ; + dmas = <&gpi_dma1 0 0 QCOM_GPI_I2C>, + <&gpi_dma1 1 0 QCOM_GPI_I2C>; + dma-names = "tx", "rx"; #address-cells = <1>; #size-cells = <0>; status = "disabled"; @@ -589,6 +639,9 @@ i2c7: i2c@984000 { pinctrl-names = "default"; pinctrl-0 = <&qup_i2c7_default>; interrupts = ; + dmas = <&gpi_dma1 0 1 QCOM_GPI_I2C>, + <&gpi_dma1 1 1 QCOM_GPI_I2C>; + dma-names = "tx", "rx"; #address-cells = <1>; #size-cells = <0>; status = "disabled"; @@ -602,6 +655,9 @@ i2c8: i2c@988000 { pinctrl-names = "default"; pinctrl-0 = <&qup_i2c8_default>; interrupts = ; + dmas = <&gpi_dma1 0 2 QCOM_GPI_I2C>, + <&gpi_dma1 1 2 QCOM_GPI_I2C>; + dma-names = "tx", "rx"; #address-cells = <1>; #size-cells = <0>; status = "disabled"; @@ -626,6 +682,9 @@ i2c10: i2c@990000 { pinctrl-names = "default"; pinctrl-0 = <&qup_i2c10_default>; interrupts = ; + dmas = <&gpi_dma1 0 4 QCOM_GPI_I2C>, + <&gpi_dma1 1 4 QCOM_GPI_I2C>; + dma-names = "tx", "rx"; #address-cells = <1>; #size-cells = <0>; status = "disabled";