AnsweredAssumed Answered

How to control PF100 PMIC in imx6q-cpufreq.c for LDO bypass

Question asked by Michael Guntli on Oct 20, 2017
Latest reply on Oct 20, 2017 by Michael Guntli

In order to take full advantage of the LDO bypass mode (How to Enable LDO Bypass Based on i.MX6 Android ICS), I would like to control the VDD_ARM and VDD_SOC through the PF100 regulator in the cpufreq driver.

 

The table lists the operation setpoints for LDO bypass mode: 0.925V for up to 396MHz, 1.150V up to 792MHz.

 

The current driver only controls the internal LDO, thus only works for "LDO enabled" mode.

This code gets the LDO regulators here:

      linux/imx6q-cpufreq.c at master · torvalds/linux · GitHub 

 

Question:

How can I get the actual PF100 voltage regulator in code? regulator_get(cpu_dev, "sw1ab")?

Why does the cpufreq driver use devm_regulator_get_optional() and not regulator_get()?

 

Where do I find the name of PF0100 SW1AB? The i.MX6 Linux Reference Chapter 23 explains the PF100 Regulator driver, and chapter 23.3.1 describes the regulator APIs. In the code I found the following table:

      linux/pfuze100-regulator.c at master · torvalds/linux · GitHub 

 

When I print the regulator names, they are listed in this exact order:

root@h5:/sys/class/regulator # cat regulator.0/name
regulator-dummy
root@h5:/sys/class/regulator # cat regulator.1/name
vdd1p1
root@h5:/sys/class/regulator # cat regulator.2/name
vdd3p0
root@h5:/sys/class/regulator # cat regulator.3/name
vdd2p5
root@h5:/sys/class/regulator # cat regulator.4/name
vddarm
root@h5:/sys/class/regulator # cat regulator.5/name
vddpu
root@h5:/sys/class/regulator # cat regulator.6/name
vddsoc
root@h5:/sys/class/regulator # cat regulator.7/name
usb_otg_vbus
root@h5:/sys/class/regulator # cat regulator.8/name
usb_h1_vbus
root@h5:/sys/class/regulator # cat regulator.9/name
SW1AB
root@h5:/sys/class/regulator # cat regulator.10/name
SW1C

Outcomes