From mboxrd@z Thu Jan 1 00:00:00 1970 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=1795030845; b=ZW3BJEirrQb1RCK+O+0VIpGKCT7E2/ZHTKSPNkwtkQGCwxOTDTlqHnBw2cCgqrl03TUr 3h9n4pwULxlz4ko0sOXJaWKv9ST7wClsK4fucVJBGncJj4n9yr6VTb0UUuKYrLJcjkGYP GHWjkWGmUPjdfduNhjxSd8f9Qjw0dNspQfXDW6kehmF1G6RXJvYytCvaqrk0G2XMBKKIs iBt8J5RvlC+2g7+e7ZtBS0QPhft3tUAv9BouG7njrM0mYyvp7OxymMzkiti6623pTszb7 QA684hRl+IKhN8iMzaQAXoEsMbnF284lTPFqVpJ8GcHXnsdq9kmmPjBPtiKeIuLlFmg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795030845; 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=HPBi0pcSClHYROaqE1O/Nn/ct7pXyNmRM49Re8gvFYg=; b=pRtNcskyrop2UD7nqTvKZyMd244NdefMedxJqck3hmqfbwk688NEiJi2BcabP4fUkJPR Bds0GXKqlFUBAHZuzP2yJ+LefUCrlvAHxZ9gkNs17m9hgZBbaWb6ZsQnSR1Tp6qVplMnR Ja6L2xqxPTLsnoXe2a3r4Pt8Dzj4iVUPejRpJYUUC6S11YSggq7lPMtsIFz5TwDpHc9DI TMHXjmz55tlqHPzAyRRwbKLHRZ4WOXWbFrB3oAD6AlZlk36aKT9QOi7ORStTuHm7qAwIL E/cQcShuGwauDh37nNnhyyEGFzTxwnoxiUulX4F+tVFbueR+9fw0WzwMDJmsuaGlsUg== 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=vhTJolIV; 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 5F86B606D348; Wed, 18 Nov 2026 19:40:45 +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=vhTJolIV Received: by smtp.kernel.org (Postfix) with ESMTPSA id B31FF1F000C4; Wed, 18 Nov 2026 19:40:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795030845; bh=HPBi0pcSClHYROaqE1O/Nn/ct7pXyNmRM49Re8gvFYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vhTJolIVXC/fFWe5akaC0Ngo96uQIyI7nT42dDtIWv+l8yYShdlU3RMr/NtZNzYvg BevsX0TLa3LCH4s4Kk5mQ9urFB3CGaaK4o9IEtDNNvlabCyS1JmfPRbHzIIgr1ulXc az6aE2NgLQmG5ZsEiZo/TZSoCjr8/rLYYR6leRW8= 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.12 0850/1756] arm64: dts: rockchip: fix analog headphone output on rk3399-firefly Date: Wed, 18 Nov 2026 15:49:37 +0100 Message-ID: <20261118150043.231152292@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150007.957976754@linuxfoundation.org> References: <20261118150007.957976754@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-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 f4491317a1b03..1dddc26efed95 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