[PATCH 6.12.y] arm64: dts: rockchip: Fix the headphone detection on the orangepi 5 plus

Mihail Chichkanov mihail75rezh at mail.ru
Sat Nov 21 11:17:34 PST 2026


commit 897658383257 upstream.

The headphone detect pin is active high on this board, but the DT says
GPIO_ACTIVE_LOW, so the jack is reported as unplugged when headphones are
inserted: the "Headphones" DAPM pin stays off, the headphone amp enable GPIO
is never driven and the signal goes to the speaker amp instead. Result is
silence on the 3.5 mm jack.

Verified on a 6.12-based kernel: with ACTIVE_LOW /sys/kernel/debug/gpio shows
gpio-59 deasserted with headphones in and "Headphones Jack" reports off; after
flipping the flag to ACTIVE_HIGH the GPIO reads asserted, the jack reports on,
DAPM shows "Headphones: out 1", the headphone amp enable GPIO goes high while
playing, and sound is audible in the headphones.

The property is named hp-det-gpio here (it was renamed to hp-det-gpios later);
simple-card-utils.c asks for gpiod_get_optional(dev, "hp-det") and gpiolib
looks up "-gpios" first with "-gpio" as a fallback, so the flag fix applies
as-is to 6.12.y.

Fixes: 236d225e1ee7 ("arm64: dts: rockchip: Add board device tree for rk3588-orangepi-5-plus")
Signed-off-by: Mihail Chichkanov <mihail75rezh at mail.ru>
---
 arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
index dd4c79b..2082717 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
@@ -120,7 +120,7 @@
 		simple-audio-card,aux-devs = <&speaker_amp>, <&headphone_amp>;
 		simple-audio-card,format = "i2s";
 		simple-audio-card,mclk-fs = <256>;
-		simple-audio-card,hp-det-gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_LOW>;
+		simple-audio-card,hp-det-gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
 		simple-audio-card,bitclock-master = <&daicpu>;
 		simple-audio-card,frame-master = <&daicpu>;
 		/*TODO: SARADC_IN3 is used as MIC detection / key input */
-- 
2.50.1
---
Requesting a stable backport: 897658383257 carries no Cc: stable, so
linux-6.12.y still has the inverted flag (line 123 of the board .dts) and the
3.5 mm jack on this board is silent because of it. The change is one line and
has a Fixes: tag. The property is named hp-det-gpio in 6.12.y (renamed to
hp-det-gpios later); simple-card-utils.c asks for gpiod_get_optional(dev,
"hp-det") and gpiolib tries "-gpios" then "-gpio", so the flag fix applies
as-is. Tested on an Orange Pi 5 Plus with a 6.12-based kernel: with ACTIVE_LOW
the jack reports "unplugged" while headphones are in and gpio-59 reads
deasserted; with ACTIVE_HIGH the jack reports on, DAPM shows
"Headphones: out 1", the headphone amp enable GPIO goes high while playing,
and sound is audible.
If DT-only changes like this are not wanted in stable, please say so and I
will carry it downstream instead.



More information about the Linux-rockchip mailing list