From patchwork Thu Dec 19 09:28:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 182055 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp235228iln; Thu, 19 Dec 2019 01:29:08 -0800 (PST) X-Google-Smtp-Source: APXvYqzLChR8kTm2rIHDk03tGYDCYGWRy+xloLefUyUwwVnTvCRBkWgITPQuBQlVR8xkf70TD1gy X-Received: by 2002:a9d:588d:: with SMTP id x13mr7508120otg.6.1576747748311; Thu, 19 Dec 2019 01:29:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576747748; cv=none; d=google.com; s=arc-20160816; b=U5yYLb6paGvDiKgaRwu6d6YkS+v8BusgS1QqGHhe/ibArvTFF3bDpd5GUkF2ho8vmH UcoaTGt0jF8XgmLkSATDyU7jzRwDwZ2x8h8g1S7cICINKUr8DR+/MqGl7ZTwDWYds3Uc HkRddfE8KAFqHMnvxX0GaXye4GsSG7ycjiOU9g3yaEv6mJotHTHEsWy/gXJJQqJq8204 e175gfZKLwQunCDAigpdyZRs5Jk1ruufCb0JEIEZauerrg0u1r7yYVIxWQOl/1B0zwHD OZ0nnmJHFp1unGP33/j5XLmrsZuAPsXxvcFKiebL1BhTrJ/Ma5bBpqmpOghwoPEG9EpE BPog== 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=D/zgSAoCVsSdiweHMVDrK8nA0R60nkQkJQGcdVDh1og=; b=UzdmCkVqRcVVCcziK5BG8uyizgR576k8oFfbtXbjl7qop92ZYjellmrj9/bKjCZjr7 5vgS9Fe3uBEXuYca8dWVSwOSYqUlgmZCoTgyjFuvJ3BgaD4AXHoAXXq1zRdNuJQQygwH vQfi4uToJxdMCmVHZHIOdkpKe2hkpQT3p2nMSNVFFeI6JcrXcDSlHIBl+3Hk1ZzLy+tQ FsP2zitb2kD2VNmLYDj981fYNkq/9YwG0wXlVWzVFjSF2z6pCGPxkjBrfju3E+0Y7IUh i8WvzrVIceQpL4tziodpLQXGMrl0ONF2I/ZVzHHlAZ34HqMxzzGRdtnJe6YQTDSNtOmy hHCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EF25ASGM; 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 i15si2937753otk.120.2019.12.19.01.29.08; Thu, 19 Dec 2019 01:29:08 -0800 (PST) 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=EF25ASGM; 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 S1726801AbfLSJ3H (ORCPT + 27 others); Thu, 19 Dec 2019 04:29:07 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37811 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726620AbfLSJ3E (ORCPT ); Thu, 19 Dec 2019 04:29:04 -0500 Received: by mail-wr1-f65.google.com with SMTP id w15so5231513wru.4 for ; Thu, 19 Dec 2019 01:29:03 -0800 (PST) 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=D/zgSAoCVsSdiweHMVDrK8nA0R60nkQkJQGcdVDh1og=; b=EF25ASGMiO9o9j2iG0RLEisgHqXZp7NRwFunGlFbYn8GG0t7TwSN4Dm0k03OX95VHe T25N5TQtJ8B5oxflT2RObxZlksD7Rm6sq3ou77lJPrlWVq5Q5pADNzSeT66QqXmMLplj Rk5D0t7FAa1D5C+TL7plL5X0uOtLi7qfvDmobXBYoOx07dt7Sfa6p5sgNm5/Z81nC7/h N9CdxWD0UST/KVpu7LJ340A31H2m6d+Ib/VcVY21G/GlPRTEFvSzLEIeNbYKMzR/NA9h zU7Q/lSDLjjZm1ZB/frDRkmOJ2O65o5sWFSplsbUMAylSTvJggS8gfJdWnQqTk7AanFd feXQ== 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=D/zgSAoCVsSdiweHMVDrK8nA0R60nkQkJQGcdVDh1og=; b=HTagK7rJ0bJkzqt6llQliZmFWm/KVkoEg1Q0VFMqicU0vRJbbxdY6AwlKVtG/IIBpU iALlV/bAoMAuzcUWWEtzkWve80dog9XRd+1WCr4lVWznjfMuhH/5IcZuH0uqRXuYPwow SXh5MPZu3ZLxuFpRnE3VxKBQzd6+stbCNx7hBrYB+zQhhwD1dfaXdA17i5NlgUmENK8Y ikLXyYi1Z3gCgEG/9X0KhuJZWRfhD5OaHtsFxcxEzF8cQFzQHLtuKm9u51n7QFlgx2Uo amVsC3CzBeFWA7QFreD9kVqaXLUUpRB6PkLH3Ml982S0v5/F7pxfZBuRwsPsubT6KCy6 zu6w== X-Gm-Message-State: APjAAAUgHLHjldVXOGcDzrb/Kf8Ajn5Bu0TLdke2C+eaFQi864a8/iJq /m1BWZnlsLmnOe1k3LKO1z8CgtAguhs= X-Received: by 2002:adf:fe86:: with SMTP id l6mr8010528wrr.252.1576747742561; Thu, 19 Dec 2019 01:29:02 -0800 (PST) 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 s1sm5627356wmc.23.2019.12.19.01.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 01:29:01 -0800 (PST) From: Srinivas Kandagatla To: vkoul@kernel.org Cc: robh@kernel.org, bgoswami@codeaurora.org, broonie@kernel.org, pierre-louis.bossart@linux.intel.com, lgirdwood@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, spapothi@codeaurora.org, Srinivas Kandagatla Subject: [PATCH v5 1/2] dt-bindings: soundwire: add bindings for Qcom controller Date: Thu, 19 Dec 2019 09:28:41 +0000 Message-Id: <20191219092842.10885-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191219092842.10885-1-srinivas.kandagatla@linaro.org> References: <20191219092842.10885-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 Reviewed-by: Rob Herring --- .../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{ + .... + }; +};