xref: /openbmc/linux/Documentation/devicetree/bindings/sound/ti,j721e-cpb-ivi-audio.yaml (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
18142500eSPeter Ujfalusi# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
261fc03b6SPeter Ujfalusi# Copyright (C) 2020 Texas Instruments Incorporated
361fc03b6SPeter Ujfalusi# Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
48142500eSPeter Ujfalusi%YAML 1.2
58142500eSPeter Ujfalusi---
68142500eSPeter Ujfalusi$id: http://devicetree.org/schemas/sound/ti,j721e-cpb-ivi-audio.yaml#
78142500eSPeter Ujfalusi$schema: http://devicetree.org/meta-schemas/core.yaml#
88142500eSPeter Ujfalusi
98142500eSPeter Ujfalusititle: Texas Instruments J721e Common Processor Board Audio Support
108142500eSPeter Ujfalusi
118142500eSPeter Ujfalusimaintainers:
1261fc03b6SPeter Ujfalusi  - Peter Ujfalusi <peter.ujfalusi@gmail.com>
138142500eSPeter Ujfalusi
148142500eSPeter Ujfalusidescription: |
158142500eSPeter Ujfalusi  The Infotainment board plugs into the Common Processor Board, the support of the
16*47aab533SBjorn Helgaas  extension board is extending the CPB audio support, described in:
178142500eSPeter Ujfalusi  sound/ti,j721e-cpb-audio.txt
188142500eSPeter Ujfalusi
198142500eSPeter Ujfalusi  The audio support on the Infotainment Expansion Board consists of McASP0
208142500eSPeter Ujfalusi  connected to two pcm3168a codecs with dedicated set of serializers to each.
218142500eSPeter Ujfalusi  The SCKI for pcm3168a is sourced from j721e AUDIO_REFCLK0 pin.
228142500eSPeter Ujfalusi
238142500eSPeter Ujfalusi  In order to support 48KHz and 44.1KHz family of sampling rates the parent clock
248142500eSPeter Ujfalusi  for AUDIO_REFCLK0 needs to be changed between PLL4 (for 48KHz) and PLL15 (for
258142500eSPeter Ujfalusi  44.1KHz). The same PLLs are used for McASP0's AUXCLK clock via different
268142500eSPeter Ujfalusi  HSDIVIDER.
278142500eSPeter Ujfalusi
288142500eSPeter Ujfalusi  Note: the same PLL4 and PLL15 is used by the audio support on the CPB!
298142500eSPeter Ujfalusi
308142500eSPeter Ujfalusi  Clocking setup for 48KHz family:
318142500eSPeter Ujfalusi  PLL4 ---> PLL4_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk
328142500eSPeter Ujfalusi        |                |-> MCASP0_AUXCLK  ---> McASP0.auxclk
338142500eSPeter Ujfalusi        |
348142500eSPeter Ujfalusi        |-> PLL4_HSDIV2 ---> AUDIO_REFCLK2  ---> pcm3168a.SCKI
358142500eSPeter Ujfalusi                         |-> AUDIO_REFCLK0  ---> pcm3168a_a/b.SCKI
368142500eSPeter Ujfalusi
378142500eSPeter Ujfalusi  Clocking setup for 44.1KHz family:
388142500eSPeter Ujfalusi  PLL15 ---> PLL15_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk
398142500eSPeter Ujfalusi        |                  |-> MCASP0_AUXCLK  ---> McASP0.auxclk
408142500eSPeter Ujfalusi        |
418142500eSPeter Ujfalusi        |-> PLL15_HSDIV2 ---> AUDIO_REFCLK2   ---> pcm3168a.SCKI
428142500eSPeter Ujfalusi                          |-> AUDIO_REFCLK0   ---> pcm3168a_a/b.SCKI
438142500eSPeter Ujfalusi
448142500eSPeter Ujfalusiproperties:
458142500eSPeter Ujfalusi  compatible:
468142500eSPeter Ujfalusi    items:
478142500eSPeter Ujfalusi      - const: ti,j721e-cpb-ivi-audio
488142500eSPeter Ujfalusi
498142500eSPeter Ujfalusi  model:
508142500eSPeter Ujfalusi    $ref: /schemas/types.yaml#/definitions/string
518142500eSPeter Ujfalusi    description: User specified audio sound card name
528142500eSPeter Ujfalusi
538142500eSPeter Ujfalusi  ti,cpb-mcasp:
548142500eSPeter Ujfalusi    description: phandle to McASP used on CPB
555f0b06daSRob Herring    $ref: /schemas/types.yaml#/definitions/phandle
568142500eSPeter Ujfalusi
578142500eSPeter Ujfalusi  ti,cpb-codec:
588142500eSPeter Ujfalusi    description: phandle to the pcm3168a codec used on the CPB
595f0b06daSRob Herring    $ref: /schemas/types.yaml#/definitions/phandle
608142500eSPeter Ujfalusi
618142500eSPeter Ujfalusi  ti,ivi-mcasp:
628142500eSPeter Ujfalusi    description: phandle to McASP used on IVI
635f0b06daSRob Herring    $ref: /schemas/types.yaml#/definitions/phandle
648142500eSPeter Ujfalusi
658142500eSPeter Ujfalusi  ti,ivi-codec-a:
668142500eSPeter Ujfalusi    description: phandle to the pcm3168a-A codec on the expansion board
675f0b06daSRob Herring    $ref: /schemas/types.yaml#/definitions/phandle
688142500eSPeter Ujfalusi
698142500eSPeter Ujfalusi  ti,ivi-codec-b:
708142500eSPeter Ujfalusi    description: phandle to the pcm3168a-B codec on the expansion board
715f0b06daSRob Herring    $ref: /schemas/types.yaml#/definitions/phandle
728142500eSPeter Ujfalusi
738142500eSPeter Ujfalusi  clocks:
748142500eSPeter Ujfalusi    items:
758142500eSPeter Ujfalusi      - description: AUXCLK clock for McASP used by CPB audio
768142500eSPeter Ujfalusi      - description: Parent for CPB_McASP auxclk (for 48KHz)
778142500eSPeter Ujfalusi      - description: Parent for CPB_McASP auxclk (for 44.1KHz)
788142500eSPeter Ujfalusi      - description: SCKI clock for the pcm3168a codec on CPB
798142500eSPeter Ujfalusi      - description: Parent for CPB_SCKI clock (for 48KHz)
808142500eSPeter Ujfalusi      - description: Parent for CPB_SCKI clock (for 44.1KHz)
818142500eSPeter Ujfalusi      - description: AUXCLK clock for McASP used by IVI audio
828142500eSPeter Ujfalusi      - description: Parent for IVI_McASP auxclk (for 48KHz)
838142500eSPeter Ujfalusi      - description: Parent for IVI_McASP auxclk (for 44.1KHz)
848142500eSPeter Ujfalusi      - description: SCKI clock for the pcm3168a codec on IVI
858142500eSPeter Ujfalusi      - description: Parent for IVI_SCKI clock (for 48KHz)
868142500eSPeter Ujfalusi      - description: Parent for IVI_SCKI clock (for 44.1KHz)
878142500eSPeter Ujfalusi
888142500eSPeter Ujfalusi  clock-names:
898142500eSPeter Ujfalusi    items:
908142500eSPeter Ujfalusi      - const: cpb-mcasp-auxclk
918142500eSPeter Ujfalusi      - const: cpb-mcasp-auxclk-48000
928142500eSPeter Ujfalusi      - const: cpb-mcasp-auxclk-44100
938142500eSPeter Ujfalusi      - const: cpb-codec-scki
948142500eSPeter Ujfalusi      - const: cpb-codec-scki-48000
958142500eSPeter Ujfalusi      - const: cpb-codec-scki-44100
968142500eSPeter Ujfalusi      - const: ivi-mcasp-auxclk
978142500eSPeter Ujfalusi      - const: ivi-mcasp-auxclk-48000
988142500eSPeter Ujfalusi      - const: ivi-mcasp-auxclk-44100
998142500eSPeter Ujfalusi      - const: ivi-codec-scki
1008142500eSPeter Ujfalusi      - const: ivi-codec-scki-48000
1018142500eSPeter Ujfalusi      - const: ivi-codec-scki-44100
1028142500eSPeter Ujfalusi
1038142500eSPeter Ujfalusirequired:
1048142500eSPeter Ujfalusi  - compatible
1058142500eSPeter Ujfalusi  - model
1068142500eSPeter Ujfalusi  - ti,cpb-mcasp
1078142500eSPeter Ujfalusi  - ti,cpb-codec
1088142500eSPeter Ujfalusi  - ti,ivi-mcasp
1098142500eSPeter Ujfalusi  - ti,ivi-codec-a
1108142500eSPeter Ujfalusi  - ti,ivi-codec-b
1118142500eSPeter Ujfalusi  - clocks
1128142500eSPeter Ujfalusi  - clock-names
1138142500eSPeter Ujfalusi
1148142500eSPeter UjfalusiadditionalProperties: false
1158142500eSPeter Ujfalusi
1168142500eSPeter Ujfalusiexamples:
1178142500eSPeter Ujfalusi  - |+
1188142500eSPeter Ujfalusi    sound {
1198142500eSPeter Ujfalusi        compatible = "ti,j721e-cpb-ivi-audio";
1208142500eSPeter Ujfalusi        model = "j721e-cpb-ivi";
1218142500eSPeter Ujfalusi
1228142500eSPeter Ujfalusi        ti,cpb-mcasp = <&mcasp10>;
1238142500eSPeter Ujfalusi        ti,cpb-codec = <&pcm3168a_1>;
1248142500eSPeter Ujfalusi
1258142500eSPeter Ujfalusi        ti,ivi-mcasp = <&mcasp0>;
1268142500eSPeter Ujfalusi        ti,ivi-codec-a = <&pcm3168a_a>;
1278142500eSPeter Ujfalusi        ti,ivi-codec-b = <&pcm3168a_b>;
1288142500eSPeter Ujfalusi
1298142500eSPeter Ujfalusi        clocks = <&k3_clks 184 1>,
1308142500eSPeter Ujfalusi                 <&k3_clks 184 2>, <&k3_clks 184 4>,
1318142500eSPeter Ujfalusi                 <&k3_clks 157 371>,
1328142500eSPeter Ujfalusi                 <&k3_clks 157 400>, <&k3_clks 157 401>,
1338142500eSPeter Ujfalusi                 <&k3_clks 174 1>,
1348142500eSPeter Ujfalusi                 <&k3_clks 174 2>, <&k3_clks 174 4>,
1358142500eSPeter Ujfalusi                 <&k3_clks 157 301>,
1368142500eSPeter Ujfalusi                 <&k3_clks 157 330>, <&k3_clks 157 331>;
1378142500eSPeter Ujfalusi        clock-names = "cpb-mcasp-auxclk",
1388142500eSPeter Ujfalusi                      "cpb-mcasp-auxclk-48000", "cpb-mcasp-auxclk-44100",
1398142500eSPeter Ujfalusi                      "cpb-codec-scki",
1408142500eSPeter Ujfalusi                      "cpb-codec-scki-48000", "cpb-codec-scki-44100",
1418142500eSPeter Ujfalusi                      "ivi-mcasp-auxclk",
1428142500eSPeter Ujfalusi                      "ivi-mcasp-auxclk-48000", "ivi-mcasp-auxclk-44100",
1438142500eSPeter Ujfalusi                      "ivi-codec-scki",
1448142500eSPeter Ujfalusi                      "ivi-codec-scki-48000", "ivi-codec-scki-44100";
1458142500eSPeter Ujfalusi    };
146