Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3759241pxv; Mon, 19 Jul 2021 08:07:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQpOV843YpZcDK9J13QSulT4MmoJM9JPPh9Va5Bw32zrAVqduZ8J8Vqyhc2pgi7ZvrktrT X-Received: by 2002:a17:906:30d8:: with SMTP id b24mr27281158ejb.358.1626707231800; Mon, 19 Jul 2021 08:07:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626707231; cv=none; d=google.com; s=arc-20160816; b=BPQwLW1h+iTgiLIZ+V5N++Z0+kM2g4WFMCJEP0kQVNgIaknTY5P+HHzzUwvLmlQu8G lkBn22J7aP6cxUlkR2Ea/nIrtFLPzAAi1Nj3FPNW6DPCvZWDIA/fu3X1pPtOIL0nYjA5 KYZ46hkWKlK+K+Xik0JEEyYVarjhcOUCWW4Ay62qkgrpJwvdBm98YxSRNxTkRrufrbqc yjJUEVwscm7NOuzoHHjCDQW71dJjVHLHsTecY8rXFEFpQVWYkFkOpdYh7qrWCSLKZOqC 7LPGck3xYEUFnYFOPUiuCrhFYJhu4R83gdB4YAR4MJ2drRGXPqjj+SNyR9jWiOZTyiAj 7C0Q== 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=D9jLnGFFfl0x5fMc0kVYPG+YxasQE/08QYG4uhDFffU=; b=sptC3P7rV9o2xAMY7AazZCGhNNxjk5Nj/ot45s6+Ghox9Lz3gWHFyf3qS7R/pQIlrk N8aSYz/fmE0NE9ZbvP9uqjQasWBpQkz/NyIHQ+iKh3Qyec/7MV7MwTLbtw++u5l4lhLS pJRAkObM0LzLtPd1eV20wS/d8QAfs6/jiavM4jfe9r+/mNHT9qT3rrU+P9ixuR09XypB jrBQA+4Knn+C785NtE/CoUPcZZ5X9rpQxO4oLE/N8Ba9GHEBU30O2eLNkVeYSpKGtp2b bTXDfaYp/9+lSAQzNai1wXKwHD3HpwaETUW0lPi5UEbk/oHtVqoC00amn5KQzS3/PCuv VouA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=VRDJu6pI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si20337531ejy.334.2021.07.19.08.06.47; Mon, 19 Jul 2021 08:07:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@gerhold.net header.s=strato-dkim-0002 header.b=VRDJu6pI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242700AbhGSOWN (ORCPT + 99 others); Mon, 19 Jul 2021 10:22:13 -0400 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.82]:25184 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242671AbhGSOU0 (ORCPT ); Mon, 19 Jul 2021 10:20:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1626706853; s=strato-dkim-0002; d=gerhold.net; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=D9jLnGFFfl0x5fMc0kVYPG+YxasQE/08QYG4uhDFffU=; b=VRDJu6pIedu+0M3zZ6vkv4+923tP9wgXcSFZQ/2tw+d2f3qsWN0WiD8YEJOBNP2r0b BWJratQFKsng6qGmj11J3rCdtRSXhb6+PumQW0EteVrvQgnnpQ/gAtYtQGJ1Dqn2b90t 9w8RnIx4N6StDC+z+aeckG/DjmvqoU3F0aYwljn4sCihFKo3ORTigLRXTwQDn5l7yFJk MjqR+lBP4vp8Z237j52JpkeVC8UQKxVAYWd4Ay9R7ppuAd5RIF2gBoD8Dp+OkM6ra3Kh g2wPhTiLGxm3zjyEeP2NQ9XLeTq20tDAxfE4B32jV5tBqb3qdlWW4obNTiZF35bLDzHY oEFw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXS7IYBkLahKxB4m6O43/v" X-RZG-CLASS-ID: mo00 Received: from droid.. by smtp.strato.de (RZmta 47.28.1 DYNA|AUTH) with ESMTPSA id g02a44x6JF0o43M (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 19 Jul 2021 17:00:50 +0200 (CEST) From: Stephan Gerhold To: "David S. Miller" , Jakub Kicinski Cc: Loic Poulain , Sergey Ryazanov , Johannes Berg , Bjorn Andersson , Andy Gross , Vinod Koul , Rob Herring , Aleksander Morgado , netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Jeffrey Hugo , Stephan Gerhold Subject: [RFC PATCH net-next 3/4] dt-bindings: net: Add schema for Qualcomm BAM-DMUX Date: Mon, 19 Jul 2021 16:53:16 +0200 Message-Id: <20210719145317.79692-4-stephan@gerhold.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719145317.79692-1-stephan@gerhold.net> References: <20210719145317.79692-1-stephan@gerhold.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The BAM Data Multiplexer provides access to the network data channels of modems integrated into many older Qualcomm SoCs, e.g. Qualcomm MSM8916 or MSM8974. It is built using a simple protocol layer on top of a DMA engine (Qualcomm BAM) and bidirectional interrupts to coordinate power control. The device tree node combines the incoming interrupt with the outgoing interrupts (smem-states) as well as the two DMA channels, which allows the BAM-DMUX driver to request all necessary resources. Signed-off-by: Stephan Gerhold --- .../bindings/net/qcom,bam-dmux.yaml | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml diff --git a/Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml b/Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml new file mode 100644 index 000000000000..33e125e70cb4 --- /dev/null +++ b/Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/qcom,bam-dmux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm BAM Data Multiplexer + +maintainers: + - Stephan Gerhold + +description: | + The BAM Data Multiplexer provides access to the network data channels + of modems integrated into many older Qualcomm SoCs, e.g. Qualcomm MSM8916 + or MSM8974. It is built using a simple protocol layer on top of a DMA engine + (Qualcomm BAM DMA) and bidirectional interrupts to coordinate power control. + +properties: + compatible: + const: qcom,bam-dmux + + interrupts: + description: + Interrupts used by the modem to signal the AP. + Both interrupts must be declared as IRQ_TYPE_EDGE_BOTH. + items: + - description: Power control + - description: Power control acknowledgment + + interrupt-names: + items: + - const: pc + - const: pc-ack + + qcom,smem-states: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: State bits used by the AP to signal the modem. + items: + - description: Power control + - description: Power control acknowledgment + + qcom,smem-state-names: + description: Names for the state bits used by the AP to signal the modem. + items: + - const: pc + - const: pc-ack + + dmas: + items: + - description: TX DMA channel phandle + - description: RX DMA channel phandle + + dma-names: + items: + - const: tx + - const: rx + +required: + - compatible + - interrupts + - interrupt-names + - qcom,smem-states + - qcom,smem-state-names + - dmas + - dma-names + +additionalProperties: false + +examples: + - | + #include + + mpss: remoteproc { + bam-dmux { + compatible = "qcom,bam-dmux"; + + interrupt-parent = <&modem_smsm>; + interrupts = <1 IRQ_TYPE_EDGE_BOTH>, <11 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "pc", "pc-ack"; + + qcom,smem-states = <&apps_smsm 1>, <&apps_smsm 11>; + qcom,smem-state-names = "pc", "pc-ack"; + + dmas = <&bam_dmux_dma 4>, <&bam_dmux_dma 5>; + dma-names = "tx", "rx"; + }; + }; -- 2.32.0