5/11/2012

How to adding new clock frequency setting for MDDI and LCDC

To get the available MDDI and LCDC clock setting, you can solution# 00014854 for 8650, 7227 and 7225.

For 7630, you can check clock setting list in clkrgm_bsp_7630.c located at AMSS\products\7x30\core\systemdrivers\clkregim\src\common

 

 

By the way, sometime, there is not pre-defined clock setting you want to use. In that case, you can add your own clock frequency setting table as below.

 

There are two kinds of tables as below. One is table for clock which derived from simple division, the other is for clock which needs more complex calculation.

Based on your target frequency, you can select clock source and Multiplier and Divider and add new table.

 

Each calculation is like this.

 

* Complex table: target_freq (.freq_hz) = (source_freq (.hal_cfg.eSource) * Multiplier (.hal_cfg.nM)) / (DividerA (.hal_cfg.nDivider) * DividerB (.hal_cfg.nN) 

 

        [CLKRGM_PIXEL_SPEED_70_MHZ] =

        {

          .freq_hz             = 73728 * 1000,

          .hal_cfg.eSource     = HAL_CLK_SOURCE_PLL3,     /// 737.28 * 1000000

          .hal_cfg.nDivider    = 2,

          .hal_cfg.nM          = 1,

          .hal_cfg.nN          = 5,

          .hal_cfg.n2D         = 5    /// Use same value with .hal_cfg.nN

        },

 

        ex) 73728*1000 = (737.28 * 1000000 * 1) / (2 * 5)

 

* Simple table: target_freq (.freq_hz) = source_freq (.hal_cfg.eSource) / Divider (.hal_cfg.nDivider)

 

        [CLKRGM_PIXEL_SPEED_25_MHZ] =

        {

          .freq_hz             = 24576 * 1000,

          .hal_cfg.eSource     = HAL_CLK_SOURCE_LPXO,     /// 24576 * 1000

          .hal_cfg.nDivider    = 1

        },

 

        ex) 24576 * 1000 = 24576 * 1000 / 1

 

No comments:

Post a Comment