xref: /linux/Documentation/devicetree/bindings/sound/ti,j721e-cpb-audio.yaml (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
18142500eSPeter Ujfalusi# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*61fc03b6SPeter Ujfalusi# Copyright (C) 2020 Texas Instruments Incorporated
3*61fc03b6SPeter 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-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:
12*61fc03b6SPeter Ujfalusi  - Peter Ujfalusi <peter.ujfalusi@gmail.com>
138142500eSPeter Ujfalusi
148142500eSPeter Ujfalusidescription: |
158142500eSPeter Ujfalusi  The audio support on the board is using pcm3168a codec connected to McASP10
168142500eSPeter Ujfalusi  serializers in parallel setup.
178142500eSPeter Ujfalusi  The pcm3168a SCKI clock is sourced from j721e AUDIO_REFCLK2 pin.
188142500eSPeter Ujfalusi  In order to support 48KHz and 44.1KHz family of sampling rates the parent
198142500eSPeter Ujfalusi  clock for AUDIO_REFCLK2 needs to be changed between PLL4 (for 48KHz) and
208142500eSPeter Ujfalusi  PLL15 (for 44.1KHz). The same PLLs are used for McASP10's AUXCLK clock via
218142500eSPeter Ujfalusi  different HSDIVIDER.
228142500eSPeter Ujfalusi
2318790b1bSPeter Ujfalusi  Clocking setup for j721e:
2418790b1bSPeter Ujfalusi    48KHz family:
258142500eSPeter Ujfalusi    PLL4 ---> PLL4_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk
268142500eSPeter Ujfalusi          |-> PLL4_HSDIV2 ---> AUDIO_REFCLK2  ---> pcm3168a.SCKI
278142500eSPeter Ujfalusi
2818790b1bSPeter Ujfalusi    44.1KHz family:
298142500eSPeter Ujfalusi    PLL15 ---> PLL15_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk
308142500eSPeter Ujfalusi           |-> PLL15_HSDIV2 ---> AUDIO_REFCLK2  ---> pcm3168a.SCKI
318142500eSPeter Ujfalusi
3218790b1bSPeter Ujfalusi  Clocking setup for j7200:
3318790b1bSPeter Ujfalusi    48KHz family:
3418790b1bSPeter Ujfalusi    PLL4 ---> PLL4_HSDIV0 ---> MCASP0_AUXCLK ---> McASP0.auxclk
3518790b1bSPeter Ujfalusi          |-> PLL4_HSDIV2 ---> AUDIO_REFCLK2  ---> pcm3168a.SCKI
3618790b1bSPeter Ujfalusi
378142500eSPeter Ujfalusiproperties:
388142500eSPeter Ujfalusi  compatible:
3918790b1bSPeter Ujfalusi    enum:
4018790b1bSPeter Ujfalusi      - ti,j721e-cpb-audio
4118790b1bSPeter Ujfalusi      - ti,j7200-cpb-audio
428142500eSPeter Ujfalusi
438142500eSPeter Ujfalusi  model:
448142500eSPeter Ujfalusi    $ref: /schemas/types.yaml#/definitions/string
458142500eSPeter Ujfalusi    description: User specified audio sound card name
468142500eSPeter Ujfalusi
478142500eSPeter Ujfalusi  ti,cpb-mcasp:
488142500eSPeter Ujfalusi    description: phandle to McASP used on CPB
495f0b06daSRob Herring    $ref: /schemas/types.yaml#/definitions/phandle
508142500eSPeter Ujfalusi
518142500eSPeter Ujfalusi  ti,cpb-codec:
528142500eSPeter Ujfalusi    description: phandle to the pcm3168a codec used on the CPB
535f0b06daSRob Herring    $ref: /schemas/types.yaml#/definitions/phandle
548142500eSPeter Ujfalusi
558142500eSPeter Ujfalusi  clocks:
5618790b1bSPeter Ujfalusi    minItems: 4
5718790b1bSPeter Ujfalusi    maxItems: 6
5818790b1bSPeter Ujfalusi
5918790b1bSPeter Ujfalusi  clock-names:
6018790b1bSPeter Ujfalusi    minItems: 4
6118790b1bSPeter Ujfalusi    maxItems: 6
6218790b1bSPeter Ujfalusi
6318790b1bSPeter Ujfalusirequired:
6418790b1bSPeter Ujfalusi  - compatible
6518790b1bSPeter Ujfalusi  - model
6618790b1bSPeter Ujfalusi  - ti,cpb-mcasp
6718790b1bSPeter Ujfalusi  - ti,cpb-codec
6818790b1bSPeter Ujfalusi  - clocks
6918790b1bSPeter Ujfalusi  - clock-names
7018790b1bSPeter Ujfalusi
7118790b1bSPeter UjfalusiadditionalProperties: false
7218790b1bSPeter Ujfalusi
7318790b1bSPeter UjfalusiallOf:
7418790b1bSPeter Ujfalusi  - if:
7518790b1bSPeter Ujfalusi      properties:
7618790b1bSPeter Ujfalusi        compatible:
7718790b1bSPeter Ujfalusi          contains:
7818790b1bSPeter Ujfalusi            const: ti,j721e-cpb-audio
7918790b1bSPeter Ujfalusi
8018790b1bSPeter Ujfalusi    then:
8118790b1bSPeter Ujfalusi      properties:
8218790b1bSPeter Ujfalusi        clocks:
838142500eSPeter Ujfalusi          items:
848142500eSPeter Ujfalusi            - description: AUXCLK clock for McASP used by CPB audio
858142500eSPeter Ujfalusi            - description: Parent for CPB_McASP auxclk (for 48KHz)
868142500eSPeter Ujfalusi            - description: Parent for CPB_McASP auxclk (for 44.1KHz)
878142500eSPeter Ujfalusi            - description: SCKI clock for the pcm3168a codec on CPB
888142500eSPeter Ujfalusi            - description: Parent for CPB_SCKI clock (for 48KHz)
898142500eSPeter Ujfalusi            - description: Parent for CPB_SCKI clock (for 44.1KHz)
908142500eSPeter Ujfalusi
918142500eSPeter Ujfalusi        clock-names:
928142500eSPeter Ujfalusi          items:
938142500eSPeter Ujfalusi            - const: cpb-mcasp-auxclk
948142500eSPeter Ujfalusi            - const: cpb-mcasp-auxclk-48000
958142500eSPeter Ujfalusi            - const: cpb-mcasp-auxclk-44100
968142500eSPeter Ujfalusi            - const: cpb-codec-scki
978142500eSPeter Ujfalusi            - const: cpb-codec-scki-48000
988142500eSPeter Ujfalusi            - const: cpb-codec-scki-44100
998142500eSPeter Ujfalusi
10018790b1bSPeter Ujfalusi  - if:
10118790b1bSPeter Ujfalusi      properties:
10218790b1bSPeter Ujfalusi        compatible:
10318790b1bSPeter Ujfalusi          contains:
10418790b1bSPeter Ujfalusi            const: ti,j7200-cpb-audio
1058142500eSPeter Ujfalusi
10618790b1bSPeter Ujfalusi    then:
10718790b1bSPeter Ujfalusi      properties:
10818790b1bSPeter Ujfalusi        clocks:
10918790b1bSPeter Ujfalusi          items:
11018790b1bSPeter Ujfalusi            - description: AUXCLK clock for McASP used by CPB audio
11118790b1bSPeter Ujfalusi            - description: Parent for CPB_McASP auxclk (for 48KHz)
11218790b1bSPeter Ujfalusi            - description: SCKI clock for the pcm3168a codec on CPB
11318790b1bSPeter Ujfalusi            - description: Parent for CPB_SCKI clock (for 48KHz)
11418790b1bSPeter Ujfalusi
11518790b1bSPeter Ujfalusi        clock-names:
11618790b1bSPeter Ujfalusi          items:
11718790b1bSPeter Ujfalusi            - const: cpb-mcasp-auxclk
11818790b1bSPeter Ujfalusi            - const: cpb-mcasp-auxclk-48000
11918790b1bSPeter Ujfalusi            - const: cpb-codec-scki
12018790b1bSPeter Ujfalusi            - const: cpb-codec-scki-48000
1218142500eSPeter Ujfalusi
1228142500eSPeter Ujfalusiexamples:
1238142500eSPeter Ujfalusi  - |+
1248142500eSPeter Ujfalusi    sound {
1258142500eSPeter Ujfalusi        compatible = "ti,j721e-cpb-audio";
1268142500eSPeter Ujfalusi        model = "j721e-cpb";
1278142500eSPeter Ujfalusi
1288142500eSPeter Ujfalusi        ti,cpb-mcasp = <&mcasp10>;
1298142500eSPeter Ujfalusi        ti,cpb-codec = <&pcm3168a_1>;
1308142500eSPeter Ujfalusi
1318142500eSPeter Ujfalusi        clocks = <&k3_clks 184 1>,
1328142500eSPeter Ujfalusi                 <&k3_clks 184 2>, <&k3_clks 184 4>,
1338142500eSPeter Ujfalusi                 <&k3_clks 157 371>,
1348142500eSPeter Ujfalusi                 <&k3_clks 157 400>, <&k3_clks 157 401>;
1358142500eSPeter Ujfalusi        clock-names = "cpb-mcasp-auxclk",
1368142500eSPeter Ujfalusi                      "cpb-mcasp-auxclk-48000", "cpb-mcasp-auxclk-44100",
1378142500eSPeter Ujfalusi                      "cpb-codec-scki",
1388142500eSPeter Ujfalusi                      "cpb-codec-scki-48000", "cpb-codec-scki-44100";
1398142500eSPeter Ujfalusi    };
140