Controlling PFUZE100 VGEN in Linux

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Controlling PFUZE100 VGEN in Linux

跳至解决方案
1,739 次查看
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

标签 (2)
标记 (3)
0 项奖励
回复
1 解答
1,273 次查看
igorpadykov
NXP Employee
NXP Employee

mx6q_sabresd_pmic_pfuze100.c:

static struct regulator_consumer_supply vgen1_consumers[] = {

       {

    .supply = "VGEN1_1V5",

    }

};

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,273 次查看
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 项奖励
回复
1,273 次查看
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 项奖励
回复
1,274 次查看
igorpadykov
NXP Employee
NXP Employee

mx6q_sabresd_pmic_pfuze100.c:

static struct regulator_consumer_supply vgen1_consumers[] = {

       {

    .supply = "VGEN1_1V5",

    }

};

0 项奖励
回复
1,273 次查看
erezsteinberg
Contributor IV

Thanks --- that worked!

0 项奖励
回复