From patchwork Tue Aug 13 08:35:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 171175 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp604744ily; Tue, 13 Aug 2019 01:36:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/diu3z8Q2rfUKv6QyVNhhbaUCSFG4ZdIzUAGJ64Stv3Z1pSehJzOgXhcqYEjRgrgtY+U0 X-Received: by 2002:a17:902:1004:: with SMTP id b4mr26016802pla.340.1565685366160; Tue, 13 Aug 2019 01:36:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565685366; cv=none; d=google.com; s=arc-20160816; b=QvjGFV87IpjAldPJveU8qR4hBe66Bd0ZirbYbmm0EPKvPGU6sv5s/CjsAu9qkB33gn EBopR81qjueyEapElNcRTmYbVvBMO2aDEMTF8bpG/VjZO+xaq1o7+IzT0eb6j8eQl968 ysI/4MYuwydKqf4pgTokmdVwUSOcdK1fE7WjsJo7ZM5LU6lx3m2erC/gnqkENSD097eI AAq8+AJIW4Ixww+XPUNumjT0VV5BFFESyicoY6h6mC2qdlOmopE3YMxWTtnR46nJgBuM kQSt+1IyJYwOnPh9l2m1hXFBjFtaOzsY//vjsojNFol1OS9r99PJr1oieUZ3/PSkfdA/ eaug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=z0kO6qx1UAc/uP1SKgjN6XAyjR6GuCSBuxXXjXMIpxU=; b=SYiRDj1O22Y/3ELiUmU6fldO1UgOap0XepOnUtxS8TMWjHp4fR0vt1pGkCLRhHiAe6 puBNk6VsnaR7VD4J4xH1VHx11Yyizkkamq20P24c1y4Tfd/zVUQPjvkDXRLzEP+OFxSw uIX4BuoS1kt7DF+JIq22uB97vXIu3Snw3VAWfxY6nCApD38nX6CxUUUjf2waOOphE/aX FXVpX6zKiKCnhNVHiLAEeZM0dZ6Z+98bFtWREh0cAf7CGrvxMxMFO9WyolxivZOHgzGi rjFQmnjsthzRwcKKU+XEDPVsUQ/KvsmepMkidBTsu0t4lYy+KihXOO+75UXWmouf0gPH fycw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S6PR9JzX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k98si548029pje.41.2019.08.13.01.36.05; Tue, 13 Aug 2019 01:36:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S6PR9JzX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728267AbfHMIgF (ORCPT + 28 others); Tue, 13 Aug 2019 04:36:05 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37952 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728213AbfHMIgB (ORCPT ); Tue, 13 Aug 2019 04:36:01 -0400 Received: by mail-wr1-f66.google.com with SMTP id g17so106936151wrr.5 for ; Tue, 13 Aug 2019 01:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z0kO6qx1UAc/uP1SKgjN6XAyjR6GuCSBuxXXjXMIpxU=; b=S6PR9JzXSPICGc9iX7ScIdI+yvEgDwS07KOePIvb4JNCloS52ZiFkiLkD0SrbfSAlr tx+/bexwbgnzgqHPM1NMAbmla6cWVfq2lIQn4vIURLvrZI2DNMbE+E+Eo0Ozhz2z7Nww 19hwZyd2ta+oIAZrZ7C1Za8PfHj7+xiKLRngp9xGfXtitOnq2aXayuAZ/e+lPUJe8Xvb ucVaLMhkE0mn/Ehdnhut6Wb9yDDiGmLIuH89xPc/Qc97HWuqcLLazqUq2qiFPJsrl+ZD RXfVcnR9j2nd0RoRoibqQU8tc4a+UcOSR13GQ5I7ySC3EaUZu+FIOidQ4xASL32v2XD2 FAFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z0kO6qx1UAc/uP1SKgjN6XAyjR6GuCSBuxXXjXMIpxU=; b=bRrZxYtouKuhz/Th6FUTpc/JhhvtlLQE9e1CGaO6nYOm9zze8jsL5aBo2evTCkOQJS qpV1QDQ+ChjxZH16JQTVmJNdHfhf7Nbgx3WFjWK2GDwEm1+bf0A0c9hoLAYqLHLa2R9i jHmtSvi3/6Zv7ZO1sFbMA8vbGEqpye5TR1cBTi/AMvnKxArD4sT1idYOQfjYQhepSHi9 oJyh4CrvRDPpVbt74Kgvng2zptxsgW95P5Ivcc+7bnV+oR6KjwDa3FxSGOnWoT8GcXhQ B5qaE4KOtAUE3e6dyx6YoLbM/cM6evOj6T11dcwx1JzvDjd4LlGA5yGfoA0lTMAOSyNQ 09wQ== X-Gm-Message-State: APjAAAU4j9nL9ZujqwglVPa6WrlZbE0agB70/Z9GEczkNC0l/cmPH+rh X/TfS1pWmOPrdyy/IwccNvnexA== X-Received: by 2002:adf:90e7:: with SMTP id i94mr42458207wri.224.1565685359159; Tue, 13 Aug 2019 01:35:59 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id o11sm8651822wrw.19.2019.08.13.01.35.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2019 01:35:58 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org, broonie@kernel.org Cc: bgoswami@codeaurora.org, plai@codeaurora.org, pierre-louis.bossart@linux.intel.com, robh+dt@kernel.org, devicetree@vger.kernel.org, lgirdwood@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, spapothi@codeaurora.org, Srinivas Kandagatla Subject: [PATCH v2 4/5] dt-bindings: soundwire: add bindings for Qcom controller Date: Tue, 13 Aug 2019 09:35:49 +0100 Message-Id: <20190813083550.5877-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190813083550.5877-1-srinivas.kandagatla@linaro.org> References: <20190813083550.5877-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds bindings for Qualcomm soundwire controller. Qualcomm SoundWire Master controller is present in most Qualcomm SoCs either integrated as part of WCD audio codecs via slimbus or as part of SOC I/O. Signed-off-by: Srinivas Kandagatla --- .../bindings/soundwire/qcom,sdw.txt | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 Documentation/devicetree/bindings/soundwire/qcom,sdw.txt -- 2.21.0 diff --git a/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt b/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt new file mode 100644 index 000000000000..436547f3b155 --- /dev/null +++ b/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt @@ -0,0 +1,167 @@ +Qualcomm SoundWire Controller Bindings + + +This binding describes the Qualcomm SoundWire Controller along with its +board specific bus parameters. + +- compatible: + Usage: required + Value type: + Definition: must be "qcom,soundwire-v..", + Example: + "qcom,soundwire-v1.3.0" + "qcom,soundwire-v1.5.0" + "qcom,soundwire-v1.6.0" +- reg: + Usage: required + Value type: + Definition: the base address and size of SoundWire controller + address space. + +- interrupts: + Usage: required + Value type: + Definition: should specify the SoundWire Controller IRQ + +- clock-names: + Usage: required + Value type: + Definition: should be "iface" for SoundWire Controller interface clock + +- clocks: + Usage: required + Value type: + Definition: should specify the SoundWire Controller interface clock + +- #sound-dai-cells: + Usage: required + Value type: + Definition: must be 1 for digital audio interfaces on the controller. + +- qcom,dout-ports: + Usage: required + Value type: + Definition: must be count of data out ports + +- qcom,din-ports: + Usage: required + Value type: + Definition: must be count of data in ports + +- qcom,ports-offset1: + Usage: required + Value type: + Definition: should specify payload transport window offset1 of each + data port. Out ports followed by In ports. + More info in MIPI Alliance SoundWire 1.0 Specifications. + +- qcom,ports-offset2: + Usage: required + Value type: + Definition: should specify payload transport window offset2 of each + data port. Out ports followed by In ports. + More info in MIPI Alliance SoundWire 1.0 Specifications. + +- qcom,ports-sinterval-low: + Usage: required + Value type: + Definition: should be sample interval low of each data port. + Out ports followed by In ports. Used for Sample Interval + calculation. + More info in MIPI Alliance SoundWire 1.0 Specifications. + +- qcom,ports-word-length: + Usage: optional + Value type: + Definition: should be size of payload channel sample. + More info in MIPI Alliance SoundWire 1.0 Specifications. + +- qcom,ports-block-pack-mode: + Usage: optional + Value type: + Definition: should be 0 or 1 to indicate the block packing mode. + 0 to indicate Blocks are per Channel + 1 to indicate Blocks are per Port. + Out ports followed by In ports. + More info in MIPI Alliance SoundWire 1.0 Specifications. + +- qcom,ports-block-group-count: + Usage: optional + Value type: + Definition: should be in range 1 to 4 to indicate how many sample + intervals are combined into a payload. + Out ports followed by In ports. + More info in MIPI Alliance SoundWire 1.0 Specifications. + +- qcom,ports-lane-control: + Usage: optional + Value type: + Definition: should be in range 0 to 7 to identify which data lane + the data port uses. + Out ports followed by In ports. + More info in MIPI Alliance SoundWire 1.0 Specifications. + +- qcom,ports-hstart: + Usage: optional + Value type: + Definition: should be number identifying lowerst numbered coloum in + SoundWire Frame, i.e. left edge of the Transport sub-frame + for each port. Values between 0 and 15 are valid. + Out ports followed by In ports. + More info in MIPI Alliance SoundWire 1.0 Specifications. + +- qcom,ports-hstop: + Usage: optional + Value type: + Definition: should be number identifying highest numbered coloum in + SoundWire Frame, i.e. the right edge of the Transport + sub-frame for each port. Values between 0 and 15 are valid. + Out ports followed by In ports. + More info in MIPI Alliance SoundWire 1.0 Specifications. + +- qcom,dports-type: + Usage: optional + Value type: + Definition: should be one of the following types + 0 for reduced port + 1 for simple ports + 2 for full port + Out ports followed by In ports. + More info in MIPI Alliance SoundWire 1.0 Specifications. + +Note: + More Information on detail of encoding of these fields can be +found in MIPI Alliance SoundWire 1.0 Specifications. + += SoundWire devices +Each subnode of the bus represents SoundWire device attached to it. +The properties of these nodes are defined by the individual bindings. + += EXAMPLE +The following example represents a SoundWire controller on DB845c board +which has controller integrated inside WCD934x codec on SDM845 SoC. + +soundwire: soundwire@c85 { + compatible = "qcom,soundwire-v1.3.0"; + reg = <0xc85 0x20>; + interrupts = <20 IRQ_TYPE_EDGE_RISING>; + clocks = <&wcc>; + clock-names = "iface"; + #sound-dai-cells = <1>; + qcom,dports-type = <0>; + qcom,dout-ports = <6>; + qcom,din-ports = <2>; + qcom,ports-sinterval-low = /bits/ 8 <0x07 0x1F 0x3F 0x7 0x1F 0x3F 0x0F 0x0F>; + qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0C 0x6 0x12 0x0D 0x07 0x0A >; + qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x1F 0x00 0x00 0x1F 0x00 0x00>; + + /* Left Speaker */ + left{ + .... + }; + + /* Right Speaker */ + right{ + .... + }; +};