devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ASoC: wcd938x: enable t14s audio headset
@ 2025-03-19  9:16 srinivas.kandagatla
  2025-03-19  9:16 ` [PATCH 1/3] ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling hp srinivas.kandagatla
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: srinivas.kandagatla @ 2025-03-19  9:16 UTC (permalink / raw)
  To: broonie, andersson
  Cc: lgirdwood, robh, krzk+dt, conor+dt, konradybcio, perex, tiwai,
	dmitry.baryshkov, linux-sound, linux-arm-msm, devicetree,
	linux-kernel, johan+linaro, Srinivas Kandagatla

From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

On Lenovo ThinkPad T14s, the headset is connected via a HiFi Switch to
support CTIA and OMTP headsets. This switch is used to minimise pop and
click during headset type switching.

This patchset adds required bindings and changes to codec and dts to   
tnable the regulator required to power this switch along with wiring up
gpio that control the headset switching.

Without this patchset, there will be lots of noise on headset and mic
will not we functional.
   
Srinivas Kandagatla (3):
  ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling
    hp
  ASoC: codecs: wcd938x: add support power on hp audio switch
  arm64: dts: qcom: x1e78100-t14s: Enable audio headset support

 .../bindings/sound/qcom,wcd93xx-common.yaml    |  4 ++++
 .../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 18 +++++++++++++++++-
 sound/soc/codecs/wcd938x.c                     |  7 +++++++
 3 files changed, 28 insertions(+), 1 deletion(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/3] ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling hp
  2025-03-19  9:16 [PATCH 0/3] ASoC: wcd938x: enable t14s audio headset srinivas.kandagatla
@ 2025-03-19  9:16 ` srinivas.kandagatla
  2025-03-19 10:01   ` Dmitry Baryshkov
  2025-03-19  9:16 ` [PATCH 2/3] ASoC: codecs: wcd938x: add support power on hp audio switch srinivas.kandagatla
  2025-03-19  9:16 ` [PATCH 3/3] arm64: dts: qcom: x1e78100-t14s: Enable audio headset support srinivas.kandagatla
  2 siblings, 1 reply; 11+ messages in thread
From: srinivas.kandagatla @ 2025-03-19  9:16 UTC (permalink / raw)
  To: broonie, andersson
  Cc: lgirdwood, robh, krzk+dt, conor+dt, konradybcio, perex, tiwai,
	dmitry.baryshkov, linux-sound, linux-arm-msm, devicetree,
	linux-kernel, johan+linaro, Srinivas Kandagatla

From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

On some platforms to minimise pop and click during switching between
CTIA and OMTP headset an additional HiFi Switch is used. Most common
case is that this switch is switched on by default, but on some
platforms this needs a regulator enable.

This patch adds required bindings to add such regulator.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 .../devicetree/bindings/sound/qcom,wcd93xx-common.yaml        | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd93xx-common.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd93xx-common.yaml
index f78ba148ad25..fa00570caf24 100644
--- a/Documentation/devicetree/bindings/sound/qcom,wcd93xx-common.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,wcd93xx-common.yaml
@@ -26,6 +26,10 @@ properties:
   vdd-mic-bias-supply:
     description: A reference to the 3.8V mic bias supply
 
+  vdd-hp-switch-supply:
+    description: A reference to the audio switch supply
+      for switching CTIA/OMTP Headset
+
   qcom,tx-device:
     $ref: /schemas/types.yaml#/definitions/phandle-array
     description: A reference to Soundwire tx device phandle
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/3] ASoC: codecs: wcd938x: add support power on hp audio switch
  2025-03-19  9:16 [PATCH 0/3] ASoC: wcd938x: enable t14s audio headset srinivas.kandagatla
  2025-03-19  9:16 ` [PATCH 1/3] ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling hp srinivas.kandagatla
@ 2025-03-19  9:16 ` srinivas.kandagatla
  2025-03-19  9:16 ` [PATCH 3/3] arm64: dts: qcom: x1e78100-t14s: Enable audio headset support srinivas.kandagatla
  2 siblings, 0 replies; 11+ messages in thread
From: srinivas.kandagatla @ 2025-03-19  9:16 UTC (permalink / raw)
  To: broonie, andersson
  Cc: lgirdwood, robh, krzk+dt, conor+dt, konradybcio, perex, tiwai,
	dmitry.baryshkov, linux-sound, linux-arm-msm, devicetree,
	linux-kernel, johan+linaro, Srinivas Kandagatla

