130 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/sound/realtek,rt5659.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: RT5659/RT5658 audio CODEC8 9maintainers:10 - Animesh Agarwal <animeshagarwal28@gmail.com>11 12description: |13 This device supports I2C only.14 15 Pins on the device (for linking into audio routes) for RT5659/RT5658:16 * DMIC L117 * DMIC R118 * DMIC L219 * DMIC R220 * IN1P21 * IN1N22 * IN2P23 * IN2N24 * IN3P25 * IN3N26 * IN4P27 * IN4N28 * HPOL29 * HPOR30 * SPOL31 * SPOR32 * LOUTL33 * LOUTR34 * MONOOUT35 * PDML36 * PDMR37 * SPDIF38 39allOf:40 - $ref: dai-common.yaml#41 42properties:43 compatible:44 enum:45 - realtek,rt565946 - realtek,rt565847 48 reg:49 maxItems: 150 51 interrupts:52 maxItems: 153 54 clocks:55 maxItems: 156 57 clock-names:58 const: mclk59 60 realtek,dmic1-data-pin:61 $ref: /schemas/types.yaml#/definitions/uint3262 enum:63 - 0 # dmic1 is not used64 - 1 # using IN2N pin as dmic1 data pin65 - 2 # using GPIO5 pin as dmic1 data pin66 - 3 # using GPIO9 pin as dmic1 data pin67 - 4 # using GPIO11 pin as dmic1 data pin68 description: Specify which pin to be used as DMIC1 data pin.69 default: 070 71 realtek,dmic2-data-pin:72 $ref: /schemas/types.yaml#/definitions/uint3273 enum:74 - 0 # dmic2 is not used75 - 1 # using IN2P pin as dmic2 data pin76 - 2 # using GPIO6 pin as dmic2 data pin77 - 3 # using GPIO10 pin as dmic2 data pin78 - 4 # using GPIO12 pin as dmic2 data pin79 description: Specify which pin to be used as DMIC2 data pin.80 default: 081 82 realtek,jd-src:83 $ref: /schemas/types.yaml#/definitions/uint3284 enum:85 - 0 # No JD is used86 - 1 # using JD3 as JD source87 - 2 # JD source for Intel HDA header88 description: Specify which JD source be used.89 default: 090 91 realtek,ldo1-en-gpios:92 maxItems: 193 description: CODEC's LDO1_EN pin.94 95 realtek,reset-gpios:96 maxItems: 197 description: CODEC's RESET pin.98 99 ports:100 $ref: /schemas/graph.yaml#/properties/ports101 102 port:103 $ref: audio-graph-port.yaml#104 unevaluatedProperties: false105 106required:107 - compatible108 - reg109 - interrupts110 111unevaluatedProperties: false112 113examples:114 - |115 #include <dt-bindings/gpio/gpio.h>116 #include <dt-bindings/interrupt-controller/irq.h>117 118 i2c {119 #address-cells = <1>;120 #size-cells = <0>;121 122 codec@1b {123 compatible = "realtek,rt5659";124 reg = <0x1b>;125 interrupt-parent = <&gpio>;126 interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;127 realtek,ldo1-en-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;128 };129 };130