devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support
@ 2021-03-29 16:42 Dario Binacchi
  2021-03-29 16:42 ` [PATCH v3 2/4] dt-bindings: ti: dpll: add spread spectrum support Dario Binacchi
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Dario Binacchi @ 2021-03-29 16:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: Grygorii Strashko, Dario Binacchi, Benoît Cousson,
	Lee Jones, Michael Turquette, Rob Herring, Stephen Boyd,
	Tero Kristo, Tony Lindgren, devicetree, linux-clk, linux-omap


As reported by the TI spruh73x RM, MPU and LCD modules support spread
spectrum clocking (SSC) on their output clocks. SSC is used to spread
the spectral peaking of the clock to reduce any electromagnetic
interference (EMI) that may be caused due to the clock’s fundamental
or any of its harmonics.
The series allows you to enable and adjust the spread spectrum clocking
for all am33xx PLLs for which it is supported.


Changes in v3:
- Add '-hz' suffix to "ti,ssc-modfreq" binding.
- Add Tony Lindgren acked tag.
- Use "ti,ssc-modfreq-hz" binding instead of "ti,ssc-modfreq".

Changes in v2:
- Remove SSC registers from dpll_core_ck@490 node (SSC is not supported)
- Add SSC registers to dpll_mpu_ck@488 node.
- Move the DT changes to the previous patch in the series.

Dario Binacchi (4):
  clk: ti: fix typo in routine description
  dt-bindings: ti: dpll: add spread spectrum support
  ARM: dts: am33xx-clocks: add spread spectrum support
  clk: ti: add am33xx spread spectrum clock support

 .../devicetree/bindings/clock/ti/dpll.txt     | 20 +++++
 arch/arm/boot/dts/am33xx-clocks.dtsi          |  4 +-
 drivers/clk/ti/dpll.c                         | 42 +++++++++
 drivers/clk/ti/dpll3xxx.c                     | 87 ++++++++++++++++++-
 include/linux/clk/ti.h                        | 24 +++++
 5 files changed, 174 insertions(+), 3 deletions(-)

-- 
2.17.1


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

* [PATCH v3 2/4] dt-bindings: ti: dpll: add spread spectrum support
  2021-03-29 16:42 [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support Dario Binacchi
@ 2021-03-29 16:42 ` Dario Binacchi
  2021-03-30 22:22   ` Rob Herring
  2021-03-29 16:42 ` [PATCH v3 3/4] ARM: dts: am33xx-clocks: " Dario Binacchi
  2021-03-30  2:24 ` [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support Stephen Boyd
  2 siblings, 1 reply; 9+ messages in thread
From: Dario Binacchi @ 2021-03-29 16:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: Grygorii Strashko, Dario Binacchi, Michael Turquette,
	Rob Herring, Stephen Boyd, devicetree, linux-clk

DT bindings for enabling and adjusting spread spectrum clocking have
been added.

Signed-off-by: Dario Binacchi <dariobin@libero.it>

---

Changes in v3:
- Add '-hz' suffix to "ti,ssc-modfreq" binding.

 .../devicetree/bindings/clock/ti/dpll.txt     | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/ti/dpll.txt b/Documentation/devicetree/bindings/clock/ti/dpll.txt
index df57009ff8e7..37a7cb6ad07d 100644
--- a/Documentation/devicetree/bindings/clock/ti/dpll.txt
+++ b/Documentation/devicetree/bindings/clock/ti/dpll.txt
@@ -42,6 +42,11 @@ Required properties:
 	"idlest" - contains the idle status register base address
 	"mult-div1" - contains the multiplier / divider register base address
 	"autoidle" - contains the autoidle register base address (optional)
+	"ssc-deltam" - DPLL supports spread spectrum clocking (SSC), contains
+		       the frequency spreading register base address (optional)
+	"ssc-modfreq" - DPLL supports spread spectrum clocking (SSC), contains
+		        the modulation frequency register base address
+			(optional)
   ti,am3-* dpll types do not have autoidle register
   ti,omap2-* dpll type does not support idlest / autoidle registers
 
@@ -51,6 +56,14 @@ Optional properties:
 	- ti,low-power-stop : DPLL supports low power stop mode, gating output
 	- ti,low-power-bypass : DPLL output matches rate of parent bypass clock
 	- ti,lock : DPLL locks in programmed rate
+	- ti,min-div : the minimum divisor to start from to round the DPLL
+		       target rate
+	- ti,ssc-deltam : DPLL supports spread spectrum clocking, frequency
+			  spreading in permille (10th of a percent)
+	- ti,ssc-modfreq-hz : DPLL supports spread spectrum clocking, spread
+			      spectrum modulation frequency
+	- ti,ssc-downspread : DPLL supports spread spectrum clocking, boolean
+			      to enable the downspread feature
 
 Examples:
 	dpll_core_ck: dpll_core_ck@44e00490 {
@@ -83,3 +96,10 @@ Examples:
 		clocks = <&sys_ck>, <&sys_ck>;
 		reg = <0x0500>, <0x0540>;
 	};
+
+	dpll_disp_ck: dpll_disp_ck {
+		#clock-cells = <0>;
+		compatible = "ti,am3-dpll-no-gate-clock";
+		clocks = <&sys_clkin_ck>, <&sys_clkin_ck>;
+		reg = <0x0498>, <0x0448>, <0x0454>, <0x044c>, <0x0450>;
+	};
-- 
2.17.1


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

* [PATCH v3 3/4] ARM: dts: am33xx-clocks: add spread spectrum support
  2021-03-29 16:42 [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support Dario Binacchi
  2021-03-29 16:42 ` [PATCH v3 2/4] dt-bindings: ti: dpll: add spread spectrum support Dario Binacchi
