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.

AM3358: CPU frequency setting when replacing AM3358 with other AM335x and speed variants

Part Number: AM3358

Hi,

This is related to the answer of this question: e2e.ti.com/.../am3358-beaglebone-black-am3358-processor-replacement-software-related-questions.

Now we would like to replace AM3358BZCZ100 with AM3358BZCZ60, which has the CPU frequency limited to 600MHz. According to TI, there is no software change needed at both u-boot and Linux levels.

Get I get some more detailed explanations on these:
1. How does u-boot decide which AM335X model and speed variant and configure the max. CPU frequency?
2. How does Linux kernel decide which AM335X model and speed variant and configure the max. CPU frequency?


Thank you for your help!

  • Hi Matt,
    Please refer to the e2e posts on the topic
    e2e.ti.com/.../1004863
    e2e.ti.com/.../983974
    Best,
    -Hong

  • Hi Hong,

    Thank you for the reply. After reading through the posts you pointed to, I summarized my understandings here:

    1. The statement of "no software change needed at both u-boot and Linux" is only partially true:
       a. u-boot/SPL: There is no need to modify, since the max speed will be read from efuse and configured accordingly.
       b. Linux kernel: It is required to modify Linux device tree, for my case, in am335x-bone-common.dtsi, change the vdd_mpu "regulator-max-microvolt" from 1351500 to 1122000.
       
    2. For the "regulator-max-microvolt" value 1122000, I noticed it does not match the value specified in the AM335x datasheet Table 5-7. How is value determined?
       Can it be a number close to the max voltage specified in Table 5-7? Or it needs to match one of these values specified in am33xx.dtsi "opp100-600000000" node?
        opp100-600000000 {
                opp-hz = /bits/ 64 <600000000>;
                opp-microvolt = <1100000 1078000 1122000>;
                opp-supported-hw = <0x06 0x0040>;
        };

    Please confirm or explain if any of my understandings is not correct.

    Thank you very much!

  • Hi Matt,
    Based on my test on AM335x GP EVM with 1GHz P/N as reported in e2e.ti.com/.../1004863,
    I'd think the code changes would apply to your case.
    Best,
    -Hong

  • Hi Hong,

    Thank you for the quick response. Sorry, I think I am still confused about the answers, really appreciated if you can please explain further.

    From this post (e2e.ti.com/.../1004863), it says that u-boot/SPL will detect max speed by reading efuse information (via calling am335x_get_efuse_mpu_max_freq()). And it looks like am335x_get_efuse_mpu_max_freq() is doing this.

    Also, further read on the Linux power management page (software-dl.ti.com/.../Power_Management.html, it says the Linux kernel also reads efuse information:



    And it looks like ti_cpufreq_get_efuse() in drivers/cpufreq/ti-cpufreq.c is doing the work for this.



    These suggest there is no need to modify both u-boot/SPL and Linux device tree in my case.

    Can you please help clarify these:
    a. Can I rely on u-boot/SPL code to detect max frequency from reading efuse information? Or hardcoding the frequency in am335x_get_efuse_mpu_max_freq() (less preferable solution) is necessary?
    b. Can I rely on Linux kernel to detect max frequency from reading efuse information? Or manually modify the device tree (also less preferable solution) is necessary?


    Thank you for your help!

  • Hi Matt,
    I looked at your inquiry closely, and yes, SPL/u-boot & kernel would auto-scale VDD/OPP via DVFS based on the SoC speed reading.
    Best,
    -Hong

  • Hi Hong,

    Thanks for reply, this confirms AM3358BZCZ60 can use same u-boot/SPL, Linux kernel for AM3358BZCZ100 without any modification. Thank you.