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.

Kernel transplantation: AM1808 using linux kernel 4.19(OMAPL138_SDK )----urgent

Other Parts Discussed in Thread: OMAPL138, AM1808, OMAP-L138

The lastest release(2013) Linux version is 2.6 in TI website,now we need to update linux kernel, the solution is using linux 4.19 which was released in OMAPL138(ti-processor-sdk-linux-omapl138-lcdk-06.03.00.106 ), after download the kernel into board,it shows:

cpufreq: __target_index: Failed to change cpu frequency: -22

Description:

hardware environment:

1: UBL : AM1808’s UBL

2: u-boot: u-boot2013.01.01

3: PC: ubuntu18.04

4: SDK: ti-processor-sdk-linux-omapl138-lcdk-06.03.00.106

5: board: ourself board using AM1808E ZWT (456)

Code changes:(just kernel code in ti-processor-sdk-linux-omapl138-lcdk-06.03.00.106)

change device tree file:

1 arch/arm/boot/dts/da850-lcdk.dts

comment three node: dsp_memory_region,sound and &dsp.

2 arch/arm/boot/dts/da850.dtsi

comment two node: aliases and dsp: dsp@11800000 .

Others:

no change

Phenomenon:

when board start up and into uboot,download kernel , ramdisk and dtb into DDR by tftpboot command,and using bootm kernelAddr ramdiskAddr dtbAddr to start kernel,and kernel can start up and entry ramdisk,but it always shown:

quary with command: cat /sys/devices/systrm/cpu/cpu0/cpufreq/

current running frequency (cpuinfo_cur_freq)384MHZ

max support frequency (cpuinfo_max_freq )300MHZ

min support frequency ( cpuinfo_min_freq )96MHZ

scaling_cur_freq: 96MHZ

kernel configuration:

if turn off [CPU Frequency scaling], then NO ERR display, but I think it should to set the MAX/MIN frequency limitand I don't know where should I change,so my question is

1 I used AM1808 UBL + uboot2013.01.01 + OAMPL1388 Linux kernel, Is there a problem with this plan?Could it be that the UBoot version doesn't match?

2How should I do to change the MAX/MIN frequency limit?

Thanks very much.

  • sorry bout wrong way to add picture:

  • Duplicate to this thread: https://e2e.ti.com/support/processors/f/791/t/933690

    Hi, Tab,

    I'll post answer in this thread and notify Tom.

    We don't recommend to mix-match u-boot and kernel from different release versions. I will recommend to start migrating u-boot first. Be sure u-boot comes up and be able to get u-boot prompt, then migrate kernel. 

    I will need to understand AM1808 to see if any differences exist between it and omap-l138, and research how to change the frequency if it needs to. If kernel supports power management for omap-l138/am1808, then the instruction can be found in Power Management section of the Linux Drivers User Guide: 

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components/Kernel/Kernel_Drivers/Power_Management.html

    Rex

  • Hi , Rex,

    I didn't try the Lastest uboot  for special reasons, and I will try to port the u-boot-2019.01  in the next few days.

    I'm sorry about that I create two similar thread,and I decide to copy all of the data into this thread:

    we did the test in three ways and didn't solve it. so I still have the question

    2, The AM1808 chip max freq is 456M . The cpuinfo_max_freq(300M) is the configured maximum OPP to operate from the Linux kernel, right? If yes, how to understand chip current running freq cpuinfo_cur_freq(384M) is larger than maximum OPP cpuinfo_max_freq (300M)? We  will  check and configure maximum OPP to operate as 456M from the Linux kernel then to see the result.

    3,   How should we do to change the MAX?For example, to make CPU work in max freq,  Below are 3 methods we will try and any comments are welcome, 

    a."# echo 384000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq"    

    b. choose the maximum OPP to operate at from the Linux kernel

    c.  u-boot> setenv maxcpuclk 456000000

    description:

    we did the test according  to three ways:

    a."# echo 384000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq"    

    b. choose the maximum OPP to operate at from the Linux kernel

    c.  u-boot> setenv maxcpuclk 456000000

    the result is failed,Detailed as follows:

    a."# echo 384000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq"   

    ofcause, we changed the scaling_max_freq before set scaling_min_freq, and after set scaling_min_freq,The phenomenon is as follows

    It will loop out the print prompt,and stop after enter a command,we checked the frequency information:

    cpufreq max: 300000

    cpufreq min: 96000

    cpufreq cur: 384000

    scale max:300000

    scale min:300000

    scale cur:300000

    it looks wrong data.

    b,u-boot> setenv maxcpuclk 456000000

    after enter u-boot and setenv maxcpuclk 456000000,then when use bootm command,it failed to load kernel (stop after init random )as follow:

    c. choose the maximum OPP to operate at from the Linux kernel

    I just configure the kernel like this:

    but I cannot find Select Maximum option after second step( ti-processor-sdk-linux-omapl138-lcdk-06.03.00.106 SDK):

    Thanks very much.

  • Hi, Tab,

    Please read the Power Management Section of the Kernel Drivers in the Kernel User's Guide URL I provided in my previous post. I would suggest to check the supported OPP's, governors, and the current settings first using the command in the document before you change them. Be sure the OPP or the governor you  are changing to is in the supported list.

    Rex