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=-10.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,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 C19A3C433F8 for ; Tue, 21 Jul 2020 11:30:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9AB1C22BF5 for ; Tue, 21 Jul 2020 11:30:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ZnnrxRa4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729856AbgGULaZ (ORCPT ); Tue, 21 Jul 2020 07:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729849AbgGULaY (ORCPT ); Tue, 21 Jul 2020 07:30:24 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E4AAC0619D8 for ; Tue, 21 Jul 2020 04:30:23 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id z15so20817823wrl.8 for ; Tue, 21 Jul 2020 04:30:23 -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=lDCzyRG0rg1IT+D0XJL6mCguANQqA8rXobavVZvW96Y=; b=ZnnrxRa4si/xuCUdSQINme4yglZDejh1OO0DnrcmRn5h18itVyWY4KRvRkI/WNZ/Ll E/VPLadw2MbujNKNCVgXWitzmPWRAKdk5XTCel3V5qpcX6FGrqmGTmm4p15DMboso/NS FV4C1to8Pfy/qNsRbWTocSYQZzf6KtgCql62o= 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=lDCzyRG0rg1IT+D0XJL6mCguANQqA8rXobavVZvW96Y=; b=eStwlwoXPYYkUi/+qgl1RtqjFL4QfYpMXn7BZ+uAs6SlQnIjOM/qRLqY0U+GHRqUkj XDNhhublOH71HcOFe1JWt8JnnBZgF5qBdvk0oJPFIqqR1BaP4Y2kM++nPJU4mB3b07UK nLrhPHzyPxjHa9Mj0kxky9Wqushxq4ywLP5rOTSSxTNT6D8ptfrMqeOgQqZqngl/KueV ZI+Vcqy/RdB+lFW6I9KHMoW1w8yF/7MUZ/tgazex3D6939KqGJXCJLu4z08lEQG7o7zt /tby3Yp65fYtAntfRDV2xLyJ2T5RDVSt1trpFPv/PAOJAjlrjLIYy88nZLhFd97yo0sN 00Bw== X-Gm-Message-State: AOAM533HotQGUkBuUd5/PliRnGBzSH3bYl60XBJrkJDRvY5OBXln2hiv GGSSVpDqbUFt8+W6/V1kKk7nMlCSDFRi4+KHXKL9hg== X-Google-Smtp-Source: ABdhPJwbrVnmzJ0PnXN6sJ8jR7GyGTkbutQcRFVK+AheZaDBzYwZNbSJrjKJ1Gle1sfdgNlgwcpeGqJ0VnvJV9KH3Mw= X-Received: by 2002:a05:6000:1209:: with SMTP id e9mr12809989wrx.404.1595331021943; Tue, 21 Jul 2020 04:30:21 -0700 (PDT) MIME-Version: 1.0 References: <20200717120207.3471030-1-cychiang@chromium.org> In-Reply-To: From: Cheng-yi Chiang Date: Tue, 21 Jul 2020 19:29:55 +0800 Message-ID: Subject: Re: [PATCH 1/2] ASoC: qcom: dt-bindings: Add sc7180 machine bindings To: Doug Anderson Cc: Taniya Das , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , ALSA Development Mailing List , Banajit Goswami , Liam Girdwood , linux-arm-msm , Patrick Lai , Takashi Iwai , LKML , Rob Herring , Bjorn Andersson , Mark Brown , Rohit kumar , Andy Gross , Tzung-Bi Shih , Dylan Reid , Linux ARM 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 Fri, Jul 17, 2020 at 11:03 PM Doug Anderson wrote: > > Hi, > Thanks for the review! > On Fri, Jul 17, 2020 at 5:02 AM Cheng-Yi Chiang wrote: > > > > Add devicetree bindings documentation file for sc7180 sound card. > > > > Signed-off-by: Cheng-Yi Chiang > > --- > > .../bindings/sound/qcom,sc7180.yaml | 123 ++++++++++++++++++ > > 1 file changed, 123 insertions(+) > > A bit of a mechanical review since my audio knowledge is not strong. > > > > 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..d60d2880d991 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml > > @@ -0,0 +1,123 @@ > > +# 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. > > nit: you don't need the pipe at the end of the "description" line. > That means that newlines are important and you don't need it. > > Thanks for the explanation. Fixed in v2. > > +definitions: > > I haven't yet seen much yaml using definitions like this. It feels > like overkill for some of these properties, especially ones that are > only ever used once in the "properties:" section and are/or are really > simple. > > ACK. In v2 I only kept dai definition and removed others. > > + link-name: > > + description: Indicates dai-link name and PCM stream name. > > + $ref: /schemas/types.yaml#/definitions/string > > + maxItems: 1 > > + > > + dai: > > + type: object > > + properties: > > + sound-dai: > > + maxItems: 1 > > + $ref: /schemas/types.yaml#/definitions/phandle-array > > + description: phandle array of the codec or CPU DAI > > + > > + required: > > + - sound-dai > > + > > + unidirectional: > > + description: Specify direction of unidirectional dai link. > > + 0 for playback only. 1 for capture only. > > + $ref: /schemas/types.yaml#/definitions/uint32 > > So if the property isn't there then it's _not_ unidirectional and if > it is there then this specifies the direction, right? I almost wonder > if this should just be two boolean properties, like: > > playback-only; > capture-only; > > ...but I guess I'd leave it to Rob and/or Mark to say what they liked > better. In any case if you keep it how you have it then you should > use yaml to force it to be either 0 or 1 if present. > > ACK Use playback-only and capture-only in v2 instead. > > + > > +properties: > > + compatible: > > + contains: > > + enum: > > + - qcom,sc7180-sndcard > > Just: > > properties: > compatible: > const: qcom,sc7180-sndcard > > Fixed in v2. > > > + 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. > > You don't need the "|-" after the "description:". That says newlines > are important but strip the newline from the end. > Fixed in v2. > > > + model: > > + $ref: /schemas/types.yaml#/definitions/string > > + description: User specified audio sound card name > > + > > +patternProperties: > > + "^dai-link-[0-9]+$": > > + description: | > > + Each subnode represents a dai link. Subnodes of each dai links would be > > + cpu/codec dais. > > From looking at "simple-card.yaml", I'm gonna guess that instead of > encoding the link number in the name of the node that you should > actually use a unit address and a reg in the subnodes. Thanks for the explanation. Fixed in v2. I think this naming is better, although there is no usage in the machine driver for the reg. > > ...also, again your description doesn't need the "|" at the end. > Maybe will be useful to you? > > Thanks for the explanation and the pointer! > > + type: object > > + > > + properties: > > + link-name: > > + $ref: "#/definitions/link-name" > > + > > + unidirectional: > > + $ref: "#/definitions/unidirectional" > > + > > + cpu: > > + $ref: "#/definitions/dai" > > + > > + codec: > > + $ref: "#/definitions/dai" > > + > > + required: > > + - link-name > > + - cpu > > + - codec > > + > > + additionalProperties: false > > + > > +examples: > > + > > + - | > > + snd { > > Can you use the full node name "sound" here? > > Fixed in v2. > > + compatible = "qcom,sc7180-sndcard"; > > + model = "sc7180-snd-card"; > > + > > + pinctrl-names = "default"; > > + pinctrl-0 = <&sec_mi2s_active &sec_mi2s_dout_active > > + &sec_mi2s_ws_active &pri_mi2s_active > > + &pri_mi2s_dout_active &pri_mi2s_ws_active > > + &pri_mi2s_din_active &pri_mi2s_mclk_active>; > > I think pinctrl is usually not in the dt examples. > Fixed in v2. > ...also, shouldn't the mi2s pinctrl be in the i2s nodes, not in the > overall sound node? Yes. Thanks for pointing this out. Fixed in dts file in chromium. > > > > + audio-routing = > > + "Headphone Jack", "HPOL", > > + "Headphone Jack", "HPOR"; > > + > > + dai-link-0 { > > + link-name = "MultiMedia0"; > > + cpu { > > + sound-dai = <&lpass_cpu 0>; > > + }; > > + > > + codec { > > + sound-dai = <&alc5682 0>; > > + }; > > + }; > > + > > + dai-link-1 { > > + link-name = "MultiMedia1"; > > + unidirectional = <0>; > > + cpu { > > + sound-dai = <&lpass_cpu 1>; > > + }; > > + > > + codec { > > + sound-dai = <&max98357a>; > > + }; > > + }; > > + }; > > -- > > 2.28.0.rc0.105.gf9edc3c819-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=-10.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, 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 5FCA3C433E4 for ; Tue, 21 Jul 2020 11:31:27 +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 E0BB720B1F for ; Tue, 21 Jul 2020 11:31:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="QZ/qj7cw"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ZnnrxRa4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0BB720B1F 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 278E6169A; Tue, 21 Jul 2020 13:30:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 278E6169A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595331085; bh=u9LEuAAOGFD89FV8+kf9UWaz3Rn1GTHC1JcZrQhNTYE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QZ/qj7cwyOoEn8maidYyhtMC2YwWcliTqVeAgOObYKhmb1OE0DH+VYbxiETkjBNXo 6ZM3GnYWQOEatFJjvHlzeNqB3PirZ6laVLGMOTw0wG/ZJuit95XDpRBcYkpHbo4wwf I3RmM83BKkZnhvA0TgQDntLgGazh6Jnqa6iIJDMw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A2F23F80212; Tue, 21 Jul 2020 13:30:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 003E0F8024A; Tue, 21 Jul 2020 13:30:32 +0200 (CEST) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (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 5DDACF80087 for ; Tue, 21 Jul 2020 13:30:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5DDACF80087 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ZnnrxRa4" Received: by mail-wr1-x444.google.com with SMTP id a15so5897194wrh.10 for ; Tue, 21 Jul 2020 04:30:23 -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=lDCzyRG0rg1IT+D0XJL6mCguANQqA8rXobavVZvW96Y=; b=ZnnrxRa4si/xuCUdSQINme4yglZDejh1OO0DnrcmRn5h18itVyWY4KRvRkI/WNZ/Ll E/VPLadw2MbujNKNCVgXWitzmPWRAKdk5XTCel3V5qpcX6FGrqmGTmm4p15DMboso/NS FV4C1to8Pfy/qNsRbWTocSYQZzf6KtgCql62o= 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=lDCzyRG0rg1IT+D0XJL6mCguANQqA8rXobavVZvW96Y=; b=NcWRNXvBi1NUml0d1b/kUNu78tXVdQGRl7HyDVPuE+4ux0/LCtJ7p2QPEvdMRrk7E3 NgTAVKYx5F9XkRit2rhc8AZWGxEnQ0SPtGI8ie5jaXn8flTt3gjyeYbIyFudruC3vxEv H6T6/VPqbWcgdfFFBnJMA4Ixy+CMI30FhWNiLDFsIDXrCMavub0a5MLmI3lq7ZnPkUag FYmumO1eBGwxTydsloKvzPw89sZS5TD/FIXnhkEnz6bLSC6R7+9wD/cgcxt7dd6Me0Su fc7Ssdx3ZmGpIl8Yatm/6610CCaDQtzSHWYnFyCe6npWdJQOuK3mOJxV9vT9hQPPFJFM fyHA== X-Gm-Message-State: AOAM533RXz1peAavg6gRpQmM9gIqqABeZzriDOCaoHbOxp/WJBLpfXGl Co088KivNMXj7EgDOwVBvZ3dhFokbbtbltDcQDviJQ== X-Google-Smtp-Source: ABdhPJwbrVnmzJ0PnXN6sJ8jR7GyGTkbutQcRFVK+AheZaDBzYwZNbSJrjKJ1Gle1sfdgNlgwcpeGqJ0VnvJV9KH3Mw= X-Received: by 2002:a05:6000:1209:: with SMTP id e9mr12809989wrx.404.1595331021943; Tue, 21 Jul 2020 04:30:21 -0700 (PDT) MIME-Version: 1.0 References: <20200717120207.3471030-1-cychiang@chromium.org> In-Reply-To: From: Cheng-yi Chiang Date: Tue, 21 Jul 2020 19:29:55 +0800 Message-ID: Subject: Re: [PATCH 1/2] ASoC: qcom: dt-bindings: Add sc7180 machine bindings To: Doug Anderson Content-Type: text/plain; charset="UTF-8" Cc: Taniya Das , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , ALSA Development Mailing List , Banajit Goswami , linux-arm-msm , Patrick Lai , Liam Girdwood , Tzung-Bi Shih , Takashi Iwai , Rob Herring , Rohit kumar , Mark Brown , Andy Gross , Dylan Reid , Bjorn Andersson , LKML , 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 Fri, Jul 17, 2020 at 11:03 PM Doug Anderson wrote: > > Hi, > Thanks for the review! > On Fri, Jul 17, 2020 at 5:02 AM Cheng-Yi Chiang wrote: > > > > Add devicetree bindings documentation file for sc7180 sound card. > > > > Signed-off-by: Cheng-Yi Chiang > > --- > > .../bindings/sound/qcom,sc7180.yaml | 123 ++++++++++++++++++ > > 1 file changed, 123 insertions(+) > > A bit of a mechanical review since my audio knowledge is not strong. > > > > 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..d60d2880d991 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml > > @@ -0,0 +1,123 @@ > > +# 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. > > nit: you don't need the pipe at the end of the "description" line. > That means that newlines are important and you don't need it. > > Thanks for the explanation. Fixed in v2. > > +definitions: > > I haven't yet seen much yaml using definitions like this. It feels > like overkill for some of these properties, especially ones that are > only ever used once in the "properties:" section and are/or are really > simple. > > ACK. In v2 I only kept dai definition and removed others. > > + link-name: > > + description: Indicates dai-link name and PCM stream name. > > + $ref: /schemas/types.yaml#/definitions/string > > + maxItems: 1 > > + > > + dai: > > + type: object > > + properties: > > + sound-dai: > > + maxItems: 1 > > + $ref: /schemas/types.yaml#/definitions/phandle-array > > + description: phandle array of the codec or CPU DAI > > + > > + required: > > + - sound-dai > > + > > + unidirectional: > > + description: Specify direction of unidirectional dai link. > > + 0 for playback only. 1 for capture only. > > + $ref: /schemas/types.yaml#/definitions/uint32 > > So if the property isn't there then it's _not_ unidirectional and if > it is there then this specifies the direction, right? I almost wonder > if this should just be two boolean properties, like: > > playback-only; > capture-only; > > ...but I guess I'd leave it to Rob and/or Mark to say what they liked > better. In any case if you keep it how you have it then you should > use yaml to force it to be either 0 or 1 if present. > > ACK Use playback-only and capture-only in v2 instead. > > + > > +properties: > > + compatible: > > + contains: > > + enum: > > + - qcom,sc7180-sndcard > > Just: > > properties: > compatible: > const: qcom,sc7180-sndcard > > Fixed in v2. > > > + 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. > > You don't need the "|-" after the "description:". That says newlines > are important but strip the newline from the end. > Fixed in v2. > > > + model: > > + $ref: /schemas/types.yaml#/definitions/string > > + description: User specified audio sound card name > > + > > +patternProperties: > > + "^dai-link-[0-9]+$": > > + description: | > > + Each subnode represents a dai link. Subnodes of each dai links would be > > + cpu/codec dais. > > From looking at "simple-card.yaml", I'm gonna guess that instead of > encoding the link number in the name of the node that you should > actually use a unit address and a reg in the subnodes. Thanks for the explanation. Fixed in v2. I think this naming is better, although there is no usage in the machine driver for the reg. > > ...also, again your description doesn't need the "|" at the end. > Maybe will be useful to you? > > Thanks for the explanation and the pointer! > > + type: object > > + > > + properties: > > + link-name: > > + $ref: "#/definitions/link-name" > > + > > + unidirectional: > > + $ref: "#/definitions/unidirectional" > > + > > + cpu: > > + $ref: "#/definitions/dai" > > + > > + codec: > > + $ref: "#/definitions/dai" > > + > > + required: > > + - link-name > > + - cpu > > + - codec > > + > > + additionalProperties: false > > + > > +examples: > > + > > + - | > > + snd { > > Can you use the full node name "sound" here? > > Fixed in v2. > > + compatible = "qcom,sc7180-sndcard"; > > + model = "sc7180-snd-card"; > > + > > + pinctrl-names = "default"; > > + pinctrl-0 = <&sec_mi2s_active &sec_mi2s_dout_active > > + &sec_mi2s_ws_active &pri_mi2s_active > > + &pri_mi2s_dout_active &pri_mi2s_ws_active > > + &pri_mi2s_din_active &pri_mi2s_mclk_active>; > > I think pinctrl is usually not in the dt examples. > Fixed in v2. > ...also, shouldn't the mi2s pinctrl be in the i2s nodes, not in the > overall sound node? Yes. Thanks for pointing this out. Fixed in dts file in chromium. > > > > + audio-routing = > > + "Headphone Jack", "HPOL", > > + "Headphone Jack", "HPOR"; > > + > > + dai-link-0 { > > + link-name = "MultiMedia0"; > > + cpu { > > + sound-dai = <&lpass_cpu 0>; > > + }; > > + > > + codec { > > + sound-dai = <&alc5682 0>; > > + }; > > + }; > > + > > + dai-link-1 { > > + link-name = "MultiMedia1"; > > + unidirectional = <0>; > > + cpu { > > + sound-dai = <&lpass_cpu 1>; > > + }; > > + > > + codec { > > + sound-dai = <&max98357a>; > > + }; > > + }; > > + }; > > -- > > 2.28.0.rc0.105.gf9edc3c819-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=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,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 79BCBC433DF for ; Tue, 21 Jul 2020 11:32:16 +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 4815D206F2 for ; Tue, 21 Jul 2020 11:32:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="knozjMAQ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ZnnrxRa4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4815D206F2 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=jc5B9wmmFIdMVIgnu0yutvjMOqBPeFYCg7LbMYmd/68=; b=knozjMAQ/V0KbLFKuSu/VU7Lv tjodNgsK4seZtcZpNDVff0sJQq6KkB+h0nSpimcMDfS42uq1deECbb4vdk4djnYjQgoSPEfWrGwDG +RL0ZQsL1VhwwYCWV4grk/NKT/96G29XWzGwUk2MTlPYdFRpZu9SVQDt4Fd0WwLB83T1rXREZtfTA PUX2PkuThm+yKRjNcUUCvSNW0c6EpXFnKQRopdvzKCdSpiK/4mXQtCZ/Mt+l33X8ygq3iRV+Ahl5i BIx0X7Sa8ulO79I0FPQ7f5Ux1DiX7yTy7vOA/4vemqUwICrqnOY1jAr1yAJ3IMDOBbnytJKzrIIKe AWCsLrhcA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxqTc-0001i4-7u; Tue, 21 Jul 2020 11:30:28 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxqTZ-0001fH-FE for linux-arm-kernel@lists.infradead.org; Tue, 21 Jul 2020 11:30:26 +0000 Received: by mail-wr1-x443.google.com with SMTP id a14so5991505wra.5 for ; Tue, 21 Jul 2020 04:30:23 -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=lDCzyRG0rg1IT+D0XJL6mCguANQqA8rXobavVZvW96Y=; b=ZnnrxRa4si/xuCUdSQINme4yglZDejh1OO0DnrcmRn5h18itVyWY4KRvRkI/WNZ/Ll E/VPLadw2MbujNKNCVgXWitzmPWRAKdk5XTCel3V5qpcX6FGrqmGTmm4p15DMboso/NS FV4C1to8Pfy/qNsRbWTocSYQZzf6KtgCql62o= 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=lDCzyRG0rg1IT+D0XJL6mCguANQqA8rXobavVZvW96Y=; b=SUG1oYMDnQpipIpbSSG0zm2snhVaxzy0hmnjYMMuonbcf4wAsmGuO7Mu6VtcI6v3hG HAK2teAO1s+JVMgiaBHNLQmOedw3VtipXWsetm1hLCbGATPzF1wf+T4gUMNLdWXRzjLF W8ac86nmaPZoZamrBU8KJRYlaONVT/VlK52PTLgS+uerzvw9HjLU64XRk04NrhXx52e4 1sNZ6/1fI2Bazjidefr0qn/DPidlk5q9bT9eYP1XgO98AhArpy0Qabu9pLivocQ/sMjE BQJ+WPP2m7YYNKuTwlsndKI8BXKlLd4IR/241Q1Ai4/DlMoqhxcPSY8gNMeartHOKuo0 5/5A== X-Gm-Message-State: AOAM530VsaTYSVgahPoNYZi/kMESQgvK9U3Sad9ZRdIN8XN2UbmPAtK5 aCHOz5Fu2JChZywOfPShAyvQF3k0IEUzhK6xbmwEcg== X-Google-Smtp-Source: ABdhPJwbrVnmzJ0PnXN6sJ8jR7GyGTkbutQcRFVK+AheZaDBzYwZNbSJrjKJ1Gle1sfdgNlgwcpeGqJ0VnvJV9KH3Mw= X-Received: by 2002:a05:6000:1209:: with SMTP id e9mr12809989wrx.404.1595331021943; Tue, 21 Jul 2020 04:30:21 -0700 (PDT) MIME-Version: 1.0 References: <20200717120207.3471030-1-cychiang@chromium.org> In-Reply-To: From: Cheng-yi Chiang Date: Tue, 21 Jul 2020 19:29:55 +0800 Message-ID: Subject: Re: [PATCH 1/2] ASoC: qcom: dt-bindings: Add sc7180 machine bindings To: Doug Anderson X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200721_073025_565524_6157C3F5 X-CRM114-Status: GOOD ( 37.38 ) 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" , ALSA Development Mailing List , Banajit Goswami , linux-arm-msm , Patrick Lai , Liam Girdwood , Tzung-Bi Shih , Takashi Iwai , Rob Herring , Rohit kumar , Mark Brown , Andy Gross , Dylan Reid , Bjorn Andersson , LKML , 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 Fri, Jul 17, 2020 at 11:03 PM Doug Anderson wrote: > > Hi, > Thanks for the review! > On Fri, Jul 17, 2020 at 5:02 AM Cheng-Yi Chiang wrote: > > > > Add devicetree bindings documentation file for sc7180 sound card. > > > > Signed-off-by: Cheng-Yi Chiang > > --- > > .../bindings/sound/qcom,sc7180.yaml | 123 ++++++++++++++++++ > > 1 file changed, 123 insertions(+) > > A bit of a mechanical review since my audio knowledge is not strong. > > > > 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..d60d2880d991 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml > > @@ -0,0 +1,123 @@ > > +# 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. > > nit: you don't need the pipe at the end of the "description" line. > That means that newlines are important and you don't need it. > > Thanks for the explanation. Fixed in v2. > > +definitions: > > I haven't yet seen much yaml using definitions like this. It feels > like overkill for some of these properties, especially ones that are > only ever used once in the "properties:" section and are/or are really > simple. > > ACK. In v2 I only kept dai definition and removed others. > > + link-name: > > + description: Indicates dai-link name and PCM stream name. > > + $ref: /schemas/types.yaml#/definitions/string > > + maxItems: 1 > > + > > + dai: > > + type: object > > + properties: > > + sound-dai: > > + maxItems: 1 > > + $ref: /schemas/types.yaml#/definitions/phandle-array > > + description: phandle array of the codec or CPU DAI > > + > > + required: > > + - sound-dai > > + > > + unidirectional: > > + description: Specify direction of unidirectional dai link. > > + 0 for playback only. 1 for capture only. > > + $ref: /schemas/types.yaml#/definitions/uint32 > > So if the property isn't there then it's _not_ unidirectional and if > it is there then this specifies the direction, right? I almost wonder > if this should just be two boolean properties, like: > > playback-only; > capture-only; > > ...but I guess I'd leave it to Rob and/or Mark to say what they liked > better. In any case if you keep it how you have it then you should > use yaml to force it to be either 0 or 1 if present. > > ACK Use playback-only and capture-only in v2 instead. > > + > > +properties: > > + compatible: > > + contains: > > + enum: > > + - qcom,sc7180-sndcard > > Just: > > properties: > compatible: > const: qcom,sc7180-sndcard > > Fixed in v2. > > > + 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. > > You don't need the "|-" after the "description:". That says newlines > are important but strip the newline from the end. > Fixed in v2. > > > + model: > > + $ref: /schemas/types.yaml#/definitions/string > > + description: User specified audio sound card name > > + > > +patternProperties: > > + "^dai-link-[0-9]+$": > > + description: | > > + Each subnode represents a dai link. Subnodes of each dai links would be > > + cpu/codec dais. > > From looking at "simple-card.yaml", I'm gonna guess that instead of > encoding the link number in the name of the node that you should > actually use a unit address and a reg in the subnodes. Thanks for the explanation. Fixed in v2. I think this naming is better, although there is no usage in the machine driver for the reg. > > ...also, again your description doesn't need the "|" at the end. > Maybe will be useful to you? > > Thanks for the explanation and the pointer! > > + type: object > > + > > + properties: > > + link-name: > > + $ref: "#/definitions/link-name" > > + > > + unidirectional: > > + $ref: "#/definitions/unidirectional" > > + > > + cpu: > > + $ref: "#/definitions/dai" > > + > > + codec: > > + $ref: "#/definitions/dai" > > + > > + required: > > + - link-name > > + - cpu > > + - codec > > + > > + additionalProperties: false > > + > > +examples: > > + > > + - | > > + snd { > > Can you use the full node name "sound" here? > > Fixed in v2. > > + compatible = "qcom,sc7180-sndcard"; > > + model = "sc7180-snd-card"; > > + > > + pinctrl-names = "default"; > > + pinctrl-0 = <&sec_mi2s_active &sec_mi2s_dout_active > > + &sec_mi2s_ws_active &pri_mi2s_active > > + &pri_mi2s_dout_active &pri_mi2s_ws_active > > + &pri_mi2s_din_active &pri_mi2s_mclk_active>; > > I think pinctrl is usually not in the dt examples. > Fixed in v2. > ...also, shouldn't the mi2s pinctrl be in the i2s nodes, not in the > overall sound node? Yes. Thanks for pointing this out. Fixed in dts file in chromium. > > > > + audio-routing = > > + "Headphone Jack", "HPOL", > > + "Headphone Jack", "HPOR"; > > + > > + dai-link-0 { > > + link-name = "MultiMedia0"; > > + cpu { > > + sound-dai = <&lpass_cpu 0>; > > + }; > > + > > + codec { > > + sound-dai = <&alc5682 0>; > > + }; > > + }; > > + > > + dai-link-1 { > > + link-name = "MultiMedia1"; > > + unidirectional = <0>; > > + cpu { > > + sound-dai = <&lpass_cpu 1>; > > + }; > > + > > + codec { > > + sound-dai = <&max98357a>; > > + }; > > + }; > > + }; > > -- > > 2.28.0.rc0.105.gf9edc3c819-goog > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel