From abd2bba1c58cd91aba807bf4e4b63bf1cdf39e1b Mon Sep 17 00:00:00 2001 From: huangjq9 Date: Thu, 26 Aug 2021 17:25:50 +0800 Subject: [PATCH] milanf: dts: stylus bu520xx bringup - bringup stylus rohm bu52055 hall sensor; - changes interrupt pin to gpio84; Change-Id: I889c80009a7ec9b9ab3153c7b050afbedd66add9 Signed-off-by: huangjq9 Reviewed-on: https://gerrit.mot.com/2051945 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Zhihong Kang Reviewed-by: Huosheng Liao Submit-Approved: Jira Key --- qcom/blair-milanf-common-overlay.dtsi | 1 + qcom/milanf-sensors.dtsi | 51 +++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100755 qcom/milanf-sensors.dtsi diff --git a/qcom/blair-milanf-common-overlay.dtsi b/qcom/blair-milanf-common-overlay.dtsi index 487764f01a40..53a6bcfb499e 100644 --- a/qcom/blair-milanf-common-overlay.dtsi +++ b/qcom/blair-milanf-common-overlay.dtsi @@ -19,6 +19,7 @@ #include "milanf-fps-overlay.dtsi" #include "milanf-display.dtsi" #include "milanf-touchscreen.dtsi" +#include "milanf-sensors.dtsi" #include "camera/blair-camera-sensor-mot-milanf-overlay.dtsi" #include "milanf-wl286xx.dtsi" diff --git a/qcom/milanf-sensors.dtsi b/qcom/milanf-sensors.dtsi new file mode 100755 index 000000000000..f3426b6eb2ab --- /dev/null +++ b/qcom/milanf-sensors.dtsi @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2019, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&tlmm { + pen_int_default: pen_int_default { + mux { + pins = "gpio84"; + function = "gpio"; + }; + config { + pins = "gpio84"; + num-grp-pins = <1>; + drive-strength = <2>; + bias-no-pull; + }; + }; + + pen_int_sleep: pen_int_sleep { + mux { + pins = "gpio84"; + function = "gpio"; + }; + config { + pins = "gpio84"; + num-grp-pins = <1>; + drive-strength = <2>; + bias-no-pull; + }; + }; +}; + +&soc { + pen_detect{ + compatible = "rohm,bu520xx_pen_detect"; + pinctrl-names = "default","sleep"; + pinctrl-0 = <&pen_int_default>; + pinctrl-1 = <&pen_int_sleep>; + rohm,nirq-gpio=<&tlmm 84 0x02>; + }; +}; +