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-ivi-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 Infotainment board plugs into the Common Processor Board, the support of the
14  extension board is extending the CPB audio support, decribed in:
15  sound/ti,j721e-cpb-audio.txt
16
17  The audio support on the Infotainment Expansion Board consists of McASP0
18  connected to two pcm3168a codecs with dedicated set of serializers to each.
19  The SCKI for pcm3168a is sourced from j721e AUDIO_REFCLK0 pin.
20
21  In order to support 48KHz and 44.1KHz family of sampling rates the parent clock
22  for AUDIO_REFCLK0 needs to be changed between PLL4 (for 48KHz) and PLL15 (for
23  44.1KHz). The same PLLs are used for McASP0's AUXCLK clock via different
24  HSDIVIDER.
25
26  Note: the same PLL4 and PLL15 is used by the audio support on the CPB!
27
28  Clocking setup for 48KHz family:
29  PLL4 ---> PLL4_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk
30        |                |-> MCASP0_AUXCLK  ---> McASP0.auxclk
31        |
32        |-> PLL4_HSDIV2 ---> AUDIO_REFCLK2  ---> pcm3168a.SCKI
33                         |-> AUDIO_REFCLK0  ---> pcm3168a_a/b.SCKI
34
35  Clocking setup for 44.1KHz family:
36  PLL15 ---> PLL15_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk
37        |                  |-> MCASP0_AUXCLK  ---> McASP0.auxclk
38        |
39        |-> PLL15_HSDIV2 ---> AUDIO_REFCLK2   ---> pcm3168a.SCKI
40                          |-> AUDIO_REFCLK0   ---> pcm3168a_a/b.SCKI
41
42properties:
43  compatible:
44    items:
45      - const: ti,j721e-cpb-ivi-audio
46
47  model:
48    $ref: /schemas/types.yaml#/definitions/string
49    description: User specified audio sound card name
50
51  ti,cpb-mcasp:
52    description: phandle to McASP used on CPB
53    allOf:
54      - $ref: /schemas/types.yaml#/definitions/phandle
55
56  ti,cpb-codec:
57    description: phandle to the pcm3168a codec used on the CPB
58    allOf:
59      - $ref: /schemas/types.yaml#/definitions/phandle
60
61  ti,ivi-mcasp:
62    description: phandle to McASP used on IVI
63    allOf:
64      - $ref: /schemas/types.yaml#/definitions/phandle
65
66  ti,ivi-codec-a:
67    description: phandle to the pcm3168a-A codec on the expansion board
68    allOf:
69      - $ref: /schemas/types.yaml#/definitions/phandle
70
71  ti,ivi-codec-b:
72    description: phandle to the pcm3168a-B codec on the expansion board
73    allOf:
74      - $ref: /schemas/types.yaml#/definitions/phandle
75
76  clocks:
77    items:
78      - description: AUXCLK clock for McASP used by CPB audio
79      - description: Parent for CPB_McASP auxclk (for 48KHz)
80      - description: Parent for CPB_McASP auxclk (for 44.1KHz)
81      - description: SCKI clock for the pcm3168a codec on CPB
82      - description: Parent for CPB_SCKI clock (for 48KHz)
83      - description: Parent for CPB_SCKI clock (for 44.1KHz)
84      - description: AUXCLK clock for McASP used by IVI audio
85      - description: Parent for IVI_McASP auxclk (for 48KHz)
86      - description: Parent for IVI_McASP auxclk (for 44.1KHz)
87      - description: SCKI clock for the pcm3168a codec on IVI
88      - description: Parent for IVI_SCKI clock (for 48KHz)
89      - description: Parent for IVI_SCKI clock (for 44.1KHz)
90
91  clock-names:
92    items:
93      - const: cpb-mcasp-auxclk
94      - const: cpb-mcasp-auxclk-48000
95      - const: cpb-mcasp-auxclk-44100
96      - const: cpb-codec-scki
97      - const: cpb-codec-scki-48000
98      - const: cpb-codec-scki-44100
99      - const: ivi-mcasp-auxclk
100      - const: ivi-mcasp-auxclk-48000
101      - const: ivi-mcasp-auxclk-44100
102      - const: ivi-codec-scki
103      - const: ivi-codec-scki-48000
104      - const: ivi-codec-scki-44100
105
106required:
107  - compatible
108  - model
109  - ti,cpb-mcasp
110  - ti,cpb-codec
111  - ti,ivi-mcasp
112  - ti,ivi-codec-a
113  - ti,ivi-codec-b
114  - clocks
115  - clock-names
116
117additionalProperties: false
118
119examples:
120  - |+
121    sound {
122        compatible = "ti,j721e-cpb-ivi-audio";
123        model = "j721e-cpb-ivi";
124
125        status = "okay";
126
127        ti,cpb-mcasp = <&mcasp10>;
128        ti,cpb-codec = <&pcm3168a_1>;
129
130        ti,ivi-mcasp = <&mcasp0>;
131        ti,ivi-codec-a = <&pcm3168a_a>;
132        ti,ivi-codec-b = <&pcm3168a_b>;
133
134        clocks = <&k3_clks 184 1>,
135                 <&k3_clks 184 2>, <&k3_clks 184 4>,
136                 <&k3_clks 157 371>,
137                 <&k3_clks 157 400>, <&k3_clks 157 401>,
138                 <&k3_clks 174 1>,
139                 <&k3_clks 174 2>, <&k3_clks 174 4>,
140                 <&k3_clks 157 301>,
141                 <&k3_clks 157 330>, <&k3_clks 157 331>;
142        clock-names = "cpb-mcasp-auxclk",
143                      "cpb-mcasp-auxclk-48000", "cpb-mcasp-auxclk-44100",
144                      "cpb-codec-scki",
145                      "cpb-codec-scki-48000", "cpb-codec-scki-44100",
146                      "ivi-mcasp-auxclk",
147                      "ivi-mcasp-auxclk-48000", "ivi-mcasp-auxclk-44100",
148                      "ivi-codec-scki",
149                      "ivi-codec-scki-48000", "ivi-codec-scki-44100";
150    };
151