Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2481302ybl; Thu, 29 Aug 2019 08:45:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxq1CBP+VHH6w58EnpMOafCEjl1zxdRAj6G4TR5dRf7Y3hL4KfVIms13NZq8dBz70ugAbvz X-Received: by 2002:a17:902:543:: with SMTP id 61mr10634910plf.20.1567093535579; Thu, 29 Aug 2019 08:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567093535; cv=none; d=google.com; s=arc-20160816; b=imUr7lL1LLxaddVFyDlDfmS/a873F0vDa0Rj5n+OEW0xo1FqZI0sOlhSs3t+0Z67Rp k6HU3bbFWM03/uQxDGbE5ijUOsJ47bi72Syoz/NEJtvcS05uZvDIWFIu+ID0+hYXpGfU 6+cnMmxb3TCED/qZZr2EqTrA1dydbJzHFHLTgek90zCE3qr2/wlZ7pEsmFPZrmwokUDt 7zqET08ZnOqq06kTiMd0TCbr8NcdMaxQ9aDbwMHtWz23P2WcrwfEv7I1+nDTYVncn4sG 1pSHqfK/iRuf3hc1aD1VAmaUNp+n0NjodQ1oFGT8wfoxjM3OUcrZjL4TDw4oadM9kL4R Gn2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LDkFATU+LYt4LEF2nR4lSZ6tZzWMfK4kZTEykE71DcI=; b=B83mLGPP9QUQ/A9yYYSY4eucljNQkgmawqaS+14H0sw1CTkRzaQRiaZs6UuWAq3Y/T shXM3c9dDDQrzUf6PW//TTYhQ/0j1XrKkSiXCER8290MDfQ60fGAl+2SI98ab7aUcN7+ FBxaa++QyhcIQ6hT7CFo3/VZJd4dKoZue14lfq70wpGCOlmNOB58jBcHl01lVQ3N12T5 SAm4hjzxR85OtowuLOcCaZ9iVi312OsgGB038+f5ZSN4Kq2ojmm2ko227B6kZeTFpbiV pwsViTrzltTwsacaNSuZhcXqv1Z8OnevCogqIFygRn4NpgZOB6tf79m2Ts0PeTM8V558 o9DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vzJZPgiD; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 88si2088272plb.349.2019.08.29.08.45.19; Thu, 29 Aug 2019 08:45:35 -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=@kernel.org header.s=default header.b=vzJZPgiD; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727984AbfH2Pmw (ORCPT + 99 others); Thu, 29 Aug 2019 11:42:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:50400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727118AbfH2Pmw (ORCPT ); Thu, 29 Aug 2019 11:42:52 -0400 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8649E22CED; Thu, 29 Aug 2019 15:42:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567093370; bh=DxWOdTfJDyMTvRtm9hgWK6xzF49v9zdddJc0Ul0OHxY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=vzJZPgiDkWKkP+NaPPxauJ+fKFwPvLGB8/KdLTohOjj/xVgXAESpMcyDxLKvgC9FL 4ds2R9TlkDRR/vh+2bQOe0y3+DDbXYkzBMHs913aiDG10CTXtcEJX0TITe/ya+q4ot Mt/Cil3GMNqnHFH52WvFb2OkSak1IHnGLTgP3aq0= Received: by mail-qt1-f172.google.com with SMTP id k13so4119062qtm.12; Thu, 29 Aug 2019 08:42:50 -0700 (PDT) X-Gm-Message-State: APjAAAV6kgnd10p4AQMetpRnckTAffkAfnLcsF2/f/bKZ+saptydbaGJ 5pnzEj3TJUT3of5IDi+IOaaOrNpFT8rYCmTckQ== X-Received: by 2002:ad4:4050:: with SMTP id r16mr6931395qvp.200.1567093369577; Thu, 29 Aug 2019 08:42:49 -0700 (PDT) MIME-Version: 1.0 References: <20190829144442.6210-1-srinivas.kandagatla@linaro.org> <20190829144442.6210-2-srinivas.kandagatla@linaro.org> In-Reply-To: <20190829144442.6210-2-srinivas.kandagatla@linaro.org> From: Rob Herring Date: Thu, 29 Aug 2019 10:42:37 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 1/4] dt-bindings: soundwire: add slave bindings To: Srinivas Kandagatla Cc: Mark Brown , Vinod , spapothi@codeaurora.org, Banajit Goswami , Linux-ALSA , "linux-kernel@vger.kernel.org" , Liam Girdwood , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 29, 2019 at 9:45 AM Srinivas Kandagatla wrote: > > This patch adds bindings for Soundwire Slave devices that includes how > SoundWire enumeration address and Link ID are used to represented in > SoundWire slave device tree nodes. > > Signed-off-by: Srinivas Kandagatla > --- > .../soundwire/soundwire-controller.yaml | 72 +++++++++++++++++++ > 1 file changed, 72 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soundwire/soundwire-controller.yaml > > diff --git a/Documentation/devicetree/bindings/soundwire/soundwire-controller.yaml b/Documentation/devicetree/bindings/soundwire/soundwire-controller.yaml > new file mode 100644 > index 000000000000..449b6130ce63 > --- /dev/null > +++ b/Documentation/devicetree/bindings/soundwire/soundwire-controller.yaml > @@ -0,0 +1,72 @@ > +# SPDX-License-Identifier: GPL-2.0 (GPL-2.0-only OR BSD-2-Clause) for new bindings. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/soundwire/soundwire-controller.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: SoundWire Controller Generic Binding > + > +maintainers: > + - Srinivas Kandagatla > + - Vinod Koul > + > +description: | > + SoundWire busses can be described with a node for the SoundWire controller > + device and a set of child nodes for each SoundWire slave on the bus. > + > +properties: > + $nodename: > + pattern: "^soundwire(@.*)?$" > + > + "#address-cells": > + const: 2 > + > + "#size-cells": > + const: 0 > + > +patternProperties: > + "^.*@[0-9a-f],[0-9a-f]$": > + type: object > + > + properties: > + compatible: > + pattern: "^sdw[0-9a-f]{1}[0-9a-f]{4}[0-9a-f]{4}[0-9a-f]{2}$" > + description: Is the textual representation of SoundWire Enumeration > + address. compatible string should contain SoundWire Version ID, > + Manufacturer ID, Part ID and Class ID in order and shall be in > + lower-case hexadecimal with leading zeroes. > + Valid sizes of these fields are > + Version ID is 1 nibble, number '0x1' represents SoundWire 1.0 > + and '0x2' represents SoundWire 1.1 and so on. > + MFD is 4 nibbles > + PID is 4 nibbles > + CID is 2 nibbles > + More Information on detail of encoding of these fields can be > + found in MIPI Alliance DisCo & SoundWire 1.0 Specifications. > + > + reg: > + maxItems: 1 > + description: > + Link ID followed by Instance ID of SoundWire Device Address. > + > + additionalProperties: false I'm pretty sure you'll want nodes with other properties. If not, then why are they in DT? So drop this. Both the controller and child nodes need to list required properties. > + > +examples: > + - | > + soundwire@c2d0000 { > + #address-cells = <2>; > + #size-cells = <0>; > + reg = <0x0c2d0000 0x2000>; > + > + speaker@0,1 { > + compatible = "sdw10217201000"; > + reg = <0 1>; > + }; > + > + speaker@0,2 { > + compatible = "sdw10217201000"; > + reg = <0 2>; > + }; > + }; > + > +... > -- > 2.21.0 >