@ 2021-03-29 16:42 ` Dario Binacchi
  2021-03-30  2:24 ` [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support Stephen Boyd
  2 siblings, 0 replies; 9+ messages in thread
From: Dario Binacchi @ 2021-03-29 16:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: Grygorii Strashko, Dario Binacchi, Benoît Cousson,
	Rob Herring, Tony Lindgren, devicetree, linux-omap

Registers for adjusting the spread spectrum clocking (SSC) have been
added. As reported by the TI spruh73x RM, SSC is supported only for
LCD and MPU PLLs.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
Acked-by: Tony Lindgren <tony@atomide.com>

---

Changes in v3:
- Add Tony Lindgren acked tag.

Changes in v2:
- Remove SSC registers from dpll_core_ck@490 node (SSC is not supported)
- Add SSC registers to dpll_mpu_ck@488 node.

 arch/arm/boot/dts/am33xx-clocks.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/am33xx-clocks.dtsi b/arch/arm/boot/dts/am33xx-clocks.dtsi
index dced92a8970e..a02e0b1229a4 100644
--- a/arch/arm/boot/dts/am33xx-clocks.dtsi
+++ b/arch/arm/boot/dts/am33xx-clocks.dtsi
@@ -204,7 +204,7 @@
 		#clock-cells = <0>;
 		compatible = "ti,am3-dpll-clock";
 		clocks = <&sys_clkin_ck>, <&sys_clkin_ck>;
-		reg = <0x0488>, <0x0420>, <0x042c>;
+		reg = <0x0488>, <0x0420>, <0x042c>, <0x0424>, <0x0428>;
 	};
 
 	dpll_mpu_m2_ck: dpll_mpu_m2_ck@4a8 {
@@ -244,7 +244,7 @@
 		#clock-cells = <0>;
 		compatible = "ti,am3-dpll-no-gate-clock";
 		clocks = <&sys_clkin_ck>, <&sys_clkin_ck>;
-		reg = <0x0498>, <0x0448>, <0x0454>;
+		reg = <0x0498>, <0x0448>, <0x0454>, <0x044c>, <0x0450>;
 	};
 
 	dpll_disp_m2_ck: dpll_disp_m2_ck@4a4 {
-- 
2.17.1


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

* Re: [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support
  2021-03-29 16:42 [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support Dario Binacchi
  2021-03-29 16:42 ` [PATCH v3 2/4] dt-bindings: ti: dpll: add spread spectrum support Dario Binacchi
  2021-03-29 16:42 ` [PATCH v3 3/4] ARM: dts: am33xx-clocks: " Dario Binacchi
@ 2021-03-30  2:24 ` Stephen Boyd
  2021-03-31  5:51   ` Tony Lindgren
  2 siblings, 1 reply; 9+ messages in thread
From: Stephen Boyd @ 2021-03-30  2:24 UTC (permalink / raw)
  To: Dario Binacchi, linux-kernel
  Cc: Grygorii Strashko, Dario Binacchi, Benoît Cousson,
	Lee Jones, Michael Turquette, Rob Herring, Tero Kristo,
	Tony Lindgren, devicetree, linux-clk, linux-omap

Quoting Dario Binacchi (2021-03-29 09:42:17)
> 
> As reported by the TI spruh73x RM, MPU and LCD modules support spread
> spectrum clocking (SSC) on their output clocks. SSC is used to spread
> the spectral peaking of the clock to reduce any electromagnetic
> interference (EMI) that may be caused due to the clock’s fundamental
> or any of its harmonics.
> The series allows you to enable and adjust the spread spectrum clocking
> for all am33xx PLLs for which it is supported.
> 

What is your merge strategy? Should all the patches go through clk tree?
Or you'll send via arm-soc?

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

* Re: [PATCH v3 2/4] dt-bindings: ti: dpll: add spread spectrum support
  2021-03-29 16:42 ` [PATCH v3 2/4] dt-bindings: ti: dpll: add spread spectrum support Dario Binacchi
@ 2021-03-30 22:22   ` Rob Herring
  0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2021-03-30 22:22 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: Stephen Boyd, Grygorii Strashko, devicetree, Michael Turquette,
	Rob Herring, linux-kernel, linux-clk

On Mon, 29 Mar 2021 18:42:19 +0200, Dario Binacchi wrote:
> DT bindings for enabling and adjusting spread spectrum clocking have
> been added.
> 
> Signed-off-by: Dario Binacchi <dariobin@libero.it>
> 
> ---
> 
> Changes in v3:
> - Add '-hz' suffix to "ti,ssc-modfreq" binding.
> 
>  .../devicetree/bindings/clock/ti/dpll.txt     | 20 +++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support
  2021-03-30  2:24 ` [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support Stephen Boyd
@ 2021-03-31  5:51   ` Tony Lindgren
  2021-03-31 16:48     ` Dario Binacchi
  2021-04-01  1:47     ` Stephen Boyd
  0 siblings, 2 replies; 9+ messages in thread
From: Tony Lindgren @ 2021-03-31  5:51 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Dario Binacchi, linux-kernel, Grygorii Strashko,
	Benoît Cousson, Lee Jones, Michael Turquette, Rob Herring,
	Tero Kristo, devicetree, linux-clk, linux-omap

* Stephen Boyd <sboyd@kernel.org> [210330 02:25]:
> Quoting Dario Binacchi (2021-03-29 09:42:17)
> > 
> > As reported by the TI spruh73x RM, MPU and LCD modules support spread
> > spectrum clocking (SSC) on their output clocks. SSC is used to spread
> > the spectral peaking of the clock to reduce any electromagnetic
> > interference (EMI) that may be caused due to the clock’s fundamental
> > or any of its harmonics.
> > The series allows you to enable and adjust the spread spectrum clocking
> > for all am33xx PLLs for which it is supported.
> > 
> 
> What is your merge strategy? Should all the patches go through clk tree?
> Or you'll send via arm-soc?

Probably best to just merge all via the clk tree as that's where most of
the changes are.

Regards,

Tony

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

* Re: [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support
  2021-03-31  5:51   ` Tony Lindgren
@ 2021-03-31 16:48     ` Dario Binacchi
  2021-04-01  1:47     ` Stephen Boyd
  1 sibling, 0 replies; 9+ messages in thread
From: Dario Binacchi @ 2021-03-31 16:48 UTC (permalink / raw)
  To: Tony Lindgren, Stephen Boyd
  Cc: linux-kernel, Grygorii Strashko, Benoît Cousson, Lee Jones,
	Michael Turquette, Rob Herring, Tero Kristo, devicetree,
	linux-clk, linux-omap


> Il 31/03/2021 07:51 Tony Lindgren <tony@atomide.com> ha scritto:
> 
>  
> * Stephen Boyd <sboyd@kernel.org> [210330 02:25]:
> > Quoting Dario Binacchi (2021-03-29 09:42:17)
> > > 
> > > As reported by the TI spruh73x RM, MPU and LCD modules support spread
> > > spectrum clocking (SSC) on their output clocks. SSC is used to spread
> > > the spectral peaking of the clock to reduce any electromagnetic
> > > interference (EMI) that may be caused due to the clock’s fundamental
> > > or any of its harmonics.
> > > The series allows you to enable and adjust the spread spectrum clocking
> > > for all am33xx PLLs for which it is supported.
> > > 
> > 
> > What is your merge strategy? Should all the patches go through clk tree?
> > Or you'll send via arm-soc?
> 
> Probably best to just merge all via the clk tree as that's where most of
> the changes are.
> 

This means that I no longer have to send patches to TI / OMAP maintainers, commiters 
and fixers, as well as at linux-omap@vger.kernel.org ?
Even if the a1e980789b06 ("am335x-spread-spectrum) clk: ti: add am33xx spread spectrum clock support") 
patch is basically related to the AM33xx/AM43xx SOCs?

Thanks and regards,
Dario

> Regards,
> 
> Tony

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

* Re: [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support
  2021-03-31  5:51   ` Tony Lindgren
  2021-03-31 16:48     ` Dario Binacchi
@ 2021-04-01  1:47     ` Stephen Boyd
  2021-05-09 13:06       ` Dario Binacchi
  1 sibling, 1 reply; 9+ messages in thread
From: Stephen Boyd @ 2021-04-01  1:47 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Dario Binacchi, linux-kernel, Grygorii Strashko,
	Benoît Cousson, Lee Jones, Michael Turquette, Rob Herring,
	Tero Kristo, devicetree, linux-clk, linux-omap

Quoting Tony Lindgren (2021-03-30 22:51:04)
> * Stephen Boyd <sboyd@kernel.org> [210330 02:25]:
> > Quoting Dario Binacchi (2021-03-29 09:42:17)
> > > 
> > > As reported by the TI spruh73x RM, MPU and LCD modules support spread
> > > spectrum clocking (SSC) on their output clocks. SSC is used to spread
> > > the spectral peaking of the clock to reduce any electromagnetic
> > > interference (EMI) that may be caused due to the clock’s fundamental
> > > or any of its harmonics.
> > > The series allows you to enable and adjust the spread spectrum clocking
> > > for all am33xx PLLs for which it is supported.
> > > 
> > 
> > What is your merge strategy? Should all the patches go through clk tree?
> > Or you'll send via arm-soc?
> 
> Probably best to just merge all via the clk tree as that's where most of
> the changes are.
> 

Ok. If nobody reviews/acks the last patch in a few days I'll merge the
pile through clk tree.

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

* Re: [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support
  2021-04-01  1:47     ` Stephen Boyd
@ 2021-05-09 13:06       ` Dario Binacchi
  0 siblings, 0 replies; 9+ messages in thread
From: Dario Binacchi @ 2021-05-09 13:06 UTC (permalink / raw)
  To: Stephen Boyd, Tony Lindgren
  Cc: linux-kernel, Grygorii Strashko, Benoît Cousson, Lee Jones,
	Michael Turquette, Rob Herring, Tero Kristo, devicetree,
	linux-clk, linux-omap

Hi Stephen, Hi Tony

> Il 01/04/2021 03:47 Stephen Boyd <sboyd@kernel.org> ha scritto:
> 
>  
> Quoting Tony Lindgren (2021-03-30 22:51:04)
> > * Stephen Boyd <sboyd@kernel.org> [210330 02:25]:
> > > Quoting Dario Binacchi (2021-03-29 09:42:17)
> > > > 
> > > > As reported by the TI spruh73x RM, MPU and LCD modules support spread
> > > > spectrum clocking (SSC) on their output clocks. SSC is used to spread
> > > > the spectral peaking of the clock to reduce any electromagnetic
> > > > interference (EMI) that may be caused due to the clock’s fundamental
> > > > or any of its harmonics.
> > > > The series allows you to enable and adjust the spread spectrum clocking
> > > > for all am33xx PLLs for which it is supported.
> > > > 
> > > 
> > > What is your merge strategy? Should all the patches go through clk tree?
> > > Or you'll send via arm-soc?
> > 
> > Probably best to just merge all via the clk tree as that's where most of
> > the changes are.
> > 
> 
> Ok. If nobody reviews/acks the last patch in a few days I'll merge the
> pile through clk tree.

It's been over a month since I submitted the patches. Meanwhile Tero Kristo has 
reviewed the most important patch of the series. However, I have not seen any 
progress in the state of the series. Furthermore, I don't see the DTS patches 
in the clk tree. Am I missing something? Or do I have to do something? Sorry 
for the questions but I don't have much experience with patch merge strategies.

Thanks and regards,
Dario

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

end of thread, other threads:[~2021-05-09 13:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 16:42 [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support Dario Binacchi
2021-03-29 16:42 ` [PATCH v3 2/4] dt-bindings: ti: dpll: add spread spectrum support Dario Binacchi
2021-03-30 22:22   ` Rob Herring
2021-03-29 16:42 ` [PATCH v3 3/4] ARM: dts: am33xx-clocks: " Dario Binacchi
2021-03-30  2:24 ` [PATCH v3 0/4] clk: ti: add am33xx spread spectrum clock support Stephen Boyd
2021-03-31  5:51   ` Tony Lindgren
2021-03-31 16:48     ` Dario Binacchi
2021-04-01  1:47     ` Stephen Boyd
2021-05-09 13:06       ` Dario Binacchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).