From: Tony Lindgren <tony@atomide.com> To: linux-kernel@vger.kernel.org Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Brian Hutchinson <b.hutchman@gmail.com>, Delio Brignoli <dbrignoli@audioscience.com>, Neil Armstrong <narmstrong@baylibre.com>, Matthijs van Duin <matthijsvanduin@gmail.com>, Philipp Rosenberger <ilu@linutronix.de> Subject: [PATCH 08/10] ARM: dts: Fix some mux and divider clocks to get dm814x-evm booting Date: Tue, 1 Dec 2015 15:38:21 -0800 [thread overview] Message-ID: <1449013103-23238-9-git-send-email-tony@atomide.com> (raw) In-Reply-To: <1449013103-23238-1-git-send-email-tony@atomide.com> Although we have hp t410 booting, I noticed that dm814x-evm does not boot after I got one. This is because we don't have the clocks yet configured properly. Let's start configuring proper clocks starting with the system timers and clocks that work with existing mux and divider clock drivers. Note that the oscillator speed register is different from am335x, dm814x has only one bit that shows the BTMODE[6] at CONTROL_STATUS[21]. Also note that this only gets the system timers working with the defined clocks. The PLL clocks are still missing and and the devices may or may not work depending on what the bootloader has enabled. Signed-off-by: Tony Lindgren <tony@atomide.com> --- arch/arm/boot/dts/dm814x-clocks.dtsi | 109 +++++++++++++++++++++++++---------- 1 file changed, 79 insertions(+), 30 deletions(-) diff --git a/arch/arm/boot/dts/dm814x-clocks.dtsi b/arch/arm/boot/dts/dm814x-clocks.dtsi index ef1e8e7..2600158 100644 --- a/arch/arm/boot/dts/dm814x-clocks.dtsi +++ b/arch/arm/boot/dts/dm814x-clocks.dtsi @@ -4,25 +4,74 @@ * published by the Free Software Foundation. */ +&pllss_clocks { + timer1_fck: timer1_fck { + #clock-cells = <0>; + compatible = "ti,mux-clock"; + clocks = <&sysclk18_ck &aud_clkin0_ck &aud_clkin1_ck + &aud_clkin2_ck &devosc_ck &auxosc_ck &tclkin_ck>; + ti,bit-shift = <3>; + reg = <0x2e0>; + }; + + timer2_fck: timer2_fck { + #clock-cells = <0>; + compatible = "ti,mux-clock"; + clocks = <&sysclk18_ck &aud_clkin0_ck &aud_clkin1_ck + &aud_clkin2_ck &devosc_ck &auxosc_ck &tclkin_ck>; + ti,bit-shift = <6>; + reg = <0x2e0>; + }; + + sysclk18_ck: sysclk18_ck { + #clock-cells = <0>; + compatible = "ti,mux-clock"; + clocks = <&rtcosc_ck>, <&rtcdivider_ck>; + ti,bit-shift = <0>; + reg = <0x02f0>; + }; +}; + &scm_clocks { + devosc_ck: devosc_ck { + #clock-cells = <0>; + compatible = "ti,mux-clock"; + clocks = <&virt_20000000_ck>, <&virt_19200000_ck>; + ti,bit-shift = <21>; + reg = <0x0040>; + }; - tclkin_ck: tclkin_ck { + /* Optional auxosc, 20 - 30 MHz range, assume 27 MHz by default */ + auxosc_ck: auxosc_ck { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <27000000>; + }; + + /* Optional 32768Hz crystal or clock on RTCOSC pins */ + rtcosc_ck: rtcosc_ck { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <32768>; }; - devosc_ck: devosc_ck { + /* Optional external clock on TCLKIN pin, set rate in baord dts file */ + tclkin_ck: tclkin_ck { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <0>; + }; + + virt_20000000_ck: virt_20000000_ck { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <20000000>; }; - /* Optional auxosc, 20 - 30 MHz range, assume 27 MHz by default */ - auxosc_ck: auxosc_ck { + virt_19200000_ck: virt_19200000_ck { #clock-cells = <0>; compatible = "fixed-clock"; - clock-frequency = <27000000>; + clock-frequency = <19200000>; }; mpu_ck: mpu_ck { @@ -49,12 +98,6 @@ clock-frequency = <48000000>; }; - sysclk18_ck: sysclk18_ck { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <32768>; - }; - cpsw_125mhz_gclk: cpsw_125mhz_gclk { #clock-cells = <0>; compatible = "fixed-clock"; @@ -69,7 +112,31 @@ }; -&pllss_clocks { +&prcm_clocks { + osc_src_ck: osc_src_ck { + #clock-cells = <0>; + compatible = "fixed-factor-clock"; + clocks = <&devosc_ck>; + clock-mult = <1>; + clock-div = <1>; + }; + + mpu_clksrc_ck: mpu_clksrc_ck { + #clock-cells = <0>; + compatible = "ti,mux-clock"; + clocks = <&devosc_ck>, <&rtcdivider_ck>; + ti,bit-shift = <0>; + reg = <0x0040>; + }; + + /* Fixed divider clock 0.0016384 * devosc */ + rtcdivider_ck: rtcdivider_ck { + #clock-cells = <0>; + compatible = "fixed-factor-clock"; + clocks = <&devosc_ck>; + clock-mult = <128>; + clock-div = <78125>; + }; aud_clkin0_ck: aud_clkin0_ck { #clock-cells = <0>; @@ -88,22 +155,4 @@ compatible = "fixed-clock"; clock-frequency = <20000000>; }; - - timer1_mux_ck: timer1_mux_ck { - #clock-cells = <0>; - compatible = "ti,mux-clock"; - clocks = <&sysclk18_ck &aud_clkin0_ck &aud_clkin1_ck - &aud_clkin2_ck &devosc_ck &auxosc_ck &tclkin_ck>; - ti,bit-shift = <3>; - reg = <0x2e0>; - }; - - timer2_mux_ck: timer2_mux_ck { - #clock-cells = <0>; - compatible = "ti,mux-clock"; - clocks = <&sysclk18_ck &aud_clkin0_ck &aud_clkin1_ck - &aud_clkin2_ck &devosc_ck &auxosc_ck &tclkin_ck>; - ti,bit-shift = <6>; - reg = <0x2e0>; - }; }; -- 2.6.2
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 08/10] ARM: dts: Fix some mux and divider clocks to get dm814x-evm booting Date: Tue, 1 Dec 2015 15:38:21 -0800 [thread overview] Message-ID: <1449013103-23238-9-git-send-email-tony@atomide.com> (raw) In-Reply-To: <1449013103-23238-1-git-send-email-tony@atomide.com> Although we have hp t410 booting, I noticed that dm814x-evm does not boot after I got one. This is because we don't have the clocks yet configured properly. Let's start configuring proper clocks starting with the system timers and clocks that work with existing mux and divider clock drivers. Note that the oscillator speed register is different from am335x, dm814x has only one bit that shows the BTMODE[6] at CONTROL_STATUS[21]. Also note that this only gets the system timers working with the defined clocks. The PLL clocks are still missing and and the devices may or may not work depending on what the bootloader has enabled. Signed-off-by: Tony Lindgren <tony@atomide.com> --- arch/arm/boot/dts/dm814x-clocks.dtsi | 109 +++++++++++++++++++++++++---------- 1 file changed, 79 insertions(+), 30 deletions(-) diff --git a/arch/arm/boot/dts/dm814x-clocks.dtsi b/arch/arm/boot/dts/dm814x-clocks.dtsi index ef1e8e7..2600158 100644 --- a/arch/arm/boot/dts/dm814x-clocks.dtsi +++ b/arch/arm/boot/dts/dm814x-clocks.dtsi @@ -4,25 +4,74 @@ * published by the Free Software Foundation. */ +&pllss_clocks { + timer1_fck: timer1_fck { + #clock-cells = <0>; + compatible = "ti,mux-clock"; + clocks = <&sysclk18_ck &aud_clkin0_ck &aud_clkin1_ck + &aud_clkin2_ck &devosc_ck &auxosc_ck &tclkin_ck>; + ti,bit-shift = <3>; + reg = <0x2e0>; + }; + + timer2_fck: timer2_fck { + #clock-cells = <0>; + compatible = "ti,mux-clock"; + clocks = <&sysclk18_ck &aud_clkin0_ck &aud_clkin1_ck + &aud_clkin2_ck &devosc_ck &auxosc_ck &tclkin_ck>; + ti,bit-shift = <6>; + reg = <0x2e0>; + }; + + sysclk18_ck: sysclk18_ck { + #clock-cells = <0>; + compatible = "ti,mux-clock"; + clocks = <&rtcosc_ck>, <&rtcdivider_ck>; + ti,bit-shift = <0>; + reg = <0x02f0>; + }; +}; + &scm_clocks { + devosc_ck: devosc_ck { + #clock-cells = <0>; + compatible = "ti,mux-clock"; + clocks = <&virt_20000000_ck>, <&virt_19200000_ck>; + ti,bit-shift = <21>; + reg = <0x0040>; + }; - tclkin_ck: tclkin_ck { + /* Optional auxosc, 20 - 30 MHz range, assume 27 MHz by default */ + auxosc_ck: auxosc_ck { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <27000000>; + }; + + /* Optional 32768Hz crystal or clock on RTCOSC pins */ + rtcosc_ck: rtcosc_ck { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <32768>; }; - devosc_ck: devosc_ck { + /* Optional external clock on TCLKIN pin, set rate in baord dts file */ + tclkin_ck: tclkin_ck { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <0>; + }; + + virt_20000000_ck: virt_20000000_ck { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <20000000>; }; - /* Optional auxosc, 20 - 30 MHz range, assume 27 MHz by default */ - auxosc_ck: auxosc_ck { + virt_19200000_ck: virt_19200000_ck { #clock-cells = <0>; compatible = "fixed-clock"; - clock-frequency = <27000000>; + clock-frequency = <19200000>; }; mpu_ck: mpu_ck { @@ -49,12 +98,6 @@ clock-frequency = <48000000>; }; - sysclk18_ck: sysclk18_ck { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <32768>; - }; - cpsw_125mhz_gclk: cpsw_125mhz_gclk { #clock-cells = <0>; compatible = "fixed-clock"; @@ -69,7 +112,31 @@ }; -&pllss_clocks { +&prcm_clocks { + osc_src_ck: osc_src_ck { + #clock-cells = <0>; + compatible = "fixed-factor-clock"; + clocks = <&devosc_ck>; + clock-mult = <1>; + clock-div = <1>; + }; + + mpu_clksrc_ck: mpu_clksrc_ck { + #clock-cells = <0>; + compatible = "ti,mux-clock"; + clocks = <&devosc_ck>, <&rtcdivider_ck>; + ti,bit-shift = <0>; + reg = <0x0040>; + }; + + /* Fixed divider clock 0.0016384 * devosc */ + rtcdivider_ck: rtcdivider_ck { + #clock-cells = <0>; + compatible = "fixed-factor-clock"; + clocks = <&devosc_ck>; + clock-mult = <128>; + clock-div = <78125>; + }; aud_clkin0_ck: aud_clkin0_ck { #clock-cells = <0>; @@ -88,22 +155,4 @@ compatible = "fixed-clock"; clock-frequency = <20000000>; }; - - timer1_mux_ck: timer1_mux_ck { - #clock-cells = <0>; - compatible = "ti,mux-clock"; - clocks = <&sysclk18_ck &aud_clkin0_ck &aud_clkin1_ck - &aud_clkin2_ck &devosc_ck &auxosc_ck &tclkin_ck>; - ti,bit-shift = <3>; - reg = <0x2e0>; - }; - - timer2_mux_ck: timer2_mux_ck { - #clock-cells = <0>; - compatible = "ti,mux-clock"; - clocks = <&sysclk18_ck &aud_clkin0_ck &aud_clkin1_ck - &aud_clkin2_ck &devosc_ck &auxosc_ck &tclkin_ck>; - ti,bit-shift = <6>; - reg = <0x2e0>; - }; }; -- 2.6.2
next prev parent reply other threads:[~2015-12-01 23:40 UTC|newest] Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-12-01 23:38 [PATCH 00/10] Patches to get dm814x-evm booting to NFSroot Tony Lindgren 2015-12-01 23:38 ` Tony Lindgren 2015-12-01 23:38 ` [PATCH 01/10] ARM: OMAP2+: Fix timer entries for dm814x Tony Lindgren 2015-12-01 23:38 ` Tony Lindgren 2015-12-01 23:38 ` [PATCH 02/10] clk: ti: Add few dm814x clock aliases Tony Lindgren 2015-12-01 23:38 ` Tony Lindgren 2015-12-08 16:57 ` Tony Lindgren 2015-12-08 16:57 ` Tony Lindgren 2015-12-08 19:26 ` Tero Kristo 2015-12-08 19:26 ` Tero Kristo 2015-12-08 19:26 ` Tero Kristo 2015-12-08 20:11 ` Tony Lindgren 2015-12-08 20:11 ` Tony Lindgren 2015-12-09 7:51 ` Tero Kristo 2015-12-09 7:51 ` Tero Kristo 2015-12-09 7:51 ` Tero Kristo 2015-12-10 0:56 ` Tony Lindgren 2015-12-10 0:56 ` Tony Lindgren 2015-12-01 23:38 ` [PATCH 03/10] ARM: OMAP2+: Add DPPLS clock manager for dm814x Tony Lindgren 2015-12-01 23:38 ` Tony Lindgren 2015-12-01 23:38 ` [PATCH 04/10] ARM: OMAP2+: Enable GPIO " Tony Lindgren 2015-12-01 23:38 ` Tony Lindgren 2015-12-01 23:38 ` [PATCH 05/10] ARM: OMAP2+: Disable GPIO softreset for dm81xx Tony Lindgren 2015-12-01 23:38 ` Tony Lindgren 2015-12-01 23:38 ` Tony Lindgren 2015-12-02 0:10 ` Matthijs van Duin 2015-12-02 0:10 ` Matthijs van Duin 2015-12-02 0:10 ` Matthijs van Duin 2015-12-02 0:41 ` Tony Lindgren 2015-12-02 0:41 ` Tony Lindgren 2015-12-02 0:41 ` Tony Lindgren 2015-12-02 0:54 ` Tony Lindgren 2015-12-02 0:54 ` Tony Lindgren 2015-12-02 0:54 ` Tony Lindgren 2015-12-02 1:38 ` Tony Lindgren 2015-12-02 1:38 ` Tony Lindgren 2015-12-02 1:38 ` Tony Lindgren 2015-12-01 23:38 ` [PATCH 06/10] ARM: OMAP2+: Remove useless check for legacy booting for dm814x Tony Lindgren 2015-12-01 23:38 ` Tony Lindgren 2015-12-01 23:38 ` [PATCH 07/10] ARM: dts: Fix dm814x entries for pllss and prcm Tony Lindgren 2015-12-01 23:38 ` Tony Lindgren 2015-12-01 23:38 ` Tony Lindgren [this message] 2015-12-01 23:38 ` [PATCH 08/10] ARM: dts: Fix some mux and divider clocks to get dm814x-evm booting Tony Lindgren 2015-12-01 23:38 ` [PATCH 09/10] ARM: dts: Fix dm8148 control modules ranges Tony Lindgren 2015-12-01 23:38 ` Tony Lindgren 2015-12-01 23:38 ` [PATCH 10/10] ARM: dts: Fix dm814x pinctrl address and mask Tony Lindgren 2015-12-01 23:38 ` Tony Lindgren 2015-12-02 0:25 ` Matthijs van Duin 2015-12-02 0:25 ` Matthijs van Duin 2015-12-02 0:25 ` Matthijs van Duin 2015-12-02 0:46 ` Tony Lindgren 2015-12-02 0:46 ` Tony Lindgren 2015-12-02 0:46 ` Tony Lindgren 2015-12-02 1:14 ` Matthijs van Duin 2015-12-02 1:14 ` Matthijs van Duin 2015-12-02 1:14 ` Matthijs van Duin 2015-12-02 1:22 ` Tony Lindgren 2015-12-02 1:22 ` Tony Lindgren 2015-12-02 1:22 ` Tony Lindgren 2015-12-02 16:09 ` Tony Lindgren 2015-12-02 16:09 ` Tony Lindgren 2015-12-02 16:09 ` Tony Lindgren 2015-12-02 1:21 ` Matthijs van Duin 2015-12-02 1:21 ` Matthijs van Duin 2015-12-02 1:21 ` Matthijs van Duin 2015-12-02 16:13 ` Tony Lindgren 2015-12-02 16:13 ` Tony Lindgren 2015-12-02 16:13 ` Tony Lindgren 2015-12-03 18:17 ` [PATCH 00/10] Patches to get dm814x-evm booting to NFSroot Grygorii Strashko 2015-12-03 18:17 ` Grygorii Strashko 2015-12-03 18:17 ` Grygorii Strashko 2015-12-03 19:21 ` Tony Lindgren 2015-12-03 19:21 ` Tony Lindgren
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=1449013103-23238-9-git-send-email-tony@atomide.com \ --to=tony@atomide.com \ --cc=b.hutchman@gmail.com \ --cc=dbrignoli@audioscience.com \ --cc=ilu@linutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=matthijsvanduin@gmail.com \ --cc=narmstrong@baylibre.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.