Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: qcom: apq8026-lg-lenok: Add vibrator support

This device has a vibrator attached to the CAMSS_GP0_CLK, use clk-pwm
and pwm-vibrator to make the vibrator work.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240121-lenok-vibrator-v1-1-d4703ff92021@z3ntu.xyz
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Luca Weiss and committed by
Bjorn Andersson
4d679e3c 8d909805

+38
+38
arch/arm/boot/dts/qcom/qcom-apq8026-lg-lenok.dts
··· 7 7 8 8 #include "qcom-msm8226.dtsi" 9 9 #include "pm8226.dtsi" 10 + #include <dt-bindings/clock/qcom,mmcc-msm8974.h> 10 11 11 12 /delete-node/ &adsp_region; 12 13 ··· 56 55 57 56 pinctrl-names = "default"; 58 57 pinctrl-0 = <&wlan_regulator_default_state>; 58 + }; 59 + 60 + pwm_vibrator: pwm { 61 + compatible = "clk-pwm"; 62 + clocks = <&mmcc CAMSS_GP0_CLK>; 63 + 64 + pinctrl-0 = <&vibrator_clk_default_state>; 65 + pinctrl-names = "default"; 66 + 67 + #pwm-cells = <2>; 68 + }; 69 + 70 + vibrator { 71 + compatible = "pwm-vibrator"; 72 + 73 + pwms = <&pwm_vibrator 0 10000>; 74 + pwm-names = "enable"; 75 + 76 + vcc-supply = <&pm8226_l28>; 77 + enable-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>; 78 + 79 + pinctrl-0 = <&vibrator_en_default_state>; 80 + pinctrl-names = "default"; 59 81 }; 60 82 }; 61 83 ··· 352 328 bias-disable; 353 329 output-high; 354 330 }; 331 + }; 332 + 333 + vibrator_clk_default_state: vibrator-clk-default-state { 334 + pins = "gpio33"; 335 + function = "gp0_clk"; 336 + drive-strength = <2>; 337 + bias-disable; 338 + }; 339 + 340 + vibrator_en_default_state: vibrator-en-default-state { 341 + pins = "gpio62"; 342 + function = "gpio"; 343 + drive-strength = <2>; 344 + bias-disable; 355 345 }; 356 346 357 347 wlan_hostwake_default_state: wlan-hostwake-default-state {