Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795025443; b=TlZ7Y5gtKy3O5SOiblUk0FBMwiNhU+hv15bA32IuCKJnZeI8YLXWp71MdjfcyVVu1GGE xvGMb0gJlQdJQt1kDn16STtEPGPgJxNsr/R0I5laboeKDS43OFaM02ju3A45ytTIrPeKw T1R0ISxY0Ca9lyoqHhYNR+OFPlQkJSXNIpZu11MJCxRa7q6YD8B8NB54Z+pnFbD0Bx8oD /jOvbBqLsN6i6zzLViQ2h741NwX64rj5w0u9WR0L/tijLejRODIJAtBI6F38aUM67Ut07 fmPI27prTT1ZsidboPSIoNA7SrKOrbS8VYPkhuTs4Hb0r+8G8Awizqe20ygaw0o5kZg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795025443; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=wcXy3bfy/NVuf9yy4n5eQeV5prlbcIC20rUWca6e5kU=; b=qwwbX7OZPHB8c8vajEDtZsFb02pX6+vl8GkTSrzvyg9Xa2Dw/HLDpSLraIsAWEkgf2BG X9rjFGpELEch4Y/kmWMAs91U/EQN4n+KQxp7Wmd3lcVtt6KpbEI2TKyxQuD9CS+WD0CWO C+LkT+Zi5+ZQbavfn52UOiUGYIVIw2YiFjQQVXFYXQxb6G76/Qskj0RZsnAuakhj3XSWX D5OHcLgmdiaJk6tL3DQhYxOhbAHAyUBGeiJwjHw3aJJwkR78suxbKiW3DpcFY1UPMBOoq 4kxTBgK1lB9vkpkXQZb76teHwqQnot+ecxcqj+xkaSMa3hbTAh/gApmj9zZ5SoU0xog== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=ppskjqFj; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51937606A32C; Wed, 18 Nov 2026 18:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=ppskjqFj Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA42D1F000C9; Wed, 18 Nov 2026 18:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795025443; bh=wcXy3bfy/NVuf9yy4n5eQeV5prlbcIC20rUWca6e5kU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ppskjqFj6akfvL7kbryQU7Y6GKPHbK9wj1n0HN4dgGSWCrBYJW16kJvrsxPk6aqW7 gs/WU8uPZIBCpv14T+iKzFlDgIZtbXfedwSZU4PZmyL0ho6UHMroZIomXKqCkREYl+ CpQkdG2pyuf41muvEKDPH7OXJXnSQcuAdJtsgMZo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yaozhong Li , Heiko Stuebner , Sasha Levin Subject: [PATCH 6.18 1081/2151] arm64: dts: rockchip: fix analog headphone output on rk3399-firefly Date: Wed, 18 Nov 2026 15:46:56 +0100 Message-ID: <20261118150201.647720771@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150121.603863898@linuxfoundation.org> References: <20261118150121.603863898@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yaozhong Li [ Upstream commit 23eab1a5e36099fd1269f8a18dc389e04dc19011 ] The analog headphone jack on this board has never produced any sound with a mainline kernel. GPIO4_C5 has to be high for audio to reach the jack. The board file muxes the pin to GPIO through the rt5640_hpcon pinctrl group and references that group from the codec node, but nothing ever requests or drives the line. Describe it the way rk3399-roc-pc-plus.dts already does something similar, as a simple-audio-amplifier auxiliary component, so that DAPM asserts the GPIO while the headphone path is active. Measured on a Firefly-RK3399 by toggling only this line while a 1 kHz tone kept playing, with the playback PCM in state: RUNNING throughout: high -> audible, low -> silent, high -> audible With this change the line is claimed and follows the audio path: pin 149 (gpio4-21): headphones-amp gpio4:149 idle: gpio-21 (|enable) out lo playing: gpio-21 (|enable) out hi Fixes: 171582e00db1 ("arm64: dts: rockchip: add support for firefly-rk3399 board") Assisted-by: LLM Signed-off-by: Yaozhong Li Link: https://patch.msgid.link/20260921063431.103-2-yaozhonguwl@gmail.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin --- .../arm64/boot/dts/rockchip/rk3399-firefly.dts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts index 0568dfa140b32..e971966516127 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts @@ -96,6 +96,15 @@ key-power { }; }; + /* GPIO that enables the headphone output path */ + headphones_amp: headphones-amp { + compatible = "simple-audio-amplifier"; + enable-gpios = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&rt5640_hpcon>; + sound-name-prefix = "Headphone Amp"; + }; + ir-receiver { compatible = "gpio-ir-receiver"; gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>; @@ -132,8 +141,11 @@ rt5640-sound { simple-audio-card,routing = "Mic Jack", "MICBIAS1", "IN1P", "Mic Jack", - "Headphone Jack", "HPOL", - "Headphone Jack", "HPOR"; + "Headphone Amp INL", "HPOL", + "Headphone Amp INR", "HPOR", + "Headphone Jack", "Headphone Amp OUTL", + "Headphone Jack", "Headphone Amp OUTR"; + simple-audio-card,aux-devs = <&headphones_amp>; simple-audio-card,cpu { sound-dai = <&i2s1>; @@ -547,8 +559,6 @@ rt5640: rt5640@1c { clock-names = "mclk"; realtek,in1-differential; #sound-dai-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&rt5640_hpcon>; }; }; -- 2.53.0