All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikita Travkin <nikita@trvn.ru>
To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Siddharth Manthan <siddharth.manthan@gmail.com>,
	Jasper Korten <jja2000@gmail.com>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	Nikita Travkin <nikita@trvn.ru>
Subject: [PATCH 4/8] arm64: dts: qcom: msm8916-samsung-gt510: Add Vibrator
Date: Thu,  5 Jan 2023 17:32:36 +0500	[thread overview]
Message-ID: <20230105123240.1089375-5-nikita@trvn.ru> (raw)
In-Reply-To: <20230105123240.1089375-1-nikita@trvn.ru>

gt510 uses a PWM controllable vibrator, that uses a general purpose
clock output for it's control. Set up the pwm, supply and the vibrator.

Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
 .../boot/dts/qcom/msm8916-samsung-gt510.dts   | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts
index e9916199e5a3..44d527b3f1f6 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts
@@ -8,4 +8,51 @@ / {
 	model = "Samsung Galaxy Tab A 9.7 (2015)";
 	compatible = "samsung,gt510", "qcom,msm8916";
 	chassis-type = "tablet";
+
+	clk_pwm: pwm {
+		compatible = "clk-pwm";
+		#pwm-cells = <2>;
+
+		clocks = <&gcc GCC_GP2_CLK>;
+
+		pinctrl-0 = <&motor_pwm_default>;
+		pinctrl-names = "default";
+	};
+
+	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-0 = <&motor_en_default>;
+		pinctrl-names = "default";
+	};
+
+	vibrator {
+		compatible = "pwm-vibrator";
+
+		pwms = <&clk_pwm 0 100000>;
+		pwm-names = "enable";
+
+		vcc-supply = <&reg_motor_vdd>;
+	};
+};
+
+&msmgpio {
+	motor_en_default: motor-en-default-state {
+		pins = "gpio76";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	motor_pwm_default: motor-pwm-default-state {
+		pins = "gpio50";
+		function = "gcc_gp2_clk_a";
+	};
 };
-- 
2.38.1


  parent reply	other threads:[~2023-01-05 12:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05 12:32 [PATCH 0/8] Add support for Samsung Galaxy tab A (2015) tablets Nikita Travkin
2023-01-05 12:32 ` [PATCH 1/8] dt-bindings: qcom: Document samsung,gt58 and gt510 Nikita Travkin
2023-01-06 11:24   ` Krzysztof Kozlowski
2023-01-05 12:32 ` [PATCH 2/8] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A (2015) Nikita Travkin
2023-01-05 12:32 ` [PATCH 3/8] arm64: dts: qcom: msm8916-samsung-gt58: Add Vibrator Nikita Travkin
2023-01-06 11:25   ` Krzysztof Kozlowski
2023-01-05 12:32 ` Nikita Travkin [this message]
2023-01-06 11:26   ` [PATCH 4/8] arm64: dts: qcom: msm8916-samsung-gt510: " Krzysztof Kozlowski
2023-01-06 11:45     ` Nikita Travkin
2023-01-05 12:32 ` [PATCH 5/8] arm64: dts: qcom: msm8916-samsung-gt510: Add touchscreen Nikita Travkin
2023-01-05 12:32 ` [PATCH 6/8] arm64: dts: qcom: msm8916-samsung-gt58: " Nikita Travkin
2023-01-05 12:32 ` [PATCH 7/8] arm64: dts: qcom: msm8916-samsung-gt5-common: Add fuelgauge Nikita Travkin
2023-01-05 12:32 ` [PATCH 8/8] arm64: dts: qcom: msm8916-samsung-gt5-common: add sensors Nikita Travkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230105123240.1089375-5-nikita@trvn.ru \
    --to=nikita@trvn.ru \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jja2000@gmail.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=siddharth.manthan@gmail.com \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.