1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*5def4c47SEmmanuel Vadot# Copyright (C) 2020 Texas Instruments Incorporated 3*5def4c47SEmmanuel Vadot# Author: Peter Ujfalusi <peter.ujfalusi@ti.com> 4c66ec88fSEmmanuel Vadot%YAML 1.2 5c66ec88fSEmmanuel Vadot--- 6c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/ti,j721e-cpb-audio.yaml# 7c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadottitle: Texas Instruments J721e Common Processor Board Audio Support 10c66ec88fSEmmanuel Vadot 11c66ec88fSEmmanuel Vadotmaintainers: 12*5def4c47SEmmanuel Vadot - Peter Ujfalusi <peter.ujfalusi@gmail.com> 13c66ec88fSEmmanuel Vadot 14c66ec88fSEmmanuel Vadotdescription: | 15c66ec88fSEmmanuel Vadot The audio support on the board is using pcm3168a codec connected to McASP10 16c66ec88fSEmmanuel Vadot serializers in parallel setup. 17c66ec88fSEmmanuel Vadot The pcm3168a SCKI clock is sourced from j721e AUDIO_REFCLK2 pin. 18c66ec88fSEmmanuel Vadot In order to support 48KHz and 44.1KHz family of sampling rates the parent 19c66ec88fSEmmanuel Vadot clock for AUDIO_REFCLK2 needs to be changed between PLL4 (for 48KHz) and 20c66ec88fSEmmanuel Vadot PLL15 (for 44.1KHz). The same PLLs are used for McASP10's AUXCLK clock via 21c66ec88fSEmmanuel Vadot different HSDIVIDER. 22c66ec88fSEmmanuel Vadot 236be33864SEmmanuel Vadot Clocking setup for j721e: 246be33864SEmmanuel Vadot 48KHz family: 25c66ec88fSEmmanuel Vadot PLL4 ---> PLL4_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk 26c66ec88fSEmmanuel Vadot |-> PLL4_HSDIV2 ---> AUDIO_REFCLK2 ---> pcm3168a.SCKI 27c66ec88fSEmmanuel Vadot 286be33864SEmmanuel Vadot 44.1KHz family: 29c66ec88fSEmmanuel Vadot PLL15 ---> PLL15_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk 30c66ec88fSEmmanuel Vadot |-> PLL15_HSDIV2 ---> AUDIO_REFCLK2 ---> pcm3168a.SCKI 31c66ec88fSEmmanuel Vadot 326be33864SEmmanuel Vadot Clocking setup for j7200: 336be33864SEmmanuel Vadot 48KHz family: 346be33864SEmmanuel Vadot PLL4 ---> PLL4_HSDIV0 ---> MCASP0_AUXCLK ---> McASP0.auxclk 356be33864SEmmanuel Vadot |-> PLL4_HSDIV2 ---> AUDIO_REFCLK2 ---> pcm3168a.SCKI 366be33864SEmmanuel Vadot 37c66ec88fSEmmanuel Vadotproperties: 38c66ec88fSEmmanuel Vadot compatible: 396be33864SEmmanuel Vadot enum: 406be33864SEmmanuel Vadot - ti,j721e-cpb-audio 416be33864SEmmanuel Vadot - ti,j7200-cpb-audio 42c66ec88fSEmmanuel Vadot 43c66ec88fSEmmanuel Vadot model: 44c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 45c66ec88fSEmmanuel Vadot description: User specified audio sound card name 46c66ec88fSEmmanuel Vadot 47c66ec88fSEmmanuel Vadot ti,cpb-mcasp: 48c66ec88fSEmmanuel Vadot description: phandle to McASP used on CPB 49c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 50c66ec88fSEmmanuel Vadot 51c66ec88fSEmmanuel Vadot ti,cpb-codec: 52c66ec88fSEmmanuel Vadot description: phandle to the pcm3168a codec used on the CPB 53c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 54c66ec88fSEmmanuel Vadot 55c66ec88fSEmmanuel Vadot clocks: 566be33864SEmmanuel Vadot minItems: 4 576be33864SEmmanuel Vadot maxItems: 6 586be33864SEmmanuel Vadot 596be33864SEmmanuel Vadot clock-names: 606be33864SEmmanuel Vadot minItems: 4 616be33864SEmmanuel Vadot maxItems: 6 626be33864SEmmanuel Vadot 636be33864SEmmanuel Vadotrequired: 646be33864SEmmanuel Vadot - compatible 656be33864SEmmanuel Vadot - model 666be33864SEmmanuel Vadot - ti,cpb-mcasp 676be33864SEmmanuel Vadot - ti,cpb-codec 686be33864SEmmanuel Vadot - clocks 696be33864SEmmanuel Vadot - clock-names 706be33864SEmmanuel Vadot 716be33864SEmmanuel VadotadditionalProperties: false 726be33864SEmmanuel Vadot 736be33864SEmmanuel VadotallOf: 746be33864SEmmanuel Vadot - if: 756be33864SEmmanuel Vadot properties: 766be33864SEmmanuel Vadot compatible: 776be33864SEmmanuel Vadot contains: 786be33864SEmmanuel Vadot const: ti,j721e-cpb-audio 796be33864SEmmanuel Vadot 806be33864SEmmanuel Vadot then: 816be33864SEmmanuel Vadot properties: 826be33864SEmmanuel Vadot clocks: 83c66ec88fSEmmanuel Vadot items: 84c66ec88fSEmmanuel Vadot - description: AUXCLK clock for McASP used by CPB audio 85c66ec88fSEmmanuel Vadot - description: Parent for CPB_McASP auxclk (for 48KHz) 86c66ec88fSEmmanuel Vadot - description: Parent for CPB_McASP auxclk (for 44.1KHz) 87c66ec88fSEmmanuel Vadot - description: SCKI clock for the pcm3168a codec on CPB 88c66ec88fSEmmanuel Vadot - description: Parent for CPB_SCKI clock (for 48KHz) 89c66ec88fSEmmanuel Vadot - description: Parent for CPB_SCKI clock (for 44.1KHz) 90c66ec88fSEmmanuel Vadot 91c66ec88fSEmmanuel Vadot clock-names: 92c66ec88fSEmmanuel Vadot items: 93c66ec88fSEmmanuel Vadot - const: cpb-mcasp-auxclk 94c66ec88fSEmmanuel Vadot - const: cpb-mcasp-auxclk-48000 95c66ec88fSEmmanuel Vadot - const: cpb-mcasp-auxclk-44100 96c66ec88fSEmmanuel Vadot - const: cpb-codec-scki 97c66ec88fSEmmanuel Vadot - const: cpb-codec-scki-48000 98c66ec88fSEmmanuel Vadot - const: cpb-codec-scki-44100 99c66ec88fSEmmanuel Vadot 1006be33864SEmmanuel Vadot - if: 1016be33864SEmmanuel Vadot properties: 1026be33864SEmmanuel Vadot compatible: 1036be33864SEmmanuel Vadot contains: 1046be33864SEmmanuel Vadot const: ti,j7200-cpb-audio 105c66ec88fSEmmanuel Vadot 1066be33864SEmmanuel Vadot then: 1076be33864SEmmanuel Vadot properties: 1086be33864SEmmanuel Vadot clocks: 1096be33864SEmmanuel Vadot items: 1106be33864SEmmanuel Vadot - description: AUXCLK clock for McASP used by CPB audio 1116be33864SEmmanuel Vadot - description: Parent for CPB_McASP auxclk (for 48KHz) 1126be33864SEmmanuel Vadot - description: SCKI clock for the pcm3168a codec on CPB 1136be33864SEmmanuel Vadot - description: Parent for CPB_SCKI clock (for 48KHz) 1146be33864SEmmanuel Vadot 1156be33864SEmmanuel Vadot clock-names: 1166be33864SEmmanuel Vadot items: 1176be33864SEmmanuel Vadot - const: cpb-mcasp-auxclk 1186be33864SEmmanuel Vadot - const: cpb-mcasp-auxclk-48000 1196be33864SEmmanuel Vadot - const: cpb-codec-scki 1206be33864SEmmanuel Vadot - const: cpb-codec-scki-48000 121c66ec88fSEmmanuel Vadot 122c66ec88fSEmmanuel Vadotexamples: 123c66ec88fSEmmanuel Vadot - |+ 124c66ec88fSEmmanuel Vadot sound { 125c66ec88fSEmmanuel Vadot compatible = "ti,j721e-cpb-audio"; 126c66ec88fSEmmanuel Vadot model = "j721e-cpb"; 127c66ec88fSEmmanuel Vadot 128c66ec88fSEmmanuel Vadot ti,cpb-mcasp = <&mcasp10>; 129c66ec88fSEmmanuel Vadot ti,cpb-codec = <&pcm3168a_1>; 130c66ec88fSEmmanuel Vadot 131c66ec88fSEmmanuel Vadot clocks = <&k3_clks 184 1>, 132c66ec88fSEmmanuel Vadot <&k3_clks 184 2>, <&k3_clks 184 4>, 133c66ec88fSEmmanuel Vadot <&k3_clks 157 371>, 134c66ec88fSEmmanuel Vadot <&k3_clks 157 400>, <&k3_clks 157 401>; 135c66ec88fSEmmanuel Vadot clock-names = "cpb-mcasp-auxclk", 136c66ec88fSEmmanuel Vadot "cpb-mcasp-auxclk-48000", "cpb-mcasp-auxclk-44100", 137c66ec88fSEmmanuel Vadot "cpb-codec-scki", 138c66ec88fSEmmanuel Vadot "cpb-codec-scki-48000", "cpb-codec-scki-44100"; 139c66ec88fSEmmanuel Vadot }; 140