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,rt5640: Convert to dtschema

Convert the RT5640/RT5639 audio CODEC bindings to DT schema.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240911-topic-amlogic-arm32-upstream-bindings-fixes-covert-realtek-rt5640-v1-1-6b3745e34540@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Neil Armstrong and committed by
Mark Brown
eba5a0ba bbeffdda

+146 -97
+146
Documentation/devicetree/bindings/sound/realtek,rt5640.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,rt5640.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: RT5640/RT5639 audio CODEC 8 + 9 + maintainers: 10 + - Neil Armstrong <neil.armstrong@linaro.org> 11 + 12 + description: | 13 + This device supports I2C only. 14 + 15 + Pins on the device (for linking into audio routes) for RT5639/RT5640: 16 + * DMIC1 17 + * DMIC2 18 + * MICBIAS1 19 + * IN1P 20 + * IN1N 21 + * IN2P 22 + * IN2N 23 + * IN3P 24 + * IN3N 25 + * HPOL 26 + * HPOR 27 + * LOUTL 28 + * LOUTR 29 + * SPOLP 30 + * SPOLN 31 + * SPORP 32 + * SPORN 33 + 34 + Additional pins on the device for RT5640: 35 + * MONOP 36 + * MONON 37 + 38 + allOf: 39 + - $ref: dai-common.yaml# 40 + 41 + properties: 42 + compatible: 43 + enum: 44 + - realtek,rt5640 45 + - realtek,rt5639 46 + 47 + reg: 48 + maxItems: 1 49 + 50 + interrupts: 51 + maxItems: 1 52 + description: The CODEC's interrupt output. 53 + 54 + realtek,in1-differential: 55 + description: 56 + Indicate MIC1 input is differential, rather than single-ended. 57 + type: boolean 58 + 59 + realtek,in2-differential: 60 + description: 61 + Indicate MIC2 input is differential, rather than single-ended. 62 + type: boolean 63 + 64 + realtek,in3-differential: 65 + description: 66 + Indicate MIC3 input is differential, rather than single-ended. 67 + type: boolean 68 + 69 + realtek,lout-differential: 70 + description: 71 + Indicate LOUT output is 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 GPIO3 pin as dmic1 data pin 81 + 82 + realtek,dmic2-data-pin: 83 + description: Specify which pin to be used as DMIC2 data pin. 84 + $ref: /schemas/types.yaml#/definitions/uint32 85 + enum: 86 + - 0 # dmic2 is not used 87 + - 1 # using IN2N pin as dmic2 data pin 88 + - 2 # using GPIO4 pin as dmic2 data pin 89 + 90 + realtek,jack-detect-source: 91 + description: The Jack Detect source. 92 + $ref: /schemas/types.yaml#/definitions/uint32 93 + enum: 94 + - 0 # Jack Detect function is not used 95 + - 1 # Use GPIO1 for jack-detect 96 + - 2 # Use JD1_IN4P for jack-detect 97 + - 3 # Use JD2_IN4N for jack-detect 98 + - 4 # Use GPIO2 for jack-detect 99 + - 5 # Use GPIO3 for jack-detect 100 + - 6 # Use GPIO4 for jack-detect 101 + 102 + realtek,jack-detect-not-inverted: 103 + description: 104 + Normal jack-detect switches give an inverted signal, set this bool 105 + in the rare case you've a jack-detect switch which is not inverted. 106 + type: boolean 107 + 108 + realtek,over-current-threshold-microamp: 109 + description: micbias over-current detection threshold in µA 110 + enum: 111 + - 600 112 + - 1500 113 + - 2000 114 + 115 + realtek,over-current-scale-factor: 116 + description: micbias over-current detection scale-factor 117 + $ref: /schemas/types.yaml#/definitions/uint32 118 + enum: 119 + - 0 # Scale current by 0.5 120 + - 1 # Scale current by 0.75 121 + - 2 # Scale current by 1.0 122 + - 3 # Scale current by 1.5 123 + 124 + required: 125 + - compatible 126 + - reg 127 + - interrupts 128 + 129 + unevaluatedProperties: false 130 + 131 + examples: 132 + - | 133 + #include <dt-bindings/gpio/gpio.h> 134 + #include <dt-bindings/interrupt-controller/irq.h> 135 + 136 + i2c { 137 + #address-cells = <1>; 138 + #size-cells = <0>; 139 + 140 + codec@1a { 141 + compatible = "realtek,rt5640"; 142 + reg = <0x1a>; 143 + interrupt-parent = <&gpio>; 144 + interrupts = <7 IRQ_TYPE_EDGE_FALLING>; 145 + }; 146 + };
-97
Documentation/devicetree/bindings/sound/rt5640.txt
··· 1 - RT5640/RT5639 audio CODEC 2 - 3 - This device supports I2C only. 4 - 5 - Required properties: 6 - 7 - - compatible : One of "realtek,rt5640" or "realtek,rt5639". 8 - 9 - - reg : The I2C address of the device. 10 - 11 - - interrupts : The CODEC's interrupt output. 12 - 13 - Optional properties: 14 - 15 - - clocks: The phandle of the master clock to the CODEC 16 - - clock-names: Should be "mclk" 17 - 18 - - realtek,in1-differential 19 - - realtek,in2-differential 20 - - realtek,in3-differential 21 - Boolean. Indicate MIC1/2/3 input are differential, rather than single-ended. 22 - 23 - - realtek,lout-differential 24 - Boolean. Indicate LOUT output is differential, rather than stereo. 25 - 26 - - realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. 27 - 28 - - realtek,dmic1-data-pin 29 - 0: dmic1 is not used 30 - 1: using IN1P pin as dmic1 data pin 31 - 2: using GPIO3 pin as dmic1 data pin 32 - 33 - - realtek,dmic2-data-pin 34 - 0: dmic2 is not used 35 - 1: using IN1N pin as dmic2 data pin 36 - 2: using GPIO4 pin as dmic2 data pin 37 - 38 - - realtek,jack-detect-source 39 - u32. Valid values: 40 - 0: jack-detect is not used 41 - 1: Use GPIO1 for jack-detect 42 - 2: Use JD1_IN4P for jack-detect 43 - 3: Use JD2_IN4N for jack-detect 44 - 4: Use GPIO2 for jack-detect 45 - 5: Use GPIO3 for jack-detect 46 - 6: Use GPIO4 for jack-detect 47 - 48 - - realtek,jack-detect-not-inverted 49 - bool. Normal jack-detect switches give an inverted signal, set this bool 50 - in the rare case you've a jack-detect switch which is not inverted. 51 - 52 - - realtek,over-current-threshold-microamp 53 - u32, micbias over-current detection threshold in µA, valid values are 54 - 600, 1500 and 2000µA. 55 - 56 - - realtek,over-current-scale-factor 57 - u32, micbias over-current detection scale-factor, valid values are: 58 - 0: Scale current by 0.5 59 - 1: Scale current by 0.75 60 - 2: Scale current by 1.0 61 - 3: Scale current by 1.5 62 - 63 - Pins on the device (for linking into audio routes) for RT5639/RT5640: 64 - 65 - * DMIC1 66 - * DMIC2 67 - * MICBIAS1 68 - * IN1P 69 - * IN1N 70 - * IN2P 71 - * IN2N 72 - * IN3P 73 - * IN3N 74 - * HPOL 75 - * HPOR 76 - * LOUTL 77 - * LOUTR 78 - * SPOLP 79 - * SPOLN 80 - * SPORP 81 - * SPORN 82 - 83 - Additional pins on the device for RT5640: 84 - 85 - * MONOP 86 - * MONON 87 - 88 - Example: 89 - 90 - rt5640 { 91 - compatible = "realtek,rt5640"; 92 - reg = <0x1c>; 93 - interrupt-parent = <&gpio>; 94 - interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>; 95 - realtek,ldo1-en-gpios = 96 - <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; 97 - };