This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Need to intergrate to reduce EMI fix in am335x ti sdk 8 BSP's

Dear Ti E2E Community,

Am trying to integrate the am335x_spread_spectrum.c file in ti sdk 8, in one of the links it says that invoke this function in board file,

I found with great diffculty the board file linux-3.14.26-g2489c02\arch\arm\mach-omap2\board-generic.c in ti sdk 8, I hope the function make_spread_spectrum() needs to called after setting up DPLLS, but am not sure where exactly the setting up of DPLLS is done  in kernel source , Could you please let me know if my understanding of calling this make_spread_spectrum after setting DPLLS

Could you please let me know where exactly this function needs to be called

 

Kindly do the needful as early as possible, as am stuck in this from two days

Many Thanks in advance

  • Hi,

    I will forward this to the SW team.

  • Many Thanks a lot Biser,

    Dear SW Team,

    Please kindly do the needful in addressing the above query as early as possible


    Many Many Thanks in advance
  • Dear SW Team,

    Could you please provide any updates w.r.t the above query, as I have my release tomorrow

    Kindly do the needful as early as possible

    Many Thanks in advance

  • I would like to provide some information on Spread Spectrum Clocking (SSC).

    Additional timing margins are required when enabling Spread Spectrum Clocking (SSC). This prevents SSC from being enabled on any of the PLLs that source clocks to peripheral interfaces. We have determined SSC can be enabled on the MPU and Display PLL's since they only source clocks to dedicated circuits and interfaces that do not require low jitter clocks. The other PLLs will effect peripheral timing, so SSC should not be enabled on any PLLs other than MPU and Display.

    You will need to configure the PLL to operate at a lower center frequency than maximum frequencies defined in the data sheet when SSC is enabled on the MPU and Display PLLs since SSC will spread the clock either side of the center frequency and the upper limit of the spread must not exceed the respective maximum frequency defined in the data sheet.

    EMI is a system level design consideration and one of the things that can aggravate EMI is a non-optimized system design. If EMI is an issue, it may need to be resolved with proper PCB layout, PCB to PCB connector selection/signal-pin assignments, off-board connector selection and cable design. For example, signals propagating through connectors need to have a ground reference that does not create a large loop area for current to flow through such that it radiates like an antenna.

    I cannot answer any questions related to implementing SSC in the various operating systems since I’m not a software support person. I just wanted to warn you that implementing SSC has some limitations and may not be easy to integrate with some of the complex power saving features currently implemented in the various operating systems.

    Regards,
    Paul
  • Thanks a lot Paul for your information

    Dear SW Team,

    Could you please provide the implementation of SSC in ti sdk 8, only with SSC enabled for MPU..

    Kindly do the needful as early as possible

    Many Thanks in advance
  • Dear Paul,

    Could you please provide few more guidance as am linux BSP's guy w.r.t the following


    You will need to configure the PLL to operate at a lower center frequency than maximum frequencies defined in the data sheet when SSC is enabled on the MPU and Display PLLs since SSC will spread the clock either side of the center frequency and the upper limit of the spread must not exceed the respective maximum frequency defined in the data sheet.

    How PLL can be configured to operate at a lower frequency??? is there any specific registers needs to be configured name them & please let me know the value of those registers??

    What is meant by lower center frequency??? what is the lower center freq value that needs to be programmed in this PLL register

    What is meant by maximum frequency in this context where can I find, since am using AM3352BZCZ30 is the max frequency means 300Mhz??

    Could you please kindly do the needful in providing those information

    Many Thanks in advance
  • Hi Srini,

    In kernel 3.14 in SDK8.0 board files are not used. Clock & DPLL definitions are don in arch/arm/boot/dts/am33xx-clocks.dtsi
    The clock management (cm) source files from arch/arm/mach-omap2/ & IP drivers use the definitions from the dtsi to perform the prcm clock settings in linux kernel.
    So you should be looking at the
    arch/arm/mach-omap2/cm33xx.c
    arch/arm/mach-omap2/omap_hwmod.c
    The clock & dpll drivers are locate din drivers/clk/ti/

    AFAIK, there is no ssc implementation that you can use as a reference.

    Best Regards,
    Yordan
  • I am using spread spectrum with a jitter width of 2%. Most of the peripheral blocks are able to function with this amount. Exception is USB (which I don't use) and Ethernet (which is clocked by the PHY). IMHO, you can ignore the fact that the maximum frequency limit is exceeded, because it's only a small amount.

    Without a board file, the best solution is to write a driver module. Every linux kernel programmer can do that.

  • Please note, the configuration suggested by Wolfgang may work under some conditions but is not a use case supported by TI.

    TI does not recommend SSC on the Peripheral PLL and the maximum operating frequency of clocks shall never exceed the limits published in the data sheet.

    Regards,
    Paul

  • Dear Wolfgang/Yordan,

    Many Thanks a lot for your inputs & guidance & would really appreciate the same

    1. Just to give more information on the code changes done. We had tried the changes at two places one at a time.

    a.      arch\arm\mach-omap2\clockdomains33xx_data.c  
     
    void __init am33xx_clockdomains_init(void)
    {
    clkdm_register_platform_funcs(&am33xx_clkdm_operations);
    clkdm_register_clkdms(clockdomains_am33xx);
    clkdm_complete_init();
    make_spread_spectrum();
    }
     
    b.      arch\arm\mach-omap2\prm_common.c  
     
    int __init of_prcm_module_init(struct of_device_id *match_table)
    {
    struct device_node *np;
    void __iomem *mem;
     
    ti_clk_ll_ops = &omap_clk_ll_ops;
     
    for_each_matching_node(np, match_table) {
    mem = of_iomap(np, 0);
    clk_memmaps[prcm_memmap_index] = mem;
    ti_dt_clk_init_provider(np, prcm_memmap_index);
    prcm_memmap_index++;
    }
     
    make_spread_spectrum();
     
    return 0;
    }
     
    For both the code modifications, Linux kernel boot-up was hanging(kernel was not coming up).
     
    Could you please let me know the exact location to call “make_spread_spectrum()” needs to be invoked?
     

    2. @Wolfgang/Yordan, Could you please let me know Have you tired in sdk8??, 

    Could you please attach the source code for loading the driver as dynamic module & its test application in this thread, where I can cross_compile & install the ko directly & verify the same

    Because I tried cross_compiling as dynamic module, as shown the attachment below, 

    srinivasan@tata-HP-Elite-7100-Microtower-PC:~/SSC$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
    make -C /home/srinivasan/Platform/board-support/linux-3.14.26-g2489c02 SUBDIRS=/home/srinivasan/SSC modules
    make[1]: Entering directory `/home/srinivasan/Platform/board-support/linux-3.14.26-g2489c02'
    CC [M] /home/srinivasan/SSC/AM335x_Spread_Spectrum.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /home/srinivasan/SSC/AM335x_Spread_Spectrum.mod.o
    LD [M] /home/srinivasan/SSC/AM335x_Spread_Spectrum.ko

    But When I tired to install am facing the below error 

    root@lifeline:~# insmod AM335x_Spread_Spectrum.ko
    [ 6516.137216] AM335x_Spread_Spectrum: disagrees about version of symbol module_layout
    insmod: ERROR: could not insert module AM335x_Spread_Spectrum.ko: Invalid module format
    root@lifeline:~#SSC.zip

    Kindly do the needful as early as possible,

    Many Thanks in advance

  • Dear Wolf/Yordan,

    Could you please provide any inputs w.r.t the above query

    Kindly do the needful as early as possible

    Many Thanks in advance

  • Hi Srini,

    I haven't tested this code on the TI SDKs. As Wolfgang suggested you can implement this as a kernel module, included in your custom build & after you boot up your device try and insmod it.

    Best Regards,
    Yordan
  • Dear Yordan,

    Many Thanks a lot  for your responses,

    After insmod, could you please let me know is there any test application for the inserted module to verify the SSC feature 

    Kindly do the needful as early as possible

    Many Thanks in advance,

  • Hi Srini, 

    Srini said:
    After insmod, could you please let me know is there any test application for the inserted module to verify the SSC feature 

     

    Not that I know of.  You could check the PRCM registers after you run your custom driver to see if your configurations are written in the registers. 

    Best Regards, 

    Yordan