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>
[PATCH v2 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det
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.45.2
[PATCH v2 5/6] ARM: dts: samsung: exynos4212-tab3: Drop interrupt from WM1811 codec
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.45.2
[PATCH v2 6/6] ARM: dts: samsung: exynos4212-tab3: Drop dummy mic bias regulators
On Thu, 25 Jul 2024 12:40:35 +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>