From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <broonie@kernel.org>, <robh+dt@kernel.org>,
<kuninori.morimoto.gx@renesas.com>, <nsaenzjulienne@suse.de>
Cc: <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>,
Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH v3 2/6] ASoC: audio-graph-card: Add plls and sysclks DT bindings
Date: Thu, 17 Dec 2020 15:41:38 +0000 [thread overview]
Message-ID: <20201217154142.24301-3-rf@opensource.cirrus.com> (raw)
In-Reply-To: <20201217154142.24301-1-rf@opensource.cirrus.com>
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 <rf@opensource.cirrus.com>
---
.../bindings/sound/audio-graph-card.txt | 72 +++++++++++++++++++
1 file changed, 72 insertions(+)
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
next prev parent reply other threads:[~2020-12-17 15:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 15:41 [PATCH v3 0/6] Add support for Rpi4b + Cirrus Lochnagar2 and CS47L15 Richard Fitzgerald
2020-12-17 15:41 ` [PATCH v3 1/6] of: base: Add of_count_phandle_with_fixed_args() Richard Fitzgerald
2020-12-17 15:41 ` Richard Fitzgerald [this message]
2020-12-21 22:34 ` [PATCH v3 2/6] ASoC: audio-graph-card: Add plls and sysclks DT bindings Rob Herring
2020-12-17 15:41 ` [PATCH v3 3/6] ASoC: audio-graph-card: Support setting component plls and sysclks Richard Fitzgerald
2020-12-18 0:03 ` Kuninori Morimoto
2020-12-21 10:38 ` Richard Fitzgerald
2020-12-17 15:41 ` [PATCH v3 4/6] ASoC: madera: Allow codecs to be selected from kernel config Richard Fitzgerald
2020-12-17 15:41 ` [PATCH v3 5/6] ASoC: madera: Export clock config defines to dt-bindings Richard Fitzgerald
2020-12-17 15:41 ` [PATCH v3 6/6] ARM: dts: Add dts for RPi4b + Cirrus Logic Lochnagar2 + CS47L15 Richard Fitzgerald
2020-12-17 17:11 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201217154142.24301-3-rf@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=nsaenzjulienne@suse.de \
--cc=patches@opensource.cirrus.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).