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: convert rt5682.txt to dt-schema

Convert the text bindings for the Realtek rt5682 and
rt5682i codecs to dt-schema.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20241211-topic-misc-rt5682-convert-v2-1-9e1dd4ff7093@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Neil Armstrong and committed by
Mark Brown
ab20bcb2 c5607812

+156 -98
+156
Documentation/devicetree/bindings/sound/realtek,rt5682.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,rt5682.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Realtek rt5682 and rt5682i codecs 8 + 9 + maintainers: 10 + - Bard Liao <bardliao@realtek.com> 11 + 12 + allOf: 13 + - $ref: dai-common.yaml# 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - realtek,rt5682 19 + - realtek,rt5682i 20 + 21 + reg: 22 + maxItems: 1 23 + description: I2C address of the device. 24 + 25 + interrupts: 26 + maxItems: 1 27 + description: The CODEC's interrupt output. 28 + 29 + realtek,dmic1-data-pin: 30 + $ref: /schemas/types.yaml#/definitions/uint32 31 + enum: 32 + - 0 # dmic1 data is not used 33 + - 1 # using GPIO2 pin as dmic1 data pin 34 + - 2 # using GPIO5 pin as dmic1 data pin 35 + description: 36 + Specify which GPIO pin be used as DMIC1 data pin. 37 + 38 + realtek,dmic1-clk-pin: 39 + $ref: /schemas/types.yaml#/definitions/uint32 40 + enum: 41 + - 0 # using GPIO1 pin as dmic1 clock pin 42 + - 1 # using GPIO3 pin as dmic1 clock pin 43 + description: 44 + Specify which GPIO pin be used as DMIC1 clk pin. 45 + 46 + realtek,jd-src: 47 + $ref: /schemas/types.yaml#/definitions/uint32 48 + enum: 49 + - 0 # No JD is used 50 + - 1 # using JD1 as JD source 51 + description: 52 + Specify which JD source be used. 53 + 54 + realtek,ldo1-en-gpios: 55 + description: 56 + The GPIO that controls the CODEC's LDO1_EN pin. 57 + 58 + realtek,btndet-delay: 59 + $ref: /schemas/types.yaml#/definitions/uint32 60 + description: 61 + The debounce delay for push button. 62 + The delay time is realtek,btndet-delay value multiple of 8.192 ms. 63 + If absent, the default is 16. 64 + 65 + realtek,dmic-clk-rate-hz: 66 + description: 67 + Set the clock rate (hz) for the requirement of the particular DMIC. 68 + 69 + realtek,dmic-delay-ms: 70 + description: 71 + Set the delay time (ms) for the requirement of the particular DMIC. 72 + 73 + realtek,dmic-clk-driving-high: 74 + type: boolean 75 + description: 76 + Set the high driving of the DMIC clock out. 77 + 78 + clocks: 79 + items: 80 + - description: phandle and clock specifier for codec MCLK. 81 + 82 + clock-names: 83 + items: 84 + - const: mclk 85 + 86 + "#clock-cells": 87 + const: 1 88 + 89 + clock-output-names: 90 + minItems: 2 91 + maxItems: 2 92 + description: Name given for DAI word clock and bit clock outputs. 93 + 94 + "#sound-dai-cells": 95 + const: 1 96 + 97 + AVDD-supply: 98 + description: Regulator supplying analog power through the AVDD pin. 99 + 100 + MICVDD-supply: 101 + description: Regulator supplying power for the microphone bias through 102 + the MICVDD pin. 103 + 104 + VBAT-supply: 105 + description: Regulator supplying battery power through the VBAT pin. 106 + 107 + DBVDD-supply: 108 + description: Regulator supplying I/O power through the DBVDD pin. 109 + 110 + LDO1-IN-supply: 111 + description: Regulator supplying power to the digital core and charge 112 + pump through the LDO1_IN pin. 113 + 114 + required: 115 + - compatible 116 + - reg 117 + - AVDD-supply 118 + - VBAT-supply 119 + - MICVDD-supply 120 + - DBVDD-supply 121 + - LDO1-IN-supply 122 + 123 + unevaluatedProperties: false 124 + 125 + examples: 126 + - | 127 + #include <dt-bindings/gpio/gpio.h> 128 + #include <dt-bindings/interrupt-controller/irq.h> 129 + 130 + i2c { 131 + #address-cells = <1>; 132 + #size-cells = <0>; 133 + 134 + codec@1a { 135 + compatible = "realtek,rt5682"; 136 + reg = <0x1a>; 137 + interrupts = <6 IRQ_TYPE_LEVEL_HIGH>; 138 + realtek,ldo1-en-gpios = 139 + <&gpio 2 GPIO_ACTIVE_HIGH>; 140 + realtek,dmic1-data-pin = <1>; 141 + realtek,dmic1-clk-pin = <1>; 142 + realtek,jd-src = <1>; 143 + 144 + #clock-cells = <1>; 145 + clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk"; 146 + 147 + clocks = <&osc>; 148 + clock-names = "mclk"; 149 + 150 + AVDD-supply = <&avdd_reg>; 151 + VBAT-supply = <&vbat_reg>; 152 + MICVDD-supply = <&micvdd_reg>; 153 + DBVDD-supply = <&dbvdd_reg>; 154 + LDO1-IN-supply = <&ldo1_in_reg>; 155 + }; 156 + };
-98
Documentation/devicetree/bindings/sound/rt5682.txt
··· 1 - RT5682 audio CODEC 2 - 3 - This device supports I2C only. 4 - 5 - Required properties: 6 - 7 - - compatible : "realtek,rt5682" or "realtek,rt5682i" 8 - 9 - - reg : The I2C address of the device. 10 - 11 - - AVDD-supply: phandle to the regulator supplying analog power through the 12 - AVDD pin 13 - 14 - - MICVDD-supply: phandle to the regulator supplying power for the microphone 15 - bias through the MICVDD pin. Either MICVDD or VBAT should be present. 16 - 17 - - VBAT-supply: phandle to the regulator supplying battery power through the 18 - VBAT pin. Either MICVDD or VBAT should be present. 19 - 20 - - DBVDD-supply: phandle to the regulator supplying I/O power through the DBVDD 21 - pin. 22 - 23 - - LDO1-IN-supply: phandle to the regulator supplying power to the digital core 24 - and charge pump through the LDO1_IN pin. 25 - 26 - Optional properties: 27 - 28 - - interrupts : The CODEC's interrupt output. 29 - 30 - - realtek,dmic1-data-pin 31 - 0: dmic1 is not used 32 - 1: using GPIO2 pin as dmic1 data pin 33 - 2: using GPIO5 pin as dmic1 data pin 34 - 35 - - realtek,dmic1-clk-pin 36 - 0: using GPIO1 pin as dmic1 clock pin 37 - 1: using GPIO3 pin as dmic1 clock pin 38 - 39 - - realtek,jd-src 40 - 0: No JD is used 41 - 1: using JD1 as JD source 42 - 43 - - realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. 44 - 45 - - realtek,btndet-delay 46 - The debounce delay for push button. 47 - The delay time is realtek,btndet-delay value multiple of 8.192 ms. 48 - If absent, the default is 16. 49 - 50 - - #clock-cells : Should be set to '<1>', wclk and bclk sources provided. 51 - - clock-output-names : Name given for DAI clocks output. 52 - 53 - - clocks : phandle and clock specifier for codec MCLK. 54 - - clock-names : Clock name string for 'clocks' attribute, should be "mclk". 55 - 56 - - realtek,dmic-clk-rate-hz : Set the clock rate (hz) for the requirement of 57 - the particular DMIC. 58 - 59 - - realtek,dmic-delay-ms : Set the delay time (ms) for the requirement of 60 - the particular DMIC. 61 - 62 - - realtek,dmic-clk-driving-high : Set the high driving of the DMIC clock out. 63 - 64 - - #sound-dai-cells: Should be set to '<1>'. 65 - 66 - Pins on the device (for linking into audio routes) for RT5682: 67 - 68 - * DMIC L1 69 - * DMIC R1 70 - * IN1P 71 - * HPOL 72 - * HPOR 73 - 74 - Example: 75 - 76 - rt5682 { 77 - compatible = "realtek,rt5682i"; 78 - reg = <0x1a>; 79 - interrupt-parent = <&gpio>; 80 - interrupts = <TEGRA_GPIO(U, 6) IRQ_TYPE_LEVEL_HIGH>; 81 - realtek,ldo1-en-gpios = 82 - <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>; 83 - realtek,dmic1-data-pin = <1>; 84 - realtek,dmic1-clk-pin = <1>; 85 - realtek,jd-src = <1>; 86 - realtek,btndet-delay = <16>; 87 - 88 - #clock-cells = <1>; 89 - clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk"; 90 - 91 - clocks = <&osc>; 92 - clock-names = "mclk"; 93 - 94 - AVDD-supply = <&avdd_reg>; 95 - MICVDD-supply = <&micvdd_reg>; 96 - DBVDD-supply = <&dbvdd_reg>; 97 - LDO1-IN-supply = <&ldo1_in_reg>; 98 - };