71893eb
From c45fbddb2cd7ce6198e33ebe6dc4c1301d7875d4 Mon Sep 17 00:00:00 2001
71893eb
From: Peter Robinson <pbrobinson@gmail.com>
71893eb
Date: Sun, 19 Apr 2020 20:50:08 +0100
71893eb
Subject: [PATCH] Fix some GPIO setup on Pinebook Pro
71893eb
71893eb
This patchset contains two small fixes for the dts of the Pinebook Pro.
71893eb
The first fixes inverted logic on the headphone detect GPIO.
71893eb
The second patch fixes unreliable DC charger detection.
71893eb
71893eb
Tobias Schramm (2):
71893eb
  arm64: dts: rockchip: fix inverted headphone detection
71893eb
  arm64: dts: rockchip: enable DC charger detection pullup
71893eb
71893eb
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
71893eb
---
71893eb
 arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 6 +++---
71893eb
 1 file changed, 3 insertions(+), 3 deletions(-)
71893eb
71893eb
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
71893eb
index 5ea281b55fe2..294d21bf45f5 100644
71893eb
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
71893eb
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
71893eb
@@ -147,7 +147,7 @@ es8316-sound {
71893eb
 			"Speaker", "Speaker Amplifier OUTL",
71893eb
 			"Speaker", "Speaker Amplifier OUTR";
71893eb
 
71893eb
-		simple-audio-card,hp-det-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_LOW>;
71893eb
+		simple-audio-card,hp-det-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
71893eb
 		simple-audio-card,aux-devs = <&speaker_amp>;
71893eb
 		simple-audio-card,pin-switches = "Speaker";
71893eb
 
71893eb
@@ -788,13 +788,13 @@ lidbtn_gpio: lidbtn-gpio {
71893eb
 
71893eb
 	dc-charger {
71893eb
 		dc_det_gpio: dc-det-gpio {
71893eb
-			rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
71893eb
+			rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
71893eb
 		};
71893eb
 	};
71893eb
 
71893eb
 	es8316 {
71893eb
 		hp_det_gpio: hp-det-gpio {
71893eb
-			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
71893eb
+			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
71893eb
 		};
71893eb
 	};
71893eb
 
71893eb
-- 
71893eb
2.26.1
71893eb