SPI clock parameters are defined in arch/arm/mach-msm/clock-xxxx.c file.
The table for the parameters is like below.
static struct clk_freq_tbl clk_tbl_spi[] = {
F_MND8(10000000, 19, 12, SRC_PLL3, 4, 7, 129),
F_MND8(26000000, 19, 12, SRC_PLL3, 4, 34, 241),
F_END,
};
Clock frequency for SPI bus is determined by M:N:D counter and the information about this is described in clock chapter of software interface manual. The concerned registers are SPI_MD_REG and SPI_NS_REG.
The example vale for 1 Mhz SPI clock is below.
F_MND8(1000000, 19, 12, SRC_PLL3, 4, 1, 185),
No comments:
Post a Comment