xref: /freebsd/sys/contrib/device-tree/Bindings/sound/rockchip,rk3308-codec.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
17d0873ebSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
27d0873ebSEmmanuel Vadot%YAML 1.2
37d0873ebSEmmanuel Vadot---
47d0873ebSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/rockchip,rk3308-codec.yaml#
57d0873ebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
67d0873ebSEmmanuel Vadot
77d0873ebSEmmanuel Vadottitle: Rockchip RK3308 Internal Codec
87d0873ebSEmmanuel Vadot
97d0873ebSEmmanuel Vadotdescription: |
107d0873ebSEmmanuel Vadot  This is the audio codec embedded in the Rockchip RK3308
117d0873ebSEmmanuel Vadot  SoC. It has 8 24-bit ADCs and 2 24-bit DACs. The maximum supported
127d0873ebSEmmanuel Vadot  sampling rate is 192 kHz.
137d0873ebSEmmanuel Vadot
147d0873ebSEmmanuel Vadot  It is connected internally to one out of a selection of the internal I2S
157d0873ebSEmmanuel Vadot  controllers.
167d0873ebSEmmanuel Vadot
177d0873ebSEmmanuel Vadot  The RK3308 audio codec has 8 independent capture channels, but some
187d0873ebSEmmanuel Vadot  features work on stereo pairs called groups:
197d0873ebSEmmanuel Vadot    * grp 0 -- MIC1 / MIC2
207d0873ebSEmmanuel Vadot    * grp 1 -- MIC3 / MIC4
217d0873ebSEmmanuel Vadot    * grp 2 -- MIC5 / MIC6
227d0873ebSEmmanuel Vadot    * grp 3 -- MIC7 / MIC8
237d0873ebSEmmanuel Vadot
247d0873ebSEmmanuel Vadotmaintainers:
257d0873ebSEmmanuel Vadot  - Luca Ceresoli <luca.ceresoli@bootlin.com>
267d0873ebSEmmanuel Vadot
277d0873ebSEmmanuel Vadotproperties:
287d0873ebSEmmanuel Vadot  compatible:
297d0873ebSEmmanuel Vadot    const: rockchip,rk3308-codec
307d0873ebSEmmanuel Vadot
317d0873ebSEmmanuel Vadot  reg:
327d0873ebSEmmanuel Vadot    maxItems: 1
337d0873ebSEmmanuel Vadot
347d0873ebSEmmanuel Vadot  rockchip,grf:
357d0873ebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
367d0873ebSEmmanuel Vadot    description:
377d0873ebSEmmanuel Vadot      Phandle to the General Register Files (GRF)
387d0873ebSEmmanuel Vadot
397d0873ebSEmmanuel Vadot  clocks:
407d0873ebSEmmanuel Vadot    items:
417d0873ebSEmmanuel Vadot      - description: clock for TX
427d0873ebSEmmanuel Vadot      - description: clock for RX
437d0873ebSEmmanuel Vadot      - description: AHB clock driving the interface
447d0873ebSEmmanuel Vadot
457d0873ebSEmmanuel Vadot  clock-names:
467d0873ebSEmmanuel Vadot    items:
477d0873ebSEmmanuel Vadot      - const: mclk_tx
487d0873ebSEmmanuel Vadot      - const: mclk_rx
497d0873ebSEmmanuel Vadot      - const: hclk
507d0873ebSEmmanuel Vadot
51*b2d2a78aSEmmanuel Vadot  port:
52*b2d2a78aSEmmanuel Vadot    $ref: audio-graph-port.yaml#
53*b2d2a78aSEmmanuel Vadot    unevaluatedProperties: false
54*b2d2a78aSEmmanuel Vadot
557d0873ebSEmmanuel Vadot  resets:
567d0873ebSEmmanuel Vadot    maxItems: 1
577d0873ebSEmmanuel Vadot
587d0873ebSEmmanuel Vadot  reset-names:
597d0873ebSEmmanuel Vadot    items:
607d0873ebSEmmanuel Vadot      - const: codec
617d0873ebSEmmanuel Vadot
627d0873ebSEmmanuel Vadot  "#sound-dai-cells":
637d0873ebSEmmanuel Vadot    const: 0
647d0873ebSEmmanuel Vadot
657d0873ebSEmmanuel Vadot  rockchip,micbias-avdd-percent:
667d0873ebSEmmanuel Vadot    description: |
677d0873ebSEmmanuel Vadot      Voltage setting for the MICBIAS pins expressed as a percentage of
687d0873ebSEmmanuel Vadot      AVDD.
697d0873ebSEmmanuel Vadot
707d0873ebSEmmanuel Vadot      E.g. if rockchip,micbias-avdd-percent = 85 and AVDD = 3v3, then the
717d0873ebSEmmanuel Vadot      MIC BIAS voltage will be 3.3 V * 85% = 2.805 V.
727d0873ebSEmmanuel Vadot
737d0873ebSEmmanuel Vadot    enum: [ 50, 55, 60, 65, 70, 75, 80, 85 ]
747d0873ebSEmmanuel Vadot
757d0873ebSEmmanuel Vadotrequired:
767d0873ebSEmmanuel Vadot  - compatible
777d0873ebSEmmanuel Vadot  - reg
787d0873ebSEmmanuel Vadot  - rockchip,grf
797d0873ebSEmmanuel Vadot  - clocks
807d0873ebSEmmanuel Vadot  - resets
817d0873ebSEmmanuel Vadot  - "#sound-dai-cells"
827d0873ebSEmmanuel Vadot
837d0873ebSEmmanuel VadotadditionalProperties: false
847d0873ebSEmmanuel Vadot
857d0873ebSEmmanuel Vadotexamples:
867d0873ebSEmmanuel Vadot  - |
877d0873ebSEmmanuel Vadot    #include <dt-bindings/clock/rk3308-cru.h>
887d0873ebSEmmanuel Vadot
897d0873ebSEmmanuel Vadot    audio_codec: audio-codec@ff560000 {
907d0873ebSEmmanuel Vadot        compatible = "rockchip,rk3308-codec";
917d0873ebSEmmanuel Vadot        reg = <0xff560000 0x10000>;
927d0873ebSEmmanuel Vadot        rockchip,grf = <&grf>;
937d0873ebSEmmanuel Vadot        clock-names = "mclk_tx", "mclk_rx", "hclk";
947d0873ebSEmmanuel Vadot        clocks = <&cru SCLK_I2S2_8CH_TX_OUT>,
957d0873ebSEmmanuel Vadot                 <&cru SCLK_I2S2_8CH_RX_OUT>,
967d0873ebSEmmanuel Vadot                 <&cru PCLK_ACODEC>;
977d0873ebSEmmanuel Vadot        reset-names = "codec";
987d0873ebSEmmanuel Vadot        resets = <&cru SRST_ACODEC_P>;
997d0873ebSEmmanuel Vadot        #sound-dai-cells = <0>;
1007d0873ebSEmmanuel Vadot    };
1017d0873ebSEmmanuel Vadot
1027d0873ebSEmmanuel Vadot...
103