[PATCH 7/8] arm64: dts: qcom: msm8939-samsung-a7: Add vibrator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A7 uses motor driver controlled with PWM signal with a fixed regulator
that powers the driver and is controlled by enable signal.

Signed-off-by: Lin, Meng-Bo <linmengbo0689@xxxxxxxxxxxxxx>
---
 .../boot/dts/qcom/msm8939-samsung-a7.dts      | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts
index dcbc8a97ce63..ea74b61782de 100644
--- a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts
+++ b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts
@@ -185,6 +185,16 @@ touchkey@20 {
 		};
 	};
 
+	pwm_vibrator: pwm-vibrator {
+		compatible = "clk-pwm";
+		#pwm-cells = <2>;
+
+		clocks = <&gcc GCC_GP2_CLK>;
+
+		pinctrl-0 = <&motor_pwm_default>;
+		pinctrl-names = "default";
+	};
+
 	reg_keyled: regulator-keyled {
 		compatible = "regulator-fixed";
 		regulator-name = "keyled";
@@ -211,6 +221,28 @@ reg_touch_key: regulator-touch-key {
 		pinctrl-0 = <&tkey_en_default>;
 		pinctrl-names = "default";
 	};
+
+	reg_vibrator: regulator-vibrator {
+		compatible = "regulator-fixed";
+		regulator-name = "motor_en";
+		regulator-min-microvolt = <3000000>;
+		regulator-max-microvolt = <3000000>;
+
+		gpio = <&tlmm 86 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-0 = <&motor_en_default>;
+		pinctrl-names = "default";
+	};
+
+	vibrator {
+		compatible = "pwm-vibrator";
+
+		pwms = <&pwm_vibrator 0 100000>;
+		pwm-names = "enable";
+
+		vcc-supply = <&reg_vibrator>;
+	};
 };
 
 &blsp_i2c1 {
@@ -311,6 +343,18 @@ gpio_keys_default: gpio-keys-default-state {
 		bias-pull-up;
 	};
 
+	motor_en_default: motor-en-default-state {
+		pins = "gpio86";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	motor_pwm_default: motor-pwm-default-state {
+		pins = "gpio50";
+		function = "gcc_gp2_clk_a";
+	};
+
 	muic_int_default: muic-int-default-state {
 		pins = "gpio12";
 		function = "gpio";
-- 
2.39.2






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux