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 2CB51C433E0 for ; Mon, 21 Dec 2020 22:35: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 8EADC22BF3 for ; Mon, 21 Dec 2020 22:35:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EADC22BF3 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 F41421703; Mon, 21 Dec 2020 23:34:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F41421703 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1608590123; bh=n3KjFUapaly9UL4O1EOPJT9qXVgiDBKI5T6rsobTMMU=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VZQqLyoXCCm3gelREL4p9e/PezL2T0ghc9JhtGXvjayCwPe53Yp5L1R9czvWgCpLl /ToX/Q6s4Zhr/bEECR/ysGCGUge8txlQiDhiZkhKdjvlO+Gl5W8N/4YDVTpOnYyejd mS7AnzbZifWdNsW2yicISX+JtcRIVwvk6xNKpJfI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8359FF80168; Mon, 21 Dec 2020 23:34:32 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1F024F801D5; Mon, 21 Dec 2020 23:34:27 +0100 (CET) Received: from mail-oo1-f45.google.com (mail-oo1-f45.google.com [209.85.161.45]) (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 20FB0F80116 for ; Mon, 21 Dec 2020 23:34:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 20FB0F80116 Received: by mail-oo1-f45.google.com with SMTP id n127so2550302ooa.13 for ; Mon, 21 Dec 2020 14:34:19 -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=nwkmxUnyc+70jBLqAzr5iSoKUZYnqKhXG4oOa7bmAVY=; b=tXKo3ua/X3lCqDskE3oyidSFOhfr0nMtcCKbPce3C0y7gvEdWr/B8nFihy7op5RJrE bZiMZVbVip8P7ilHiMiw0GWXhrHKMtkPOdK0eco6sh51hK84MBYts/fJQf3UyveAXN/W 8zz2N6sn7Rt6jcTSOBN8XZcNcujdTpIoeBigoBcMR1HVP18eJuokvuXplfUH4YHcjgkN QENxB9Y6RcEBb39HazVwjSEI5aTDWkZAzaegt9XEjp/gOpilc8PDCBovtSjWrb/9NT7z 1KljTPQWneQTu+Zb+4XqE0dwF9sTni9CucZiU5fc/iRbDIRuZ5rPQF3WIolWxbma4Fyi KMRQ== X-Gm-Message-State: AOAM533Lsz0+ttQ3Cs+xWVhqyYJ4QnBE/dtkVRXJA1H4Dvw8qY1p1et6 wCijTY5K1HJ3DQhUwx7Hbw== X-Google-Smtp-Source: ABdhPJzZe4HjIcXZYX6IiGv6NVNfbHgWdbvac2UXEoc2OdCwz2tKMLWGBTFtRKX8zgTcFXnio+DJ+Q== X-Received: by 2002:a05:6820:503:: with SMTP id m3mr13135986ooj.83.1608590057671; Mon, 21 Dec 2020 14:34:17 -0800 (PST) Received: from robh.at.kernel.org ([64.188.179.253]) by smtp.gmail.com with ESMTPSA id p18sm3916482ood.48.2020.12.21.14.34.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 14:34:16 -0800 (PST) Received: (nullmailer pid 693960 invoked by uid 1000); Mon, 21 Dec 2020 22:34:13 -0000 Date: Mon, 21 Dec 2020 15:34:13 -0700 From: Rob Herring To: Richard Fitzgerald Subject: Re: [PATCH v3 2/6] ASoC: audio-graph-card: Add plls and sysclks DT bindings Message-ID: <20201221223413.GA693000@robh.at.kernel.org> References: <20201217154142.24301-1-rf@opensource.cirrus.com> <20201217154142.24301-3-rf@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201217154142.24301-3-rf@opensource.cirrus.com> Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, 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 Thu, Dec 17, 2020 at 03:41:38PM +0000, Richard Fitzgerald wrote: > The audio-graph-card driver has bindings for configuring the clocking > for DAIs within a component, but is missing bindings for setting > up the PLLs and sysclks of the component. > > This patch adds the two new bindings 'plls' and 'sysclks' so that the > audio-graph-driver can fully configure the component clocking. > > Signed-off-by: Richard Fitzgerald > --- > .../bindings/sound/audio-graph-card.txt | 72 +++++++++++++++++++ > 1 file changed, 72 insertions(+) This is a schema now in master. > > diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.txt b/Documentation/devicetree/bindings/sound/audio-graph-card.txt > index d5f6919a2d69..30405e64cfbb 100644 > --- a/Documentation/devicetree/bindings/sound/audio-graph-card.txt > +++ b/Documentation/devicetree/bindings/sound/audio-graph-card.txt > @@ -32,6 +32,40 @@ Required properties: > Optional properties: > - pa-gpios: GPIO used to control external amplifier. > > +- plls: 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. > + > + 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. > + > +- plls-clocks: A list of clock names giving the source clock for each setting > + in the plls property. > + > +- sysclks: 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. > + > + 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. > + > +- sysclks-clocks: A list of clock names giving the source clock for each setting > + in the sysclks property. > + > ----------------------- > Example: Single DAI case > ----------------------- > @@ -335,3 +369,41 @@ Example: Multi DAI with DPCM > }; > }; > }; > + > +----------------------- > +Example: Set component sysclks and PLLs > +----------------------- > + > + sound { > + compatible = "audio-graph-card"; > + > + clocks = <&audioclk>, <&pll1>; > + clock-names = "audioclk", "pll1"; > + > + plls = <&cs47l15 MADERA_FLL1_REFCLK MADERA_FLL_SRC_MCLK1 98304000>; > + plls-clocks = "audioclk"; > + > + sysclks = <&cs47l15 MADERA_CLK_SYSCLK_1 MADERA_CLK_SRC_FLL1 0>; > + sysclks-clocks = "pll1"; > + > + dais = <&cpu_i2s_port>; > + > + pll1: pll1 { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <98304000>; > + }; > + }; > + > + cs47l15: codec@0 { > + ... > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + cs47l15_aif1_port: port@0 { > + reg = <0>; > + cs47l15_aif1: endpoint { > + remote-endpoint = <&cpu_i2s_endpoint>; > + }; > + }; > + }; > -- > 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.0 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 9FC43C433DB for ; Mon, 21 Dec 2020 22:35:35 +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 3C9D722BE9 for ; Mon, 21 Dec 2020 22:35:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C9D722BE9 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=FKgNF5FJNJyGQZ03yGjs6kJ8/nkKvZawnKu3KbCrIKo=; b=KWib2AfeuA/7UMM4kU2n0lHjL smj+kVEs4v9VZQdY7swTwsXbKJ8kb2GCJoSLZ9an/8Q4AlNb4FjCEQJD6XpkMHevm937Cvcl408bd cUH6a0RL1sBSaVdMmpy1bPh1y3Mrco/aYmS/njzT1MRqxuoaum7qRVV1CuOaI2mpKqGLGogoZS0wU i8+jvfMaKjX1MCZwSb8ml+Y+x4H+DFFT5FNKRrVd0P9bcoDgVx5dL6BD0SSScVLeEWwndl2UQklUi MPelcpxchoRp8k9V1A9YgnnSYKyrjJXxLIU3lYSRsezK3vyhAoTxmIzmI++6aymGiPKC4mUk4tUec 61zmuilZw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krTl0-0000NM-A4; Mon, 21 Dec 2020 22:34:22 +0000 Received: from mail-oo1-f47.google.com ([209.85.161.47]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krTkw-0000MP-Sv; Mon, 21 Dec 2020 22:34:19 +0000 Received: by mail-oo1-f47.google.com with SMTP id o5so2546163oop.12; Mon, 21 Dec 2020 14:34:18 -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=nwkmxUnyc+70jBLqAzr5iSoKUZYnqKhXG4oOa7bmAVY=; b=Dl4CLyCuEP/sabYF5L3YguafhV3VMUegwgi1KNWfmgEcCby+0lTVSZ9Icvw/CesCko CXDD9mO25qMf4VHF1REsR2v/sVxQeuSt/1EYNdA+2jfrj5+16HVvc4yPlx2UsIxIVX0o KF5jdTV8PoyvergGCssPrOCPFfUmV1aiSRh+a4IxYiA3o1gHDeuAMQmUBJkEHTxzhPuq Ecb40K4yITDda88ehA7lJAwnLw3r8mT55rRgSgDu1FXczPrDslgfXdWfp3M4JmqrcF+J Z5od8jBXPvxn81MiLWkrVoI7IDEy/2pS6SWBrb6CzqXTWgnuscK7+8drkn4CCc2LzY5M P3Sw== X-Gm-Message-State: AOAM533LNk3m1awsfbDriAxHCz6b3e8yTmHVWZB7Esosv7Oz/zU2vru/ 5XruKC/Jp1lEX4ckT1/UYw== X-Google-Smtp-Source: ABdhPJzZe4HjIcXZYX6IiGv6NVNfbHgWdbvac2UXEoc2OdCwz2tKMLWGBTFtRKX8zgTcFXnio+DJ+Q== X-Received: by 2002:a05:6820:503:: with SMTP id m3mr13135986ooj.83.1608590057671; Mon, 21 Dec 2020 14:34:17 -0800 (PST) Received: from robh.at.kernel.org ([64.188.179.253]) by smtp.gmail.com with ESMTPSA id p18sm3916482ood.48.2020.12.21.14.34.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 14:34:16 -0800 (PST) Received: (nullmailer pid 693960 invoked by uid 1000); Mon, 21 Dec 2020 22:34:13 -0000 Date: Mon, 21 Dec 2020 15:34:13 -0700 From: Rob Herring To: Richard Fitzgerald Subject: Re: [PATCH v3 2/6] ASoC: audio-graph-card: Add plls and sysclks DT bindings Message-ID: <20201221223413.GA693000@robh.at.kernel.org> References: <20201217154142.24301-1-rf@opensource.cirrus.com> <20201217154142.24301-3-rf@opensource.cirrus.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201217154142.24301-3-rf@opensource.cirrus.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201221_173418_955099_5F020D35 X-CRM114-Status: GOOD ( 24.36 ) 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, 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 Thu, Dec 17, 2020 at 03:41:38PM +0000, Richard Fitzgerald wrote: > The audio-graph-card driver has bindings for configuring the clocking > for DAIs within a component, but is missing bindings for setting > up the PLLs and sysclks of the component. > > This patch adds the two new bindings 'plls' and 'sysclks' so that the > audio-graph-driver can fully configure the component clocking. > > Signed-off-by: Richard Fitzgerald > --- > .../bindings/sound/audio-graph-card.txt | 72 +++++++++++++++++++ > 1 file changed, 72 insertions(+) This is a schema now in master. > > diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.txt b/Documentation/devicetree/bindings/sound/audio-graph-card.txt > index d5f6919a2d69..30405e64cfbb 100644 > --- a/Documentation/devicetree/bindings/sound/audio-graph-card.txt > +++ b/Documentation/devicetree/bindings/sound/audio-graph-card.txt > @@ -32,6 +32,40 @@ Required properties: > Optional properties: > - pa-gpios: GPIO used to control external amplifier. > > +- plls: 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. > + > + 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. > + > +- plls-clocks: A list of clock names giving the source clock for each setting > + in the plls property. > + > +- sysclks: 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. > + > + 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. > + > +- sysclks-clocks: A list of clock names giving the source clock for each setting > + in the sysclks property. > + > ----------------------- > Example: Single DAI case > ----------------------- > @@ -335,3 +369,41 @@ Example: Multi DAI with DPCM > }; > }; > }; > + > +----------------------- > +Example: Set component sysclks and PLLs > +----------------------- > + > + sound { > + compatible = "audio-graph-card"; > + > + clocks = <&audioclk>, <&pll1>; > + clock-names = "audioclk", "pll1"; > + > + plls = <&cs47l15 MADERA_FLL1_REFCLK MADERA_FLL_SRC_MCLK1 98304000>; > + plls-clocks = "audioclk"; > + > + sysclks = <&cs47l15 MADERA_CLK_SYSCLK_1 MADERA_CLK_SRC_FLL1 0>; > + sysclks-clocks = "pll1"; > + > + dais = <&cpu_i2s_port>; > + > + pll1: pll1 { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <98304000>; > + }; > + }; > + > + cs47l15: codec@0 { > + ... > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + cs47l15_aif1_port: port@0 { > + reg = <0>; > + cs47l15_aif1: endpoint { > + remote-endpoint = <&cpu_i2s_endpoint>; > + }; > + }; > + }; > -- > 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=ham 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 18F8AC433DB for ; Mon, 21 Dec 2020 22:35:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB83A22BE9 for ; Mon, 21 Dec 2020 22:34:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726016AbgLUWe7 (ORCPT ); Mon, 21 Dec 2020 17:34:59 -0500 Received: from mail-oo1-f51.google.com ([209.85.161.51]:37053 "EHLO mail-oo1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbgLUWe6 (ORCPT ); Mon, 21 Dec 2020 17:34:58 -0500 Received: by mail-oo1-f51.google.com with SMTP id p72so2563157oop.4; Mon, 21 Dec 2020 14:34:43 -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=nwkmxUnyc+70jBLqAzr5iSoKUZYnqKhXG4oOa7bmAVY=; b=T4eJDsuoyvBrbpz4OfpfsF0tAjdQWCzZQusPR6JGszvcdsXf4+0v7e4Fy8rjjRYkn3 kmTpsZY+ljHcnkEedsL7iVIO3S+8Heh2oPyUtlhIATCWETzEsFNZhef+VRP6xyz2akcZ Pnn+NNu2LAmrw3l1PTKN1eKKy8fQFlnfseXqppw33ARp7S+6IjzWBi51/1JplJW9I8fw lgmVhTrAwRT6l1Nc/ye/JPfR5UDt5IA5svBxinWmWUEkTg1vrWK4eD4/8jIuO39sl5N0 bRl9TAnSms92FzcUa+Pyx3qZxWBOY/cxlRNKsPPyIAla8eXW4NfacgPn8gmcNLNaboZx tYfA== X-Gm-Message-State: AOAM531Q2vmrgGRehS/yCoxLZgTbeunFJndUDcyGe/1pVZHsNY+xNF+u xzmhtYYoKYb2Uf4CyjWMJw== X-Google-Smtp-Source: ABdhPJzZe4HjIcXZYX6IiGv6NVNfbHgWdbvac2UXEoc2OdCwz2tKMLWGBTFtRKX8zgTcFXnio+DJ+Q== X-Received: by 2002:a05:6820:503:: with SMTP id m3mr13135986ooj.83.1608590057671; Mon, 21 Dec 2020 14:34:17 -0800 (PST) Received: from robh.at.kernel.org ([64.188.179.253]) by smtp.gmail.com with ESMTPSA id p18sm3916482ood.48.2020.12.21.14.34.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 14:34:16 -0800 (PST) Received: (nullmailer pid 693960 invoked by uid 1000); Mon, 21 Dec 2020 22:34:13 -0000 Date: Mon, 21 Dec 2020 15:34:13 -0700 From: Rob Herring To: Richard Fitzgerald Cc: broonie@kernel.org, kuninori.morimoto.gx@renesas.com, nsaenzjulienne@suse.de, 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 v3 2/6] ASoC: audio-graph-card: Add plls and sysclks DT bindings Message-ID: <20201221223413.GA693000@robh.at.kernel.org> References: <20201217154142.24301-1-rf@opensource.cirrus.com> <20201217154142.24301-3-rf@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201217154142.24301-3-rf@opensource.cirrus.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Dec 17, 2020 at 03:41:38PM +0000, Richard Fitzgerald wrote: > The audio-graph-card driver has bindings for configuring the clocking > for DAIs within a component, but is missing bindings for setting > up the PLLs and sysclks of the component. > > This patch adds the two new bindings 'plls' and 'sysclks' so that the > audio-graph-driver can fully configure the component clocking. > > Signed-off-by: Richard Fitzgerald > --- > .../bindings/sound/audio-graph-card.txt | 72 +++++++++++++++++++ > 1 file changed, 72 insertions(+) This is a schema now in master. > > diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.txt b/Documentation/devicetree/bindings/sound/audio-graph-card.txt > index d5f6919a2d69..30405e64cfbb 100644 > --- a/Documentation/devicetree/bindings/sound/audio-graph-card.txt > +++ b/Documentation/devicetree/bindings/sound/audio-graph-card.txt > @@ -32,6 +32,40 @@ Required properties: > Optional properties: > - pa-gpios: GPIO used to control external amplifier. > > +- plls: 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. > + > + 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. > + > +- plls-clocks: A list of clock names giving the source clock for each setting > + in the plls property. > + > +- sysclks: 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. > + > + 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. > + > +- sysclks-clocks: A list of clock names giving the source clock for each setting > + in the sysclks property. > + > ----------------------- > Example: Single DAI case > ----------------------- > @@ -335,3 +369,41 @@ Example: Multi DAI with DPCM > }; > }; > }; > + > +----------------------- > +Example: Set component sysclks and PLLs > +----------------------- > + > + sound { > + compatible = "audio-graph-card"; > + > + clocks = <&audioclk>, <&pll1>; > + clock-names = "audioclk", "pll1"; > + > + plls = <&cs47l15 MADERA_FLL1_REFCLK MADERA_FLL_SRC_MCLK1 98304000>; > + plls-clocks = "audioclk"; > + > + sysclks = <&cs47l15 MADERA_CLK_SYSCLK_1 MADERA_CLK_SRC_FLL1 0>; > + sysclks-clocks = "pll1"; > + > + dais = <&cpu_i2s_port>; > + > + pll1: pll1 { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <98304000>; > + }; > + }; > + > + cs47l15: codec@0 { > + ... > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + cs47l15_aif1_port: port@0 { > + reg = <0>; > + cs47l15_aif1: endpoint { > + remote-endpoint = <&cpu_i2s_endpoint>; > + }; > + }; > + }; > -- > 2.20.1 >