Controlling PFUZE100 VGEN in Linux

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

Controlling PFUZE100 VGEN in Linux

Jump to solution
1,238 Views
erezsteinberg
Contributor IV

Hello experts,

I have some components that are powered by the VGEN LDOs in PFUZE0100

Currently I enable them in U-Boot, but I need to have control over them during runtime in Linux.

I tried regulator_get("vgen1") or regulator_get("PFUZE100_VGEN1"), but both fail.

How can I get control these?

Regards,

Erez

Labels (2)
Tags (3)
0 Kudos
1 Solution
772 Views
igorpadykov
NXP Employee
NXP Employee

mx6q_sabresd_pmic_pfuze100.c:

static struct regulator_consumer_supply vgen1_consumers[] = {

       {

    .supply = "VGEN1_1V5",

    }

};

View solution in original post

0 Kudos
4 Replies
772 Views
igorpadykov
NXP Employee
NXP Employee

Hi Erez

I think you can look at cpu_vdd3p0 example :

arch/arm/mach-mx6/mx6_anatop_regulator.c:

/* USB phy 3P0 */

static struct regulator_consumer_supply vdd3p0_consumers[] = {

    {

        .supply = "cpu_vdd3p0",

    },

};

pm.c  pm_init( )  :

..

vdd3p0_regulator = regulator_get(NULL, "cpu_vdd3p0");

    if (IS_ERR(vdd3p0_regulator)) {

   printk(KERN_ERR "%s: failed to get 3p0 regulator Err: %d\n",
   __func__, ret);
   return PTR_ERR(vdd3p0_regulator);

    }

    ret = regulator_set_voltage(vdd3p0_regulator, VDD3P0_VOLTAGE,

   VDD3P0_VOLTAGE);

    if (ret) {

   printk(KERN_ERR "%s: failed to set 3p0 regulator voltage Err: %d\n",
   __func__, ret);

    }

    ret = regulator_enable(vdd3p0_regulator);

    if (ret) {

   printk(KERN_ERR "%s: failed to enable 3p0 regulator Err: %d\n",
   __func__, ret);

    }

Best regards

igor

0 Kudos
772 Views
erezsteinberg
Contributor IV

Yes, this is what I'm trying to do --

But.. what is the name for the PFUZE VGEN regulators?

regulator_get(NULL, "?????????");

0 Kudos
773 Views
igorpadykov
NXP Employee
NXP Employee

mx6q_sabresd_pmic_pfuze100.c:

static struct regulator_consumer_supply vgen1_consumers[] = {

       {

    .supply = "VGEN1_1V5",

    }

};

0 Kudos
772 Views
erezsteinberg
Contributor IV

Thanks --- that worked!

0 Kudos