linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: t-kristo@ti.com (Tero Kristo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: DRA7x: dts: Fix the 32kHz clock calculation
Date: Wed, 27 Apr 2016 14:40:14 +0300	[thread overview]
Message-ID: <5720A51E.2000900@ti.com> (raw)
In-Reply-To: <1461693269-19436-3-git-send-email-Linux.HWI@garmin.com>

On 26/04/16 20:54, J.D. Schroeder wrote:
> From: "J.D. Schroeder" <jay.schroeder@garmin.com>
>
> This commit fixes the 32kHz clock (sys_32k_ck) calculation to be
> correctly based on the SYS_CLK1 (sys_clkin1) frequency. Based on the
> TRM CTRL_CORE_BOOTSTRAP[9:8] SPEEDSELECT, set by the SYSBOOT[9:8]
> board jumpers according to the SYS_CLK1 frequency, the frequency of
> the 32kHz FUNC_32K_CLK is set to SYS_CLK1/610. The following
> sys_32k_ck frequencies get used for different SYS_CLK1 frequencies:
>          0b00: Unknown  -> 32768 Hz crystal from CLKIN_32K pin
>          0b01: 20   MHz -> 32787 Hz clock (SYS_CLK1/610)
>          0b10: 27   MHz -> 44262 Hz clock (SYS_CLK1/610)
>          0b11: 19.2 MHz -> 31475 Hz clock (SYS_CLK1/610)
>
> Signed-off-by: J.D. Schroeder <jay.schroeder@garmin.com>
> Reviewed-by: Ben McCauley <ben.mccauley@garmin.com>

A patch doing the same thing is already in mainline, see:

commit eea08802f586acd6aef377d1b4a541821013cc0b
Author: Keerthy <j-keerthy@ti.com>
Date:   Mon Apr 4 11:07:15 2016 +0530

     ARM: dts: dra7: Correct clock tree for sys_32k_ck

So, this one can be ignored.

-Tero

> ---
>   arch/arm/boot/dts/dra7xx-clocks.dtsi | 28 ++++++++++++++++++++++------
>   1 file changed, 22 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/boot/dts/dra7xx-clocks.dtsi b/arch/arm/boot/dts/dra7xx-clocks.dtsi
> index 9d1a583..a514fc3 100644
> --- a/arch/arm/boot/dts/dra7xx-clocks.dtsi
> +++ b/arch/arm/boot/dts/dra7xx-clocks.dtsi
> @@ -98,12 +98,6 @@
>   		clock-frequency = <32768>;
>   	};
>
> -	sys_32k_ck: sys_32k_ck {
> -		#clock-cells = <0>;
> -		compatible = "fixed-clock";
> -		clock-frequency = <32768>;
> -	};
> -
>   	virt_12000000_ck: virt_12000000_ck {
>   		#clock-cells = <0>;
>   		compatible = "fixed-clock";
> @@ -2177,4 +2171,26 @@
>   		ti,bit-shift = <22>;
>   		reg = <0x0558>;
>   	};
> +
> +	sys_32kin: sys_32kin {
> +		#clock-cells = <0>;
> +		compatible = "fixed-clock";
> +		clock-frequency = <32768>;
> +	};
> +
> +	sys_clkin1_32k_div: sys_clkin1_32k_div {
> +		#clock-cells = <0>;
> +		compatible = "fixed-factor-clock";
> +		clocks = <&sys_clkin1>;
> +		clock-mult = <1>;
> +		clock-div = <610>;
> +	};
> +
> +	sys_32k_ck: sys_32k_ck {
> +		#clock-cells = <0>;
> +		compatible = "ti,mux-clock";
> +		clocks = <&sys_32kin>, <&sys_clkin1_32k_div>, <&sys_clkin1_32k_div>, <&sys_clkin1_32k_div>;
> +		ti,bit-shift = <8>;
> +		reg = <0x06c4>;
> +	};
>   };
>

  reply	other threads:[~2016-04-27 11:40 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 17:54 [PATCH 0/3] AM57/DRA7 Clock Tree DTSI Fix-ups J.D. Schroeder
2016-04-26 17:54 ` [PATCH 1/3] DRA7: Fix clock data for gmac_gmii_ref_clk_div J.D. Schroeder
2016-04-27 11:21   ` Tero Kristo
2016-04-27 16:36     ` Tony Lindgren
2016-04-27 17:16       ` Tony Lindgren
2016-05-02 17:12         ` [PATCH v2 0/3] AM57/DRA7 Clock Tree DTSI Fix-ups J.D. Schroeder
2016-05-02 17:12           ` [PATCH v2 1/3] DRA7: Fix clock data for gmac_gmii_ref_clk_div J.D. Schroeder
2016-05-02 17:12           ` [PATCH v2 2/3] ARM: DRA7x: dts: Update the OSC_32K_CLK frequency J.D. Schroeder
2016-05-03  8:16             ` Tero Kristo
2016-05-03 13:31               ` J.D. Schroeder
2016-05-03 16:43                 ` Tony Lindgren
2016-05-03 17:32                   ` Tero Kristo
2016-05-03 17:49                     ` J.D. Schroeder
2016-05-03 18:08                       ` Tony Lindgren
2016-05-03 18:08                       ` Tero Kristo
2016-05-03 23:17                         ` Nishanth Menon
2016-05-04 14:09                     ` Matthijs van Duin
2016-05-02 17:12           ` [PATCH v2 3/3] ARM: dts: dra7: fix clock node definition to avoid build warning J.D. Schroeder
2016-05-03  4:20           ` [PATCH v2 0/3] AM57/DRA7 Clock Tree DTSI Fix-ups Lokesh Vutla
2016-04-26 17:54 ` [PATCH 2/3] ARM: DRA7x: dts: Fix the 32kHz clock calculation J.D. Schroeder
2016-04-27 11:40   ` Tero Kristo [this message]
2016-04-27 14:06     ` J.D. Schroeder
2016-04-27 19:47       ` Tero Kristo
2016-04-27 20:13         ` J.D. Schroeder
2016-04-26 17:54 ` [PATCH 3/3] ARM: DRA7x: dts: Update the OSC_32K_CLK frequency J.D. Schroeder
2016-04-27 11:49   ` Tero Kristo
2016-04-27 14:20     ` J.D. Schroeder
2016-04-26 18:13 ` [PATCH 0/3] AM57/DRA7 Clock Tree DTSI Fix-ups Tony Lindgren
2016-04-26 19:18   ` J.D. Schroeder

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=5720A51E.2000900@ti.com \
    --to=t-kristo@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).