From patchwork Wed Sep 23 06:34:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 313422 Delivered-To: patch@linaro.org Received: by 2002:a92:5ad1:0:0:0:0:0 with SMTP id b78csp207824ilg; Tue, 22 Sep 2020 23:34:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIDI2AWVavznLbSXmDF5krrP7gwrbTfxKr+TvdLyLb7DCWtYDLLRqEl22WQmdtmcca1FC3 X-Received: by 2002:a17:906:1157:: with SMTP id i23mr9183958eja.440.1600842870075; Tue, 22 Sep 2020 23:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600842870; cv=none; d=google.com; s=arc-20160816; b=VDOp1k8so8vFxAI24ehX+ONCioSdwVBJSSULvyE1+gstEGiaPV6PUufXn3gPvVosQR dY2xMAJK9JBzH5sXNdMxydkg35StBMVN3j+ZzX0Nc/w2vWGbMGYrUBtEi9TrYx/mxmzL JhJRFeYttWndrT7klugLJ/vWnfToM3jeCDx+qMZ3OWPUABgoOYnPOsUhxnptJRuqK3Tg /L5PCpLnrOTUT2YVoXMPzmcZ0GzIHos8nU75TFlHc4iYGRpGOvrQo7Y0Weai1hidjINm b04EjprCBDubM+GrvxDe1H+4Bc0dHWpDzHnvu1pYy4kKtpLrWZIiZgQfa8HSGK5FdCse ae9A== 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=vsMh7trzdNlRHBQRlzbiKtk9WfhgqOIb6n6i2nDEyuVadNoVPK+HjpEr9CgQJPZBY+ 4Exe1wuGdYUJ/6mChIaHgAdsfkE3LJSqxKNtQyv3kB/qmmQPyf/pWSwOUh8dLZ1Ap333 pDhX3IynjB2gSvnZdfMqnotMfI4FVdj0j9ksTaxRW8rgwvaUTgUtej5TaZ3BL5CqxJ/5 chvlKOtxXOKOAgQIcSZnxi9OF2UVIZS7ceWuhewlooEa+zcjxc0Twx9YX3NboM/7/bSq 14FvWtJ5cSOZ7PsG4YAKrCMAQnDr9EoEXek8cDSmBFJjVRja5GgzoOi6ZMOHO2FaThMj s7VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lice9a+U; 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 lj12si7600896ejb.74.2020.09.22.23.34.29; Tue, 22 Sep 2020 23:34:30 -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=lice9a+U; 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 S1726781AbgIWGeZ (ORCPT + 6 others); Wed, 23 Sep 2020 02:34:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:45088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbgIWGeZ (ORCPT ); Wed, 23 Sep 2020 02:34:25 -0400 Received: from localhost.localdomain (unknown [122.171.175.143]) (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 B893D2223E; Wed, 23 Sep 2020 06:34:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600842864; bh=IQhmDb9Gvirr9W7TU/bGaxVy/Wzg/SI9mkPG47dyJY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lice9a+UyI7fxdQ3sqb7GarHYcxzIynYIH0/2JlZ6oHsMmSqFtADMbEKVQTgBSoPG DaoJkIC9NOBAkXgA6qf16++qT+mNPbgAsw371lW86zNqUSCkf6UGb8ABe8j1WoD8Dh I3pRD6nX/QlPK1yjfiGS7Nyx37jE5VBio4DMTGOU= 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 v3 1/3] dt-bindings: dmaengine: Document qcom, gpi dma binding Date: Wed, 23 Sep 2020 12:04:08 +0530 Message-Id: <20200923063410.3431917-2-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200923063410.3431917-1-vkoul@kernel.org> References: <20200923063410.3431917-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__ */