1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 %YAML 1.2 3 --- 4 $id: http://devicetree.org/schemas/sound/realtek,rt5645.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 7 title: RT5650/RT5645 audio CODEC 8 9 maintainers: 10 - Animesh Agarwal <animeshagarwal28@gmail.com> 11 12 description: | 13 This device supports I2C only. 14 15 Pins on the device (for linking into audio routes) for RT5645/RT5650: 16 * DMIC L1 17 * DMIC R1 18 * DMIC L2 19 * DMIC R2 20 * IN1P 21 * IN1N 22 * IN2P 23 * IN2N 24 * Haptic Generator 25 * HPOL 26 * HPOR 27 * LOUTL 28 * LOUTR 29 * PDM1L 30 * PDM1R 31 * SPOL 32 * SPOR 33 34 allOf: 35 - $ref: dai-common.yaml# 36 37 properties: 38 compatible: 39 enum: 40 - realtek,rt5645 41 - realtek,rt5650 42 43 reg: 44 maxItems: 1 45 46 interrupts: 47 maxItems: 1 48 description: The CODEC's interrupt output. 49 50 avdd-supply: 51 description: Power supply for AVDD, providing 1.8V. 52 53 cpvdd-supply: 54 description: Power supply for CPVDD, providing 3.5V. 55 56 hp-detect-gpios: 57 description: 58 A GPIO spec for the external headphone detect pin. If jd-mode = 0, we 59 will get the JD status by getting the value of hp-detect-gpios. 60 maxItems: 1 61 62 cbj-sleeve-gpios: 63 description: 64 A GPIO spec to control the external combo jack circuit to tie the 65 sleeve/ring2 contacts to the ground or floating. It could avoid some 66 electric noise from the active speaker jacks. 67 maxItems: 1 68 69 realtek,in2-differential: 70 description: 71 Indicate MIC2 input are differential, rather than single-ended. 72 type: boolean 73 74 realtek,dmic1-data-pin: 75 description: Specify which pin to be used as DMIC1 data pin. 76 $ref: /schemas/types.yaml#/definitions/uint32 77 enum: 78 - 0 # dmic1 is not used 79 - 1 # using IN2P pin as dmic1 data pin 80 - 2 # using GPIO6 pin as dmic1 data pin 81 - 3 # using GPIO10 pin as dmic1 data pin 82 - 4 # using GPIO12 pin as dmic1 data pin 83 84 realtek,dmic2-data-pin: 85 description: Specify which pin to be used as DMIC2 data pin. 86 $ref: /schemas/types.yaml#/definitions/uint32 87 enum: 88 - 0 # dmic2 is not used 89 - 1 # using IN2N pin as dmic2 data pin 90 - 2 # using GPIO5 pin as dmic2 data pin 91 - 3 # using GPIO11 pin as dmic2 data pin 92 93 realtek,jd-mode: 94 description: The JD mode of rt5645/rt5650. 95 $ref: /schemas/types.yaml#/definitions/uint32 96 enum: 97 - 0 # rt5645/rt5650 JD function is not used 98 - 1 # Mode-0 (VDD=3.3V), two port jack detection 99 - 2 # Mode-1 (VDD=3.3V), one port jack detection 100 - 3 # Mode-2 (VDD=1.8V), one port jack detection 101 102 required: 103 - compatible 104 - reg 105 - interrupts 106 - avdd-supply 107 - cpvdd-supply 108 109 unevaluatedProperties: false 110 111 examples: 112 - | 113 #include <dt-bindings/gpio/gpio.h> 114 #include <dt-bindings/interrupt-controller/irq.h> 115 116 i2c { 117 #address-cells = <1>; 118 #size-cells = <0>; 119 120 codec@1a { 121 compatible = "realtek,rt5650"; 122 reg = <0x1a>; 123 hp-detect-gpios = <&gpio 19 0>; 124 cbj-sleeve-gpios = <&gpio 20 0>; 125 interrupt-parent = <&gpio>; 126 interrupts = <7 IRQ_TYPE_EDGE_FALLING>; 127 avdd-supply = <&avdd_reg>; 128 cpvdd-supply = <&cpvdd_supply>; 129 realtek,jd-mode = <3>; 130 }; 131 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.