Linux-Clk Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/3] clk: imx8mn: add snvs clock
@ 2020-01-15  8:42 Horia Geantă
  2020-01-15  8:42 ` [PATCH 1/3] dt-bindings: clock: imx8mn: add SNVS clock Horia Geantă
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Horia Geantă @ 2020-01-15  8:42 UTC (permalink / raw)
  To: Shawn Guo, Stephen Boyd, Rob Herring
  Cc: Mark Rutland, Sascha Hauer, Michael Turquette,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Anson Huang, Leonard Crestez, Abel Vesa, devicetree,
	linux-arm-kernel, linux-clk, linux-kernel

This patch set adds the clock for snvs module on imx8mn.
DT bindings, clk driver are updated accordingly.
DT for imx8mn (snvs-rtc-lp node) is also updated.

Horia Geantă (3):
  dt-bindings: clock: imx8mn: add SNVS clock
  clk: imx8mn: add SNVS clock to clock tree
  arm64: dts: imx8mn: add clock for snvs rtc node

 arch/arm64/boot/dts/freescale/imx8mn.dtsi | 1 +
 drivers/clk/imx/clk-imx8mn.c              | 1 +
 include/dt-bindings/clock/imx8mn-clock.h  | 4 +++-
 3 files changed, 5 insertions(+), 1 deletion(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] dt-bindings: clock: imx8mn: add SNVS clock
  2020-01-15  8:42 [PATCH 0/3] clk: imx8mn: add snvs clock Horia Geantă
@ 2020-01-15  8:42 ` Horia Geantă
  2020-01-15  9:14   ` Abel Vesa
  2020-01-15  8:42 ` [PATCH 2/3] clk: imx8mn: add SNVS clock to clock tree Horia Geantă
  2020-01-15  8:42 ` [PATCH 3/3] arm64: dts: imx8mn: add clock for snvs rtc node Horia Geantă
  2 siblings, 1 reply; 5+ messages in thread
From: Horia Geantă @ 2020-01-15  8:42 UTC (permalink / raw)
  To: Shawn Guo, Stephen Boyd, Rob Herring
  Cc: Mark Rutland, Sascha Hauer, Michael Turquette,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Anson Huang, Leonard Crestez, Abel Vesa, devicetree,
	linux-arm-kernel, linux-clk, linux-kernel

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
---
 include/dt-bindings/clock/imx8mn-clock.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/dt-bindings/clock/imx8mn-clock.h b/include/dt-bindings/clock/imx8mn-clock.h
index 0f2b8423ce1d..43883fe65db5 100644
--- a/include/dt-bindings/clock/imx8mn-clock.h
+++ b/include/dt-bindings/clock/imx8mn-clock.h
@@ -228,6 +228,8 @@
 #define IMX8MN_SYS_PLL2_333M_CG			209
 #define IMX8MN_SYS_PLL2_500M_CG			210
 
-#define IMX8MN_CLK_END				211
+#define IMX8MN_CLK_SNVS_ROOT			211
+
+#define IMX8MN_CLK_END				212
 
 #endif
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/3] clk: imx8mn: add SNVS clock to clock tree
  2020-01-15  8:42 [PATCH 0/3] clk: imx8mn: add snvs clock Horia Geantă
  2020-01-15  8:42 ` [PATCH 1/3] dt-bindings: clock: imx8mn: add SNVS clock Horia Geantă
@ 2020-01-15  8:42 ` Horia Geantă
  2020-01-15  8:42 ` [PATCH 3/3] arm64: dts: imx8mn: add clock for snvs rtc node Horia Geantă
  2 siblings, 0 replies; 5+ messages in thread
From: Horia Geantă @ 2020-01-15  8:42 UTC (permalink / raw)
  To: Shawn Guo, Stephen Boyd, Rob Herring
  Cc: Mark Rutland, Sascha Hauer, Michael Turquette,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Anson Huang, Leonard Crestez, Abel Vesa, devicetree,
	linux-arm-kernel, linux-clk, linux-kernel

i.mx8mn has support for clock gating the snvs module.
Add it into clock tree so that rtc-snvs driver could use it.

Note this will also be required in the snvs_pwrkey driver,
once support for clock management will be added.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
---
 drivers/clk/imx/clk-imx8mn.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c
index ce2ba3dce483..6a50b59968f5 100644
--- a/drivers/clk/imx/clk-imx8mn.c
+++ b/drivers/clk/imx/clk-imx8mn.c
@@ -519,6 +519,7 @@ static int imx8mn_clocks_probe(struct platform_device *pdev)
 	hws[IMX8MN_CLK_SAI5_IPG] = imx_clk_hw_gate2_shared2("sai5_ipg_clk", "ipg_audio_root", base + 0x4370, 0, &share_count_sai5);
 	hws[IMX8MN_CLK_SAI6_ROOT] = imx_clk_hw_gate2_shared2("sai6_root_clk", "sai6", base + 0x4380, 0, &share_count_sai6);
 	hws[IMX8MN_CLK_SAI6_IPG] = imx_clk_hw_gate2_shared2("sai6_ipg_clk", "ipg_audio_root", base + 0x4380, 0, &share_count_sai6);
