Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
[platform/kernel/linux-starfive.git] / Documentation / devicetree / bindings / sound / ti,j721e-cpb-audio.yaml
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
7 title: Texas Instruments J721e Common Processor Board Audio Support
8
9 maintainers:
10   - Peter Ujfalusi <peter.ujfalusi@ti.com>
11
12 description: |
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
29 properties:
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     allOf:
41       - $ref: /schemas/types.yaml#/definitions/phandle
42
43   ti,cpb-codec:
44     description: phandle to the pcm3168a codec used on the CPB
45     allOf:
46       - $ref: /schemas/types.yaml#/definitions/phandle
47
48   clocks:
49     items:
50       - description: AUXCLK clock for McASP used by CPB audio
51       - description: Parent for CPB_McASP auxclk (for 48KHz)
52       - description: Parent for CPB_McASP auxclk (for 44.1KHz)
53       - description: SCKI clock for the pcm3168a codec on CPB
54       - description: Parent for CPB_SCKI clock (for 48KHz)
55       - description: Parent for CPB_SCKI clock (for 44.1KHz)
56
57   clock-names:
58     items:
59       - const: cpb-mcasp-auxclk
60       - const: cpb-mcasp-auxclk-48000
61       - const: cpb-mcasp-auxclk-44100
62       - const: cpb-codec-scki
63       - const: cpb-codec-scki-48000
64       - const: cpb-codec-scki-44100
65
66 required:
67   - compatible
68   - model
69   - ti,cpb-mcasp
70   - ti,cpb-codec
71   - clocks
72   - clock-names
73
74 additionalProperties: false
75
76 examples:
77   - |+
78     sound {
79         compatible = "ti,j721e-cpb-audio";
80         model = "j721e-cpb";
81
82         status = "okay";
83
84         ti,cpb-mcasp = <&mcasp10>;
85         ti,cpb-codec = <&pcm3168a_1>;
86
87         clocks = <&k3_clks 184 1>,
88                  <&k3_clks 184 2>, <&k3_clks 184 4>,
89                  <&k3_clks 157 371>,
90                  <&k3_clks 157 400>, <&k3_clks 157 401>;
91         clock-names = "cpb-mcasp-auxclk",
92                       "cpb-mcasp-auxclk-48000", "cpb-mcasp-auxclk-44100",
93                       "cpb-codec-scki",
94                       "cpb-codec-scki-48000", "cpb-codec-scki-44100";
95     };