U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Marangi <ansuelsmth@gmail.com>
To: Crispin John <john@phrozen.org>, Tom Rini <trini@konsulko.com>,
	Lukasz Majewski <lukma@denx.de>,
	Sean Anderson <seanga2@gmail.com>,
	Ryder Lee <ryder.lee@mediatek.com>,
	Weijie Gao <weijie.gao@mediatek.com>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,
	Christian Marangi <ansuelsmth@gmail.com>,
	Sam Shih <sam.shih@mediatek.com>,
	u-boot@lists.denx.de
Subject: [PATCH 12/14] clk: mediatek: mt7981: fix support for pwm3 clock
Date: Fri,  2 Aug 2024 15:53:13 +0200	[thread overview]
Message-ID: <20240802135326.25303-13-ansuelsmth@gmail.com> (raw)
In-Reply-To: <20240802135326.25303-1-ansuelsmth@gmail.com>

Add and fix support for pwm3 clock. In the pwm DTSI node we were
actually using PWM2 clock for PWM3. Now that we have correct ID also add
the missing entry of gate and mux to support PWM3 clock.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 arch/arm/dts/mt7981.dtsi          | 3 +--
 drivers/clk/mediatek/clk-mt7981.c | 3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi
index fc13b90caf6..b3f8a50cd10 100644
--- a/arch/arm/dts/mt7981.dtsi
+++ b/arch/arm/dts/mt7981.dtsi
@@ -144,8 +144,7 @@
 			 <&infracfg_ao CK_INFRA_PWM_BSEL>,
 			 <&infracfg_ao CK_INFRA_PWM1_CK>,
 			 <&infracfg_ao CK_INFRA_PWM2_CK>,
-			 /* FIXME */
-			 <&infracfg_ao CK_INFRA_PWM2_CK>;
+			 <&infracfg_ao CK_INFRA_PWM3_CK>;
 		assigned-clocks = <&topckgen CK_TOP_PWM_SEL>;
 		assigned-clock-parents = <&topckgen CK_TOP_CB_CKSQ_40M>;
 		clock-names = "top", "main", "pwm1", "pwm2", "pwm3";
diff --git a/drivers/clk/mediatek/clk-mt7981.c b/drivers/clk/mediatek/clk-mt7981.c
index 4435430dcde..7b692186dc1 100644
--- a/drivers/clk/mediatek/clk-mt7981.c
+++ b/drivers/clk/mediatek/clk-mt7981.c
@@ -381,6 +381,8 @@ static const struct mtk_composite infra_muxes[] = {
 		  9, 1),
 	INFRA_MUX(CK_INFRA_PWM2_SEL, "infra_pwm2_sel", infra_pwm1_parents, 0x10,
 		  11, 1),
+	INFRA_MUX(CK_INFRA_PWM3_SEL, "infra_pwm3_sel", infra_pwm1_parents, 0x10,
+		  15, 1),
 	INFRA_MUX(CK_INFRA_PWM_BSEL, "infra_pwm_bsel", infra_pwm_bsel_parents,
 		  0x10, 13, 2),
 	INFRA_MUX(CK_INFRA_PCIE_SEL, "infra_pcie_sel", infra_pcie_parents, 0x20,
@@ -445,6 +447,7 @@ static const struct mtk_gate infracfg_ao_gates[] = {
 	GATE_INFRA0_INFRA(CK_INFRA_PWM_STA, "infra_pwm_sta", CK_INFRA_PWM_BSEL, 2),
 	GATE_INFRA0_INFRA(CK_INFRA_PWM1_CK, "infra_pwm1", CK_INFRA_PWM1_SEL, 3),
 	GATE_INFRA0_INFRA(CK_INFRA_PWM2_CK, "infra_pwm2", CK_INFRA_PWM2_SEL, 4),
+	GATE_INFRA0_INFRA(CK_INFRA_PWM3_CK, "infra_pwm3", CK_INFRA_PWM3_SEL, 27),
 	GATE_INFRA0_TOP(CK_INFRA_CQ_DMA_CK, "infra_cq_dma", CK_TOP_SYSAXI, 6),
 	GATE_INFRA0_TOP(CK_INFRA_AUD_BUS_CK, "infra_aud_bus", CK_TOP_SYSAXI, 8),
 	GATE_INFRA0_TOP(CK_INFRA_AUD_26M_CK, "infra_aud_26m", CK_TOP_F26M_SEL, 9),
-- 
2.45.2


  parent reply	other threads:[~2024-08-02 19:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02 13:53 [PATCH 00/14] clk: mediatek: mt7981: clk migration for OF_UPSTREAM Christian Marangi
2024-08-02 13:53 ` [PATCH 01/14] clk: mediatek: mt7981: add missing clock for infra_ipcie_pipe Christian Marangi
2024-08-02 13:53 ` [PATCH 02/14] clk: mediatek: mt7981: fix typo for infra_i2c0_ck Christian Marangi
2024-08-02 13:53 ` [PATCH 03/14] clk: mediatek: mt7981: fix wrong mux width for pwm2 and pwm1 clock Christian Marangi
2024-08-02 13:53 ` [PATCH 04/14] clk: mediatek: mt7981: fix wrong clock definition for spi2 Christian Marangi
2024-08-02 13:53 ` [PATCH 05/14] clk: mediatek: mt7981: add missing clock for spi1 node Christian Marangi
2024-08-02 13:53 ` [PATCH 06/14] clk: mediatek: mt7981: swap wrong clock-names for spi nodes Christian Marangi
2024-08-02 13:53 ` [PATCH 07/14] clk: mediatek: mt7981: fix wrong parent for TOP_FAUD clock Christian Marangi
2024-08-02 13:53 ` [PATCH 08/14] clk: mediatek: mt7981: fix wrong parent list for INFRA_PWM1_SEL mux Christian Marangi
2024-08-02 13:53 ` [PATCH 09/14] clk: mediatek: mt7981: implement sgmii0/1 clock Christian Marangi
2024-08-02 13:53 ` [PATCH 10/14] clk: mediatek: mt7981: drop 1/1 spurious factor Christian Marangi
2024-08-02 13:53 ` [PATCH 11/14] clk: mediatek: mt7981: replace infracfg ID with upstream linux Christian Marangi
2024-08-02 13:53 ` Christian Marangi [this message]
2024-08-02 13:53 ` [PATCH 13/14] clk: mediatek: mt7981: convert to unified infracfg gates + muxes Christian Marangi
2024-08-02 13:53 ` [PATCH 14/14] clk: mediatek: mt7981: rename CK to CLK Christian Marangi
2024-08-20  0:29 ` [PATCH 00/14] clk: mediatek: mt7981: clk migration for OF_UPSTREAM Tom Rini

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=20240802135326.25303-13-ansuelsmth@gmail.com \
    --to=ansuelsmth@gmail.com \
    --cc=GSS_MTK_Uboot_upstream@mediatek.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=john@phrozen.org \
    --cc=lukma@denx.de \
    --cc=ryder.lee@mediatek.com \
    --cc=sam.shih@mediatek.com \
    --cc=seanga2@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=weijie.gao@mediatek.com \
    /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