Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes
@ 2024-08-16  7:50 Artur Weber
  2024-08-16  7:50 ` [PATCH RESEND v2 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det Artur Weber
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Artur Weber @ 2024-08-16  7:50 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-sound, ~postmarketos/upstreaming, Artur Weber,
	Krzysztof Kozlowski

This is a follow-up to "ASoC: samsung: midas-audio: Add GPIO-based
headset jack detection"[1]; it appears to have been silently merged
except for the DTS parts, this patchset is a resend of the DTS patches.

Besides the DTS changes necessary to enable headset jack detection
for the Samsung Galaxy Tab 3 8.0, it also adds a new compatible for
the Tab 3 (samsung,tab3-audio). This is done so that we can set up
different requirements in DT binding (Tab 3 does not have main/sub
bias regulators), and drop the main/sub mic bias dummy regulators
from the Tab 3 DTSI.

[1] https://lore.kernel.org/all/20240525-midas-wm1811-gpio-jack-v4-0-f488e03bd8c7@gmail.com/

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
Changes in v2:
- Addressed review comments from Krzysztof (anyOf instead of oneOf in
  if: statement, fixed earmic_bias_reg node name to correct number,
  reorganized patches to move headset-mic-bias-supply property next to
  other headset properties in DTS)
- Link to v1: https://lore.kernel.org/r/20240716-midas-audio-tab3-v1-0-a53ea075af5a@gmail.com

---
Artur Weber (6):
      ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det
      ASoC: dt-bindings: midas-audio: Add separate compatible for tab3 audio
      ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection
      ARM: dts: samsung: exynos4212-tab3: Add MCLK2 clock to WM1811 codec config
      ARM: dts: samsung: exynos4212-tab3: Drop interrupt from WM1811 codec
      ARM: dts: samsung: exynos4212-tab3: Drop dummy mic bias regulators

 .../bindings/sound/samsung,midas-audio.yaml        | 59 +++++++++++++++++++---
 arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi     | 39 ++++++++------
 2 files changed, 76 insertions(+), 22 deletions(-)
---
base-commit: 91e3b24eb7d297d9d99030800ed96944b8652eaf
change-id: 20240715-midas-audio-tab3-174716e45618

Best regards,
-- 
Artur Weber <aweber.kernel@gmail.com>


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

* [PATCH RESEND v2 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det
  2024-08-16  7:50 [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes Artur Weber
@ 2024-08-16  7:50 ` Artur Weber
  2024-08-16  7:57   ` Artur Weber
  2024-08-16 22:35   ` Rob Herring (Arm)
  2024-08-16  7:50 ` [PATCH RESEND v2 2/6] ASoC: dt-bindings: midas-audio: Add separate compatible for tab3 audio Artur Weber
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 11+ messages in thread
From: Artur Weber @ 2024-08-16  7:50 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-sound, ~postmarketos/upstreaming, Artur Weber

GPIO jack detection requires an IIO channel and the detection threshold
to work. Explicitly declare the requirement in DT schema.

Fixes: 0a590ecc672a ("ASoC: dt-bindings: samsung,midas-audio: Add GPIO-based headset jack detection")
Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
Changes in v2:
- Use anyOf instead of oneOf in headset-detect-gpios/headset-key-gpios
  if: statement
---
 .../bindings/sound/samsung,midas-audio.yaml        | 29 +++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
index 69ddfd4afdcd..5483421a6fd3 100644
--- a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
+++ b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
@@ -9,9 +9,6 @@ title: Samsung Midas audio complex with WM1811 codec
 maintainers:
   - Sylwester Nawrocki <s.nawrocki@samsung.com>
 
-allOf:
-  - $ref: sound-card-common.yaml#
-
 properties:
   compatible:
     const: samsung,midas-audio
@@ -102,6 +99,32 @@ required:
   - mic-bias-supply
   - submic-bias-supply
 
+allOf:
+  - $ref: sound-card-common.yaml#
+
+  - if:
+      anyOf:
+        - required: [ headset-detect-gpios ]
+        - required: [ headset-key-gpios ]
+    then:
+      required:
+        - io-channels
+        - io-channel-names
+
+  - if:
+      required:
+        - headset-detect-gpios
+    then:
+      required:
+        - samsung,headset-4pole-threshold-microvolt
+
+  - if:
+      required:
+        - headset-key-gpios
+    then:
+      required:
+        - samsung,headset-button-threshold-microvolt
+
 unevaluatedProperties: false
 
 examples:

-- 
2.46.0


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

* [PATCH RESEND v2 2/6] ASoC: dt-bindings: midas-audio: Add separate compatible for tab3 audio
  2024-08-16  7:50 [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes Artur Weber
  2024-08-16  7:50 ` [PATCH RESEND v2 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det Artur Weber
@ 2024-08-16  7:50 ` Artur Weber
  2024-08-16  7:51 ` [PATCH RESEND v2 3/6] ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection Artur Weber
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Artur Weber @ 2024-08-16  7:50 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-sound, ~postmarketos/upstreaming, Artur Weber,
	Krzysztof Kozlowski

Unlike the Midas, the Galaxy Tab 3 8.0 does not have a main/sub mic
bias regulator, but it does have a separate headset mic bias regulator.

Add a new compatible for the Tab 3's audio and declare required
regulators separately based on the provided compatible.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
 .../bindings/sound/samsung,midas-audio.yaml        | 30 +++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
index 5483421a6fd3..cb6105a6b216 100644
--- a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
+++ b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
@@ -11,7 +11,11 @@ maintainers:
 
 properties:
   compatible:
-    const: samsung,midas-audio
+    oneOf:
+      - const: samsung,midas-audio
+      - items:
+          - const: samsung,tab3-audio
+          - const: samsung,midas-audio
 
   cpu:
     type: object
@@ -96,8 +100,6 @@ required:
   - cpu
   - codec
   - audio-routing
-  - mic-bias-supply
-  - submic-bias-supply
 
 allOf:
   - $ref: sound-card-common.yaml#
@@ -125,6 +127,28 @@ allOf:
       required:
         - samsung,headset-button-threshold-microvolt
 
+  - if:
+      properties:
+        compatible:
+          const: samsung,midas-audio
+
+    then:
+      required:
+        - mic-bias-supply
+        - submic-bias-supply
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,tab3-audio
+
+    then:
+      required:
+        - headset-mic-bias-supply
+        - headset-detect-gpios
+        - headset-key-gpios
+
 unevaluatedProperties: false
 
 examples:

-- 
2.46.0


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

* [PATCH RESEND v2 3/6] ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection
  2024-08-16  7:50 [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes Artur Weber
  2024-08-16  7:50 ` [PATCH RESEND v2 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det Artur Weber
  2024-08-16  7:50 ` [PATCH RESEND v2 2/6] ASoC: dt-bindings: midas-audio: Add separate compatible for tab3 audio Artur Weber
@ 2024-08-16  7:51 ` Artur Weber
  2024-08-16  7:51 ` [PATCH RESEND v2 4/6] ARM: dts: samsung: exynos4212-tab3: Add MCLK2 clock to WM1811 codec config Artur Weber
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Artur Weber @ 2024-08-16  7:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-sound, ~postmarketos/upstreaming, Artur Weber

Set up headset mic bias regulator and add the necessary properties to
the samsung,midas-audio node to allow for headset jack detection.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
Changes in v2:
- Move headset-mic-bias-supply property next to other headset properties
---
 arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
index 9bc05961577d..bbafd4ece5f7 100644
--- a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
+++ b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
@@ -300,12 +300,31 @@ submic_bias_reg: voltage-regulator-5 {
 		regulator-max-microvolt = <2800000>;
 	};
 
+	earmic_bias_reg: voltage-regulator-6 {
+		compatible = "regulator-fixed";
+		regulator-name = "EAR_MICBIAS_LDO_2.8V";
+		regulator-min-microvolt = <2800000>;
+		regulator-max-microvolt = <2800000>;
+		gpio = <&gpm0 0 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	sound: sound {
 		compatible = "samsung,midas-audio";
 		model = "TAB3";
 		mic-bias-supply = <&mic_bias_reg>;
 		submic-bias-supply = <&submic_bias_reg>;
 
+		lineout-sel-gpios = <&gpj1 2 GPIO_ACTIVE_HIGH>;
+
+		headset-mic-bias-supply = <&earmic_bias_reg>;
+		headset-detect-gpios = <&gpx0 4 GPIO_ACTIVE_LOW>;
+		headset-key-gpios = <&gpx3 6 GPIO_ACTIVE_LOW>;
+		samsung,headset-4pole-threshold-microvolt = <710 2000>;
+		samsung,headset-button-threshold-microvolt = <0 130 260>;
+		io-channel-names = "headset-detect";
+		io-channels = <&adc 0>;
+
 		audio-routing = "HP", "HPOUT1L",
 				"HP", "HPOUT1R",
 
@@ -351,6 +370,11 @@ wlan_pwrseq: sdhci3-pwrseq {
 	};
 };
 
+&adc {
+	vdd-supply = <&ldo3_reg>;
+	status = "okay";
+};
+
 &bus_acp {
 	devfreq = <&bus_dmc>;
 	status = "okay";

-- 
2.46.0


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

* [PATCH RESEND v2 4/6] ARM: dts: samsung: exynos4212-tab3: Add MCLK2 clock to WM1811 codec config
  2024-08-16  7:50 [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes Artur Weber
                   ` (2 preceding siblings ...)
  2024-08-16  7:51 ` [PATCH RESEND v2 3/6] ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection Artur Weber
@ 2024-08-16  7:51 ` Artur Weber
  2024-08-16  7:51 ` [PATCH RESEND v2 5/6] ARM: dts: samsung: exynos4212-tab3: Drop interrupt from WM1811 codec Artur Weber
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Artur Weber @ 2024-08-16  7:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-sound, ~postmarketos/upstreaming, Artur Weber

In the schematics, the MCLK2 pin is shown as connected to CODEC_CLK32K,
which is derived from the same 32KHZ_PMIC clock as Bluetooth/WiFi and
GPS clocks. 32KHZ_PMIC is connected to the BTCLK pin, represented in
mainline as S2MPS11_CLK_BT.

Add the MCLK2 clock to the WM1811 codec clock property to properly
describe the hardware.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
 arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
index bbafd4ece5f7..5106bb752b7d 100644
--- a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
+++ b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
@@ -535,8 +535,9 @@ &i2c_4 {
 	wm1811: audio-codec@1a {
 		compatible = "wlf,wm1811";
 		reg = <0x1a>;
-		clocks = <&pmu_system_controller 0>;
-		clock-names = "MCLK1";
+		clocks = <&pmu_system_controller 0>,
+			 <&s5m8767_osc S2MPS11_CLK_BT>;
+		clock-names = "MCLK1", "MCLK2";
 		interrupt-controller;
 		#interrupt-cells = <2>;
 		interrupt-parent = <&gpx3>;

-- 
2.46.0


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

* [PATCH RESEND v2 5/6] ARM: dts: samsung: exynos4212-tab3: Drop interrupt from WM1811 codec
  2024-08-16  7:50 [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes Artur Weber
                   ` (3 preceding siblings ...)
  2024-08-16  7:51 ` [PATCH RESEND v2 4/6] ARM: dts: samsung: exynos4212-tab3: Add MCLK2 clock to WM1811 codec config Artur Weber
@ 2024-08-16  7:51 ` Artur Weber
  2024-08-16  7:51 ` [PATCH RESEND v2 6/6] ARM: dts: samsung: exynos4212-tab3: Drop dummy mic bias regulators Artur Weber
  2024-12-29 10:10 ` (subset) [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes Krzysztof Kozlowski
  6 siblings, 0 replies; 11+ messages in thread
From: Artur Weber @ 2024-08-16  7:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-sound, ~postmarketos/upstreaming, Artur Weber

This was initially copied from the Midas DTSI, but there is no
proof that the same interrupt is also used on the Tab 3. The pin
listed as the interrupt here is GPIO_HDMI_CEC on the Midas,
but for the Tab 3 it is the headset button GPIO - GPIO_EAR_SEND_END.

Drop the interrupt, since there is no proof that it is used.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
 arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
index 5106bb752b7d..70e3091062f9 100644
--- a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
+++ b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
@@ -540,8 +540,6 @@ wm1811: audio-codec@1a {
 		clock-names = "MCLK1", "MCLK2";
 		interrupt-controller;
 		#interrupt-cells = <2>;
-		interrupt-parent = <&gpx3>;
-		interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
 
 		gpio-controller;
 		#gpio-cells = <2>;

-- 
2.46.0


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

* [PATCH RESEND v2 6/6] ARM: dts: samsung: exynos4212-tab3: Drop dummy mic bias regulators
  2024-08-16  7:50 [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes Artur Weber
                   ` (4 preceding siblings ...)
  2024-08-16  7:51 ` [PATCH RESEND v2 5/6] ARM: dts: samsung: exynos4212-tab3: Drop interrupt from WM1811 codec Artur Weber
@ 2024-08-16  7:51 ` Artur Weber
  2024-12-29 10:06   ` Krzysztof Kozlowski
  2024-12-29 10:10 ` (subset) [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes Krzysztof Kozlowski
  6 siblings, 1 reply; 11+ messages in thread
From: Artur Weber @ 2024-08-16  7:51 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-sound, ~postmarketos/upstreaming, Artur Weber

Add the samsung,tab3-audio compatible that makes mic bias regulators
non-required, and drop the dummy main/sub mic bias regulators that
don't exist in hardware.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
Changes in v2:
- Rename earmic bias reg node to voltage-regulator-4
---
 arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
index 70e3091062f9..553ddc3d42da 100644
--- a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
+++ b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
@@ -286,21 +286,7 @@ display_3v3_supply: voltage-regulator-3 {
 		enable-active-high;
 	};
 
-	mic_bias_reg: voltage-regulator-4 {
-		compatible = "regulator-fixed";
-		regulator-name = "MICBIAS_LDO_2.8V";
-		regulator-min-microvolt = <2800000>;
-		regulator-max-microvolt = <2800000>;
-	};
-
-	submic_bias_reg: voltage-regulator-5 {
-		compatible = "regulator-fixed";
-		regulator-name = "SUB_MICBIAS_LDO_2.8V";
-		regulator-min-microvolt = <2800000>;
-		regulator-max-microvolt = <2800000>;
-	};
-
-	earmic_bias_reg: voltage-regulator-6 {
+	earmic_bias_reg: voltage-regulator-4 {
 		compatible = "regulator-fixed";
 		regulator-name = "EAR_MICBIAS_LDO_2.8V";
 		regulator-min-microvolt = <2800000>;
@@ -310,10 +296,8 @@ earmic_bias_reg: voltage-regulator-6 {
 	};
 
 	sound: sound {
-		compatible = "samsung,midas-audio";
+		compatible = "samsung,tab3-audio", "samsung,midas-audio";
 		model = "TAB3";
-		mic-bias-supply = <&mic_bias_reg>;
-		submic-bias-supply = <&submic_bias_reg>;
 
 		lineout-sel-gpios = <&gpj1 2 GPIO_ACTIVE_HIGH>;
 

-- 
2.46.0


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

* Re: [PATCH RESEND v2 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det
  2024-08-16  7:50 ` [PATCH RESEND v2 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det Artur Weber
@ 2024-08-16  7:57   ` Artur Weber
  2024-08-16 22:35   ` Rob Herring (Arm)
  1 sibling, 0 replies; 11+ messages in thread
From: Artur Weber @ 2024-08-16  7:57 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-sound, ~postmarketos/upstreaming

On 16.08.2024 09:50, Artur Weber wrote:
> GPIO jack detection requires an IIO channel and the detection threshold
> to work. Explicitly declare the requirement in DT schema.
> 
> Fixes: 0a590ecc672a ("ASoC: dt-bindings: samsung,midas-audio: Add GPIO-based headset jack detection")

Sorry, looks like the Reviewed-by tag from Rob Herring[1] didn't apply:

 > Reviewed-by: Rob Herring (Arm) <robh@kernel.org>

Best regards
Artur

[1] 
https://lore.kernel.org/all/172235554875.1349313.9208770866983277057.robh@kernel.org/

> Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
> ---
> Changes in v2:
> - Use anyOf instead of oneOf in headset-detect-gpios/headset-key-gpios
>    if: statement
> ---
>   .../bindings/sound/samsung,midas-audio.yaml        | 29 +++++++++++++++++++---
>   1 file changed, 26 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
> index 69ddfd4afdcd..5483421a6fd3 100644
> --- a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
> +++ b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml
> @@ -9,9 +9,6 @@ title: Samsung Midas audio complex with WM1811 codec
>   maintainers:
>     - Sylwester Nawrocki <s.nawrocki@samsung.com>
>   
> -allOf:
> -  - $ref: sound-card-common.yaml#
> -
>   properties:
>     compatible:
>       const: samsung,midas-audio
> @@ -102,6 +99,32 @@ required:
>     - mic-bias-supply
>     - submic-bias-supply
>   
> +allOf:
> +  - $ref: sound-card-common.yaml#
> +
> +  - if:
> +      anyOf:
> +        - required: [ headset-detect-gpios ]
> +        - required: [ headset-key-gpios ]
> +    then:
> +      required:
> +        - io-channels
> +        - io-channel-names
> +
> +  - if:
> +      required:
> +        - headset-detect-gpios
> +    then:
> +      required:
> +        - samsung,headset-4pole-threshold-microvolt
> +
> +  - if:
> +      required:
> +        - headset-key-gpios
> +    then:
> +      required:
> +        - samsung,headset-button-threshold-microvolt
> +
>   unevaluatedProperties: false
>   
>   examples:
> 


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

* Re: [PATCH RESEND v2 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det
  2024-08-16  7:50 ` [PATCH RESEND v2 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det Artur Weber
  2024-08-16  7:57   ` Artur Weber
@ 2024-08-16 22:35   ` Rob Herring (Arm)
  1 sibling, 0 replies; 11+ messages in thread
From: Rob Herring (Arm) @ 2024-08-16 22:35 UTC (permalink / raw)
  To: Artur Weber
  Cc: linux-samsung-soc, Alim Akhtar, linux-sound, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-kernel, linux-arm-kernel,
	~postmarketos/upstreaming


On Fri, 16 Aug 2024 09:50:58 +0200, Artur Weber wrote:
> GPIO jack detection requires an IIO channel and the detection threshold
> to work. Explicitly declare the requirement in DT schema.
> 
> Fixes: 0a590ecc672a ("ASoC: dt-bindings: samsung,midas-audio: Add GPIO-based headset jack detection")
> Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
> ---
> Changes in v2:
> - Use anyOf instead of oneOf in headset-detect-gpios/headset-key-gpios
>   if: statement
> ---
>  .../bindings/sound/samsung,midas-audio.yaml        | 29 +++++++++++++++++++---
>  1 file changed, 26 insertions(+), 3 deletions(-)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH RESEND v2 6/6] ARM: dts: samsung: exynos4212-tab3: Drop dummy mic bias regulators
  2024-08-16  7:51 ` [PATCH RESEND v2 6/6] ARM: dts: samsung: exynos4212-tab3: Drop dummy mic bias regulators Artur Weber
@ 2024-12-29 10:06   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-29 10:06 UTC (permalink / raw)
  To: Artur Weber, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-sound, ~postmarketos/upstreaming

On 16/08/2024 09:51, Artur Weber wrote:
> -
> -	earmic_bias_reg: voltage-regulator-6 {
> +	earmic_bias_reg: voltage-regulator-4 {
>  		compatible = "regulator-fixed";
>  		regulator-name = "EAR_MICBIAS_LDO_2.8V";
>  		regulator-min-microvolt = <2800000>;
> @@ -310,10 +296,8 @@ earmic_bias_reg: voltage-regulator-6 {
>  	};
>  
>  	sound: sound {
> -		compatible = "samsung,midas-audio";
> +		compatible = "samsung,tab3-audio", "samsung,midas-audio";
>  		model = "TAB3";

This looks still undocumented. Please resend when bindings get accepted
by Mark. Dropping from my queue.

Best regards,
Krzysztof

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

* Re: (subset) [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes
  2024-08-16  7:50 [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes Artur Weber
                   ` (5 preceding siblings ...)
  2024-08-16  7:51 ` [PATCH RESEND v2 6/6] ARM: dts: samsung: exynos4212-tab3: Drop dummy mic bias regulators Artur Weber
@ 2024-12-29 10:10 ` Krzysztof Kozlowski
  6 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-29 10:10 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar,
	Artur Weber
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-sound, ~postmarketos/upstreaming


On Fri, 16 Aug 2024 09:50:57 +0200, Artur Weber wrote:
> This is a follow-up to "ASoC: samsung: midas-audio: Add GPIO-based
> headset jack detection"[1]; it appears to have been silently merged
> except for the DTS parts, this patchset is a resend of the DTS patches.
> 
> Besides the DTS changes necessary to enable headset jack detection
> for the Samsung Galaxy Tab 3 8.0, it also adds a new compatible for
> the Tab 3 (samsung,tab3-audio). This is done so that we can set up
> different requirements in DT binding (Tab 3 does not have main/sub
> bias regulators), and drop the main/sub mic bias dummy regulators
> from the Tab 3 DTSI.
> 
> [...]

Applied, thanks!

[3/6] ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection
      https://git.kernel.org/krzk/linux/c/2c3c373555460b79a6a201c87230d32b211f8323
[4/6] ARM: dts: samsung: exynos4212-tab3: Add MCLK2 clock to WM1811 codec config
      https://git.kernel.org/krzk/linux/c/d15cc681ba79fdc722d4aa7a83e572850cf5f64a
[5/6] ARM: dts: samsung: exynos4212-tab3: Drop interrupt from WM1811 codec
      https://git.kernel.org/krzk/linux/c/acd33b48ce663c7e293b11cd77df7ea702ca34f6
[6/6] ARM: dts: samsung: exynos4212-tab3: Drop dummy mic bias regulators
      (no commit info)

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


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

end of thread, other threads:[~2024-12-29 10:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-16  7:50 [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes Artur Weber
2024-08-16  7:50 ` [PATCH RESEND v2 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det Artur Weber
2024-08-16  7:57   ` Artur Weber
2024-08-16 22:35   ` Rob Herring (Arm)
2024-08-16  7:50 ` [PATCH RESEND v2 2/6] ASoC: dt-bindings: midas-audio: Add separate compatible for tab3 audio Artur Weber
2024-08-16  7:51 ` [PATCH RESEND v2 3/6] ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection Artur Weber
2024-08-16  7:51 ` [PATCH RESEND v2 4/6] ARM: dts: samsung: exynos4212-tab3: Add MCLK2 clock to WM1811 codec config Artur Weber
2024-08-16  7:51 ` [PATCH RESEND v2 5/6] ARM: dts: samsung: exynos4212-tab3: Drop interrupt from WM1811 codec Artur Weber
2024-08-16  7:51 ` [PATCH RESEND v2 6/6] ARM: dts: samsung: exynos4212-tab3: Drop dummy mic bias regulators Artur Weber
2024-12-29 10:06   ` Krzysztof Kozlowski
2024-12-29 10:10 ` (subset) [PATCH RESEND v2 0/6] ASoC: samsung: midas_wm1811: Separate compatible for tab3 + fixes Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox