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=-14.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, 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 3803DC433DB for ; Wed, 13 Jan 2021 15:23: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 7882423329 for ; Wed, 13 Jan 2021 15:23:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7882423329 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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 B30EF16DB; Wed, 13 Jan 2021 16:22:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B30EF16DB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1610551408; bh=W+QdX5ldSEd31t12yzV1m3tR3iTcBhgYI5dXBhY80F0=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=XPCCMHqgGYLnn7XMA6sUkW0vmpZXwYTMXSgxb2sXZMxF1queyn1Q/2FE521JZxyO4 2arIOXcjEaFkfCcyNF36lNb9VlMTpaiI6ajqaL+liWj53J87fXaAhtRuyEG81laf9i dbcz8/3GSbZ/5GRC5BPkMQ/g76Y4hYmc9UVT7d3A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2766DF80085; Wed, 13 Jan 2021 16:22:38 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 35031F801ED; Wed, 13 Jan 2021 16:22:37 +0100 (CET) Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) (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 E7AB3F80085 for ; Wed, 13 Jan 2021 16:22:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E7AB3F80085 Received: by mail-ot1-f48.google.com with SMTP id o11so2221579ote.4 for ; Wed, 13 Jan 2021 07:22:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SE9am3kq8RjarWOXnd9kdCTvbTnepwR4fe9xga07N+k=; b=cYPdQgDSVHTSMwfjhOfgruRGe574oONZ7l/w4YfaPm9XRmZ846O9JF6VFCRdQjpQ0t 4BtFbUCp3xDUc+eJ0ixqmu/KvZb/V6XYBAubuGV2AV4lX5dk9LjkIAJy4WNSJFbf+tGz E2pO8SXpX3vMXvcP/gh8hdMPX3Se4zmDl0E0gs+vTsz5y1YU8eooIDPlPmg9szh41czf KmvBuJbzrO8d84of0Cta/WEtcKNOc1tMvYESdt48iQkxz7HFdHe3QieoKO+NEA75QmwQ fvX2HyYJkQBQ5bGoOUmDsl1Yey81qZh0N9wx8rBb8CLLX5M4qxbph4vE4a8OW9bS08fk L8xQ== X-Gm-Message-State: AOAM530mDTgEfIxacGdMtkPX9B2eIqh29ssB/hRL/tmEDLyskrA/sgTC hoy5XGGY4HY2zb4T6sdN6w== X-Google-Smtp-Source: ABdhPJyXSD7O2u+KLy4dCmhAaS4RrzejnZJ8LhZpdTnooicBMv0HLXKioHgADiNofONZ/RIUjKsn5g== X-Received: by 2002:a9d:470f:: with SMTP id a15mr1617646otf.62.1610551347611; Wed, 13 Jan 2021 07:22:27 -0800 (PST) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id e10sm437795otl.38.2021.01.13.07.22.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 07:22:26 -0800 (PST) Received: (nullmailer pid 2470201 invoked by uid 1000); Wed, 13 Jan 2021 15:22:25 -0000 Date: Wed, 13 Jan 2021 09:22:25 -0600 From: Rob Herring To: Richard Fitzgerald Subject: Re: [PATCH v4 2/6] dt-bindings: audio-graph-card: Add plls and sysclks properties Message-ID: <20210113152225.GA2334778@robh.at.kernel.org> References: <20210108160501.7638-1-rf@opensource.cirrus.com> <20210108160501.7638-3-rf@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210108160501.7638-3-rf@opensource.cirrus.com> Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, f.fainelli@gmail.com, kuninori.morimoto.gx@renesas.com, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, broonie@kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, nsaenzjulienne@suse.de 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, Jan 08, 2021 at 04:04:57PM +0000, Richard Fitzgerald wrote: > The audio-graph-card driver has properties for configuring the clocking > for DAIs within a component, but is missing properties for setting > up the PLLs and sysclks of the component. > > This patch adds the two new properties 'plls' and 'sysclks' so that the > audio-graph-driver can fully configure the component clocking. I'm not sure this makes sense to be generic, but if so, we already have the clock binding and should use (and possibly extend) that. This appears to all be configuration of clocks within the codec, so these properties belong in the codec or cpu nodes. > Signed-off-by: Richard Fitzgerald > --- > .../bindings/sound/audio-graph.yaml | 46 +++++++++++++++++++ > 1 file changed, 46 insertions(+) > > diff --git a/Documentation/devicetree/bindings/sound/audio-graph.yaml b/Documentation/devicetree/bindings/sound/audio-graph.yaml > index 4b46794e5153..9e0819205a17 100644 > --- a/Documentation/devicetree/bindings/sound/audio-graph.yaml > +++ b/Documentation/devicetree/bindings/sound/audio-graph.yaml > @@ -39,6 +39,52 @@ properties: > mic-det-gpio: > maxItems: 1 > > + plls: > + description: | > + A list of component pll settings. There are 4 cells per PLL setting: > + - phandle to the node of the codec or cpu component, > + - component PLL id, > + - component clock source id, > + - frequency (in Hz) of the PLL output clock. assigned-clocks binding can set frequencies and parent clocks. 'pll' is too specific to the implementation. You may want to configure the freq and parent of something that's not a pll. > + The PLL id and clock source id are specific to the particular component > + so see the relevant component driver for the ids. Typically the > + clock source id indicates the pin the source clock is connected to. > + The same phandle can appear in multiple entries so that several plls > + can be set in the same component. > + $ref: /schemas/types.yaml#/definitions/phandle-array > + > + plls-clocks: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + description: | > + A list of clock names giving the source clock for each setting > + in the plls property. > + > + sysclks: > + description: | > + A list of component sysclk settings. There are 4 cells per sysclk > + setting: > + - phandle to the node of the codec or cpu component, > + - component sysclk id, > + - component clock source id, > + - direction of the clock: 0 if the clock is an input to the component, > + 1 if it is an output. A clock provider and consumer would provide the direction. > + The sysclk id and clock source id are specific to the particular > + component so see the relevant component driver for the ids. Typically > + the clock source id indicates the pin the source clock is connected to. > + The same phandle can appear in multiple entries so that several sysclks > + can be set in the same component. > + $ref: /schemas/types.yaml#/definitions/phandle-array > + > + sysclks-clocks: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + description: | > + A list of clock names giving the source clock for each setting > + in the sysclks property. > + > +dependencies: > + plls: [ plls-clocks ] > + sysclks: [ sysclks-clocks ] > + > required: > - dais > > -- > 2.20.1 > 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=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, 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 5B5DFC433E0 for ; Wed, 13 Jan 2021 15:24:19 +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 078F623329 for ; Wed, 13 Jan 2021 15:24:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 078F623329 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DcgjaorpxBgtA2/K4Z0kjteE+D5oa9mNp1kH7pPQH/o=; b=rL+9G6I2N4RqC6md7R2uakO9b SrdMauUWDOpdgvVANsY1FqYSBUIPsBhPxyKGXyJRFivy9cp5632TZJb3EecS3XnaB4/srbWiT2Efq eO/b83/fVzHe7pcIG7B9w0dHOIe66QZGYdSV8vFo+1LEcQj/VRrQ7i8vj5WnHMQBFgX5LEZF8oEuL IkViRSjJMgTz3Pz0zucz/EZQFBRJvVRFnqjNYetvvdpVtjTAaVULRyk58byd2t1TjirwIUL/ettDL o4YL1qGeke/5Ar4oEIuOae8nSWDjPQMR3GX9iLlgb5ymi9EZzk3lmX+oj5hHJuXYXk4HAO7pJEjKH 4lQG3yKrw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzhyr-0001OZ-Pv; Wed, 13 Jan 2021 15:22:41 +0000 Received: from mail-ot1-f50.google.com ([209.85.210.50]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzhyl-0001KT-SJ; Wed, 13 Jan 2021 15:22:40 +0000 Received: by mail-ot1-f50.google.com with SMTP id d20so2226463otl.3; Wed, 13 Jan 2021 07:22:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SE9am3kq8RjarWOXnd9kdCTvbTnepwR4fe9xga07N+k=; b=cK9qjR3JjvbHiQ/htgNd5wpWVW2BMiYtxXKNY6o6qNP41lc8yQ0OhKNnsBDPqCgW4k l0ptIiMnxEbQJQM5OBSx13/inSGsOWSuAu6JZTZCMiBsfgyV0MiAZp5jqTUip+5iz1rw JC5g1ikl/SL0WOyc00Gr+nsDtuR+kPuMEAaZkMz5wuFbTUaR0evW+/k39Zc8yg9yW9/V pNGbQMZzE7JYzEvj5DeH15ZceFd8bmjs5d5gJAdUQvtVrbsx35F7c/rlNyZyHE88hTb0 JOCyh/NHwtzXtfIjm+rdyqaJDF4ZBobqCURoDNicu7+AY0BZ0tGmZYNuD/mZXDkjCUU7 PO6A== X-Gm-Message-State: AOAM533HNODxXnZGIlnxxmaUm2jRCGPc0s2AauwbPsML40dPDSbBPMU/ KTUr/ZbgbsWSTumGRfe+QsLJUctIjA== X-Google-Smtp-Source: ABdhPJyXSD7O2u+KLy4dCmhAaS4RrzejnZJ8LhZpdTnooicBMv0HLXKioHgADiNofONZ/RIUjKsn5g== X-Received: by 2002:a9d:470f:: with SMTP id a15mr1617646otf.62.1610551347611; Wed, 13 Jan 2021 07:22:27 -0800 (PST) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id e10sm437795otl.38.2021.01.13.07.22.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 07:22:26 -0800 (PST) Received: (nullmailer pid 2470201 invoked by uid 1000); Wed, 13 Jan 2021 15:22:25 -0000 Date: Wed, 13 Jan 2021 09:22:25 -0600 From: Rob Herring To: Richard Fitzgerald Subject: Re: [PATCH v4 2/6] dt-bindings: audio-graph-card: Add plls and sysclks properties Message-ID: <20210113152225.GA2334778@robh.at.kernel.org> References: <20210108160501.7638-1-rf@opensource.cirrus.com> <20210108160501.7638-3-rf@opensource.cirrus.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210108160501.7638-3-rf@opensource.cirrus.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210113_102235_957718_068A675C X-CRM114-Status: GOOD ( 23.45 ) 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: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, f.fainelli@gmail.com, kuninori.morimoto.gx@renesas.com, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, broonie@kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, nsaenzjulienne@suse.de 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, Jan 08, 2021 at 04:04:57PM +0000, Richard Fitzgerald wrote: > The audio-graph-card driver has properties for configuring the clocking > for DAIs within a component, but is missing properties for setting > up the PLLs and sysclks of the component. > > This patch adds the two new properties 'plls' and 'sysclks' so that the > audio-graph-driver can fully configure the component clocking. I'm not sure this makes sense to be generic, but if so, we already have the clock binding and should use (and possibly extend) that. This appears to all be configuration of clocks within the codec, so these properties belong in the codec or cpu nodes. > Signed-off-by: Richard Fitzgerald > --- > .../bindings/sound/audio-graph.yaml | 46 +++++++++++++++++++ > 1 file changed, 46 insertions(+) > > diff --git a/Documentation/devicetree/bindings/sound/audio-graph.yaml b/Documentation/devicetree/bindings/sound/audio-graph.yaml > index 4b46794e5153..9e0819205a17 100644 > --- a/Documentation/devicetree/bindings/sound/audio-graph.yaml > +++ b/Documentation/devicetree/bindings/sound/audio-graph.yaml > @@ -39,6 +39,52 @@ properties: > mic-det-gpio: > maxItems: 1 > > + plls: > + description: | > + A list of component pll settings. There are 4 cells per PLL setting: > + - phandle to the node of the codec or cpu component, > + - component PLL id, > + - component clock source id, > + - frequency (in Hz) of the PLL output clock. assigned-clocks binding can set frequencies and parent clocks. 'pll' is too specific to the implementation. You may want to configure the freq and parent of something that's not a pll. > + The PLL id and clock source id are specific to the particular component > + so see the relevant component driver for the ids. Typically the > + clock source id indicates the pin the source clock is connected to. > + The same phandle can appear in multiple entries so that several plls > + can be set in the same component. > + $ref: /schemas/types.yaml#/definitions/phandle-array > + > + plls-clocks: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + description: | > + A list of clock names giving the source clock for each setting > + in the plls property. > + > + sysclks: > + description: | > + A list of component sysclk settings. There are 4 cells per sysclk > + setting: > + - phandle to the node of the codec or cpu component, > + - component sysclk id, > + - component clock source id, > + - direction of the clock: 0 if the clock is an input to the component, > + 1 if it is an output. A clock provider and consumer would provide the direction. > + The sysclk id and clock source id are specific to the particular > + component so see the relevant component driver for the ids. Typically > + the clock source id indicates the pin the source clock is connected to. > + The same phandle can appear in multiple entries so that several sysclks > + can be set in the same component. > + $ref: /schemas/types.yaml#/definitions/phandle-array > + > + sysclks-clocks: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + description: | > + A list of clock names giving the source clock for each setting > + in the sysclks property. > + > +dependencies: > + plls: [ plls-clocks ] > + sysclks: [ sysclks-clocks ] > + > required: > - dais > > -- > 2.20.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 57A48C433E0 for ; Wed, 13 Jan 2021 15:23:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08AEE23329 for ; Wed, 13 Jan 2021 15:23:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726523AbhAMPXJ (ORCPT ); Wed, 13 Jan 2021 10:23:09 -0500 Received: from mail-ot1-f53.google.com ([209.85.210.53]:44014 "EHLO mail-ot1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725801AbhAMPXI (ORCPT ); Wed, 13 Jan 2021 10:23:08 -0500 Received: by mail-ot1-f53.google.com with SMTP id q25so2188337otn.10; Wed, 13 Jan 2021 07:22:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SE9am3kq8RjarWOXnd9kdCTvbTnepwR4fe9xga07N+k=; b=r/VicUnQ5yw2wjSj7r9xoU+qkGFHn34sd4UBjOF6JIlEHEt9rF+xwjTZxnAV5ZeRaK 6Q4OztWVwzRruQM4ve8JUvkZ2N1NYSGp/ONWauok0WVYDy0lPkiteEqotL5H0BFYGOJr xRlRGOsUKFL6Au3yeM6g3dxBO2juwKkZRBTCMBbBcDjJzDApes0CiBQRUvLAzrWe6pCT fT7ZT+2DX9VEDL8Bl2kdns2f9FLOIrpDkkZqRvhbFLZgG8gXI56TiBfQMNGSziWHDNp5 RMWLaOrtH6tjQt9GRZGyRBe64oRDngMAQZ2G8hZLHeZrH04NmXTzPIhPDYH0bHCPK3E5 v+Hw== X-Gm-Message-State: AOAM531KIU3ZH65iPsLT3RJbc6+n274qu4M9r+vDriG8KVvw+8c9l8OF 0M6JSe1c0B9b6F834U0iTA== X-Google-Smtp-Source: ABdhPJyXSD7O2u+KLy4dCmhAaS4RrzejnZJ8LhZpdTnooicBMv0HLXKioHgADiNofONZ/RIUjKsn5g== X-Received: by 2002:a9d:470f:: with SMTP id a15mr1617646otf.62.1610551347611; Wed, 13 Jan 2021 07:22:27 -0800 (PST) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id e10sm437795otl.38.2021.01.13.07.22.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 07:22:26 -0800 (PST) Received: (nullmailer pid 2470201 invoked by uid 1000); Wed, 13 Jan 2021 15:22:25 -0000 Date: Wed, 13 Jan 2021 09:22:25 -0600 From: Rob Herring To: Richard Fitzgerald Cc: broonie@kernel.org, kuninori.morimoto.gx@renesas.com, nsaenzjulienne@suse.de, f.fainelli@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 2/6] dt-bindings: audio-graph-card: Add plls and sysclks properties Message-ID: <20210113152225.GA2334778@robh.at.kernel.org> References: <20210108160501.7638-1-rf@opensource.cirrus.com> <20210108160501.7638-3-rf@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210108160501.7638-3-rf@opensource.cirrus.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Fri, Jan 08, 2021 at 04:04:57PM +0000, Richard Fitzgerald wrote: > The audio-graph-card driver has properties for configuring the clocking > for DAIs within a component, but is missing properties for setting > up the PLLs and sysclks of the component. > > This patch adds the two new properties 'plls' and 'sysclks' so that the > audio-graph-driver can fully configure the component clocking. I'm not sure this makes sense to be generic, but if so, we already have the clock binding and should use (and possibly extend) that. This appears to all be configuration of clocks within the codec, so these properties belong in the codec or cpu nodes. > Signed-off-by: Richard Fitzgerald > --- > .../bindings/sound/audio-graph.yaml | 46 +++++++++++++++++++ > 1 file changed, 46 insertions(+) > > diff --git a/Documentation/devicetree/bindings/sound/audio-graph.yaml b/Documentation/devicetree/bindings/sound/audio-graph.yaml > index 4b46794e5153..9e0819205a17 100644 > --- a/Documentation/devicetree/bindings/sound/audio-graph.yaml > +++ b/Documentation/devicetree/bindings/sound/audio-graph.yaml > @@ -39,6 +39,52 @@ properties: > mic-det-gpio: > maxItems: 1 > > + plls: > + description: | > + A list of component pll settings. There are 4 cells per PLL setting: > + - phandle to the node of the codec or cpu component, > + - component PLL id, > + - component clock source id, > + - frequency (in Hz) of the PLL output clock. assigned-clocks binding can set frequencies and parent clocks. 'pll' is too specific to the implementation. You may want to configure the freq and parent of something that's not a pll. > + The PLL id and clock source id are specific to the particular component > + so see the relevant component driver for the ids. Typically the > + clock source id indicates the pin the source clock is connected to. > + The same phandle can appear in multiple entries so that several plls > + can be set in the same component. > + $ref: /schemas/types.yaml#/definitions/phandle-array > + > + plls-clocks: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + description: | > + A list of clock names giving the source clock for each setting > + in the plls property. > + > + sysclks: > + description: | > + A list of component sysclk settings. There are 4 cells per sysclk > + setting: > + - phandle to the node of the codec or cpu component, > + - component sysclk id, > + - component clock source id, > + - direction of the clock: 0 if the clock is an input to the component, > + 1 if it is an output. A clock provider and consumer would provide the direction. > + The sysclk id and clock source id are specific to the particular > + component so see the relevant component driver for the ids. Typically > + the clock source id indicates the pin the source clock is connected to. > + The same phandle can appear in multiple entries so that several sysclks > + can be set in the same component. > + $ref: /schemas/types.yaml#/definitions/phandle-array > + > + sysclks-clocks: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + description: | > + A list of clock names giving the source clock for each setting > + in the sysclks property. > + > +dependencies: > + plls: [ plls-clocks ] > + sysclks: [ sysclks-clocks ] > + > required: > - dais > > -- > 2.20.1 >