diff options
author | Nikita Travkin <nikita@trvn.ru> | 2022-10-20 11:56:08 +0000 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2022-10-28 16:25:54 -0500 |
commit | 5ffe618764a36c2d259674b854abd574790ea56b (patch) | |
tree | 76ebcce9aac36a9cedc51d861b7a10314238468d /arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | |
parent | aab0dd5cf11f8d9edd766e2b65f65a4cf1166c7c (diff) | |
download | linux-5ffe618764a36c2d259674b854abd574790ea56b.tar.bz2 |
arm64: dts: qcom: msm8916-samsung-a2015: Add vibrator
Both a2015 devices use motor drivers controlled with PWM signal.
A5 additionally has a fixed regulator that powers the driver and is
controlled by enable signal. A3 routes that enable signal to the
motor driver itself.
To simplify the description, add the motor to the common dtsi and
assume a regulator is used for both.
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
[Rename the nodes to be reusable in msm8916-sansung-e2015]
Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221020115255.2026-1-linmengbo0689@protonmail.com
Diffstat (limited to 'arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi')
-rw-r--r-- | arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi index 5f7cec347a4f..2a074e70c4da 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi @@ -23,6 +23,17 @@ }; }; + clk_pwm: pwm { + compatible = "clk-pwm"; + #pwm-cells = <2>; + + clocks = <&gcc GCC_GP2_CLK>; + + pinctrl-names = "default"; + pinctrl-0 = <&motor_pwm_default>; + status = "disabled"; + }; + gpio-keys { compatible = "gpio-keys"; @@ -61,6 +72,24 @@ }; }; + /* + * NOTE: A5 connects GPIO 76 to a reglator powering the motor + * driver IC but A3 connects the same signal to an ENABLE pin of + * the driver. + */ + reg_motor_vdd: regulator-motor-vdd { + compatible = "regulator-fixed"; + regulator-name = "motor_vdd"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&msmgpio 76 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&motor_en_default>; + }; + reg_vdd_tsp_a: regulator-vdd-tsp-a { compatible = "regulator-fixed"; regulator-name = "vdd_tsp_a"; @@ -153,6 +182,16 @@ pinctrl-0 = <&nfc_default &nfc_clk_req>; }; }; + + vibrator: vibrator { + compatible = "pwm-vibrator"; + + pwms = <&clk_pwm 0 100000>; + pwm-names = "enable"; + + vcc-supply = <®_motor_vdd>; + status = "disabled"; + }; }; &blsp_i2c2 { @@ -397,6 +436,19 @@ }; }; + motor_en_default: motor-en-default { + pins = "gpio76"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + motor_pwm_default: motor-pwm-default { + pins = "gpio50"; + function = "gcc_gp2_clk_a"; + }; + muic_i2c_default: muic-i2c-default { pins = "gpio105", "gpio106"; function = "gpio"; |