public inbox for linux-pwm@vger.kernel.org
 help / color / mirror / Atom feed
From: Devi Priya <quic_devipriy@quicinc.com>
To: <agross@kernel.org>, <andersson@kernel.org>,
	<konrad.dybcio@linaro.org>, <lee@kernel.org>,
	<robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
	<conor+dt@kernel.org>, <thierry.reding@gmail.com>,
	<baruch@tkos.co.il>, <linux-arm-msm@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<u.kleine-koenig@pengutronix.de>, <linux-pwm@vger.kernel.org>
Subject: [PATCH 3/4] arm64: dts: qcom: ipq9574: Add pwm support
Date: Fri, 6 Oct 2023 10:23:16 +0530	[thread overview]
Message-ID: <20231006045317.1056625-4-quic_devipriy@quicinc.com> (raw)
In-Reply-To: <20231006045317.1056625-1-quic_devipriy@quicinc.com>

The PWM is in the TCSR area. Make tcsr "simple-mfd" compatible
and add pwm as a child of tcsr.
Also, Enable pwm support in RDP418 of IPQ9574 SoC.

Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq9574-rdp418.dts | 12 ++++++++++++
 arch/arm64/boot/dts/qcom/ipq9574.dtsi       | 15 ++++++++++++++-
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574-rdp418.dts b/arch/arm64/boot/dts/qcom/ipq9574-rdp418.dts
index 2b093e02637b..d275c98b4df7 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574-rdp418.dts
+++ b/arch/arm64/boot/dts/qcom/ipq9574-rdp418.dts
@@ -43,6 +43,12 @@ &blsp1_uart2 {
 	status = "okay";
 };
 
+&pwm {
+	pinctrl-0 = <&pwm_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
 &rpm_requests {
 	regulators {
 		compatible = "qcom,rpm-mp5496-regulators";
@@ -79,6 +85,12 @@ &sleep_clk {
 };
 
 &tlmm {
+	pwm_pins: pwm-state {
+		pins = "gpio57";
+		function = "pwm";
+		drive-strength = <8>;
+	};
+
 	sdc_default_state: sdc-default-state {
 		clk-pins {
 			pins = "gpio5";
diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 8a72ad4afd03..5465254fbdde 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -296,8 +296,21 @@ tcsr_mutex: hwlock@1905000 {
 		};
 
 		tcsr: syscon@1937000 {
-			compatible = "qcom,tcsr-ipq9574", "syscon";
+			compatible = "qcom,tcsr-ipq9574", "syscon", "simple-mfd";
 			reg = <0x01937000 0x21000>;
+			ranges = <0x0 0x01937000 0x21000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			pwm: pwm@a010 {
+				compatible = "qcom,ipq9574-pwm", "qcom,ipq6018-pwm";
+				reg = <0xa010 0x20>;
+				clocks = <&gcc GCC_ADSS_PWM_CLK>;
+				assigned-clocks = <&gcc GCC_ADSS_PWM_CLK>;
+				assigned-clock-rates = <100000000>;
+				#pwm-cells = <2>;
+				status = "disabled";
+			};
 		};
 
 		sdhc_1: mmc@7804000 {
-- 
2.34.1


  parent reply	other threads:[~2023-10-06  4:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06  4:53 [PATCH 0/4] Enable pwm support for IPQ5332 & IPQ9574 SoCs Devi Priya
2023-10-06  4:53 ` [PATCH 1/4] dt-bindings: pwm: Document the pwm compatible for ipq5332 & ipq9574 Devi Priya
2023-10-06  6:08   ` Krzysztof Kozlowski
2023-10-06  4:53 ` [PATCH 2/4] dt-bindings: mfd: qcom,tcsr: Extend simple-mfd & pwm support for IPQ targets Devi Priya
2023-10-06  6:09   ` Krzysztof Kozlowski
2023-10-12 10:07   ` (subset) " Lee Jones
2023-10-23  9:53     ` Lee Jones
2023-10-06  4:53 ` Devi Priya [this message]
2023-10-06  6:09   ` [PATCH 3/4] arm64: dts: qcom: ipq9574: Add pwm support Krzysztof Kozlowski
2023-10-06  4:53 ` [PATCH 4/4] arm64: dts: qcom: ipq5332: " Devi Priya
2023-10-06  6:10   ` Krzysztof Kozlowski
2023-11-14 11:34 ` [PATCH 0/4] Enable pwm support for IPQ5332 & IPQ9574 SoCs Uwe Kleine-König
2024-01-28  2:46 ` Bjorn Andersson

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=20231006045317.1056625-4-quic_devipriy@quicinc.com \
    --to=quic_devipriy@quicinc.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=baruch@tkos.co.il \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox