From patchwork Fri Sep 18 06:29:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 313165 Delivered-To: patch@linaro.org Received: by 2002:a92:5ad1:0:0:0:0:0 with SMTP id b78csp1061948ilg; Thu, 17 Sep 2020 23:30:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQsprtFVOIjIfMkkx5oH6PRhlrxx7u5Oogzz6Mk2roR7Rd8sqX5Z2s/wyoPuNjJWk3txnz X-Received: by 2002:a17:906:914b:: with SMTP id y11mr35646277ejw.145.1600410623519; Thu, 17 Sep 2020 23:30:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600410623; cv=none; d=google.com; s=arc-20160816; b=u2/Suo4Gc74IisPH5A576j4rFvcGJughA3StngM7yTrLM1uIo2N5XQesuZMZecVwUx JzL60gV27sn53yl0Cg6E40ovdjvTrQrsT9bJPJwTD/vL/qObnPKsFUB49MFSCYPYmDCU oZkgJW3VlJU62pFVQyqGuqp3oncutvx8z3fcyMOhQWSj7bapV/z+7tHQbhtPGfYIN0y8 4Y+olMNMr3XZycrNxyolFFjVq3Jt3u8oLhuiHBeB/HYdInBaxJUfT6tY6TILfkFIIfNb H+8zU1qjEXHQqVFZAI6RIy5qFCzfFlqPI6JAl17nhxo/EvYH0Q/mUPr8bERaJ3bLssFs 3Z0w== 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=yNE+w1H9jhI3Cuq511Rmqek9YWB8ibRSW381uBgG61s=; b=pFn5Sed7+neVfQDYfOHMfB/8r8d0IuQ1bWuLhdLOsU46w1jBVDXpDBlOzTWr4ZjOxv 8U1gHoMNNBUwfIk387wgBfS89KPih6uU8DvPHChXeWvpDbQugYSTTdcuDyVKp1x8soJm r1TTu1nEgYnPcfZY2gOWvirmjkFPCTjL20tfmeN0vgQv/t/qiXy2rLWdeOcs826psOdy 7oYFiL9y3ORSOeNqVuRwLZnHO5AwfW4xphOAHXy/PNcDMtpjLjTvhhvOxeHWmjs6jRRO NvsEN7NtEkcvr8JwNXRlDEhgIWUbB3nfJm+i/YyvQGLn2b0AB8tw4z7SJAq9X0rzcE4H cIOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mIiIVX25; 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 v20si1520685ejr.561.2020.09.17.23.30.23; Thu, 17 Sep 2020 23:30:23 -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=mIiIVX25; 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 S1726414AbgIRGaW (ORCPT + 6 others); Fri, 18 Sep 2020 02:30:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:33214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726402AbgIRGaV (ORCPT ); Fri, 18 Sep 2020 02:30:21 -0400 Received: from localhost.localdomain (unknown [136.185.124.244]) (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 7D42B2100A; Fri, 18 Sep 2020 06:30:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600410620; bh=IQhmDb9Gvirr9W7TU/bGaxVy/Wzg/SI9mkPG47dyJY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mIiIVX25MRM14GAKz6rgjg1AHEg7VMtBhzzpalo1LPrRncpqxS/ozdPcV5GMCgfUK zdPhdT/PWBrjzoR94cYXGy1WxenfMOPfqIH78Kt43nhNajSKY94KVwHbXw4e1Y5cTi amXL+v5Sbq6CYIu8Gnxgo0Q9q0XhnPK8A5qSiqqs= 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 v2 1/3] dt-bindings: dmaengine: Document qcom, gpi dma binding Date: Fri, 18 Sep 2020 11:59:53 +0530 Message-Id: <20200918062955.2095156-2-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918062955.2095156-1-vkoul@kernel.org> References: <20200918062955.2095156-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 diff --git a/Documentation/devicetree/bindings/dma/qcom,gpi.yaml b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml new file mode 100644 index 000000000000..82f404bc8745 --- /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,gpi-dma + + reg: + maxItems: 1 + + interrupts: + description: + Interrupt lines for each GPII 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: + maxItems: 1 + + 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__ */