]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: dts: qcom: apq8026-huawei-sturgeon: Add vibrator
authorLuca Weiss <luca@z3ntu.xyz>
Sun, 30 Apr 2023 18:20:57 +0000 (20:20 +0200)
committerBjorn Andersson <andersson@kernel.org>
Tue, 30 May 2023 14:54:19 +0000 (07:54 -0700)
The watch has a DRV2605 for haptics. Add a node for it based on the
values found in the downstream board file.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230430-drv260x-improvements-v1-5-1fb28b4cc698@z3ntu.xyz
arch/arm/boot/dts/qcom-apq8026-huawei-sturgeon.dts

index d64096028ab13b5216308624e781b2cb6749fcd0..eb73b992a696441d4cb7f4b6226201f82c6f83dd 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "qcom-msm8226.dtsi"
 #include "qcom-pm8226.dtsi"
+#include <dt-bindings/input/ti-drv260x.h>
 
 /delete-node/ &adsp_region;
 
        status = "okay";
 };
 
+&blsp1_i2c2 {
+       clock-frequency = <384000>;
+
+       status = "okay";
+
+       vibrator@5a {
+               compatible = "ti,drv2605";
+               reg = <0x5a>;
+               enable-gpios = <&tlmm 60 GPIO_ACTIVE_HIGH>;
+
+               mode = <DRV260X_ERM_MODE>;
+               library-sel = <DRV260X_ERM_LIB_D>;
+               vib-rated-mv = <2765>;
+               vib-overdrive-mv = <3525>;
+
+               pinctrl-0 = <&vibrator_default_state>;
+               pinctrl-names = "default";
+       };
+};
+
 &blsp1_i2c5 {
        clock-frequency = <384000>;
 
                };
        };
 
+       vibrator_default_state: vibrator-default-state {
+               pins = "gpio59", "gpio60";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-pull-down;
+       };
+
        wlan_hostwake_default_state: wlan-hostwake-default-state {
                pins = "gpio66";
                function = "gpio";