From patchwork Fri Apr 16 13:31:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 422734 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 617DAC433B4 for ; Fri, 16 Apr 2021 13:31:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4399E610EA for ; Fri, 16 Apr 2021 13:31:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243956AbhDPNcI (ORCPT ); Fri, 16 Apr 2021 09:32:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:44016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243944AbhDPNcG (ORCPT ); Fri, 16 Apr 2021 09:32:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 137FE61073; Fri, 16 Apr 2021 13:31:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618579901; bh=pAFpgWg6GPX+HhwpwQwrdVpYDakGXHbOvQZ8j+Yr9rw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cBYbkd9nvymoIf4n3FejMQykdvgbImc6bqmUzpqwcDIxTuWq9tKWhdhwIOTYmnQ0x ApFSfaaLf30TmJEjc+gNjGgU+Dgf1qsQzBi5Ag2SQg0eNzRkzaqbM1uU/crYKLcrrX FkplHJE0XC9FH4wieV84SaY0YAUZrUDPUC2zlQNF+JNBYGyVNs3VJf05Vg4znKFfip t3Dqxq1O6EPXRlxYVnx9+gdwAgGF2xCNeIC7bMhkzXMdKkpzWXlKmgWyaqF+g7wjvP I5DinzkC7tO+YOnnUU9/gPGRi0SV+AeV/yC44DgCAi49I4yCLQc5nxFSFZZu+3grOH XhxJKlz270wDg== From: Felipe Balbi To: Andy Gross , Bjorn Andersson , Vinod Koul Cc: Rob Herring , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, Felipe Balbi Subject: [PATCH 1/2] DMA: qcom: gpi: add compatible for sm8150 Date: Fri, 16 Apr 2021 16:31:32 +0300 Message-Id: <20210416133133.2067467-2-balbi@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210416133133.2067467-1-balbi@kernel.org> References: <20210416133133.2067467-1-balbi@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Felipe Balbi No functional changes, just adding a new compatible for a diferent SoC. Signed-off-by: Felipe Balbi --- Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 + drivers/dma/qcom/gpi.c | 1 + 2 files changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/qcom,gpi.yaml b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml index f8142adf9aea..902e2e523386 100644 --- a/Documentation/devicetree/bindings/dma/qcom,gpi.yaml +++ b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml @@ -20,6 +20,7 @@ properties: compatible: enum: - qcom,sdm845-gpi-dma + - qcom,sm8150-gpi-dma reg: maxItems: 1 diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c index 57f5ee4235c7..43ac3ab23d4c 100644 --- a/drivers/dma/qcom/gpi.c +++ b/drivers/dma/qcom/gpi.c @@ -2281,6 +2281,7 @@ static int gpi_probe(struct platform_device *pdev) static const struct of_device_id gpi_of_match[] = { { .compatible = "qcom,sdm845-gpi-dma" }, + { .compatible = "qcom,sm8150-gpi-dma" }, { }, }; MODULE_DEVICE_TABLE(of, gpi_of_match); From patchwork Fri Apr 16 13:31:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 423467 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 777F9C43460 for ; Fri, 16 Apr 2021 13:31:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C5FA61103 for ; Fri, 16 Apr 2021 13:31:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243972AbhDPNcL (ORCPT ); Fri, 16 Apr 2021 09:32:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:44038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235011AbhDPNcJ (ORCPT ); Fri, 16 Apr 2021 09:32:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4ED9B611AB; Fri, 16 Apr 2021 13:31:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618579904; bh=+ixLBXsOQJbJhcO4SAHjGAMGE+PG5w0UMyRTyWbfUW0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RkQoER3ROwKwtIfeNG4gzDVgxV/cdgdMFzjPes8ZQA3vllFVAeFdTn84ELK2W7s1y ddt7UcSvgfBcSkZTCd7Iz8JigS/vBdE/PHEpd8uX6hOYuh1/65KvuhqodyD6B0Jzbb ++e+lWNIDSCb3rB8hdsje0cn+1VqIbakmJI9ka9F06yh8gOpr/DdAkdnC60vJIoRIl xZfvechAVBVjc081CJ7y5E+6QG/1x3L7J9vDXX4Ew02sLVLVjMgI5eOKl/FEA3S9GE 3z7+5w7DDLgR3OHbL2ivqJQ8tZJ5SCBFrrfegwgQ7biR19Lx/wI1f/LFAWqCHw8h+T 3p6VnMnzZipig== From: Felipe Balbi To: Andy Gross , Bjorn Andersson , Vinod Koul Cc: Rob Herring , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, Felipe Balbi Subject: [PATCH 2/2] arm64: boot: dts: qcom: sm8150: Add DMA nodes Date: Fri, 16 Apr 2021 16:31:33 +0300 Message-Id: <20210416133133.2067467-3-balbi@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210416133133.2067467-1-balbi@kernel.org> References: <20210416133133.2067467-1-balbi@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Felipe Balbi With this patch, DMA has a chance of probing and doing something useful. Signed-off-by: Felipe Balbi --- arch/arm64/boot/dts/qcom/sm8150.dtsi | 72 ++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index c563f381a138..b426e935a36b 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -4,6 +4,7 @@ * Copyright (c) 2019, Linaro Limited */ +#include #include #include #include @@ -577,6 +578,29 @@ gcc: clock-controller@100000 { <&sleep_clk>; }; + gpi_dma0: qcom,gpi-dma@800000 { + #dma-cells = <3>; + compatible = "qcom,sm8150-gpi-dma"; + reg = <0 0x800000 0 0x60000>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + ; + dma-channels = <13>; + dma-channel-mask = <0xfa>; + iommus = <&apps_smmu 0x00d6 0x0>; + status = "disabled"; + }; + qupv3_id_0: geniqup@8c0000 { compatible = "qcom,geni-se-qup"; reg = <0x0 0x008c0000 0x0 0x6000>; @@ -612,6 +636,8 @@ spi0: spi@880000 { pinctrl-0 = <&qup_spi0_default>; interrupts = ; spi-max-frequency = <50000000>; + dmas = <&gpi_dma0 0 0 QCOM_GPI_SPI>, + <&gpi_dma0 1 0 QCOM_GPI_SPI>; #address-cells = <1>; #size-cells = <0>; status = "disabled"; @@ -814,6 +840,29 @@ spi7: spi@89c000 { }; }; + gpi_dma1: qcom,gpi-dma@a00000 { + #dma-cells = <3>; + compatible = "qcom,sm8150-gpi-dma"; + reg = <0 0xa00000 0 0x60000>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + ; + dma-channels = <13>; + dma-channel-mask = <0xfa>; + iommus = <&apps_smmu 0x0616 0x0>; + status = "disabled"; + }; + qupv3_id_1: geniqup@ac0000 { compatible = "qcom,geni-se-qup"; reg = <0x0 0x00ac0000 0x0 0x6000>; @@ -1004,6 +1053,29 @@ spi16: spi@a94000 { }; }; + gpi_dma2: qcom,gpi-dma@c00000 { + #dma-cells = <3>; + compatible = "qcom,sm8150-gpi-dma"; + reg = <0 0xc00000 0 0x60000>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + ; + dma-channels = <13>; + dma-channel-mask = <0xfa>; + iommus = <&apps_smmu 0x07b6 0x0>; + status = "disabled"; + }; + qupv3_id_2: geniqup@cc0000 { compatible = "qcom,geni-se-qup"; reg = <0x0 0x00cc0000 0x0 0x6000>;