Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1893044pxa; Mon, 3 Aug 2020 01:43:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyL/fqaDLR9SiWofAx2t4KrjqxLhMFvEztLEc/hsjbKZFgqLlqlMIxbM6MyJZMIOym3QGKW X-Received: by 2002:a17:906:e0ce:: with SMTP id gl14mr16520127ejb.393.1596444204019; Mon, 03 Aug 2020 01:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596444204; cv=none; d=google.com; s=arc-20160816; b=YdeiOas19ncmlq60KiiN4D7E/nvLSqnsa/eb0ta/xRp2kvOssqzcB0pI2ZjAGNFZCB mKZ8CiQWQ7VHH7ru7rLHGvkTHNi9UKUb1LD1inMo/6RjKHOMRrYcEMSOZFwBbpkmne+5 Xwx3TCDJsUncUYE5L+9HiZORGRXZNf0PH1P69yCW0cdyqrxKasCo14omXxvDgSHlDqlD /RZXfrOT89OMQ67Sf9TK4D3aPyKHgJLAqMtZzIr21LCtyg99pTEh9h5StG4WDVeQojGi zkWmJF1QDwRKV7eH/GOik//WnfauvKevDXmKrTBv3Ej7b6d7QiU3enNZzW5RWP/hgewb elRw== 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=Cq5+lj+HxdPKUksR7gRNmns7ju/WhDWUsP3NFKOReq8=; b=yT2NGWmrLfB/419HPpreWdJrJ/qobCOGgx1x5piK5w2jPc0xVzHvDFiepovQOH9wTE CAVsW4wmzNhaOX6dvYu8G4w+lMlvxe5W+gW+iw/I6zoTWQ8m8DqCbHJWUx0CDpWrnfOT I7aYhIUzH7n/ssGsQQOgmmgPGjwlAAo27g0/bCk4z1Ba70fJK9hH9hbQeuGGWvwtYVHX yaAU4e8A8OcRlYOLMxJmZPJG+affVaXl9vgGL0MskYVUD1ZirnonC7ItdC1I/vTMJ04H 7fJLtBRTKfe0/97jMiaejneWVvcXXztCFOejb/U4i/tUghFAESKYF0GygRfdpbL+DKR6 qWJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Bw8H8gOu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt12si4922008edb.547.2020.08.03.01.43.01; Mon, 03 Aug 2020 01:43:24 -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=@chromium.org header.s=google header.b=Bw8H8gOu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725945AbgHCIka (ORCPT + 99 others); Mon, 3 Aug 2020 04:40:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725867AbgHCIk3 (ORCPT ); Mon, 3 Aug 2020 04:40:29 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55F39C061756 for ; Mon, 3 Aug 2020 01:40:29 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id q76so13433192wme.4 for ; Mon, 03 Aug 2020 01:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Cq5+lj+HxdPKUksR7gRNmns7ju/WhDWUsP3NFKOReq8=; b=Bw8H8gOuWbx14/g/EG6O1Y8+gAH1srU5wsQImYaHnDeDvfgbsnQKLIlyY2i6Yk44la kqnaNemfWLvh+APs8IfLgZPvzxWXxtXUuHX7Ic8rW+ccSp6HA2zUh8KrW1aoQICqaqJq DX4cOJ6oyKiLOXjJwV24MKgUSxxNtoZN9DJvk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Cq5+lj+HxdPKUksR7gRNmns7ju/WhDWUsP3NFKOReq8=; b=n0DuOo9Mlo8iNNYWJx8NCdO2299/B450j22dMZAt/tFxvdhh3usJCHwyZ1rDTh7Y6/ IITYALrBldLDdwQHkR9C3PFkKg2A2Lj0O7DAUKxX0b/lB5CMzl2iS8H5wCXen2RZoDk/ hHq4d67kYQyxFqXA2r0a1gPiPR2oCbfQDej2OoRw/yNy8ij5BxAQDzY+fUMz6kfNDP45 8y0GnOhByvLZgkHAy9IljfSlA1eRgIc9lCyECY47ld0bqe+yLe6gzYKVy3hElfqd3i/j 6W2uVpSy+8xgcWPSWmUWR2BGgIGgH2nW/9qwVTKQgzFwPgWtIwrjLxURuVYOvG8eP9MO 3XmA== X-Gm-Message-State: AOAM5333YgSz+jqC5/QbTzPtRMBL7n0iBDZgnICZP4BQ78CIEC7thvTv bq+wiZ6dmZ2zvG0ZybeJDMWlNtLCu7Fb/uHUS6Yp2SYSJh8IRA== X-Received: by 2002:a1c:4e17:: with SMTP id g23mr14528398wmh.42.1596444027706; Mon, 03 Aug 2020 01:40:27 -0700 (PDT) MIME-Version: 1.0 References: <20200731084023.2678931-1-cychiang@chromium.org> <20200731084023.2678931-2-cychiang@chromium.org> <20200731183248.GB531472@bogus> In-Reply-To: <20200731183248.GB531472@bogus> From: Cheng-yi Chiang Date: Mon, 3 Aug 2020 16:40:00 +0800 Message-ID: Subject: Re: [PATCH v3 1/2] ASoC: qcom: dt-bindings: Add sc7180 machine bindings To: Rob Herring Cc: linux-kernel , Mark Brown , Taniya Das , Rohit kumar , Banajit Goswami , Patrick Lai , Andy Gross , Bjorn Andersson , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Srini Kandagatla , Stephan Gerhold , Doug Anderson , Dylan Reid , Tzung-Bi Shih , Linux ARM , linux-arm-msm , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." 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 Sat, Aug 1, 2020 at 2:32 AM Rob Herring wrote: > > On Fri, Jul 31, 2020 at 04:40:22PM +0800, Cheng-Yi Chiang wrote: > > Add devicetree bindings documentation file for sc7180 sound card. > > > > Signed-off-by: Cheng-Yi Chiang > > --- > > .../bindings/sound/qcom,sc7180.yaml | 113 ++++++++++++++++++ > > 1 file changed, 113 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/sound/qcom,sc7180.yaml > > > > diff --git a/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml b/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml > > new file mode 100644 > > index 000000000000..ce8a5a2d9df9 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml > > @@ -0,0 +1,113 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/sound/qcom,sc7180.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Qualcomm Technologies Inc. SC7180 ASoC sound card driver > > + > > +maintainers: > > + - Rohit kumar > > + - Cheng-Yi Chiang > > + > > +description: > > + This binding describes the SC7180 sound card which uses LPASS for audio. > > + > > +definitions: > > Please don't use 'definitions'. Either just duplicate it or you can do > 'patternProperties'. > Removed dai definition in v4. > > + > > + dai: > > + type: object > > + properties: > > + sound-dai: > > + maxItems: 1 > > + $ref: /schemas/types.yaml#/definitions/phandle-array > > + description: phandle array of the codec or CPU DAI > > This is a common property. You can assume we have a common schema > definition for it. IOW, 'sound-dai: true' is enough as it's always a > single phandle+args. > In the examples I found, Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml, Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml use: sound-dai: $ref: /schemas/types.yaml#/definitions/phandle description: phandle of the CPU DAI Documentation/devicetree/bindings/sound/simple-card.yaml just use sound-dai: maxItems: 1 In v4, I used 'sound-dai: true' as suggested. But I am a bit confused about assuming there is a common schema definition for it. I checked the code at https://github.com/devicetree-org/dt-schema but did not found the definition for it. Did I miss something here ? Thanks for the help! > > + > > + required: > > + - sound-dai > > + > > +properties: > > + compatible: > > + contains: > > + const: qcom,sc7180-sndcard > > + > > + audio-routing: > > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > > + description: > > + A list of the connections between audio components. Each entry is a > > + pair of strings, the first being the connection's sink, the second > > + being the connection's source. > > + > > + model: > > + $ref: /schemas/types.yaml#/definitions/string > > + description: User specified audio sound card name > > + > > + aux-dev: > > + $ref: /schemas/types.yaml#/definitions/phandle > > + description: phandle of the codec for headset detection > > + > > +patternProperties: > > + "^dai-link(@[0-9]+)?$": > > + description: > > + Each subnode represents a dai link. Subnodes of each dai links would be > > + cpu/codec dais. > > + > > + type: object > > + > > + properties: > > + link-name: > > + description: Indicates dai-link name and PCM stream name. > > + $ref: /schemas/types.yaml#/definitions/string > > + maxItems: 1 > > + > > + cpu: > > + $ref: "#/definitions/dai" > > + > > + codec: > > + $ref: "#/definitions/dai" > > + > > + required: > > + - link-name > > + - cpu > > + - codec > > + > > + additionalProperties: false > > + > > +examples: > > + > > + - | > > + sound { > > + compatible = "qcom,sc7180-sndcard"; > > + model = "sc7180-snd-card"; > > + > > + audio-routing = > > + "Headphone Jack", "HPOL", > > + "Headphone Jack", "HPOR"; > > + > > + aux-dev = <&alc5682>; > > + > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + dai-link@0 { > > + link-name = "MultiMedia0"; > > + cpu { > > + sound-dai = <&lpass_cpu 0>; > > + }; > > + > > + codec { > > + sound-dai = <&alc5682 0>; > > + }; > > + }; > > + > > + dai-link@1 { > > + link-name = "MultiMedia1"; > > + cpu { > > + sound-dai = <&lpass_cpu 1>; > > + }; > > + > > + codec { > > + sound-dai = <&max98357a>; > > + }; > > + }; > > + }; > > -- > > 2.28.0.163.g6104cc2f0b6-goog > >