1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/ti,j721e-cpb-audio.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Texas Instruments J721e Common Processor Board Audio Support
8
9maintainers:
10  - Peter Ujfalusi <peter.ujfalusi@ti.com>
11
12description: |
13  The audio support on the board is using pcm3168a codec connected to McASP10
14  serializers in parallel setup.
15  The pcm3168a SCKI clock is sourced from j721e AUDIO_REFCLK2 pin.
16  In order to support 48KHz and 44.1KHz family of sampling rates the parent
17  clock for AUDIO_REFCLK2 needs to be changed between PLL4 (for 48KHz) and
18  PLL15 (for 44.1KHz). The same PLLs are used for McASP10's AUXCLK clock via
19  different HSDIVIDER.
20
21  Clocking setup for 48KHz family:
22  PLL4 ---> PLL4_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk
23        |-> PLL4_HSDIV2 ---> AUDIO_REFCLK2  ---> pcm3168a.SCKI
24
25  Clocking setup for 44.1KHz family:
26  PLL15 ---> PLL15_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk
27         |-> PLL15_HSDIV2 ---> AUDIO_REFCLK2  ---> pcm3168a.SCKI
28
29properties:
30  compatible:
31    items:
32      - const: ti,j721e-cpb-audio
33
34  model:
35    $ref: /schemas/types.yaml#/definitions/string
36    description: User specified audio sound card name
37
38  ti,cpb-mcasp:
39    description: phandle to McASP used on CPB
40    $ref: /schemas/types.yaml#/definitions/phandle
41
42  ti,cpb-codec:
43    description: phandle to the pcm3168a codec used on the CPB
44    $ref: /schemas/types.yaml#/definitions/phandle
45
46  clocks:
47    items:
48      - description: AUXCLK clock for McASP used by CPB audio
49      - description: Parent for CPB_McASP auxclk (for 48KHz)
50      - description: Parent for CPB_McASP auxclk (for 44.1KHz)
51      - description: SCKI clock for the pcm3168a codec on CPB
52      - description: Parent for CPB_SCKI clock (for 48KHz)
53      - description: Parent for CPB_SCKI clock (for 44.1KHz)
54
55  clock-names:
56    items:
57      - const: cpb-mcasp-auxclk
58      - const: cpb-mcasp-auxclk-48000
59      - const: cpb-mcasp-auxclk-44100
60      - const: cpb-codec-scki
61      - const: cpb-codec-scki-48000
62      - const: cpb-codec-scki-44100
63
64required:
65  - compatible
66  - model
67  - ti,cpb-mcasp
68  - ti,cpb-codec
69  - clocks
70  - clock-names
71
72additionalProperties: false
73
74examples:
75  - |+
76    sound {
77        compatible = "ti,j721e-cpb-audio";
78        model = "j721e-cpb";
79
80        status = "okay";
81
82        ti,cpb-mcasp = <&mcasp10>;
83        ti,cpb-codec = <&pcm3168a_1>;
84
85        clocks = <&k3_clks 184 1>,
86                 <&k3_clks 184 2>, <&k3_clks 184 4>,
87                 <&k3_clks 157 371>,
88                 <&k3_clks 157 400>, <&k3_clks 157 401>;
89        clock-names = "cpb-mcasp-auxclk",
90                      "cpb-mcasp-auxclk-48000", "cpb-mcasp-auxclk-44100",
91                      "cpb-codec-scki",
92                      "cpb-codec-scki-48000", "cpb-codec-scki-44100";
93    };
94