From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

On some platforms to minimise pop and click during switching between
CTIA and OMTP headset an additional HiFi Switch is used. Most common
case is that this switch is switched on by default, but on some
platforms this needs a regulator enable. Enable this regulator if
platform is setup with regulator.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/codecs/wcd938x.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
index f2a4f3262bdb..a00845089e13 100644
--- a/sound/soc/codecs/wcd938x.c
+++ b/sound/soc/codecs/wcd938x.c
@@ -3267,6 +3267,13 @@ static int wcd938x_populate_dt_data(struct wcd938x_priv *wcd938x, struct device
 		return dev_err_probe(dev, PTR_ERR(wcd938x->us_euro_gpio),
 				     "us-euro swap Control GPIO not found\n");
 
+	ret = devm_regulator_get_enable_optional(dev, "vdd-hp-switch");
+	if (ret && ret != -ENODEV) {
+		if (ret != -EPROBE_DEFER)
+			dev_err(dev, "Couldn't retrieve/enable audio switch supply\n");
+		return ret;
+	}
+
 	cfg->swap_gnd_mic = wcd938x_swap_gnd_mic;
 
 	wcd938x->supplies[0].supply = "vdd-rxtx";
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/3] arm64: dts: qcom: x1e78100-t14s: Enable audio headset support
  2025-03-19  9:16 [PATCH 0/3] ASoC: wcd938x: enable t14s audio headset srinivas.kandagatla
  2025-03-19  9:16 ` [PATCH 1/3] ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling hp srinivas.kandagatla
  2025-03-19  9:16 ` [PATCH 2/3] ASoC: codecs: wcd938x: add support power on hp audio switch srinivas.kandagatla
@ 2025-03-19  9:16 ` srinivas.kandagatla
  2025-03-20  9:29   ` Krzysztof Kozlowski
  2 siblings, 1 reply; 11+ messages in thread
From: srinivas.kandagatla @ 2025-03-19  9:16 UTC (permalink / raw)
  To: broonie, andersson
  Cc: lgirdwood, robh, krzk+dt, conor+dt, konradybcio, perex, tiwai,
	dmitry.baryshkov, linux-sound, linux-arm-msm, devicetree,
	linux-kernel, johan+linaro, Srinivas Kandagatla

From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

On Lenovo ThinkPad T14s, the headset is connected via a HiFi Switch to
support CTIA and OMTP headsets. This switch is used to minimise pop and
click during headset type switching.

Enable the regulator required to power this switch along with wiring up
gpio that control the headset switching.

