[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230622020541.65860-1-linmengbo0689@protonmail.com>
Date: Thu, 22 Jun 2023 02:05:51 +0000
From: "Lin, Meng-Bo" <linmengbo0689@...tonmail.com>
To: linux-kernel@...r.kernel.org
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Stephan Gerhold <stephan@...hold.net>,
Nikita Travkin <nikita@...n.ru>, linux-arm-msm@...r.kernel.org,
devicetree@...r.kernel.org, ~postmarketos/upstreaming@...ts.sr.ht
Subject: [PATCH 7/8] arm64: dts: qcom: msm8939-samsung-a7: Add vibrator
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@...tonmail.com>
---
.../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 = <®_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
Powered by blists - more mailing lists