build/patch/kernel/archive/sunxi-6.2/patches.megous/arm64-dts-pinephone-pro-Add-light-proximity-sensor-support.patch

52 lines
1.3 KiB
Diff

From 077d649beb9102a9780e0c8fc634616ed5a5cccd Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 9 Sep 2022 16:41:07 +0200
Subject: [PATCH 285/391] arm64: dts: pinephone-pro: Add light/proximity sensor
support
Pinephone Pro uses STK3311
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../boot/dts/rockchip/rk3399-pinephone-pro.dts | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
index fba4809e8..3e6730897 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
@@ -849,6 +849,17 @@ touchscreen@14 {
touchscreen-size-y = <1440>;
poweroff-in-suspend;
};
+
+ light-sensor@48 {
+ compatible = "sensortek,stk3311";
+ reg = <0x48>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <RK_PD3 IRQ_TYPE_EDGE_FALLING>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&stk3311_int>;
+ vdd-supply = <&vcc_3v0>;
+ leda-supply = <&vcc_3v0>;
+ };
};
&i2c4 {
@@ -1170,6 +1181,12 @@ spk_en: spk-en {
};
};
+ stk3311 {
+ stk3311_int: stk3311-int {
+ rockchip,pins = <4 RK_PD3 RK_FUNC_GPIO &pcfg_input_pull_up>;
+ };
+ };
+
usb-typec {
vcc5v0_typec_en: vcc5v0_typec_en {
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
--
2.35.3