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.

AM437x kernel boot in Nitro mode

Other Parts Discussed in Thread: AM4378

Hello,

we are using AM4378 processor. I would like to setup Nitro mode (1GHZ cpu freq) as default after bootup for Linux.

I have been playing a little bit with cpufreq driver (we are using Linux 4.1.18) and I'm able to change whole scale with "userspace governor" on the fly.

If I want to set up default cpu freq of processor, what is the best/easiest way how to do it?

I tought that I can specify it in DTS file, but I wasn't able to find any example. I read a little bit about http://processors.wiki.ti.com/index.php/Linux_Core_Power_Management_User's_Guide_(v4.1)#Operating_Points

but I didn't get the point of it and if I can use it wtih AM4378 processor? (there is written "The OPP Modifier framework and DT entries used in the older v3.12 kernel have now been replaced by platform data defined in arch/arm/mach-omap2/oppXXXX_data.c files.") Therefore I took a look on arch/arm/mach-omap2/opp43xx_data.c source code and here I can see list of modes and their init, but I don't know how to change OPPNitro as default one?

Can you help me?

Thanks, Ondrej

  • If you're leveraging TI's u-boot code, it reads fuses in the device  and sets the speed to the max allowed. So your 1 GHz devices will be set to 1 GHz very early in the boot sequence. To STAY at 1 GHz you must only keep Linux out of the way. Setting the user space governor as the default governor will do this. In that case Linux will only change the frequency if someone specifically requests it.

  • For now, kernel starts with 720 MHz cpu frequency.

    Here is cpufreq output after kernel startup:
    root@test:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_cur_freq
    720000
    root@test:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_max_freq
    1000000
    root@test:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_governor
    userspace
    root@test:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_available_frequenccies
    300000 600000 720000 800000 1000000

    Then I set up 1GHZ frequency:
    root@test:/sys/devices/system/cpu/cpu0/cpufreq# echo 1000000 > scaling_setspeed
    root@test:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_cur_freq
    1000000

    Regarding to your reply, when using userspace governor, kernel should run on 1GHz, right?

    Or can you guide me where can I check if u-boot (or kernel) changing cpu frequncy to 720 MHz?
    Is it possible to choose default u-boot/kernel cpu freqency by my own? (e.g. 300 MHz?)

    Many thanks for your help!
    Ondrej
  • In u-boot in the board.c file there is a function called get_opp_offset() that determines the speed to which the MPU should be set. Please have a look to see how things are being configured.