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.

AM3354: Configuring 600 MHz for AM3354 while using PMIC TPS650250

Part Number: AM3354
Other Parts Discussed in Thread: TPS650250, LM3533, LP3971, LP3972, TWL6040, TPS65023, TPS62360, TPS65090, TPS65218, TPS65010, TPS65217, TPS65086, LP3943, TPS51632, TPS65132, TPS65912, TPS65910

Hello TI experts,

we are using a PMIC TPS650250 to power an AM335x (AM3354BZCZ60). The processor seems to run on 300 MHz instead of the desired 600 MHz. Right now, we don't know how to configure (defconfig + device tree) the system in such a way, that it runs on 600 MHz.

The device is working without any problems, but it is running on 300 MHz instead of the desired 600 MHz.

Problem 1:

cpufreq-info doesn't recognise the CPU:

# cpufreq-info 
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU

Problem 2:

We recognised that under /sys, there are some things missing, e.g. (/sys/devices/system/cpu/cpu0/cpufreq)

root@icg-connect-am3354-lm:~# ls -al /sys/devices/system/cpu/cpu0/            
drwxr-xr-x    6 root     root             0 Jan  1  1970 .
drwxr-xr-x    7 root     root             0 Jan  1  1970 ..
-rw-r--r--    1 root     root          4096 Dec 15 10:00 cpu_capacity
drwxr-xr-x    5 root     root             0 Dec 15 10:00 cpuidle
drwxr-xr-x    2 root     root             0 Dec 15 10:00 hotplug
lrwxrwxrwx    1 root     root             0 Dec 15 10:00 of_node -> ../../../../firmware/devicetree/base/cpus/cpu@0
drwxr-xr-x    2 root     root             0 Dec 15 10:00 power
lrwxrwxrwx    1 root     root             0 Jan  1  1970 subsystem -> ../../../../bus/cpu
drwxr-xr-x    2 root     root             0 Dec 15 10:00 topology
-rw-r--r--    1 root     root          4096 Jan  1  1970 uevent

Problem 3:

Our processes are slower than expected. Also 7z repots that the CPU runs on 300 MHz:

# 7za b -mmt1

7-Zip (a) [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,32 bits,1 CPU LE)

LE
CPU Freq:   294   295   293   294   295   295   295

RAM size:    1007 MB,  # CPU hardware threads:   1
RAM usage:    435 MB,  # Benchmark threads:      1

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:        143   100    140    139  |       2729   100    234    233
23:        139   100    142    142  |       2651   100    230    230
24:        135    99    147    146  |       2623   100    231    230
25:        132   100    152    152  |       2592   100    232    231
----------------------------------  | ------------------------------
Avr:             100    145    145  |              100    232    231
Tot:             100    189    188

Details:

When we boot our device, we see the following output for dmesg | grep -i cpu

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] percpu: Embedded 15 pages/cpu @be7bf000 s32652 r8192 d20596 u61440
[    0.000000] pcpu-alloc: s32652 r8192 d20596 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] 	RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.069309] CPU: Testing write buffer coherency: ok
[    0.070141] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.167529] smp: Bringing up secondary CPUs ...
[    0.167557] smp: Brought up 1 node, 1 CPU
[    0.167598] CPU: All CPU(s) started in SVC mode.
[    0.345432] cpuidle: using governor ladder
[    0.921303] cpuidle: enable-method property 'ti,am3352' found operations

Our current configuration defconfig looks like:

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL 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
# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set

#
# CPU frequency scaling drivers
#
CONFIG_CPUFREQ_DT=y
CONFIG_CPUFREQ_DT_PLATDEV=y
# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set
# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set
CONFIG_ARM_OMAP2PLUS_CPUFREQ=y
CONFIG_ARM_TI_CPUFREQ=y
# CONFIG_QORIQ_CPUFREQ is not set


#....

