How to change ARM and SoC voltage by writing on HW registers?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to change ARM and SoC voltage by writing on HW registers?

2,589 Views
maurice
Contributor III

Hello community,

I want to change ARM and SoC voltages by writing on HW registers : PMU, CCM and CCM_ANALOG.

It is applied when the frequency is changing, 996 MHz to 792 MHz:

  1. Init PMU registers: values “1F” are written in reg_core.reg0_trig and reg_core.reg2_trig registers for ARM ans SoC.
  2. Init GPC register: value 0x80000000 is written in IMR4 register
  3. Setting frequency and voltage:
    1. Setting CCM_CCSR registers for the target frequency. Saving the PLL into PLL_SW
    2. Setting new PLL-ARM
    3. Change voltage thanks to PMU registers and operating points of the data sheet. I write into PMU_REG_CORE register.
    4. Wait update voltage.
    5. Clear the PLL_SW.

Despite I followed the data sheet, only the frequency has changed. ARM and SoC voltages are the same. Did I miss something?

I compared to CPUFREQ driver where the voltage changed.

I use:

  • Linux-3.0.35
  • CPUFREQ driver is disabled
  • iMX6 quad

Thank you

Labels (3)
0 Kudos
6 Replies

1,265 Views
maurice
Contributor III

Hello,

I succeed to chenge the VDD_ARM on the iMX6. It has been checked by a probe the R27 shunt.

To do that, solution is to control the PMIC by the I2C.

Thank you Chip for your help.

Best regards,

Maurice

0 Kudos

1,265 Views
igorpadykov
NXP Employee
NXP Employee

Hi maurice

behaviour may be affected by bypass mechanism,

please check cpufreq.c, functions

mx6_arm_regulator_bypass(void), mx6_soc_pu_regulator_bypass

Regulators are described in Chapter 21 Anatop Regulator Driver

i.MX_6Dual6Quad_Linux_Reference_Manual.pdf included in

L3.0.35_4.1.0_LINUX_DOCS

Just for test one can use SDK

i.MX 6Series Platform SDK

Best regards

chip

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

1,265 Views
maurice
Contributor III

Hi chip,

Thank you for your answer.

It seems that mx6_arm_regulator_bypass and mx6_soc_pu_regulator_bypass functions are not defined and not used so it cannot be bypassed.
I followed also the manual in the chapter 21 but it is not working.

What I want is to deactivate the cpufreq driver totally from the kernel configuration.
A 1GHz, I measured a VDD_ARM of 1.25 V with cpufreq driver and 1.30 V with no cpufreq driver. Even if, there is no call user call to be at 1 GHz, cpufreq driver seems to manipulate voltage, isn't it?

Moreover, I see the SDK code and I did the same protocol. is SDK needs to have cpufreq driver activated to work?

Finally, I am still searching why the voltage is not changing.

Maurice

1,265 Views
igorpadykov
NXP Employee
NXP Employee

Hi maurice

are you speaking about VDD_ARM_CAP, VDD_SOC_CAP voltages, correct ?

in SDK, what registers are you writing to change

VDD_ARM_CAP, VDD_SOC_CAP ?

Best regards

chip

0 Kudos

1,265 Views
maurice
Contributor III

Hi,

Thanks, I think where is the problem.

First, I measure the VDDCORE (thanks to R27 shunt) and not VDD_ARM or VDD_ARM_CAP, therefore I cannot measure voltage changing by using PMU.

CPUFREQ does not use the PMU but the PMIC to change voltage.

I need to see what is the exact protocol to access to PMIC: Device ID, access to PMIC through i2C bus.

Best regards,

Maurice

0 Kudos

1,265 Views
igorpadykov
NXP Employee
NXP Employee

Hi maurice

it may be useful to look at Linux docs

L3.0.35_4.1.0_LINUX_DOCS

Best regards

chip

0 Kudos