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

ASoC: rt5640: Add devicetree-bindings for dmic, jack-detect

Add devicetree-bindings for the dmic, jack-detect source and overcurrent-
detect threshold settings.

The dmic bindings mirror the existing bindings for the rt5645.
The jd-src and ovcd bindings mirror the existing bindings for the rt5651.

Cc devicetree@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Hans de Goede and committed by
Mark Brown
e9e7a3bd 8e7a1f1f

+60
+35
Documentation/devicetree/bindings/sound/rt5640.txt
··· 22 22 23 23 - realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. 24 24 25 + - realtek,dmic1-data-pin 26 + 0: dmic1 is not used 27 + 1: using IN1P pin as dmic1 data pin 28 + 2: using GPIO3 pin as dmic1 data pin 29 + 30 + - realtek,dmic2-data-pin 31 + 0: dmic2 is not used 32 + 1: using IN1N pin as dmic2 data pin 33 + 2: using GPIO4 pin as dmic2 data pin 34 + 35 + - realtek,jack-detect-source 36 + u32. Valid values: 37 + 0: jack-detect is not used 38 + 1: Use GPIO1 for jack-detect 39 + 2: Use JD1_IN4P for jack-detect 40 + 3: Use JD2_IN4N for jack-detect 41 + 4: Use GPIO2 for jack-detect 42 + 5: Use GPIO3 for jack-detect 43 + 6: Use GPIO4 for jack-detect 44 + 45 + - realtek,jack-detect-not-inverted 46 + bool. Normal jack-detect switches give an inverted signal, set this bool 47 + in the rare case you've a jack-detect switch which is not inverted. 48 + 49 + - realtek,over-current-threshold-microamp 50 + u32, micbias over-current detection threshold in µA, valid values are 51 + 600, 1500 and 2000µA. 52 + 53 + - realtek,over-current-scale-factor 54 + u32, micbias over-current detection scale-factor, valid values are: 55 + 0: Scale current by 0.5 56 + 1: Scale current by 0.75 57 + 2: Scale current by 1.0 58 + 3: Scale current by 1.5 59 + 25 60 Pins on the device (for linking into audio routes) for RT5639/RT5640: 26 61 27 62 * DMIC1
+25
include/dt-bindings/sound/rt5640.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __DT_RT5640_H 3 + #define __DT_RT5640_H 4 + 5 + #define RT5640_DMIC1_DATA_PIN_NONE 0 6 + #define RT5640_DMIC1_DATA_PIN_IN1P 1 7 + #define RT5640_DMIC1_DATA_PIN_GPIO3 2 8 + 9 + #define RT5640_DMIC2_DATA_PIN_NONE 0 10 + #define RT5640_DMIC2_DATA_PIN_IN1N 1 11 + #define RT5640_DMIC2_DATA_PIN_GPIO4 2 12 + 13 + #define RT5640_JD_SRC_GPIO1 1 14 + #define RT5640_JD_SRC_JD1_IN4P 2 15 + #define RT5640_JD_SRC_JD2_IN4N 3 16 + #define RT5640_JD_SRC_GPIO2 4 17 + #define RT5640_JD_SRC_GPIO3 5 18 + #define RT5640_JD_SRC_GPIO4 6 19 + 20 + #define RT5640_OVCD_SF_0P5 0 21 + #define RT5640_OVCD_SF_0P75 1 22 + #define RT5640_OVCD_SF_1P0 2 23 + #define RT5640_OVCD_SF_1P5 3 24 + 25 + #endif /* __DT_RT5640_H */