* [PATCH] ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes @ 2013-02-19 8:32 Manjunathappa, Prakash [not found] ` <1361262734-8540-1-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Manjunathappa, Prakash @ 2013-02-19 8:32 UTC (permalink / raw) To: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/ Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, grant.likely-s3s/WqlpOiPyB63q8FvJNQ, hs-ynQEQJNshbs, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r DT kernel with latest of denx SPL U-boot boots with garbled UART logs. This is because in U-boot UART2 gets sourced by PLL0_SYSCLK2 configured for 150MHz. But later in kernel UART2 gets mapped to PLL1_SYSCLK2 and is configured for 132MHz not for 150MHz. PLL1 is configured for 264MHz to support mDDR on the EVM. That is memory controller driving mDDR can be configured for 150MHz and mDDR it self can operate at 132MHz. So override UART1 and UART2 DT node clock-frequency property with rate available on da850 EVM. Signed-off-by: Manjunathappa, Prakash <prakash.pm-l0cyMroinI0@public.gmane.org> --- arch/arm/boot/dts/da850-evm.dts | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts index f712fb6..c359872 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -22,9 +22,11 @@ status = "okay"; }; serial1: serial@1d0c000 { + clock-frequency = <132000000>; status = "okay"; }; serial2: serial@1d0d000 { + clock-frequency = <132000000>; status = "okay"; }; rtc0: rtc@1c23000 { -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <1361262734-8540-1-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH] ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes [not found] ` <1361262734-8540-1-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org> @ 2013-02-28 10:39 ` Sekhar Nori [not found] ` <512F33F3.9070203-l0cyMroinI0@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Sekhar Nori @ 2013-02-28 10:39 UTC (permalink / raw) To: Manjunathappa, Prakash Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/, linux-lFZ/pmaqli7XmaaqVzeoHQ, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, grant.likely-s3s/WqlpOiPyB63q8FvJNQ, hs-ynQEQJNshbs, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Prakash, On 2/19/2013 2:02 PM, Manjunathappa, Prakash wrote: > DT kernel with latest of denx SPL U-boot boots with garbled UART > logs. This is because in U-boot UART2 gets sourced by PLL0_SYSCLK2 > configured for 150MHz. But later in kernel UART2 gets mapped to > PLL1_SYSCLK2 and is configured for 132MHz not for 150MHz. > > PLL1 is configured for 264MHz to support mDDR on the EVM. That is > memory controller driving mDDR can be configured for 150MHz and > mDDR it self can operate at 132MHz. > > So override UART1 and UART2 DT node clock-frequency property with > rate available on da850 EVM. > > Signed-off-by: Manjunathappa, Prakash <prakash.pm-l0cyMroinI0@public.gmane.org> How about dropping the clock-frequency attribute altogether? of_serial.c seems to be falling back on clk apis if frequency is not passed and that should make the kernel work with all versions of U-Boot. Thanks, Sekhar > --- > arch/arm/boot/dts/da850-evm.dts | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts > index f712fb6..c359872 100644 > --- a/arch/arm/boot/dts/da850-evm.dts > +++ b/arch/arm/boot/dts/da850-evm.dts > @@ -22,9 +22,11 @@ > status = "okay"; > }; > serial1: serial@1d0c000 { > + clock-frequency = <132000000>; > status = "okay"; > }; > serial2: serial@1d0d000 { > + clock-frequency = <132000000>; > status = "okay"; > }; > rtc0: rtc@1c23000 { > ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <512F33F3.9070203-l0cyMroinI0@public.gmane.org>]
* RE: [PATCH] ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes [not found] ` <512F33F3.9070203-l0cyMroinI0@public.gmane.org> @ 2013-03-15 13:26 ` Manjunathappa, Prakash [not found] ` <A73F36158E33644199EB82C5EC81C7BC3EA49090-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Manjunathappa, Prakash @ 2013-03-15 13:26 UTC (permalink / raw) To: Nori, Sekhar Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org, linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org, hs-ynQEQJNshbs@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Hi Sekhar, On Thu, Feb 28, 2013 at 16:09:47, Nori, Sekhar wrote: > Prakash, > > On 2/19/2013 2:02 PM, Manjunathappa, Prakash wrote: > > DT kernel with latest of denx SPL U-boot boots with garbled UART > > logs. This is because in U-boot UART2 gets sourced by PLL0_SYSCLK2 > > configured for 150MHz. But later in kernel UART2 gets mapped to > > PLL1_SYSCLK2 and is configured for 132MHz not for 150MHz. > > > > PLL1 is configured for 264MHz to support mDDR on the EVM. That is > > memory controller driving mDDR can be configured for 150MHz and > > mDDR it self can operate at 132MHz. > > > > So override UART1 and UART2 DT node clock-frequency property with > > rate available on da850 EVM. > > > > Signed-off-by: Manjunathappa, Prakash <prakash.pm-l0cyMroinI0@public.gmane.org> > > How about dropping the clock-frequency attribute altogether? of_serial.c > seems to be falling back on clk apis if frequency is not passed and that > should make the kernel work with all versions of U-Boot. > Yes it can be dropped by having duplicate clock node for UART having only dev_id. This is required because DT kernel does the clk_get with only dev_id and non-DT kernel only with con_id. In DT kernel clk_get is done from generic code of_platform_serial_setup:of_serial.c and in non-DT kernel is done from platform code, davinci_serial_setup_clk:arch/arm/mach-davinci/serial.c Please let me know your opinion on this. Thanks, Prakash > Thanks, > Sekhar > > > --- > > arch/arm/boot/dts/da850-evm.dts | 2 ++ > > 1 files changed, 2 insertions(+), 0 deletions(-) > > > > diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts > > index f712fb6..c359872 100644 > > --- a/arch/arm/boot/dts/da850-evm.dts > > +++ b/arch/arm/boot/dts/da850-evm.dts > > @@ -22,9 +22,11 @@ > > status = "okay"; > > }; > > serial1: serial@1d0c000 { > > + clock-frequency = <132000000>; > > status = "okay"; > > }; > > serial2: serial@1d0d000 { > > + clock-frequency = <132000000>; > > status = "okay"; > > }; > > rtc0: rtc@1c23000 { > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <A73F36158E33644199EB82C5EC81C7BC3EA49090-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>]
* Re: [PATCH] ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes [not found] ` <A73F36158E33644199EB82C5EC81C7BC3EA49090-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org> @ 2013-03-15 14:37 ` Sekhar Nori 2013-04-09 5:31 ` Manjunathappa, Prakash 0 siblings, 1 reply; 5+ messages in thread From: Sekhar Nori @ 2013-03-15 14:37 UTC (permalink / raw) To: Manjunathappa, Prakash Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org, linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org, grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org, hs-ynQEQJNshbs@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org On 3/15/2013 6:56 PM, Manjunathappa, Prakash wrote: > Hi Sekhar, > > On Thu, Feb 28, 2013 at 16:09:47, Nori, Sekhar wrote: >> Prakash, >> >> On 2/19/2013 2:02 PM, Manjunathappa, Prakash wrote: >>> DT kernel with latest of denx SPL U-boot boots with garbled UART >>> logs. This is because in U-boot UART2 gets sourced by PLL0_SYSCLK2 >>> configured for 150MHz. But later in kernel UART2 gets mapped to >>> PLL1_SYSCLK2 and is configured for 132MHz not for 150MHz. >>> >>> PLL1 is configured for 264MHz to support mDDR on the EVM. That is >>> memory controller driving mDDR can be configured for 150MHz and >>> mDDR it self can operate at 132MHz. >>> >>> So override UART1 and UART2 DT node clock-frequency property with >>> rate available on da850 EVM. >>> >>> Signed-off-by: Manjunathappa, Prakash <prakash.pm-l0cyMroinI0@public.gmane.org> >> >> How about dropping the clock-frequency attribute altogether? of_serial.c >> seems to be falling back on clk apis if frequency is not passed and that >> should make the kernel work with all versions of U-Boot. >> > > Yes it can be dropped by having duplicate clock node for UART having only You meant an additional clk_lookup entry? That's different from a new 'struct clk' node. > dev_id. This is required because DT kernel does the clk_get with only dev_id > and non-DT kernel only with con_id. In DT kernel clk_get is done from generic > code of_platform_serial_setup:of_serial.c and in non-DT kernel is done from > platform code, davinci_serial_setup_clk:arch/arm/mach-davinci/serial.c > > Please let me know your opinion on this. When only one clock is present, con_id of NULL is more appropriate. How about fixing arch/arm/mach-davinci/serial.c and existing clk_lookup entries to use this? Thanks, Sekhar ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes 2013-03-15 14:37 ` Sekhar Nori @ 2013-04-09 5:31 ` Manjunathappa, Prakash 0 siblings, 0 replies; 5+ messages in thread From: Manjunathappa, Prakash @ 2013-04-09 5:31 UTC (permalink / raw) To: Nori, Sekhar Cc: davinci-linux-open-source@linux.davincidsp.com, linux@arm.linux.org.uk, devicetree-discuss@lists.ozlabs.org, rob.herring@calxeda.com, grant.likely@secretlab.ca, hs@denx.de, linux-arm-kernel@lists.infradead.org On Fri, Mar 15, 2013 at 20:07:39, Nori, Sekhar wrote: > > > On 3/15/2013 6:56 PM, Manjunathappa, Prakash wrote: > > Hi Sekhar, > > > > On Thu, Feb 28, 2013 at 16:09:47, Nori, Sekhar wrote: > >> Prakash, > >> > >> On 2/19/2013 2:02 PM, Manjunathappa, Prakash wrote: > >>> DT kernel with latest of denx SPL U-boot boots with garbled UART > >>> logs. This is because in U-boot UART2 gets sourced by PLL0_SYSCLK2 > >>> configured for 150MHz. But later in kernel UART2 gets mapped to > >>> PLL1_SYSCLK2 and is configured for 132MHz not for 150MHz. > >>> > >>> PLL1 is configured for 264MHz to support mDDR on the EVM. That is > >>> memory controller driving mDDR can be configured for 150MHz and > >>> mDDR it self can operate at 132MHz. > >>> > >>> So override UART1 and UART2 DT node clock-frequency property with > >>> rate available on da850 EVM. > >>> > >>> Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com> > >> > >> How about dropping the clock-frequency attribute altogether? of_serial.c > >> seems to be falling back on clk apis if frequency is not passed and that > >> should make the kernel work with all versions of U-Boot. > >> > > > > Yes it can be dropped by having duplicate clock node for UART having only > > You meant an additional clk_lookup entry? That's different from a new > 'struct clk' node. > Yes I meant adding to clk_lookup, not new 'struct clk'. > > dev_id. This is required because DT kernel does the clk_get with only dev_id > > and non-DT kernel only with con_id. In DT kernel clk_get is done from generic > > code of_platform_serial_setup:of_serial.c and in non-DT kernel is done from > > platform code, davinci_serial_setup_clk:arch/arm/mach-davinci/serial.c > > > > Please let me know your opinion on this. > > When only one clock is present, con_id of NULL is more appropriate. How > about fixing arch/arm/mach-davinci/serial.c and existing clk_lookup > entries to use this? > Ok I will share patch which fixes this. Thanks, Prakash ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-09 5:31 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-02-19 8:32 [PATCH] ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes Manjunathappa, Prakash [not found] ` <1361262734-8540-1-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org> 2013-02-28 10:39 ` Sekhar Nori [not found] ` <512F33F3.9070203-l0cyMroinI0@public.gmane.org> 2013-03-15 13:26 ` Manjunathappa, Prakash [not found] ` <A73F36158E33644199EB82C5EC81C7BC3EA49090-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org> 2013-03-15 14:37 ` Sekhar Nori 2013-04-09 5:31 ` Manjunathappa, Prakash
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).