From dd617215e43671c0ba88dbd25c99fa42de9be69c Mon Sep 17 00:00:00 2001
From: Martijn Braam <martijn@brixit.nl>
Date: Mon, 15 Feb 2021 13:18:02 -0800
Subject: [PATCH] dts: pinephone: jack detection

---
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 3cf2f3e6a41a..1a096576d258 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -355,11 +355,13 @@ &codec {
 	pinctrl-names = "default";
 	pinctrl-0 = <&aif2_pins>, <&aif3_pins>;
 	status = "okay";
+	allwinner,inverted-jack-detection;
 };
 
 &codec_analog {
 	cpvdd-supply = <&reg_eldo1>;
 	status = "okay";
+	allwinner,internal-bias-resistor;
 };
 
 &cpu0 {
@@ -818,11 +820,11 @@ &sound {
 	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
 	simple-audio-card,widgets = "Microphone", "Headset Microphone",
 				    "Microphone", "Internal Microphone",
-				    "Headphone", "Headphone Jack",
+				    "Headphone", "Headphone",
 				    "Speaker", "Internal Earpiece",
 				    "Speaker", "Internal Speaker";
 	simple-audio-card,routing =
-			"Headphone Jack", "HP",
+			"Headphone", "HP",
 			"Internal Earpiece", "EARPIECE",
 			"Internal Speaker", "Speaker Amp OUTL",
 			"Internal Speaker", "Speaker Amp OUTR",
-- 
2.31.1

