Commit 5ffe6187 authored by Nikita Travkin's avatar Nikita Travkin Committed by Bjorn Andersson

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: default avatarNikita Travkin <nikita@trvn.ru>
[Rename the nodes to be reusable in msm8916-sansung-e2015]
Signed-off-by: default avatarLin, Meng-Bo <linmengbo0689@protonmail.com>
Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221020115255.2026-1-linmengbo0689@protonmail.com
parent aab0dd5c
...@@ -23,6 +23,17 @@ tz-apps@85500000 { ...@@ -23,6 +23,17 @@ tz-apps@85500000 {
}; };
}; };
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 { gpio-keys {
compatible = "gpio-keys"; compatible = "gpio-keys";
...@@ -61,6 +72,24 @@ event-hall-sensor { ...@@ -61,6 +72,24 @@ event-hall-sensor {
}; };
}; };
/*
* 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 { reg_vdd_tsp_a: regulator-vdd-tsp-a {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "vdd_tsp_a"; regulator-name = "vdd_tsp_a";
...@@ -153,6 +182,16 @@ nfc@27 { ...@@ -153,6 +182,16 @@ nfc@27 {
pinctrl-0 = <&nfc_default &nfc_clk_req>; pinctrl-0 = <&nfc_default &nfc_clk_req>;
}; };
}; };
vibrator: vibrator {
compatible = "pwm-vibrator";
pwms = <&clk_pwm 0 100000>;
pwm-names = "enable";
vcc-supply = <&reg_motor_vdd>;
status = "disabled";
};
}; };
&blsp_i2c2 { &blsp_i2c2 {
...@@ -397,6 +436,19 @@ mdss_sleep: mdss-sleep { ...@@ -397,6 +436,19 @@ mdss_sleep: mdss-sleep {
}; };
}; };
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 { muic_i2c_default: muic-i2c-default {
pins = "gpio105", "gpio106"; pins = "gpio105", "gpio106";
function = "gpio"; function = "gpio";
......
...@@ -81,6 +81,10 @@ touchscreen@20 { ...@@ -81,6 +81,10 @@ touchscreen@20 {
}; };
}; };
&clk_pwm {
status = "okay";
};
&dsi0 { &dsi0 {
panel@0 { panel@0 {
reg = <0>; reg = <0>;
...@@ -104,6 +108,10 @@ &dsi0_out { ...@@ -104,6 +108,10 @@ &dsi0_out {
remote-endpoint = <&panel_in>; remote-endpoint = <&panel_in>;
}; };
&vibrator {
status = "okay";
};
&msmgpio { &msmgpio {
panel_vdd3_default: panel-vdd3-default { panel_vdd3_default: panel-vdd3-default {
pins = "gpio9"; pins = "gpio9";
......
...@@ -50,6 +50,10 @@ touchscreen@48 { ...@@ -50,6 +50,10 @@ touchscreen@48 {
}; };
}; };
&clk_pwm {
status = "okay";
};
&pronto { &pronto {
iris { iris {
compatible = "qcom,wcn3660b"; compatible = "qcom,wcn3660b";
...@@ -61,6 +65,10 @@ &touchkey { ...@@ -61,6 +65,10 @@ &touchkey {
vdd-supply = <&reg_touch_key>; vdd-supply = <&reg_touch_key>;
}; };
&vibrator {
status = "okay";
};
&msmgpio { &msmgpio {
tkey_en_default: tkey-en-default { tkey_en_default: tkey-en-default {
pins = "gpio97"; pins = "gpio97";
......
...@@ -26,19 +26,6 @@ muic: extcon@14 { ...@@ -26,19 +26,6 @@ muic: extcon@14 {
}; };
}; };
reg_motor_vdd: regulator-motor-vdd {
compatible = "regulator-fixed";
regulator-name = "motor_vdd";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&msmgpio 76 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
pinctrl-0 = <&motor_en_default>;
};
reg_touch_key: regulator-touch-key { reg_touch_key: regulator-touch-key {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "touch_key"; regulator-name = "touch_key";
...@@ -61,20 +48,17 @@ &blsp_i2c2 { ...@@ -61,20 +48,17 @@ &blsp_i2c2 {
/delete-node/ magnetometer@12; /delete-node/ magnetometer@12;
}; };
&reg_motor_vdd {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
&touchkey { &touchkey {
vcc-supply = <&reg_touch_key>; vcc-supply = <&reg_touch_key>;
vdd-supply = <&reg_touch_key>; vdd-supply = <&reg_touch_key>;
}; };
&msmgpio { &msmgpio {
motor_en_default: motor-en-default {
pins = "gpio76";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
tkey_en_default: tkey-en-default { tkey_en_default: tkey-en-default {
pins = "gpio97"; pins = "gpio97";
function = "gpio"; function = "gpio";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment