lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1614276364-13655-4-git-send-email-spujar@nvidia.com>
Date:   Thu, 25 Feb 2021 23:36:02 +0530
From:   Sameer Pujar <spujar@...dia.com>
To:     <broonie@...nel.org>, <robh@...nel.org>
CC:     <jonathanh@...dia.com>, <kuninori.morimoto.gx@...esas.com>,
        <alsa-devel@...a-project.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, Sameer Pujar <spujar@...dia.com>
Subject: [RFC PATCH 3/5] ASoC: audio-graph-card: Add bindings for sysclk and pll

ASoC core provides callbacks snd_soc_dai_set_sysclk() and
snd_soc_dai_set_pll() for system clock (sysclk) and pll configurations
respectively. Add bindings for flexible sysclk or pll configurations
which can be driven from CPU/Codec DAI or endpoint subnode from DT.
This in turn helps to avoid hard codings in driver and makes it more
generic.

Also add system-clock related bindings, "system-clock-direction-out"
and "system-clock-frequency", which are already supported.

Cc: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Cc: Rob Herring <robh@...nel.org>
Signed-off-by: Sameer Pujar <spujar@...dia.com>
---
 .../bindings/sound/audio-graph-port.yaml           | 71 ++++++++++++++++++++++
 1 file changed, 71 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
index 766e910..4f50291 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -71,6 +71,77 @@ properties:
             description: CPU to Codec rate channels.
             $ref: /schemas/types.yaml#/definitions/uint32
 
+          system-clock-frequency:
+            description: |
+              Specify system clock (sysclk) frequency for CPU or Codec
+              component. Or if a clock is specified in the CPU or Codec
+              device node and a scaling factor is given with "mclk-fs",
+              sysclk will be calculated as a multiple of stream sample
+              rate and "mclk-fs". The rate is updated when stream starts.
+            $ref: /schemas/types.yaml#/definitions/uint32
+
+          system-clock-direction-out:
+            description: |
+              Specifies clock direction as "out" on initialization. It
+              is useful for some CPUs with fixed clocks.
+            $ref: /schemas/types.yaml#/definitions/flag
+
+          system-clock-id:
+            description: |
+              CPU or Codec component may have multiple clocks. A specific
+              clock may have to be configured. In such cases the clock
+              ID needs to be specified.
+            $ref: /schemas/types.yaml#/definitions/uint32
+
+          system-clock-source:
+            description: |
+              CPU or Codec component may have multiple sources for its
+              system clock (sysclk). In such cases the sysclk source
+              needs to be specified.
+            $ref: /schemas/types.yaml#/definitions/uint32
+
+          pll-id:
+            description: |
+              Specify PLL that needs to be configured. This is useful
+              when the CPU or Codec component has multiple PLLs.
+            $ref: /schemas/types.yaml#/definitions/uint32
+
+          pll-source:
+            description: |
+              When PLL has multiple reference clock sources, the exact
+              source needs to be specified for the required configuration.
+            $ref: /schemas/types.yaml#/definitions/uint32
+
+          pll-input-reference:
+            description: |
+              Specify how to calculate input frequency for the PLL.
+              Depending on the identifier, input frequency can be
+              calculated at runtime. For example if I2S bit clock is used
+              as reference, rate depends on actual PCM parameters (rate,
+              channels and bits) during an audio session. If a fixed rate
+              is used, then "pll-input-frequency" can be used instead.
+            $ref: /schemas/types.yaml#/definitions/uint32
+            const: 2
+
+          pll-input-frequency:
+            description: Specify fixed input frequency
+            $ref: /schemas/types.yaml#/definitions/uint32
+
+          pll-output-reference:
+            description: |
+              Specify how to calculate output frequency for the PLL.
+              Depending on the identifier, output frequency can be
+              calculated at runtime. If output clock is used for MCLK purpose,
+              then it may depend on "mclk-fs" scale factor. In such cases it
+              needs to be calculated at runtime. If a fixed output frequency
+              is needed, then "pll-output-frequency" can be used instead.
+            $ref: /schemas/types.yaml#/definitions/uint32
+            const: 1
+
+          pll-output-frequency:
+            description: Specify fixed output frequency
+            $ref: /schemas/types.yaml#/definitions/uint32
+
   ports:
     description: multi OF-Graph subnode
     type: object
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