1cce4cbb1SLuca Ceresoli# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2cce4cbb1SLuca Ceresoli%YAML 1.2 3cce4cbb1SLuca Ceresoli--- 4cce4cbb1SLuca Ceresoli$id: http://devicetree.org/schemas/sound/rockchip,rk3308-codec.yaml# 5cce4cbb1SLuca Ceresoli$schema: http://devicetree.org/meta-schemas/core.yaml# 6cce4cbb1SLuca Ceresoli 7cce4cbb1SLuca Ceresolititle: Rockchip RK3308 Internal Codec 8cce4cbb1SLuca Ceresoli 9cce4cbb1SLuca Ceresolidescription: | 10cce4cbb1SLuca Ceresoli This is the audio codec embedded in the Rockchip RK3308 11cce4cbb1SLuca Ceresoli SoC. It has 8 24-bit ADCs and 2 24-bit DACs. The maximum supported 12cce4cbb1SLuca Ceresoli sampling rate is 192 kHz. 13cce4cbb1SLuca Ceresoli 14cce4cbb1SLuca Ceresoli It is connected internally to one out of a selection of the internal I2S 15cce4cbb1SLuca Ceresoli controllers. 16cce4cbb1SLuca Ceresoli 17cce4cbb1SLuca Ceresoli The RK3308 audio codec has 8 independent capture channels, but some 18cce4cbb1SLuca Ceresoli features work on stereo pairs called groups: 19cce4cbb1SLuca Ceresoli * grp 0 -- MIC1 / MIC2 20cce4cbb1SLuca Ceresoli * grp 1 -- MIC3 / MIC4 21cce4cbb1SLuca Ceresoli * grp 2 -- MIC5 / MIC6 22cce4cbb1SLuca Ceresoli * grp 3 -- MIC7 / MIC8 23cce4cbb1SLuca Ceresoli 24cce4cbb1SLuca Ceresolimaintainers: 25cce4cbb1SLuca Ceresoli - Luca Ceresoli <luca.ceresoli@bootlin.com> 26cce4cbb1SLuca Ceresoli 27cce4cbb1SLuca Ceresoliproperties: 28cce4cbb1SLuca Ceresoli compatible: 29cce4cbb1SLuca Ceresoli const: rockchip,rk3308-codec 30cce4cbb1SLuca Ceresoli 31cce4cbb1SLuca Ceresoli reg: 32cce4cbb1SLuca Ceresoli maxItems: 1 33cce4cbb1SLuca Ceresoli 34cce4cbb1SLuca Ceresoli rockchip,grf: 35cce4cbb1SLuca Ceresoli $ref: /schemas/types.yaml#/definitions/phandle 36cce4cbb1SLuca Ceresoli description: 37cce4cbb1SLuca Ceresoli Phandle to the General Register Files (GRF) 38cce4cbb1SLuca Ceresoli 39cce4cbb1SLuca Ceresoli clocks: 40cce4cbb1SLuca Ceresoli items: 41cce4cbb1SLuca Ceresoli - description: clock for TX 42cce4cbb1SLuca Ceresoli - description: clock for RX 43cce4cbb1SLuca Ceresoli - description: AHB clock driving the interface 44cce4cbb1SLuca Ceresoli 45cce4cbb1SLuca Ceresoli clock-names: 46cce4cbb1SLuca Ceresoli items: 47cce4cbb1SLuca Ceresoli - const: mclk_tx 48cce4cbb1SLuca Ceresoli - const: mclk_rx 49cce4cbb1SLuca Ceresoli - const: hclk 50cce4cbb1SLuca Ceresoli 51*cc8475a0SDmitry Yashin port: 52*cc8475a0SDmitry Yashin $ref: audio-graph-port.yaml# 53*cc8475a0SDmitry Yashin unevaluatedProperties: false 54*cc8475a0SDmitry Yashin 55cce4cbb1SLuca Ceresoli resets: 56cce4cbb1SLuca Ceresoli maxItems: 1 57cce4cbb1SLuca Ceresoli 58cce4cbb1SLuca Ceresoli reset-names: 59cce4cbb1SLuca Ceresoli items: 60cce4cbb1SLuca Ceresoli - const: codec 61cce4cbb1SLuca Ceresoli 62cce4cbb1SLuca Ceresoli "#sound-dai-cells": 63cce4cbb1SLuca Ceresoli const: 0 64cce4cbb1SLuca Ceresoli 65cce4cbb1SLuca Ceresoli rockchip,micbias-avdd-percent: 66cce4cbb1SLuca Ceresoli description: | 67cce4cbb1SLuca Ceresoli Voltage setting for the MICBIAS pins expressed as a percentage of 68cce4cbb1SLuca Ceresoli AVDD. 69cce4cbb1SLuca Ceresoli 70cce4cbb1SLuca Ceresoli E.g. if rockchip,micbias-avdd-percent = 85 and AVDD = 3v3, then the 71cce4cbb1SLuca Ceresoli MIC BIAS voltage will be 3.3 V * 85% = 2.805 V. 72cce4cbb1SLuca Ceresoli 73cce4cbb1SLuca Ceresoli enum: [ 50, 55, 60, 65, 70, 75, 80, 85 ] 74cce4cbb1SLuca Ceresoli 75cce4cbb1SLuca Ceresolirequired: 76cce4cbb1SLuca Ceresoli - compatible 77cce4cbb1SLuca Ceresoli - reg 78cce4cbb1SLuca Ceresoli - rockchip,grf 79cce4cbb1SLuca Ceresoli - clocks 80cce4cbb1SLuca Ceresoli - resets 81cce4cbb1SLuca Ceresoli - "#sound-dai-cells" 82cce4cbb1SLuca Ceresoli 83cce4cbb1SLuca CeresoliadditionalProperties: false 84cce4cbb1SLuca Ceresoli 85cce4cbb1SLuca Ceresoliexamples: 86cce4cbb1SLuca Ceresoli - | 87cce4cbb1SLuca Ceresoli #include <dt-bindings/clock/rk3308-cru.h> 88cce4cbb1SLuca Ceresoli 89cce4cbb1SLuca Ceresoli audio_codec: audio-codec@ff560000 { 90cce4cbb1SLuca Ceresoli compatible = "rockchip,rk3308-codec"; 91cce4cbb1SLuca Ceresoli reg = <0xff560000 0x10000>; 92cce4cbb1SLuca Ceresoli rockchip,grf = <&grf>; 93cce4cbb1SLuca Ceresoli clock-names = "mclk_tx", "mclk_rx", "hclk"; 94cce4cbb1SLuca Ceresoli clocks = <&cru SCLK_I2S2_8CH_TX_OUT>, 95cce4cbb1SLuca Ceresoli <&cru SCLK_I2S2_8CH_RX_OUT>, 96cce4cbb1SLuca Ceresoli <&cru PCLK_ACODEC>; 97cce4cbb1SLuca Ceresoli reset-names = "codec"; 98cce4cbb1SLuca Ceresoli resets = <&cru SRST_ACODEC_P>; 99cce4cbb1SLuca Ceresoli #sound-dai-cells = <0>; 100cce4cbb1SLuca Ceresoli }; 101cce4cbb1SLuca Ceresoli 102cce4cbb1SLuca Ceresoli... 103