+	hws[IMX8MN_CLK_SNVS_ROOT] = imx_clk_hw_gate4("snvs_root_clk", "ipg_root", base + 0x4470, 0);
 	hws[IMX8MN_CLK_UART1_ROOT] = imx_clk_hw_gate4("uart1_root_clk", "uart1", base + 0x4490, 0);
 	hws[IMX8MN_CLK_UART2_ROOT] = imx_clk_hw_gate4("uart2_root_clk", "uart2", base + 0x44a0, 0);
 	hws[IMX8MN_CLK_UART3_ROOT] = imx_clk_hw_gate4("uart3_root_clk", "uart3", base + 0x44b0, 0);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/3] arm64: dts: imx8mn: add clock for snvs rtc node
  2020-01-15  8:42 [PATCH 0/3] clk: imx8mn: add snvs clock Horia Geantă
  2020-01-15  8:42 ` [PATCH 1/3] dt-bindings: clock: imx8mn: add SNVS clock Horia Geantă
  2020-01-15  8:42 ` [PATCH 2/3] clk: imx8mn: add SNVS clock to clock tree Horia Geantă
@ 2020-01-15  8:42 ` Horia Geantă
  2 siblings, 0 replies; 5+ messages in thread
From: Horia Geantă @ 2020-01-15  8:42 UTC (permalink / raw)
  To: Shawn Guo, Stephen Boyd, Rob Herring
  Cc: Mark Rutland, Sascha Hauer, Michael Turquette,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Anson Huang, Leonard Crestez, Abel Vesa, devicetree,
	linux-arm-kernel, linux-clk, linux-kernel

Initial commit adding imx8mn support:
6c3debcbae47 ("arm64: dts: freescale: Add i.MX8MN dtsi support")
added the "clock-names" property for the snvs rtc node,
however it missed adding the clock.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8mn.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
index a44b5438e842..d23347aaedda 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
@@ -358,6 +358,7 @@
 					offset = <0x34>;
 					interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
 						     <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MN_CLK_SNVS_ROOT>;
 					clock-names = "snvs-rtc";
 				};
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] dt-bindings: clock: imx8mn: add SNVS clock
  2020-01-15  8:42 ` [PATCH 1/3] dt-bindings: clock: imx8mn: add SNVS clock Horia Geantă
@ 2020-01-15  9:14   ` Abel Vesa
  0 siblings, 0 replies; 5+ messages in thread
From: Abel Vesa @ 2020-01-15  9:14 UTC (permalink / raw)
  To: Horia Geanta
  Cc: Shawn Guo, Stephen Boyd, Rob Herring, Mark Rutland, Sascha Hauer,
	Michael Turquette, Pengutronix Kernel Team, Fabio Estevam,
	dl-linux-imx, Anson Huang, Leonard Crestez, devicetree,
	linux-arm-kernel, linux-clk, linux-kernel

On 20-01-15 10:42:23, Horia Geantă wrote:
> Signed-off-by: Horia Geantă <horia.geanta@nxp.com>

Add a commit message please.

Note, this modifies the devicetree ABI.

> ---
>  include/dt-bindings/clock/imx8mn-clock.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/include/dt-bindings/clock/imx8mn-clock.h b/include/dt-bindings/clock/imx8mn-clock.h
> index 0f2b8423ce1d..43883fe65db5 100644
> --- a/include/dt-bindings/clock/imx8mn-clock.h
> +++ b/include/dt-bindings/clock/imx8mn-clock.h
> @@ -228,6 +228,8 @@
>  #define IMX8MN_SYS_PLL2_333M_CG			209
>  #define IMX8MN_SYS_PLL2_500M_CG			210
>  
> -#define IMX8MN_CLK_END				211
> +#define IMX8MN_CLK_SNVS_ROOT			211
> +
> +#define IMX8MN_CLK_END				212
>  
>  #endif
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15  8:42 [PATCH 0/3] clk: imx8mn: add snvs clock Horia Geantă
2020-01-15  8:42 ` [PATCH 1/3] dt-bindings: clock: imx8mn: add SNVS clock Horia Geantă
2020-01-15  9:14   ` Abel Vesa
2020-01-15  8:42 ` [PATCH 2/3] clk: imx8mn: add SNVS clock to clock tree Horia Geantă
2020-01-15  8:42 ` [PATCH 3/3] arm64: dts: imx8mn: add clock for snvs rtc node Horia Geantă

Linux-Clk Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-clk/0 linux-clk/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-clk linux-clk/ https://lore.kernel.org/linux-clk \
		linux-clk@vger.kernel.org
	public-inbox-index linux-clk

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-clk


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git