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:使用 PMIC TPS650250时为 AM3354配置600MHz

Guru**** 1640390 points
Other Parts Discussed in Thread: TPS650250, TPS65217
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1180606/am3354-configuring-600-mhz-for-am3354-while-using-pmic-tps650250

器件型号:AM3354
主题中讨论的其他器件:TPS650250LM3533LP3971LP3972TWL6040TPS65023TPS62360TPS65090TPS65218TPS65010TPS65217TPS65086LP3943TPS51632TPS65132TPS65912TPS65910

您好、TI 专家、

我们使用 PMIC TPS650250为 AM335x (AM3354BZCZ60)供电。 处理器似乎以300MHz 运行、而不是所需的600MHz 运行。 现在、我们不知道如何配置(defconfig +器件树)系统、使其以600MHz 的频率运行。

该器件可以正常工作、但运行频率为300MHz、而不是所需的600MHz。

问题1:

cpufreq-info 无法识别 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

问题2:

我们认识到在/sys 下、缺少一些内容、例如(/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

问题3:

我们的流程比预期慢。 此外、CPU 以300MHz 运行的7z 电位计:

# 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

详细信息:

当我们引导器件时、我们看到 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

我们的当前配置 defconfig 如下所示:

#
# 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

问题:

我们找不到预定义的 CONFIG_MFD_TPS650250 CONFIG_电脑 控制器_TPS650250条目。 要使用 TPS650250、我们必须在 defconfig 中设置什么?

为了以600MHz 的频率运行 AM335x 并能够使用 cpufreq-info、我们的器件树中需要采用哪种配置? 不需要速度步进、固定的600MHz 设置足以满足我们的要求。

如果您需要其他信息、我们将尽快提供。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Florian、

    您是否在 AM335x 平台上使用 TI 处理器 SDK Linux? 如果是、哪个版本?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    请附加完整的 Linux 引导日志。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、刘斌、

    经过数小时的反复试验研究后、我们终于找到了一个可行的解决方案。

    从技术上讲、在该项目中、我们采用了与 BeagleBone Black 类似的设计、其中默认采用 PMIC TPS65217。 电路板布局和一些组件更改后、我们遇到了上述问题。 一个主要问题是切换到 PMIC TPS650250、这主要导致了我们的错误。

    为了尽可能接近原始 BeagleBone Black 配置、我们尝试解决单个*。dtsi 覆盖文件中的所有问题。 我们的解决方案如下:

    ///////////////////////////////////////////////////
    // 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
    ///////////////////////////////////////////////////

    这些变化的主要目标是:

    • /tps/compatible ->删除此属性、因为这会导致内核尝试加载 PMIC TPS65217驱动程序、但这是不可能的、因为它不再存在
    • /ic20/status ->禁用 ic20、因为新的 PMIC TPS650250无法通过 i2c 进行通信。
    • /VDD_MPU ->定义了一个固定稳压器。 电压必须与正确的值相匹配、这些值取自我们从硬件布局器检索到的原理图
    • /cpus/cpu0/cpu0-supply ->使用之前定义的 VDD_MPU 固定稳压器作为 CPU0电源。

    不需要的情况下对 defconfig 进行进一步更改(请参阅上面的示例)。 但是、为了减少不需要的驱动程序、我们更改了 defconfig 中的内容

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

    不 包括与 PMIC TPS65217相关的内容。

    现在、一切都按预期工作、同样:

    输出前问题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).

    输出前问题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

    现在、通过/sys 获取 cpufreq 文件夹和所有必需信息、如电流、最小和最大 CPU 频率

    输出前问题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

    最棒的

    Florian Künzner í a