#
# Multifunction device drivers
#
CONFIG_MFD_CORE=y
# CONFIG_MFD_ACT8945A is not set
# CONFIG_MFD_AS3711 is not set
# CONFIG_MFD_AS3722 is not set
# CONFIG_PMIC_ADP5520 is not set
# CONFIG_MFD_AAT2870_CORE is not set
# CONFIG_MFD_ATMEL_FLEXCOM is not set
# CONFIG_MFD_ATMEL_HLCDC is not set
# CONFIG_MFD_BCM590XX is not set
# CONFIG_MFD_BD9571MWV is not set
# CONFIG_MFD_AXP20X_I2C is not set
# CONFIG_MFD_CROS_EC is not set
# CONFIG_MFD_ASIC3 is not set
# CONFIG_PMIC_DA903X is not set
# CONFIG_MFD_DA9052_I2C is not set
# CONFIG_MFD_DA9055 is not set
# CONFIG_MFD_DA9062 is not set
# CONFIG_MFD_DA9063 is not set
# CONFIG_MFD_DA9150 is not set
# CONFIG_MFD_DLN2 is not set
# CONFIG_MFD_MC13XXX_I2C is not set
# CONFIG_MFD_HI6421_PMIC is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_HTC_I2CPLD is not set
# CONFIG_MFD_KEMPLD is not set
# CONFIG_MFD_88PM800 is not set
# CONFIG_MFD_88PM805 is not set
# CONFIG_MFD_88PM860X is not set
# CONFIG_MFD_MAX14577 is not set
# CONFIG_MFD_MAX77620 is not set
# CONFIG_MFD_MAX77686 is not set
# CONFIG_MFD_MAX77693 is not set
# CONFIG_MFD_MAX77843 is not set
# CONFIG_MFD_MAX8907 is not set
# CONFIG_MFD_MAX8925 is not set
# CONFIG_MFD_MAX8997 is not set
# CONFIG_MFD_MAX8998 is not set
# CONFIG_MFD_MT6397 is not set
# CONFIG_MFD_MENF21BMC is not set
# CONFIG_MFD_VIPERBOARD is not set
# CONFIG_MFD_RETU is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_MFD_PM8XXX is not set
# CONFIG_MFD_RT5033 is not set
# CONFIG_MFD_RTSX_USB is not set
# CONFIG_MFD_RC5T583 is not set
# CONFIG_MFD_RK808 is not set
# CONFIG_MFD_RN5T618 is not set
# CONFIG_MFD_SEC_CORE is not set
# CONFIG_MFD_SI476X_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_MFD_SKY81452 is not set
# CONFIG_MFD_SMSC is not set
# CONFIG_ABX500_CORE is not set
# CONFIG_MFD_STMPE is not set
CONFIG_MFD_SYSCON=y
CONFIG_MFD_TI_AM335X_TSCADC=y
# CONFIG_MFD_LP3943 is not set
# CONFIG_MFD_LP8788 is not set
# CONFIG_MFD_TI_LMU is not set
# CONFIG_MFD_PALMAS is not set
# CONFIG_TPS6105X is not set
# CONFIG_TPS65010 is not set
# CONFIG_TPS6507X is not set
# CONFIG_MFD_TPS65086 is not set
# CONFIG_MFD_TPS65090 is not set
#CONFIG_MFD_TPS65217=y
# CONFIG_MFD_TI_LP873X is not set
# CONFIG_MFD_TI_LP87565 is not set
# CONFIG_MFD_TPS65218 is not set
# CONFIG_MFD_TPS6586X is not set
# CONFIG_MFD_TPS65910 is not set
# CONFIG_MFD_TPS65912_I2C is not set
# CONFIG_MFD_TPS80031 is not set
# CONFIG_TWL4030_CORE is not set
# CONFIG_TWL6040_CORE is not set
# CONFIG_MFD_WL1273_CORE is not set
# CONFIG_MFD_LM3533 is not set
# CONFIG_MFD_TC3589X is not set
# CONFIG_MFD_TMIO is not set
# CONFIG_MFD_T7L66XB is not set
# CONFIG_MFD_TC6387XB is not set
# CONFIG_MFD_TC6393XB is not set
# CONFIG_MFD_ARIZONA_I2C is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM831X_I2C is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_WM8994 is not set
CONFIG_REGULATOR=y
# CONFIG_REGULATOR_DEBUG is not set
CONFIG_REGULATOR_FIXED_VOLTAGE=y
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
# CONFIG_REGULATOR_ACT8865 is not set
# CONFIG_REGULATOR_AD5398 is not set
# CONFIG_REGULATOR_ANATOP is not set
# CONFIG_REGULATOR_DA9210 is not set
# CONFIG_REGULATOR_DA9211 is not set
# CONFIG_REGULATOR_FAN53555 is not set
# CONFIG_REGULATOR_GPIO is not set
# CONFIG_REGULATOR_ISL9305 is not set
# CONFIG_REGULATOR_ISL6271A is not set
# CONFIG_REGULATOR_LP3971 is not set
# CONFIG_REGULATOR_LP3972 is not set
# CONFIG_REGULATOR_LP872X is not set
# CONFIG_REGULATOR_LP8755 is not set
# CONFIG_REGULATOR_LTC3589 is not set
# CONFIG_REGULATOR_LTC3676 is not set
# CONFIG_REGULATOR_MAX1586 is not set
# CONFIG_REGULATOR_MAX8649 is not set
# CONFIG_REGULATOR_MAX8660 is not set
# CONFIG_REGULATOR_MAX8952 is not set
# CONFIG_REGULATOR_MAX8973 is not set
# CONFIG_REGULATOR_MT6311 is not set
# CONFIG_REGULATOR_PBIAS is not set
# CONFIG_REGULATOR_PFUZE100 is not set
# CONFIG_REGULATOR_PV88060 is not set
# CONFIG_REGULATOR_PV88080 is not set
# CONFIG_REGULATOR_PV88090 is not set
# CONFIG_REGULATOR_PWM is not set
# CONFIG_REGULATOR_TI_ABB is not set
# CONFIG_REGULATOR_TPS51632 is not set
# CONFIG_REGULATOR_TPS62360 is not set
# CONFIG_REGULATOR_TPS65023 is not set
# CONFIG_REGULATOR_TPS6507X is not set
# CONFIG_REGULATOR_TPS65132 is not set
#CONFIG_REGULATOR_TPS65217=y
# CONFIG_REGULATOR_VCTRL is not set
CONFIG_CEC_CORE=y
# CONFIG_RC_CORE is not set
# CONFIG_MEDIA_SUPPORT is not set

