How to set SPI Clock to 8 Mzh on Omap4460

17 views
Skip to first unread message

Bhupendra Pawar

unread,
May 2, 2014, 5:46:27 AM5/2/14
to panda...@googlegroups.com
Hi,

I am using Pandaboard ES Rev B2. Kernel 3.0 from Omapzoom.

MCSPI1 is being used to communicate with other chip which can support
max 8 Mzh clock as slave.

Omap is working as master and other chips is as slave. I am able to
communicate with my chip but I can set only some set of spi clock freq
on Pandaboard e.g.

7MHz Configured -- Real bitrate observed is 6MHz

8MHz Configured -- Real bitrate observed is 6MHz

10MHz Configured -- Real bitrate observed is 6MHz
4MHz Configured -- Real bitrate observed is 3MHz

When I browse the code I found that

Applicable spi freq on Pandaboard is calculated by as below:

#define OMAP2_MCSPI_MAX_FREQ 48000000

file : drivers/spi/omap2_mcspi.c
static u32 omap2_mcspi_calc_divisor(u32 speed_hz)
{
u32 div;

for (div = 0; div < 15; div++)
if (speed_hz >= (OMAP2_MCSPI_MAX_FREQ >> div))
return div;

return 15;
}

I need to set the spi clock freq to 8Mzh, how it is possible on Omap4460.

Why OMAP2_MCSPI_MAX_FREQ is set to 48MHz, is it possible to change
this to 32Mzh, in that case I can acheive 8MHz.

Please suggest some way to configure spi clock freq to 8Mzh. Thanks in advace.

Br,

Bhupendra
Reply all
Reply to author
Forward
0 new messages