]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: dts: qcom: milos-fairphone-fp6: Add Hall Effect sensor
authorLuca Weiss <luca.weiss@fairphone.com>
Fri, 13 Feb 2026 14:21:06 +0000 (15:21 +0100)
committerBjorn Andersson <andersson@kernel.org>
Thu, 26 Mar 2026 14:40:33 +0000 (09:40 -0500)
Add a node for the Hall Effect sensor, used to detect whether the Flip
Cover is closed or not.

The sensor is powered through vreg_l10b, so let's put a
regulator-always-on on that to make sure the sensor gets power.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260213-fp6-hall-sensor-v2-1-ecd113d4919c@fairphone.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts

index 52895dd9e4fa117aef6822df230ebf644e5f02ba..0199253859f10e8eb5152ee3b0abd59a9b526d5a 100644 (file)
        gpio-keys {
                compatible = "gpio-keys";
 
-               pinctrl-0 = <&volume_up_default>;
+               pinctrl-0 = <&volume_up_default>, <&hall_sensor_default>;
                pinctrl-names = "default";
 
+               /* Powered by the always-on vreg_l10b */
+               event-hall-sensor {
+                       label = "Hall Effect Sensor";
+                       gpios = <&tlmm 70 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <EV_SW>;
+                       linux,code = <SW_LID>;
+                       linux,can-disable;
+                       wakeup-source;
+               };
+
                key-volume-up {
                        label = "Volume Up";
                        gpios = <&pm7550_gpios 6 GPIO_ACTIVE_LOW>;
                        regulator-min-microvolt = <1800000>;
                        regulator-max-microvolt = <1800000>;
                        regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+                       /* Hall sensor VDD */
+                       regulator-always-on;
                };
 
                vreg_l11b: ldo11 {
                bias-pull-up;
        };
 
+       hall_sensor_default: hall-sensor-default-state {
+               pins = "gpio70";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-disable;
+       };
+
        pm8008_int_default: pm8008-int-default-state {
                pins = "gpio125";
                function = "gpio";