Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: dt-bindings: realtek,rt5677: Convert to dtschema

Convert the RT5677 audio CODEC bindings to DT schema.

Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240627105030.14360-1-animeshagarwal28@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Animesh Agarwal and committed by
Mark Brown
4381b88b 55f0a1fa

+135 -78
+135
Documentation/devicetree/bindings/sound/realtek,rt5677.yaml
··· 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,rt5677.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: RT5677 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): 16 + * IN1P 17 + * IN1N 18 + * IN2P 19 + * IN2N 20 + * MICBIAS1 21 + * DMIC1 22 + * DMIC2 23 + * DMIC3 24 + * DMIC4 25 + * LOUT1 26 + * LOUT2 27 + * LOUT3 28 + 29 + allOf: 30 + - $ref: dai-common.yaml# 31 + 32 + properties: 33 + compatible: 34 + const: realtek,rt5677 35 + 36 + reg: 37 + maxItems: 1 38 + 39 + interrupts: 40 + maxItems: 1 41 + 42 + gpio-controller: true 43 + 44 + '#gpio-cells': 45 + const: 2 46 + 47 + realtek,pow-ldo2-gpio: 48 + maxItems: 1 49 + description: CODEC's POW_LDO2 pin. 50 + 51 + realtek,reset-gpio: 52 + maxItems: 1 53 + description: CODEC's RESET pin. Active low. 54 + 55 + realtek,gpio-config: 56 + description: | 57 + Array of six 8bit elements that configures GPIO. 58 + 0 - floating (reset value) 59 + 1 - pull down 60 + 2 - pull up 61 + $ref: /schemas/types.yaml#/definitions/uint32-array 62 + minItems: 6 63 + maxItems: 6 64 + items: 65 + maximum: 2 66 + 67 + realtek,jd1-gpio: 68 + $ref: /schemas/types.yaml#/definitions/uint32 69 + enum: 70 + - 0 # OFF 71 + - 1 # GPIO1 for jd1. 72 + - 2 # GPIO2 for jd1. 73 + - 3 # GPIO3 for jd1. 74 + description: Configures GPIO Mic Jack detection 1. 75 + 76 + realtek,jd2-gpio: 77 + $ref: /schemas/types.yaml#/definitions/uint32 78 + enum: 79 + - 0 # OFF 80 + - 1 # GPIO4 for jd2. 81 + - 2 # GPIO5 for jd2. 82 + - 3 # GPIO6 for jd2. 83 + description: Configures GPIO Mic Jack detection 2. 84 + 85 + realtek,jd3-gpio: 86 + $ref: /schemas/types.yaml#/definitions/uint32 87 + enum: 88 + - 0 # OFF 89 + - 1 # GPIO4 for jd3. 90 + - 2 # GPIO5 for jd3. 91 + - 3 # GPIO6 for jd3. 92 + description: Configures GPIO Mic Jack detection 3. 93 + 94 + patternProperties: 95 + '^realtek,in[1-2]-differential$': 96 + type: boolean 97 + description: Indicate MIC1/2 input are differential, rather than 98 + single-ended. 99 + 100 + '^realtek,lout[1-3]-differential$': 101 + type: boolean 102 + description: Indicate LOUT1/2/3 outputs are differential, rather than 103 + single-ended. 104 + 105 + required: 106 + - compatible 107 + - reg 108 + - interrupts 109 + - gpio-controller 110 + - '#gpio-cells' 111 + 112 + unevaluatedProperties: false 113 + 114 + examples: 115 + - | 116 + #include <dt-bindings/gpio/gpio.h> 117 + #include <dt-bindings/interrupt-controller/irq.h> 118 + 119 + i2c { 120 + #address-cells = <1>; 121 + #size-cells = <0>; 122 + 123 + codec@2c { 124 + compatible = "realtek,rt5677"; 125 + reg = <0x2c>; 126 + interrupt-parent = <&gpio>; 127 + interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; 128 + gpio-controller; 129 + #gpio-cells = <2>; 130 + realtek,pow-ldo2-gpio = <&gpio 3 GPIO_ACTIVE_HIGH>; 131 + realtek,reset-gpio = <&gpio 3 GPIO_ACTIVE_LOW>; 132 + realtek,in1-differential; 133 + realtek,gpio-config = <0 0 0 0 0 2>; 134 + }; 135 + };
-78
Documentation/devicetree/bindings/sound/rt5677.txt
··· 1 - RT5677 audio CODEC 2 - 3 - This device supports I2C only. 4 - 5 - Required properties: 6 - 7 - - compatible : "realtek,rt5677". 8 - 9 - - reg : The I2C address of the device. 10 - 11 - - interrupts : The CODEC's interrupt output. 12 - 13 - - gpio-controller : Indicates this device is a GPIO controller. 14 - 15 - - #gpio-cells : Should be two. The first cell is the pin number and the 16 - second cell is used to specify optional parameters (currently unused). 17 - 18 - Optional properties: 19 - 20 - - realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin. 21 - - realtek,reset-gpio : The GPIO that controls the CODEC's RESET pin. Active low. 22 - 23 - - realtek,in1-differential 24 - - realtek,in2-differential 25 - - realtek,lout1-differential 26 - - realtek,lout2-differential 27 - - realtek,lout3-differential 28 - Boolean. Indicate MIC1/2 input and LOUT1/2/3 outputs are differential, 29 - rather than single-ended. 30 - 31 - - realtek,gpio-config 32 - Array of six 8bit elements that configures GPIO. 33 - 0 - floating (reset value) 34 - 1 - pull down 35 - 2 - pull up 36 - 37 - - realtek,jd1-gpio 38 - Configures GPIO Mic Jack detection 1. 39 - Select 0 ~ 3 as OFF, GPIO1, GPIO2 and GPIO3 respectively. 40 - 41 - - realtek,jd2-gpio 42 - - realtek,jd3-gpio 43 - Configures GPIO Mic Jack detection 2 and 3. 44 - Select 0 ~ 3 as OFF, GPIO4, GPIO5 and GPIO6 respectively. 45 - 46 - Pins on the device (for linking into audio routes): 47 - 48 - * IN1P 49 - * IN1N 50 - * IN2P 51 - * IN2N 52 - * MICBIAS1 53 - * DMIC1 54 - * DMIC2 55 - * DMIC3 56 - * DMIC4 57 - * LOUT1 58 - * LOUT2 59 - * LOUT3 60 - 61 - Example: 62 - 63 - rt5677 { 64 - compatible = "realtek,rt5677"; 65 - reg = <0x2c>; 66 - interrupt-parent = <&gpio>; 67 - interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>; 68 - 69 - gpio-controller; 70 - #gpio-cells = <2>; 71 - 72 - realtek,pow-ldo2-gpio = 73 - <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; 74 - realtek,reset-gpio = <&gpio TEGRA_GPIO(BB, 3) GPIO_ACTIVE_LOW>; 75 - realtek,in1-differential = "true"; 76 - realtek,gpio-config = /bits/ 8 <0 0 0 0 0 2>; /* pull up GPIO6 */ 77 - realtek,jd2-gpio = <3>; /* Enables Jack detection for GPIO6 */ 78 - };