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.

What kernel option is needed to get /sys/devices/system/cpu/cpu0/cpufreq directory created

Hi!

My board is working on linux-ti-staging-rt-4.1.  Kernel configuration should be as presented in processors.wiki.ti.com/.../Linux_Core_Power_Management_User's_Guide_(v4.1). Somehow sysfs directories for dvfs are not created. What additional settings should I need? My board is am335x based board with TPS65217C pmic and beagle bone DTB settings copied for this power regulator block.


Thanks,
Matti

  • Hi Matti,

    What is your kernel config file? In example, in AM335x TI SDK 02.00.01.07 linux kernel v4.1.13 we use tisdk_am335x-evm_defconfig. For PSP only, we use am335x_evm_defconfig.

    See also:

    processors.wiki.ti.com/.../AM335x_Power_Management_User_Guide

    Regards,
    Pavel
  • Hi Pavel,
    I have kind of inherited my config while I have updated kernel from 3.12 .. 4.1-rt. My board used to have fixed regulators (with Media:0001-Introduce-dynamic-frequency-scaling.patch mentioned in your reference). Sysfs structures were created at least in 3.xx (without rt). Now I can verify that these structures do not exist in 4.1-rt design (DVF patched) with fixed regulator design nor in the dynamic regulator design. I do not have access to board without rt kernel at the moment.
    So, it seems that DVF patch did not produce these structures. I could check defconfig you mentioned if I could find it somehow. There are some references in Ti e2e about this defconfig issue. Are they still valid telling that I should check omap2plus_defconfig instead of tisdk_am335x-evm_defconfig? If not, could you kindly attach that - or provide proper reference.
    Thanks,
    Matti
  • Matti,

    Matti Kaasinen said:
    I have kind of inherited my config while I have updated kernel from 3.12 .. 4.1-rt.

    Can you provide a pointer from the place you have get this kernel linux-ti-staging-rt-4.1?

    Matti Kaasinen said:
    So, it seems that DVF patch did not produce these structures.

    I do not think this Media:0001-Introduce-dynamic-frequency-scaling.patch patch is removing these sysfs entries. At which stage you have the entries in sysfs?

    /sys/?/?/?/?/?

    After applying the patch, do you make the below flow?

    cd <kernel source directory>
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- <defconfig> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig <the menuconfig interface should appear> Select "System Type" Select "TI OMAP Common Features" Select "Dynamic Frequency Scaling" Configure "Maximum supported DFS voltage (in microvolts)" (default is 1100000, or 1.1V) Select "Exit" until you are prompted to save the configuration changes, and save them. Rebuild the kernel.

    Matti Kaasinen said:
    I could check defconfig you mentioned if I could find it somehow.

    You can search it with two approaches:

    1. cd <kernel source directory>
        make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- help

    The available defconfig files should show up.

    2. cd <kernel source directory>/arch/arm/configs/

    The defconfig files available are located in this directory.

    Matti Kaasinen said:
    There are some references in Ti e2e about this defconfig issue. Are they still valid telling that I should check omap2plus_defconfig instead of tisdk_am335x-evm_defconfig? If not, could you kindly attach that - or provide proper reference.

    I am not aware of these references. Can you provide pointers to these?

    Regards,
    Pavel

  • Pavel,
    I have been using Yocto project (fido) and linux-ti-staging-rt-4.1 has come from meta-ti layer.
    I did not expect that patch would remove, but it could have produced these structures.
    Actually I don't need that patch anymore. Fixed voltage regulators were in the first prototypes for this board. Now the problem is that I can't verify how adjustable regulators work. But I tried the procedure you suggested - in fact as it goes in yocto:
    bitbake virtual/kernel -f -c menuconfig
    command opens menuconfig:
    But here is the problem:
    There is no "Select "Dynamic Frequency Scaling" option in "TI OMAP Common Features" section.
    Defconfig: there is no tisdk_am335x-evm_defconfig in /arch/arm/configs/
    Meta-ti seems using configuration fragments, no configuration in single file. Only way I have found ti find the default config is to run first menuconfig and save it.

    I suppose I should contact meta-arago regarding this issue.
    Thanks,
    Matti
  • Matti,

    Seems like linux-ti-staging-rt-4.1 is available from the below location:

    I suspect the root cause are the options selected in your .config file, which is based on <defconfig> file (if any) and menuconfig. Can you send me your .config file for analyses? It should be located in your <kernel source directory>.

    Matti Kaasinen said:
    I suppose I should contact meta-arago regarding this issue.

    Yes, you can double check with the team there.

    Also some pointers which might be in help:

    - see "Getting Started with Openembedded" ppt

    Regards,
    Pavel

  • Pavel,

    I tried running menuconfig once more without defconfig of my own. Therefore, it should have been brought up with internal defconfig. Results were not any better. No "Dynamic Frequency Scaling" option was available.

    Please find my defconfig attached.

    Thanks,

    Matti

    2437.defconfig.txt

  • Matti,

    I see some differences between your config file and the one from the TI SDK (that come with CPUFreq enabled by default). Can you align your config file like below:

    #

    # CPU Power Management

    #

    #

    # CPU Frequency scaling

    #

    CONFIG_CPU_FREQ=y

    CONFIG_CPU_FREQ_GOV_COMMON=y

    CONFIG_CPU_FREQ_STAT=y

    CONFIG_CPU_FREQ_STAT_DETAILS=y

    # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

    # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set

    # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set

    CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y

    # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

    CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

    CONFIG_CPU_FREQ_GOV_POWERSAVE=y

    CONFIG_CPU_FREQ_GOV_USERSPACE=y

    CONFIG_CPU_FREQ_GOV_ONDEMAND=y

    CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

    #

    # CPU frequency scaling drivers

    #

    CONFIG_CPUFREQ_DT=m

    CONFIG_CPUFREQ_VOLTDM=y

    # CONFIG_ARM_KIRKWOOD_CPUFREQ is not set

    # CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set

    # CONFIG_QORIQ_CPUFREQ is not set

    Regards,
    Pavel

  • Matti Kaasinen said:
    I tried running menuconfig once more without defconfig of my own. Therefore, it should have been brought up with internal defconfig. Results were not any better. No "Dynamic Frequency Scaling" option was available.

    For this option to be available, you need to apply the patch Media:0001-Introduce-dynamic-frequency-scaling.patch.

    BR
    Pavel

  • Pavel Botev said:
    Matti Kaasinen
    I tried running menuconfig once more without defconfig of my own. Therefore, it should have been brought up with internal defconfig. Results were not any better. No "Dynamic Frequency Scaling" option was available.

    For this option to be available, you need to apply the patch Media:0001-Introduce-dynamic-frequency-scaling.patch.

    OK, those options were for just tuning frequency, thanks

  • I followed your advice and it worked. It would be nice to know what changes were really needed. Thank you very much for your help.
    Thanks,
    Matti