From patchwork Thu Oct 8 12:31:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 317471 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp1308440ilm; Thu, 8 Oct 2020 05:32:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG1LEO9sbiUYqjC52Ra9rOSojRsjDWx4r4Rw1+bOQefIqt6Lv0UU6dF2GsXsBHUACqDcb2 X-Received: by 2002:a17:906:940c:: with SMTP id q12mr8817636ejx.195.1602160334189; Thu, 08 Oct 2020 05:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602160334; cv=none; d=google.com; s=arc-20160816; b=TLCMXpS4qs2mm5BuVxh1yqCGMc9/x7e5w06+frIQoufKJrl3X+tDRIAnYxDX6SffSf 69ly5bDGCJWuIpM231p5nx73hZQHgstXxGX2XcCviEzgA2wfQsuVNXj37xZZBgsl5xOv v9VafrJd+wwUa06lydb5UMvdj181pafdRT+s2SxEhcpEHY9K7JA0EgrH4gHlT7ozcsB/ XrmM1lSDtMX+XgF/zLhM8C/MklgH/NAl8H6Vdg7WjFrHF5z0pALHLN64HcD7aN3ZCjEi kEhlCaQaRWOFyQh0DIlnsnNdxfBDBCyXKG4i7dTHzsvnj0vaIj8QLGvvOMP0bS5p85el E72w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Mfn5sZOBgxrfys7If3mwQLXj8t9rjFJPvzwe3wgZGs8=; b=fsDwbMKF6UiD4GvnCvITPBlNXxEq1b6vkNwZYEP8HNW3hpHTznM1bfajqH74PBhK1n 1rEYty38Ck6u3Iql55InxR3KnyUlQkrcUdrSaJAZjAys/43KanFfZrBktLNwWkG1xXRY Tsd0jiGsYNtWJHCdTXrUlPmYe2Ms0YK20lTE2IWhpfh9AFgYNIV86En3ADGheJ7cHJ5J 5unCvl5vnjdbvbiUWAzvROgr3AnEo0dZ0La3xjouy6+KreEwK0qFedKqz2lkCT3+GhKZ e2K96m556br6H0fDtKGr6Kyxg9BS2/Eju8ntBlL3WOyNegQ3okij6tjb0+YuWIMsjrrH NubA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KHUXb6RY; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lf14si3758480ejb.720.2020.10.08.05.32.13; Thu, 08 Oct 2020 05:32:14 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KHUXb6RY; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729921AbgJHMcN (ORCPT + 6 others); Thu, 8 Oct 2020 08:32:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:57898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725802AbgJHMcM (ORCPT ); Thu, 8 Oct 2020 08:32:12 -0400 Received: from localhost.localdomain (unknown [122.182.224.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E1B8E2184D; Thu, 8 Oct 2020 12:32:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602160331; bh=+Jls9iCpTRcSMWAYCqPr4gisGOnMftsEieh9dAsauXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KHUXb6RY/yegeogZ0ayUAnShIfwhfvgUNiAzFmDHg4aqhT+6FY4GwcQnghYMd7PlP 2LDIaQnFKCOLsDvvv2l4vBjBGI7MF2cN//+ZMGth+fkNhzN2gkyx/8Z/Kv1hEFo/fD P1XBy4KCk/CeZDGEvhh44bLMzBCMOVJKrem4rKV8= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul , Rob Herring , Bjorn Andersson , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Ujfalusi Subject: [PATCH v4 1/3] dt-bindings: dmaengine: Document qcom, gpi dma binding Date: Thu, 8 Oct 2020 18:01:49 +0530 Message-Id: <20201008123151.764238-2-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201008123151.764238-1-vkoul@kernel.org> References: <20201008123151.764238-1-vkoul@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add devicetree binding documentation for GPI DMA controller implemented on Qualcomm SoCs Signed-off-by: Vinod Koul --- .../devicetree/bindings/dma/qcom,gpi.yaml | 86 +++++++++++++++++++ include/dt-bindings/dma/qcom-gpi.h | 11 +++ 2 files changed, 97 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/qcom,gpi.yaml create mode 100644 include/dt-bindings/dma/qcom-gpi.h -- 2.26.2 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/dma/qcom,gpi.yaml b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml new file mode 100644 index 000000000000..4470c1b2fd6c --- /dev/null +++ b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/qcom,gpi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies Inc GPI DMA controller + +maintainers: + - Vinod Koul + +description: | + QCOM GPI DMA controller provides DMA capabilities for + peripheral buses such as I2C, UART, and SPI. + +allOf: + - $ref: "dma-controller.yaml#" + +properties: + compatible: + enum: + - qcom,sdm845-gpi-dma + + reg: + maxItems: 1 + + interrupts: + description: + Interrupt lines for each GPI instance + maxItems: 13 + + "#dma-cells": + const: 3 + description: > + DMA clients must use the format described in dma.txt, giving a phandle + to the DMA controller plus the following 3 integer cells: + - channel: if set to 0xffffffff, any available channel will be allocated + for the client. Otherwise, the exact channel specified will be used. + - seid: serial id of the client as defined in the SoC documentation. + - client: type of the client as defined in dt-bindings/dma/qcom-gpi.h + + iommus: + maxItems: 1 + + dma-channels: + maximum: 31 + + dma-channel-mask: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - "#dma-cells" + - iommus + - dma-channels + - dma-channel-mask + +examples: + - | + #include + #include + gpi_dma0: dma-controller@800000 { + compatible = "qcom,gpi-dma"; + #dma-cells = <3>; + reg = <0x00800000 0x60000>; + iommus = <&apps_smmu 0x0016 0x0>; + dma-channels = <13>; + dma-channel-mask = <0xfa>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + ; + }; + +... diff --git a/include/dt-bindings/dma/qcom-gpi.h b/include/dt-bindings/dma/qcom-gpi.h new file mode 100644 index 000000000000..71f79eb7614c --- /dev/null +++ b/include/dt-bindings/dma/qcom-gpi.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (c) 2020, Linaro Ltd. */ + +#ifndef __DT_BINDINGS_DMA_QCOM_GPI_H__ +#define __DT_BINDINGS_DMA_QCOM_GPI_H__ + +#define QCOM_GPI_SPI 1 +#define QCOM_GPI_UART 2 +#define QCOM_GPI_I2C 3 + +#endif /* __DT_BINDINGS_DMA_QCOM_GPI_H__ */ From patchwork Thu Oct 8 12:31:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 317472 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp1308541ilm; Thu, 8 Oct 2020 05:32:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztjzRvb74TbpnGr61GQkfWV4xRx0o2OiXr4n9sFPhNba9JfSCLNHT3LKOQ+oxD1k2fuH/p X-Received: by 2002:aa7:dd4b:: with SMTP id o11mr8545879edw.251.1602160338099; Thu, 08 Oct 2020 05:32:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602160338; cv=none; d=google.com; s=arc-20160816; b=N+z+imzRObNx7jr02KPAm4jDEh4q1NGVPTSujo5cZah7/MK9L3dMnGl8RP5qi5Y7ha lDOUn2Lovfh28R6s3O5aCwlp6Kw1PoC8MS9ccBhM/iwQ6KYfXZ3dHdsa0mB0DWLSr/9p iv4zKw1+UUdYZhoKqP1H4sTu6JosyswyNpcZtOkYUdFpIvkTYEnW46r+XN+HKilbqSYg DBOE1HbGLXlSEOQ+Z1T5RNb8swbz4d/pYfAYEEiJJCaWFoY//V7DWxyKuAb8VSrHQwup wTiFkh0yy4f+YvsM+696KQStPaZ4AFMKDWypNl8Gea5FOSqPUL/p0pkgpXqkO9UtmLjx 3J2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RbSi8uMi8IQtiGIoF1yBFjp5YM4pQp954JlrSRPR5oo=; b=JVSUestn9qBYC6IOfJUZNrMd4pFGSdsgMcdovPFkhIAQlxTtogQo+CZrTX1gCnh9GX bLkiXYaWCLA++bita3KJTZv4n3i4Qx5NvtDnu4SL6n4xTpzcRMz0OiwvqQqTRTabltdU 2YRKAuWM9SM7+RECajgJSqSjlH7LGEdOvzXk8krVvX2ZelHlH1u2aJORIqJV59I9kF9d neQHzl+Mr7bo5khbXrKHoxrSS7CKp/cfjJKfhFpP2Szwc5YyAeIqiztC8Y8r6uYemwid 9sXYHulK8ZkaENbEhJywnGQwo4oKYtUhnqyEea8a2sgg0ez304B2B0slT9WnFzz7NrwW 47tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mI5CoUeH; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lf14si3758480ejb.720.2020.10.08.05.32.17; Thu, 08 Oct 2020 05:32:18 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mI5CoUeH; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725802AbgJHMcR (ORCPT + 6 others); Thu, 8 Oct 2020 08:32:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:58002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729942AbgJHMcQ (ORCPT ); Thu, 8 Oct 2020 08:32:16 -0400 Received: from localhost.localdomain (unknown [122.182.224.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 987BB2083B; Thu, 8 Oct 2020 12:32:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602160335; bh=ySoQckmFJh8rm9F+Ix3Hhff1OcUz1ve3KxVHcsZ+2xA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mI5CoUeHWcffAjGKN3ozZqTb3SB5WHq24a0X7oVEUdvQwGB3gnZ0ZuHwmWjtT4YCE VzuV6wWCAB1hIqSPSwLECNvMgx5BkSob4Xd2aAxwHzcju4vAIu157bSL9ieDwoIXgr lEpMZRRXaO8Ef2e4OMv8n7XMJC+2D8egHO4O1Vns= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul , Rob Herring , Bjorn Andersson , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Ujfalusi Subject: [PATCH v4 2/3] dmaengine: add peripheral configuration Date: Thu, 8 Oct 2020 18:01:50 +0530 Message-Id: <20201008123151.764238-3-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201008123151.764238-1-vkoul@kernel.org> References: <20201008123151.764238-1-vkoul@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Some complex dmaengine controllers have capability to program the peripheral device, so pass on the peripheral configuration as part of dma_slave_config Signed-off-by: Vinod Koul --- include/linux/dmaengine.h | 5 +++++ 1 file changed, 5 insertions(+) -- 2.26.2 diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 6fbd5c99e30c..a15dc2960f6d 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -418,6 +418,9 @@ enum dma_slave_buswidth { * @slave_id: Slave requester id. Only valid for slave channels. The dma * slave peripheral will have unique id as dma requester which need to be * pass as slave config. + * @peripheral_config: peripheral configuration for programming peripheral + * for dmaengine transfer + * @peripheral_size: peripheral configuration buffer size * * This struct is passed in as configuration data to a DMA engine * in order to set up a certain channel for DMA transport at runtime. @@ -443,6 +446,8 @@ struct dma_slave_config { u32 dst_port_window_size; bool device_fc; unsigned int slave_id; + void *peripheral_config; + size_t peripheral_size; }; /**