ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes
PATCH 1/1 ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes
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.
--- arch/arm/boot/dts/da850-evm.dts | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/boot/dts/da850-evm.dts +2 -0
@@ -22,9 +22,11 @@ status = "okay"; }; serial1: serial at 1d0c000 { + clock-frequency = <132000000>; status = "okay"; }; serial2: serial at 1d0d000 { + clock-frequency = <132000000>; status = "okay"; }; rtc0: rtc at 1c23000 {
Signature · 1 line
1.7.4.1
PATCH 1/1 ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes
Prakash,
Quoted 5 lines · Prakash
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_SYSCLK2configured for 150MHz. But later in kernel UART2 gets mapped toPLL1_SYSCLK2and is configured for 132MHz not for 150MHz.
Quoted 8 lines
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 <[email protected]>
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
Quoted 21 lines
--- arch/arm/boot/dts/da850-evm.dts | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/boot/dts/da850-evm.dts +2
-0@@ -22,9 +22,11 @@ status = "okay"; }; serial1: serial at 1d0c000 { + clock-frequency = <132000000>; status = "okay"; }; serial2: serial at 1d0d000 { + clock-frequency = <132000000>; status = "okay"; }; rtc0: rtc at 1c23000 {
PATCH 1/1 ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes
Hi Sekhar,
Quoted 12 lines · Sekhar
Prakash,
Quoted 9 lines · Prakash
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_SYSCLK2configured for 150MHz. But later in kernel UART2 gets mapped toPLL1_SYSCLK2and 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.
Quoted 9 lines
Quoted 4 lines
So override UART1 and UART2 DT node clock-frequency property with rate available on da850 EVM.
Signed-off-by Manjunathappa, Prakash <[email protected]>How about dropping the clock-frequency attribute altogether?
of_serial.cseems 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
Quoted 25 lines
Thanks,
SekharQuoted 21 lines
--- arch/arm/boot/dts/da850-evm.dts | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/boot/dts/da850-evm.dts +2
-0@@ -22,9 +22,11 @@ status = "okay"; }; serial1: serial at 1d0c000 { + clock-frequency = <132000000>; status = "okay"; }; serial2: serial at 1d0d000 { + clock-frequency = <132000000>; status = "okay"; }; rtc0: rtc at 1c23000 {
PATCH 1/1 ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes
Quoted 18 lines · Prakash
Hi Sekhar,
Quoted 15 lines · Sekhar
Prakash,
Quoted 12 lines · Prakash
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_SYSCLK2configured for 150MHz. But later in kernel UART2 gets mapped toPLL1_SYSCLK2and 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.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Signed-off-by Manjunathappa, Prakash <[email protected]>How about dropping the clock-frequency attribute altogether?
of_serial.cseems 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.
Quoted 6 lines
dev_id. This is required because DT kernel does theclk_getwith onlydev_idand non-DT kernel only withcon_id. In DT kernelclk_getis 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.cPlease 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
PATCH 1/1 ARM: davinci: da850 evm: update clock rate for UART 1/2 DT nodes
Quoted 28 lines · Sekhar
Quoted 25 lines · Prakash
Hi Sekhar,
Quoted 21 lines · Sekhar
Prakash,
Quoted 5 lines · Prakash
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_SYSCLK2configured for 150MHz. But later in kernel UART2 gets mapped toPLL1_SYSCLK2and is configured for 132MHz not for 150MHz.Quoted 8 lines
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 <[email protected]>How about dropping the clock-frequency attribute altogether?
of_serial.cseems 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.
Quoted 5 lines
Quoted 1 line
Yes it can be dropped by having duplicate clock node for UART having only
You meant an additional
clk_lookupentry? That's different from a new 'struct clk' node.
Yes I meant adding to clk_lookup, not new 'struct clk'.
Quoted 11 lines
Quoted 6 lines
dev_id. This is required because DT kernel does theclk_getwith onlydev_idand non-DT kernel only withcon_id. In DT kernelclk_getis 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.cPlease let me know your opinion on this.
When only one clock is present,
con_idof NULL is more appropriate. How about fixingarch/arm/mach-davinci/serial.cand existingclk_lookupentries to use this?
Ok I will share patch which fixes this.
Thanks,
Prakash