summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
diff options
context:
space:
mode:
authorLuca Weiss <luca@z3ntu.xyz>2023-04-27 22:34:29 +0200
committerBjorn Andersson <andersson@kernel.org>2023-05-24 19:37:41 -0700
commite0a6590d8ceb7d6c4e35b5b5eb368d9fb800487f (patch)
tree81cface536c0d4b388577bb4efbe1eae13f9a79d /arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
parentac9a78681b921877518763ba0e89202254349d1b (diff)
ARM: dts: qcom: msm8974-hammerhead: Add vibrator
The Nexus 5 has a vibrator connected to the clock output of GP1_CLK which we can use with the clk-pwm driver, then we can use that pwm with pwm-vibrator to get haptics functionality. This patch is based on Brian Masney's previous patch with clk-vibrator. Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230427-hammerhead-vibra-v1-4-e87eeb94da51@z3ntu.xyz
Diffstat (limited to 'arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts')
-rw-r--r--arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts35
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
index ab35f2d644c0..fea8a6be9021 100644
--- a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
@@ -41,6 +41,25 @@
};
};
+ clk_pwm: pwm {
+ compatible = "clk-pwm";
+ clocks = <&mmcc CAMSS_GP1_CLK>;
+
+ pinctrl-0 = <&vibrator_pin>;
+ pinctrl-names = "default";
+
+ #pwm-cells = <2>;
+ };
+
+ vibrator {
+ compatible = "pwm-vibrator";
+ pwms = <&clk_pwm 0 100000>;
+ pwm-names = "enable";
+
+ vcc-supply = <&pm8941_l19>;
+ enable-gpios = <&tlmm 60 GPIO_ACTIVE_HIGH>;
+ };
+
vreg_wlan: wlan-regulator {
compatible = "regulator-fixed";
@@ -637,6 +656,22 @@
function = "gpio";
};
};
+
+ vibrator_pin: vibrator-state {
+ core-pins {
+ pins = "gpio27";
+ function = "gp1_clk";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ enable-pins {
+ pins = "gpio60";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
};
&usb {