From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5053C433E0 for ; Mon, 3 Aug 2020 08:40:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0B3D20678 for ; Mon, 3 Aug 2020 08:40:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Bw8H8gOu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726246AbgHCIka (ORCPT ); Mon, 3 Aug 2020 04:40:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbgHCIk3 (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 5E1B1C061757 for ; Mon, 3 Aug 2020 01:40:29 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id k8so14666608wma.2 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=AlM2a+F4YvCmBi50GanhgHykzXpaX8zaeJ4Oo37IBT0k1zH3x99qgLBomBxWg4Hbnk IoG+rVx96Gdv/c0ruQuiAX2lw0/Gg6R4X3q4fZWC6F0UKg2BMdB3JBCllk3YHZxcxqs0 6dT2XPP8gnA53T4nbDE4QjVHdg+4nLZtbbOJ1LV9XBb9D77RrczJJm2F/eRYN6Vit8+k /ZQEdpCu5xdD0mE8E+FLIObp6e9dv72AYanhQyBKGw+ORRN5xQX6nbeBDcigjPwegXZi Noh/BwY8KjGlm1jCpg/QFrHFP1ispie6NwuWzqytr7u0ExVtkIfymYrdqdxCjyW1jQkn JTLg== X-Gm-Message-State: AOAM533fC9ePG35DRq2RyU8/VfnqKJ06A8sWZltEOSO9o9l4RlDXAPdP OVCmlzHMJ1OTSPzQ/7agha2uJepyKf1O9u3xC+LEbg== X-Google-Smtp-Source: ABdhPJyAahynHEVEn2oNVJMFau2e96vW5t5i5ugRhfFM5wveqNbnogUdLR+Dmsz70dO7HSAwUKUwpj9F129+6y4tr7I= 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C968CC433E3 for ; Mon, 3 Aug 2020 08:41:32 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 554EF20678 for ; Mon, 3 Aug 2020 08:41:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="odoHveHx"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Bw8H8gOu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 554EF20678 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 65E9C86F; Mon, 3 Aug 2020 10:40:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 65E9C86F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1596444091; bh=s7TeGvLgT1PyT8cinSBVpAu52TQvntv8EogDQydQjp8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=odoHveHxzFgMtQyqA6SSMMIC351RTWjd8srKY03WIb0H9uun58QJBhUkVA+lDiuXP BiaXmZZspo6QVpGfGeeUjrDbZ34q5m0JCt+TzYnvpObrv0iYH3OymiPlIx5LbkPc39 PoH7rwyeSnL7katSN6HkScFCQxAwt0V0FH7Nm7I8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EB7BAF801F7; Mon, 3 Aug 2020 10:40:40 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5A9C2F80218; Mon, 3 Aug 2020 10:40:39 +0200 (CEST) Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E821BF80148 for ; Mon, 3 Aug 2020 10:40:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E821BF80148 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Bw8H8gOu" Received: by mail-wm1-x342.google.com with SMTP id c19so3325035wmd.1 for ; Mon, 03 Aug 2020 01:40:28 -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=DASvvdOQqFtflRQcPyiULBeeLhZ0dD6gjxoX25qD/4qQd/mjTRmwFScU2JJoJWp5kp l00HVM2ETYQIzl2DPUeM9UOKQjnMCgBcaVtrwsFh5Xw5sv6+50ukP1MQQOJ2yBHuHDk+ k0lkcUtV1eypHAy3ittyxsK5O2WxKVcDp8y7De6iWIAeEz+o1u84nNT/tKlsI9NbXwXU MA3PvBkEkcNDLVjR56GEjNUbL5c+RtovSiZKh0WuZ7ySB2aeopkb+uL/CisSmvGbxj4m B1Lo28iWfUYKUyPXdeYJeFTqJ4mQOcMODiNSkQGqrTboKXIUxxq1hS6d+vSM4ISdlkQP 7SKw== X-Gm-Message-State: AOAM532FU9db3sBM2LWmKZv8k//8dnji5sSZDB9HhRCgd9k4YS3CM1Yb lkAXCcaLu9Qr1M+2zXcW3+89+YlTd42huqqRSm7ONg== X-Google-Smtp-Source: ABdhPJyAahynHEVEn2oNVJMFau2e96vW5t5i5ugRhfFM5wveqNbnogUdLR+Dmsz70dO7HSAwUKUwpj9F129+6y4tr7I= 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 Content-Type: text/plain; charset="UTF-8" Cc: Taniya Das , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Banajit Goswami , Stephan Gerhold , Liam Girdwood , linux-arm-msm , Patrick Lai , Takashi Iwai , linux-kernel , Tzung-Bi Shih , Bjorn Andersson , Mark Brown , Rohit kumar , Andy Gross , Doug Anderson , Srini Kandagatla , Dylan Reid , Linux ARM X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90671C433E0 for ; Mon, 3 Aug 2020 08:42:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5CAB020678 for ; Mon, 3 Aug 2020 08:42:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OxUacr41"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Bw8H8gOu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CAB020678 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IVtfVUcg/Aw6vvPIkfC7OB+h3twej0VgEslnZPgdMNk=; b=OxUacr41GHDDAQFV9XHUDJRlB wvXjciayBDTaSdGfgm6OY/+UFH4LCtW/LhekVt33AJmBoo+DrZftNkd00rniKP8158PtjKrW+emPL 2kqVCOvTz/sb1XTl/oNz4X44P4GDTx8yAk/HkMGfNcc+QobjUF2hK0eWLLrbh40XJUvlC1Zz5y1ol B6YiIop48OzOiFusD1ZfR+FKGcUYNATYqji8NQmBZ8v5Cxm6FSjFrRt3ZL53J6IaRkPF+7n2vD+gS Nlx2etMDOAOmgxcbTmps/wYtQrMJJwVFFAloDrpPKjb6pompAXntB+cplDJdnnMgoPvOJa9KmRAYb 0/ndV4Y/A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2W1H-0001mF-Ie; Mon, 03 Aug 2020 08:40:31 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2W1F-0001lW-4G for linux-arm-kernel@lists.infradead.org; Mon, 03 Aug 2020 08:40:30 +0000 Received: by mail-wm1-x341.google.com with SMTP id c19so3325038wmd.1 for ; Mon, 03 Aug 2020 01:40:28 -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=I8uD3COmeGMTLzFIUbDTFiQuR9qpUgbslUxgdq3QkTaleu6yb0FaJrvcog5oUHXtjr e2GHmp+SOsUP+hSqoB8sZSxfuJ/AKMLkloB0RnwLzy1fH8GkQgrI4YlVqMQFEo1xoGUd Lup6yRkTmCXBXCv3Na2j29fMXF1lVnLSGuIuHu/Id4/Ul35XCvxtcWDhmN88b5eT0Pll tM5Wj2Rz5UdvXw/L7N8kmvV8HvkWDLttlFSzIhy2K6yRtoZ2gZ+8+Zl221w2a8gDYN0O R/VYGA30t59EUF/3vWbtWPx1Yy2dq2YD8aLOXRn0YxlPDERML9sBEatz720FFPk+7iYI Lr3A== X-Gm-Message-State: AOAM530dDksFtA+9/OdEkmR+66yGTuoTWpYlcKZqI3N+nHvG4nLmU8HM mPYOKcr22p7fAnIaG73TgXR4ly0gFjDZiQhMd2Kqtg== X-Google-Smtp-Source: ABdhPJyAahynHEVEn2oNVJMFau2e96vW5t5i5ugRhfFM5wveqNbnogUdLR+Dmsz70dO7HSAwUKUwpj9F129+6y4tr7I= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200803_044029_214106_27C8DA5C X-CRM114-Status: GOOD ( 25.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Taniya Das , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Banajit Goswami , Stephan Gerhold , Liam Girdwood , linux-arm-msm , Patrick Lai , Takashi Iwai , linux-kernel , Tzung-Bi Shih , Bjorn Andersson , Mark Brown , Rohit kumar , Andy Gross , Doug Anderson , Srini Kandagatla , Dylan Reid , Jaroslav Kysela , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel