From 54ddce1cf18b40b4e89b445885f5bf03a2fb6483 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Thu, 9 Dec 2021 16:52:29 +0100 Subject: [PATCH] arm64: dts: rk3399-pinephone-pro: improve sound device definition This commit renames the sound card and the "Headphone" widget so they match the names used by the ALSA UCM profiles. It also adds a jack detection GPIO to the sound card definition. Signed-off-by: Arnaud Ferraris --- .../boot/dts/rockchip/rk3399-pinephone-pro.dts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts index 13141c643..63f0d5a5c 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts @@ -177,29 +177,30 @@ power { // spaker - amp enabled by SPK_CTL_H // // mclk - GPIO4_A0/I2S_CLK - // - // some gpio-jack-detection driver? - //pinctrl-0 = <&hp_det>; // GPIO4_D4 rt5640-sound { compatible = "simple-audio-card"; - simple-audio-card,name = "rockchip,rt5640-codec"; + pinctrl-names = "default"; + pinctrl-0 = <&hp_det>; + simple-audio-card,name = "PinePhonePro"; simple-audio-card,aux-devs = <&speaker_amp>; simple-audio-card,format = "i2s"; simple-audio-card,mclk-fs = <256>; + simple-audio-card,hp-det-gpio = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>; + simple-audio-card,pin-switches = "Internal Speaker"; simple-audio-card,widgets = "Microphone", "Headset Microphone", "Microphone", "Internal Microphone", - "Headphone", "Headphone Jack", + "Headphone", "Headphones", "Speaker", "Internal Earpiece", "Speaker", "Internal Speaker", "Line", "Line In Modem", "Line", "Line Out Modem"; simple-audio-card,routing = - "Headphone Jack", "HPOL", - "Headphone Jack", "HPOR", + "Headphones", "HPOL", + "Headphones", "HPOR", "Internal Earpiece", "SPOLP", "Internal Earpiece", "SPOLN", "Internal Speaker", "Speaker Amp OUTL", -- 2.34.1