Without this, headset audio will be very noisy and might see headset
detection errors.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 .../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts
index b2c2347f54fa..f39c51c809e8 100644
--- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts
+++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts
@@ -22,7 +22,7 @@ / {
 	wcd938x: audio-codec {
 		compatible = "qcom,wcd9385-codec";
 
-		pinctrl-0 = <&wcd_default>;
+		pinctrl-0 = <&wcd_default>, <&us_euro_hs_sel>;
 		pinctrl-names = "default";
 
 		qcom,micbias1-microvolt = <1800000>;
@@ -36,11 +36,13 @@ wcd938x: audio-codec {
 		qcom,tx-device = <&wcd_tx>;
 
 		reset-gpios = <&tlmm 191 GPIO_ACTIVE_LOW>;
+		us-euro-gpios = <&tlmm 68 GPIO_ACTIVE_HIGH>;
 
 		vdd-buck-supply = <&vreg_l15b_1p8>;
 		vdd-rxtx-supply = <&vreg_l15b_1p8>;
 		vdd-io-supply = <&vreg_l15b_1p8>;
 		vdd-mic-bias-supply = <&vreg_bob1>;
+		vdd-hp-switch-supply = <&vreg_l16b_2p5>;
 
 		#sound-dai-cells = <1>;
 	};
@@ -367,6 +369,13 @@ vreg_l15b_1p8: ldo15 {
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
 		};
 
+		vreg_l16b_2p5: ldo16 {
+			regulator-name = "vreg_l6b_2p5";
+			regulator-min-microvolt = <2504000>;
+			regulator-max-microvolt = <2504000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
 		vreg_l17b_2p5: ldo17 {
 			regulator-name = "vreg_l17b_2p5";
 			regulator-min-microvolt = <2504000>;
@@ -942,6 +951,13 @@ int-n-pins {
 		};
 	};
 
+	us_euro_hs_sel: us-euro-hs-sel-state {
+		pins = "gpio68";
+		function = "gpio";
+		bias-pull-down;
+		drive-strength = <2>;
+	};
+
 	kybd_default: kybd-default-state {
 		pins = "gpio67";
 		function = "gpio";
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling hp
  2025-03-19  9:16 ` [PATCH 1/3] ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling hp srinivas.kandagatla
@ 2025-03-19 10:01   ` Dmitry Baryshkov
  2025-03-19 15:59     ` Srinivas Kandagatla
  0 siblings, 1 reply; 11+ messages in thread
From: Dmitry Baryshkov @ 2025-03-19 10:01 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: broonie, andersson, lgirdwood, robh, krzk+dt, conor+dt,
	konradybcio, perex, tiwai, dmitry.baryshkov, linux-sound,
	linux-arm-msm, devicetree, linux-kernel, johan+linaro

On Wed, Mar 19, 2025 at 09:16:35AM +0000, srinivas.kandagatla@linaro.org wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> 
> On some platforms to minimise pop and click during switching between
> CTIA and OMTP headset an additional HiFi Switch is used. Most common
> case is that this switch is switched on by default, but on some
> platforms this needs a regulator enable.

Is this regulator supplying the codec or some external component? In the
latter case it's likely that it should not be a part of WCD bindings.

> This patch adds required bindings to add such regulator.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  .../devicetree/bindings/sound/qcom,wcd93xx-common.yaml        | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd93xx-common.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd93xx-common.yaml
> index f78ba148ad25..fa00570caf24 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,wcd93xx-common.yaml
> +++ b/Documentation/devicetree/bindings/sound/qcom,wcd93xx-common.yaml
> @@ -26,6 +26,10 @@ properties:
>    vdd-mic-bias-supply:
>      description: A reference to the 3.8V mic bias supply
>  
> +  vdd-hp-switch-supply:
> +    description: A reference to the audio switch supply
> +      for switching CTIA/OMTP Headset
> +
>    qcom,tx-device:
>      $ref: /schemas/types.yaml#/definitions/phandle-array
>      description: A reference to Soundwire tx device phandle
> -- 
> 2.39.5
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling hp
  2025-03-19 10:01   ` Dmitry Baryshkov
@ 2025-03-19 15:59     ` Srinivas Kandagatla
  2025-03-19 16:03       ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Srinivas Kandagatla @ 2025-03-19 15:59 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: broonie, andersson, lgirdwood, robh, krzk+dt, conor+dt,
	konradybcio, perex, tiwai, dmitry.baryshkov, linux-sound,
	linux-arm-msm, devicetree, linux-kernel, johan+linaro



On 19/03/2025 10:01, Dmitry Baryshkov wrote:
> On Wed, Mar 19, 2025 at 09:16:35AM +0000, srinivas.kandagatla@linaro.org wrote:
>> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>
>> On some platforms to minimise pop and click during switching between
>> CTIA and OMTP headset an additional HiFi Switch is used. Most common
>> case is that this switch is switched on by default, but on some
>> platforms this needs a regulator enable.
> 
> Is this regulator supplying the codec or some external component? In the
> latter case it's likely that it should not be a part of WCD bindings.

This is regulator powering a mux that is driven by gpio which is part of 
codec binding. So I would assume this will fall into the codec.

Where would we fit this if not part of codec?

Unless we mark this regulator as always on.

--srini
> 
>> This patch adds required bindings to add such regulator.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>>   .../devicetree/bindings/sound/qcom,wcd93xx-common.yaml        | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd93xx-common.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd93xx-common.yaml
>> index f78ba148ad25..fa00570caf24 100644
>> --- a/Documentation/devicetree/bindings/sound/qcom,wcd93xx-common.yaml
>> +++ b/Documentation/devicetree/bindings/sound/qcom,wcd93xx-common.yaml
>> @@ -26,6 +26,10 @@ properties:
>>     vdd-mic-bias-supply:
>>       description: A reference to the 3.8V mic bias supply
>>   
>> +  vdd-hp-switch-supply:
>> +    description: A reference to the audio switch supply
>> +      for switching CTIA/OMTP Headset
>> +
>>     qcom,tx-device:
>>       $ref: /schemas/types.yaml#/definitions/phandle-array
>>       description: A reference to Soundwire tx device phandle
>> -- 
>> 2.39.5
>>
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling hp
  2025-03-19 15:59     ` Srinivas Kandagatla
@ 2025-03-19 16:03       ` Mark Brown
  2025-03-19 18:00         ` Srinivas Kandagatla
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2025-03-19 16:03 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Dmitry Baryshkov, andersson, lgirdwood, robh, krzk+dt, conor+dt,
	konradybcio, perex, tiwai, dmitry.baryshkov, linux-sound,
	linux-arm-msm, devicetree, linux-kernel, johan+linaro

[-- Attachment #1: Type: text/plain, Size: 603 bytes --]

On Wed, Mar 19, 2025 at 03:59:23PM +0000, Srinivas Kandagatla wrote:
> On 19/03/2025 10:01, Dmitry Baryshkov wrote:

> > Is this regulator supplying the codec or some external component? In the
> > latter case it's likely that it should not be a part of WCD bindings.

> This is regulator powering a mux that is driven by gpio which is part of
> codec binding. So I would assume this will fall into the codec.

> Where would we fit this if not part of codec?

> Unless we mark this regulator as always on.

I would expect that the mux would appear in the DT and consume both the
GPIO and the regulator.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling hp
  2025-03-19 16:03       ` Mark Brown
@ 2025-03-19 18:00         ` Srinivas Kandagatla
  2025-03-20  9:31           ` Krzysztof Kozlowski
  0 siblings, 1 reply; 11+ messages in thread
From: Srinivas Kandagatla @ 2025-03-19 18:00 UTC (permalink / raw)
  To: Mark Brown
  Cc: Dmitry Baryshkov, andersson, lgirdwood, robh, krzk+dt, conor+dt,
	konradybcio, perex, tiwai, dmitry.baryshkov, linux-sound,
	linux-arm-msm, devicetree, linux-kernel, johan+linaro



On 19/03/2025 16:03, Mark Brown wrote:
> On Wed, Mar 19, 2025 at 03:59:23PM +0000, Srinivas Kandagatla wrote:
>> On 19/03/2025 10:01, Dmitry Baryshkov wrote:
> 
>>> Is this regulator supplying the codec or some external component? In the
>>> latter case it's likely that it should not be a part of WCD bindings.
> 
>> This is regulator powering a mux that is driven by gpio which is part of
>> codec binding. So I would assume this will fall into the codec.
> 
>> Where would we fit this if not part of codec?
> 
>> Unless we mark this regulator as always on.
> 
> I would expect that the mux would appear in the DT and consume both the
> GPIO and the regulator.
Yes, its doable, so we would endup with a mux driver consuming regulator 
and gpio and move the gpio handling in codec to move to use mux control.

Let met try that and see how it looks like.

--srini


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] arm64: dts: qcom: x1e78100-t14s: Enable audio headset support
  2025-03-19  9:16 ` [PATCH 3/3] arm64: dts: qcom: x1e78100-t14s: Enable audio headset support srinivas.kandagatla
@ 2025-03-20  9:29   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-20  9:29 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: broonie, andersson, lgirdwood, robh, krzk+dt, conor+dt,
	konradybcio, perex, tiwai, dmitry.baryshkov, linux-sound,
	linux-arm-msm, devicetree, linux-kernel, johan+linaro

On Wed, Mar 19, 2025 at 09:16:37AM +0000, srinivas.kandagatla@linaro.org wrote:
>  		vdd-buck-supply = <&vreg_l15b_1p8>;
>  		vdd-rxtx-supply = <&vreg_l15b_1p8>;
>  		vdd-io-supply = <&vreg_l15b_1p8>;
>  		vdd-mic-bias-supply = <&vreg_bob1>;
> +		vdd-hp-switch-supply = <&vreg_l16b_2p5>;
>  
>  		#sound-dai-cells = <1>;
>  	};
> @@ -367,6 +369,13 @@ vreg_l15b_1p8: ldo15 {
>  			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>  		};
>  
> +		vreg_l16b_2p5: ldo16 {
> +			regulator-name = "vreg_l6b_2p5";

Typo: l16b

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling hp
  2025-03-19 18:00         ` Srinivas Kandagatla
@ 2025-03-20  9:31           ` Krzysztof Kozlowski
  2025-03-20 10:51             ` Srinivas Kandagatla
  0 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-20  9:31 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Mark Brown, Dmitry Baryshkov, andersson, lgirdwood, robh, krzk+dt,
	conor+dt, konradybcio, perex, tiwai, dmitry.baryshkov,
	linux-sound, linux-arm-msm, devicetree, linux-kernel,
	johan+linaro

On Wed, Mar 19, 2025 at 06:00:51PM +0000, Srinivas Kandagatla wrote:
> 
> 
> On 19/03/2025 16:03, Mark Brown wrote:
> > On Wed, Mar 19, 2025 at 03:59:23PM +0000, Srinivas Kandagatla wrote:
> > > On 19/03/2025 10:01, Dmitry Baryshkov wrote:
> > 
> > > > Is this regulator supplying the codec or some external component? In the
> > > > latter case it's likely that it should not be a part of WCD bindings.
> > 
> > > This is regulator powering a mux that is driven by gpio which is part of
> > > codec binding. So I would assume this will fall into the codec.
> > 
> > > Where would we fit this if not part of codec?
> > 
> > > Unless we mark this regulator as always on.
> > 
> > I would expect that the mux would appear in the DT and consume both the
> > GPIO and the regulator.
> Yes, its doable, so we would endup with a mux driver consuming regulator and
> gpio and move the gpio handling in codec to move to use mux control.
> 
> Let met try that and see how it looks like.

Looking at schematics this is clearly not a supply of a codec, but as
Dmitry said, separate switch. Actually two switches.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling hp
  2025-03-20  9:31           ` Krzysztof Kozlowski
@ 2025-03-20 10:51             ` Srinivas Kandagatla
  0 siblings, 0 replies; 11+ messages in thread
From: Srinivas Kandagatla @ 2025-03-20 10:51 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Mark Brown, Dmitry Baryshkov, andersson, lgirdwood, robh, krzk+dt,
	conor+dt, konradybcio, perex, tiwai, dmitry.baryshkov,
	linux-sound, linux-arm-msm, devicetree, linux-kernel,
	johan+linaro



On 20/03/2025 09:31, Krzysztof Kozlowski wrote:
> On Wed, Mar 19, 2025 at 06:00:51PM +0000, Srinivas Kandagatla wrote:
>>
>>
>> On 19/03/2025 16:03, Mark Brown wrote:
>>> On Wed, Mar 19, 2025 at 03:59:23PM +0000, Srinivas Kandagatla wrote:
>>>> On 19/03/2025 10:01, Dmitry Baryshkov wrote:
>>>
>>>>> Is this regulator supplying the codec or some external component? In the
>>>>> latter case it's likely that it should not be a part of WCD bindings.
>>>
>>>> This is regulator powering a mux that is driven by gpio which is part of
>>>> codec binding. So I would assume this will fall into the codec.
>>>
>>>> Where would we fit this if not part of codec?
>>>
>>>> Unless we mark this regulator as always on.
>>>
>>> I would expect that the mux would appear in the DT and consume both the
>>> GPIO and the regulator.
>> Yes, its doable, so we would endup with a mux driver consuming regulator and
>> gpio and move the gpio handling in codec to move to use mux control.
>>
>> Let met try that and see how it looks like.
> 
> Looking at schematics this is clearly not a supply of a codec, but as
> Dmitry said, separate switch. Actually two switches.

AFAIU, Adding single mux for both seems to be the best option.
Eventhough physically they are two muxes but they can not be driven 
independently, and logically/functionally they are doing only one thing 
of handing us/euro headset.


But if we represent these two muxes as two different nodes then the 
driver is messed up, as all the resources (gpios. pinctrls, regultors) 
will be shared and we can not control them independently.



thanks,
Srini
> 
> Best regards,
> Krzysztof
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-03-20 10:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-19  9:16 [PATCH 0/3] ASoC: wcd938x: enable t14s audio headset srinivas.kandagatla
2025-03-19  9:16 ` [PATCH 1/3] ASoC: dt-bindings: wcd93xx: add bindings for audio switch controlling hp srinivas.kandagatla
2025-03-19 10:01   ` Dmitry Baryshkov
2025-03-19 15:59     ` Srinivas Kandagatla
2025-03-19 16:03       ` Mark Brown
2025-03-19 18:00         ` Srinivas Kandagatla
2025-03-20  9:31           ` Krzysztof Kozlowski
2025-03-20 10:51             ` Srinivas Kandagatla
2025-03-19  9:16 ` [PATCH 2/3] ASoC: codecs: wcd938x: add support power on hp audio switch srinivas.kandagatla
2025-03-19  9:16 ` [PATCH 3/3] arm64: dts: qcom: x1e78100-t14s: Enable audio headset support srinivas.kandagatla
2025-03-20  9:29   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).