Questions:

We couldn't find predefined CONFIG_MFD_TPS650250 and CONFIG_REGULATOR_TPS650250 entries. What do we have to set in defconfig to use the TPS650250?.

Which configuration is required in our device tree to run the AM335x with 600 MHz and to be able to use cpufreq-info? A speed stepping is not required, a fixed 600 MHz setup is enough for us.

If you need additional information, we will try to provide this as soon as possible.

  • Hi Florian,

    Do you use TI Processor SDK Linux on your AM335x platform? If so which version?

  • Please attach the full Linux boot log.

  • Hello Bin Liu,

    after hours of research with trial and error, we have finally a working solution.

    Technically, at this project, we came from a design similar than the BeagleBone Black with the default PMIC TPS65217. After the board layout and some components were changed, we had the issues described above. One major issue was the switch to the PMIC TPS650250 which mainly caused our errors.

    To be as close as possible to the original BeagleBone Black configuration, we tried to solve everything in a single *.dtsi overlay file. Here is our solution:

    ///////////////////////////////////////////////////
    // Start: changes/configuration for PMIC TPS650250
    
    // Recently, the original PMIC TPS65217 that is also used in the BeagleBone 
    // Black has been changed to PMIC TPS650250, which causes the CPU to run only 
    // with 300 MHz instead of the desired 600 MHz.
    
    &tps {
    	//delete compatible because otherwise, the cpufreq wants to load the 
    	//driver for the former PMIC TPS65217
    	/delete-property/ compatible;
    };
    
    &i2c0 {
    	//The i2c0 that usually controlls the old PMIC TPS65217 is disabled,
    	//because the new PMIC TPS65217 doesn't have an i2c interface
    	status = "disabled";
    };
    
    / {
    	//definition of a fixed regulator that represents the PMIC TPS65217. 
    	//It is important that the min/max volt is used from the schematic 
    	//view of the hardware.
    	vdd_mpu: regulator0 {
    		compatible = "regulator-fixed";
    		regulator-name = "vdd_mpu";
    		regulator-min-microvolt = <1100000>;
    		regulator-max-microvolt = <1100000>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	//configures the CPU to the the fixed regulator power supply.
    	cpus {
    		cpu@0 {
    			cpu0-supply = <&vdd_mpu>;
    			cpu-supply = <&vdd_mpu>;
    		};
    	};
    
    };
    
    // End: changes/configuration for PMIC TPS650250
    ///////////////////////////////////////////////////

    The main objectives in this changes are:

    • /tps/compatible -> delete this property, because this causes the kernel try to load the PMIC TPS65217 driver, but this is not possible, because it's not there anymore
    • /ic20/status -> disables the ic20, because the new PMIC TPS650250 is not able to communicate via i2c.
    • /vdd_mpu -> defines a fixed regulator. The volts have to match the correct values, which were taken from the schematic that we retrieved from the HW layouter
    • /cpus/cpu0/cpu0-supply -> use the previously defined vdd_mpu fixed regulator as the cpu0 power supply.

    Further changes in the defconfig where not required (see example above). But to reduce the non-required drivers, we changed in defconfig

    #CONFIG_MFD_TPS65217=y
    ...
    #CONFIG_REGULATOR_TPS65217=y
    ...
    #CONFIG_BACKLIGHT_TPS65217=y

    to  not include the PMIC TPS65217 related stuff.

    Now, everything is working as expected, again:

    Output former problem 1:

    # cpufreq-info 
    cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
    Report errors and bugs to cpufreq@vger.kernel.org, please.
    analyzing CPU 0:
      driver: cpufreq-dt
      CPUs which run at the same hardware frequency: 0
      CPUs which need to have their frequency coordinated by software: 0
      maximum transition latency: 300 us.
      hardware limits: 600 MHz - 600 MHz
      available frequency steps: 600 MHz
      available cpufreq governors: conservative, ondemand, userspace, powersave, performance
      current policy: frequency should be within 600 MHz and 600 MHz.
                      The governor "performance" may decide which speed to use
                      within this range.
      current CPU frequency is 600 MHz (asserted by call to hardware).

    Output former problem 2:

    # ls -al /sys/devices/system/cpu/cpu0/
    drwxr-xr-x    6 root     root             0 Jan  1  1970 .
    drwxr-xr-x    7 root     root             0 Jan  1  1970 ..
    -rw-r--r--    1 root     root          4096 Dec 22 07:47 cpu_capacity
    lrwxrwxrwx    1 root     root             0 Dec 22 07:47 cpufreq -> ../cpufreq/policy0
    drwxr-xr-x    5 root     root             0 Dec 22 07:47 cpuidle
    drwxr-xr-x    2 root     root             0 Dec 22 07:47 hotplug
    lrwxrwxrwx    1 root     root             0 Dec 22 07:47 of_node -> ../../../../firmware/devicetree/base/cpus/cpu@0
    drwxr-xr-x    2 root     root             0 Dec 22 07:47 power
    lrwxrwxrwx    1 root     root             0 Jan  1  1970 subsystem -> ../../../../bus/cpu
    drwxr-xr-x    2 root     root             0 Dec 22 07:47 topology
    -rw-r--r--    1 root     root          4096 Jan  1  1970 uevent

    Now, cpufreq folder and all required information such as current, min, and max cpu frequency can be obtained through the /sys.

    Output former problem 3:

    # 7za b -mmt1
    
    7-Zip (a) [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
    p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,32 bits,1 CPU LE)
    
    LE
    CPU Freq:   588   591   592   592   592   592   592   591
    
    RAM size:    1007 MB,  # CPU hardware threads:   1
    RAM usage:    435 MB,  # Benchmark threads:      1
    
                           Compressing  |                  Decompressing
    Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
             KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS
    
    22:        246   100    241    240  |       5222   100    448    446
    23:        237   100    243    242  |       5130   100    446    444
    24:        229   100    248    247  |       4965   100    437    436
    25:        222   100    255    254  |       4891   100    437    435
    ----------------------------------  | ------------------------------
    Avr:             100    247    246  |              100    442    440
    Tot:             100    344    343

    Best,

    Florian Künzner