From patchwork Wed Oct 30 15:31: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: 178118 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp6046260ocf; Wed, 30 Oct 2019 08:32:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8UBKhPmTRrQUw+Or+hH0ioMWJHwEPkbAPfgM1dygo7ylME4FHUGTLVTRdH5TaaEJtUMXE X-Received: by 2002:a17:906:2cd4:: with SMTP id r20mr26261ejr.307.1572449520461; Wed, 30 Oct 2019 08:32:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572449520; cv=none; d=google.com; s=arc-20160816; b=qrLVnDhB4tmY01ITMsIgsydj5h4zL7y9OTNQ/zTBvtdvDltTybZ2nFGlqLXcG0Yffg 6Z2g7Lt6nqwJDk8/HTCmHuNCAlk+4OB1AtbsPJayh8zbW6vuoFVRwnNA1K4aWB1ywWl+ NHnGJ3DhStbYw9+tkYtRLHUhukUpfTPwtM7tt1XNioLubtEBzBujFzTuRQ9zQX/Ivr3i vAXmJEvp0q2Kl7cpP2xYJx6JI3nRHLe81B/VCna0pTZgkmryqE9fkjmwtHFctlZUbNRc jQrF0DT/j5rviEEr6tu28ctpNj6HEzrMxEFOZeJi7b+kYh97OTj/rEX+cTPEoNVDinsC bWVg== 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=yEcXAg/eBx99MOhVXS0VS0FuBBl4qtw5QHmFpVPcox4=; b=pECfNTTn7g9tTe0bDLWaFPof3QLY6QiV7/6Zuis6ym0/JNC8UbgjGVPK+ZBmWI4POw z9e7KEnv5VScACYlHhyQ7E5frv4h5huITiUJTGoxIbp0POU4yf6QxF7oNX4C3jYXlrWl 0AJCB3+J5htbsVGkjmh1rPnLDrNlsoTSOej9A+rHz/NXbTUXsIZOjBYwCDHxRi9yqDtM 381WmbqCT8H1IJKJWj73Ck2rzAPBpzEjYsncKjKynrPRWDMPlDGIigpYcnAypygghsn8 hDs82ZgyfZNuv4KYcqdEFboFNILPqO9dizAjs0gQLkSbi0yXWdnb/zYBVioZy7PxWrWa A+gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Tfk6xCdy; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 h12si1464202ejd.17.2019.10.30.08.31.59; Wed, 30 Oct 2019 08:32:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=Tfk6xCdy; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1727206AbfJ3Pb6 (ORCPT + 8 others); Wed, 30 Oct 2019 11:31:58 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:54681 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727036AbfJ3Pb5 (ORCPT ); Wed, 30 Oct 2019 11:31:57 -0400 Received: by mail-wm1-f67.google.com with SMTP id g7so2567320wmk.4 for ; Wed, 30 Oct 2019 08:31:55 -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=yEcXAg/eBx99MOhVXS0VS0FuBBl4qtw5QHmFpVPcox4=; b=Tfk6xCdyxctH526OGxFc7sHM3ABLiZQfJU7KJXkTCsFK0RSPDEserF5W7UtlU4GI2s ksIIYB+t/jRtdS7o2VzkeQBiPyPcEPu28ojwqJkB+u6t8g6gI58twJCMx1yq4xOcylWy D9zy+saVH09J/pqDrQ3nTTPvNSDirwy1uju32Cy/XCQPfpUwzX8LuNWG+3Q4Qj4hEWS5 radTzrrU/UohE2MrvUfmU1g9DJjCAFkfy0EYk08Dgq7s2UDMt0wscwkSN5+gw3lQdwy/ afjXx3uJpRED31istM335kWirpcPR+1hUG37A+m5HFDTo5dzIbj5QjHUjL+vyNL5XWaa /bFQ== 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=yEcXAg/eBx99MOhVXS0VS0FuBBl4qtw5QHmFpVPcox4=; b=m5cvXW3UY+INOUg0ur1ysWWrL/HrdEzfYbAWEps6qczpBqytu+zatLauIClG5uA1KD QY3oeYtr00KQU5SXJK97bl8k1/0JrNNsUSZ6t43YfcoOgi9cKVRr4gzzlUoOuWVlehiJ 0+GYH7H629B0LcZ/CdJkvIbZ/zNyuRPzzsoIbMdch8ok3JtDIGiEkE1oSjMeqnA68iUE GF6WggttDQtxe32ppslBnH9OZU6iwAFY233J2Xmt7tnjsDtdh8Te7eMpidxHFRdpijBH wl/DgylHIorABj1ER7GAai5XeNI+NxPU7vpsZHlsTSeyaBAgx6hPpaTtJRX7RRD8n5C5 AWrg== X-Gm-Message-State: APjAAAXt7c0lEDNLPZZLK6efXi3RKOHocUpNO6W9nA/qKE+oNnqMx3S/ giU+ePCy6TDEyB2zpLrJh71jUQ== X-Received: by 2002:a05:600c:2551:: with SMTP id e17mr34010wma.51.1572449514794; Wed, 30 Oct 2019 08:31:54 -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 u21sm417329wmu.27.2019.10.30.08.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2019 08:31:54 -0700 (PDT) From: Srinivas Kandagatla To: robh@kernel.org, vkoul@kernel.org Cc: broonie@kernel.org, bgoswami@codeaurora.org, pierre-louis.bossart@linux.intel.com, devicetree@vger.kernel.org, lgirdwood@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, spapothi@codeaurora.org, Srinivas Kandagatla Subject: [PATCH v4 1/2] dt-bindings: soundwire: add bindings for Qcom controller Date: Wed, 30 Oct 2019 15:31:49 +0000 Message-Id: <20191030153150.18303-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191030153150.18303-1-srinivas.kandagatla@linaro.org> References: <20191030153150.18303-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 | 179 ++++++++++++++++++ 1 file changed, 179 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..4f58de490f0a --- /dev/null +++ b/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt @@ -0,0 +1,179 @@ +Qualcomm SoundWire Controller Bindings + + +This binding describes the Qualcomm SoundWire Controller along with its +board specific bus parameters. + +- compatible: + Usage: required + Value type: + Definition: Should be "qcom,soundwire-v1.3.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, count of both in and + out ports together should not exceed 15. + +- qcom,din-ports: + Usage: required + Value type: + Definition: must be count of data in ports, count of both in and + out ports together should not exceed 15. + +- 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 port + 2 for full port + Out ports followed by In ports. + More info in MIPI Alliance SoundWire 1.0 Specifications. + +- #address-cells: + Usage: Required + Value type: + Definition: Should be 2 refer to soundwire-controller.yaml + +- #size-cells: + Usage: Required + Value type: + Definition: Should be 0 refer to soundwire-controller.yaml + +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. +Refer to soundwire/soundwire-controller.yaml for details of required bindings. +Each sub node can have its device specific bindings that are not documented +here. + += 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>; + #address-cells = <2>; + #size-cells = <0>; + /* Left Speaker */ + left { + .... + }; + + /* Right Speaker */ + right { + .... + }; +};