* [U-Boot] TI:OMAP: [PATCH 3/7] API to set twl4030 voltage and dev group
@ 2010-01-12 19:03 Khasim Syed Mohammed
0 siblings, 0 replies; 5+ messages in thread
From: Khasim Syed Mohammed @ 2010-01-12 19:03 UTC (permalink / raw)
To: u-boot
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] TI:OMAP: [PATCH 3/7] API to set twl4030 voltage and dev group
@ 2010-01-18 13:56 Khasim Syed Mohammed
2010-01-24 0:07 ` Tom
0 siblings, 1 reply; 5+ messages in thread
From: Khasim Syed Mohammed @ 2010-01-18 13:56 UTC (permalink / raw)
To: u-boot
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] TI:OMAP: [PATCH 3/7] API to set twl4030 voltage and dev group
2010-01-18 13:56 [U-Boot] TI:OMAP: [PATCH 3/7] API to set twl4030 voltage and dev group Khasim Syed Mohammed
@ 2010-01-24 0:07 ` Tom
2010-01-25 14:08 ` Khasim Syed Mohammed
0 siblings, 1 reply; 5+ messages in thread
From: Tom @ 2010-01-24 0:07 UTC (permalink / raw)
To: u-boot
Khasim Syed Mohammed wrote:
> From ca6c186c40fafaf0bf53f5f3e90057c0a34374f9 Mon Sep 17 00:00:00 2001
> From: Syed Mohammed Khasim <khasim@ti.com>
> Date: Mon, 18 Jan 2010 18:22:09 +0530
> Subject: [PATCH] API to set twl4030 voltage and dev group
>
> V3:
> Incorporated review comments to set voltage first
> and then dev group
>
> V2:
> Incorporated review comments to split the patch and
> add generic API to set the voltage and device group.
> http://www.mail-archive.com/u-boot at lists.denx.de/msg27136.html
>
> V1:
> Added support for 720 Mhz
> http://www.mail-archive.com/u-boot at lists.denx.de/msg27035.html
>
> Signed-off-by: Syed Mohammed Khasim <khasim@ti.com>
> ---
> drivers/power/twl4030.c | 24 +++++++++++++++---------
> include/twl4030.h | 16 ++++++++++++++++
> 2 files changed, 31 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
> index eb066cb..f25b58f 100644
> --- a/drivers/power/twl4030.c
> +++ b/drivers/power/twl4030.c
> @@ -59,16 +59,9 @@ void twl4030_power_reset_init(void)
> }
> }
>
> -
> /*
> * Power Init
> */
> -#define DEV_GRP_P1 0x20
> -#define VAUX3_VSEL_28 0x03
> -#define DEV_GRP_ALL 0xE0
> -#define VPLL2_VSEL_18 0x05
> -#define VDAC_VSEL_18 0x03
> -
> void twl4030_power_init(void)
> {
> unsigned char byte;
> @@ -98,8 +91,6 @@ void twl4030_power_init(void)
> TWL4030_PM_RECEIVER_VDAC_DEDICATED);
> }
>
> -#define VMMC1_VSEL_30 0x02
> -
> void twl4030_power_mmc_init(void)
> {
> unsigned char byte;
> @@ -113,3 +104,18 @@ void twl4030_power_mmc_init(void)
> twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
> TWL4030_PM_RECEIVER_VMMC1_DEDICATED);
> }
> +
> +/*
> + * Generic function to select Device Group and Voltage
> + */
> +void twl4030_pmrecv_vsel_cfg(u8 vsel_reg, u8 vsel_val,
> + u8 dev_grp, u8 dev_grp_sel)
> +{
> + /* Select the Voltage */
> + twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, vsel_val,
> + vsel_reg);
> +
> + /* Select the Device Group */
> + twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, dev_grp_sel,
> + dev_grp);
> +}
> diff --git a/include/twl4030.h b/include/twl4030.h
> index 2b2f5ae..9bdd3ea 100644
> --- a/include/twl4030.h
> +++ b/include/twl4030.h
> @@ -471,6 +471,22 @@
> #define TWL4030_USB_PHY_CLK_CTRL_STS 0xFF
>
> /*
> + * Voltage Selection in PM Receiver Module
> + */
> +#define VAUX2_VSEL_18 0x05
> +#define VDD1_VSEL_14 0x40
> +#define VAUX3_VSEL_28 0x03
> +#define VPLL2_VSEL_18 0x05
> +#define VDAC_VSEL_18 0x03
> +#define VMMC1_VSEL_30 0x02
> +
Remain consistent with existing naming
Use the TWL4030_PM_RECEIVER prefix
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] TI:OMAP: [PATCH 3/7] API to set twl4030 voltage and dev group
2010-01-24 0:07 ` Tom
@ 2010-01-25 14:08 ` Khasim Syed Mohammed
2010-01-25 15:06 ` Tom
0 siblings, 1 reply; 5+ messages in thread
From: Khasim Syed Mohammed @ 2010-01-25 14:08 UTC (permalink / raw)
To: u-boot
On Sun, Jan 24, 2010 at 5:37 AM, Tom <Tom.Rix@windriver.com> wrote:
> Khasim Syed Mohammed wrote:
>>
>> From ca6c186c40fafaf0bf53f5f3e90057c0a34374f9 Mon Sep 17 00:00:00 2001
>> From: Syed Mohammed Khasim <khasim@ti.com>
>> Date: Mon, 18 Jan 2010 18:22:09 +0530
>> Subject: [PATCH] API to set twl4030 voltage and dev group
>>
>> V3:
>> Incorporated review comments to set voltage first
>> and then dev group
>>
>> V2:
>> Incorporated review comments to split the patch and
>> add generic API to set the voltage and device group.
>> http://www.mail-archive.com/u-boot at lists.denx.de/msg27136.html
>>
>> V1:
>> Added support for 720 Mhz
>> http://www.mail-archive.com/u-boot at lists.denx.de/msg27035.html
>>
>> Signed-off-by: Syed Mohammed Khasim <khasim@ti.com>
>> ---
>> ?drivers/power/twl4030.c | ? 24 +++++++++++++++---------
>> ?include/twl4030.h ? ? ? | ? 16 ++++++++++++++++
>> ?2 files changed, 31 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
>> index eb066cb..f25b58f 100644
>> --- a/drivers/power/twl4030.c
>> +++ b/drivers/power/twl4030.c
>> @@ -59,16 +59,9 @@ void twl4030_power_reset_init(void)
>> ? ? ? ?}
>> ?}
>>
>> -
>> ?/*
>> ?* Power Init
>> ?*/
>> -#define DEV_GRP_P1 ? ? ? ? ? ? 0x20
>> -#define VAUX3_VSEL_28 ? ? ? ? ?0x03
>> -#define DEV_GRP_ALL ? ? ? ? ? ?0xE0
>> -#define VPLL2_VSEL_18 ? ? ? ? ?0x05
>> -#define VDAC_VSEL_18 ? ? ? ? ? 0x03
>> -
>> ?void twl4030_power_init(void)
>> ?{
>> ? ? ? ?unsigned char byte;
>> @@ -98,8 +91,6 @@ void twl4030_power_init(void)
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? TWL4030_PM_RECEIVER_VDAC_DEDICATED);
>> ?}
>>
>> -#define VMMC1_VSEL_30 ? ? ? ? ?0x02
>> -
>> ?void twl4030_power_mmc_init(void)
>> ?{
>> ? ? ? ?unsigned char byte;
>> @@ -113,3 +104,18 @@ void twl4030_power_mmc_init(void)
>> ? ? ? ?twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? TWL4030_PM_RECEIVER_VMMC1_DEDICATED);
>> ?}
>> +
>> +/*
>> + * Generic function to select Device Group and Voltage
>> + */
>> +void twl4030_pmrecv_vsel_cfg(u8 vsel_reg, u8 vsel_val,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? u8 dev_grp, u8 dev_grp_sel)
>> +{
>> + ? ? ? /* Select the Voltage */
>> + ? ? ? twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, vsel_val,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? vsel_reg);
>> +
>> + ? ? ? /* Select the Device Group */
>> + ? ? ? twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, dev_grp_sel,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? dev_grp);
>> +}
>> diff --git a/include/twl4030.h b/include/twl4030.h
>> index 2b2f5ae..9bdd3ea 100644
>> --- a/include/twl4030.h
>> +++ b/include/twl4030.h
>> @@ -471,6 +471,22 @@
>> ?#define TWL4030_USB_PHY_CLK_CTRL_STS ? ? ? ? ? ? ? ? ? 0xFF
>>
>> ?/*
>> + * Voltage Selection in PM Receiver Module
>> + */
>> +#define VAUX2_VSEL_18 ? ? ? ? ?0x05
>> +#define VDD1_VSEL_14 ? ? ? ? ? 0x40
>> +#define VAUX3_VSEL_28 ? ? ? ? ?0x03
>> +#define VPLL2_VSEL_18 ? ? ? ? ?0x05
>> +#define VDAC_VSEL_18 ? ? ? ? ? 0x03
>> +#define VMMC1_VSEL_30 ? ? ? ? ?0x02
>> +
>
> Remain consistent with existing naming
> Use the TWL4030_PM_RECEIVER prefix
>
Are you sure, you want to do this
VMMC1_VSEL_30
Changed to
TWL4030_PM_RECEIVER_VMMC1_VSEL_30
It looks very awkward to me, More over the prefix is used for register
definition already. This is bit value - Kindly confirm
Regards,
Khasim
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] TI:OMAP: [PATCH 3/7] API to set twl4030 voltage and dev group
2010-01-25 14:08 ` Khasim Syed Mohammed
@ 2010-01-25 15:06 ` Tom
0 siblings, 0 replies; 5+ messages in thread
From: Tom @ 2010-01-25 15:06 UTC (permalink / raw)
To: u-boot
Khasim Syed Mohammed wrote:
> On Sun, Jan 24, 2010 at 5:37 AM, Tom <Tom.Rix@windriver.com> wrote:
>> Khasim Syed Mohammed wrote:
>>> From ca6c186c40fafaf0bf53f5f3e90057c0a34374f9 Mon Sep 17 00:00:00 2001
>>> From: Syed Mohammed Khasim <khasim@ti.com>
>>> Date: Mon, 18 Jan 2010 18:22:09 +0530
>>> Subject: [PATCH] API to set twl4030 voltage and dev group
>>>
>>> V3:
>>> Incorporated review comments to set voltage first
>>> and then dev group
>>>
>>> V2:
>>> Incorporated review comments to split the patch and
>>> add generic API to set the voltage and device group.
>>> http://www.mail-archive.com/u-boot at lists.denx.de/msg27136.html
>>>
>>> V1:
>>> Added support for 720 Mhz
>>> http://www.mail-archive.com/u-boot at lists.denx.de/msg27035.html
>>>
>>> Signed-off-by: Syed Mohammed Khasim <khasim@ti.com>
>>> ---
>>> drivers/power/twl4030.c | 24 +++++++++++++++---------
>>> include/twl4030.h | 16 ++++++++++++++++
>>> 2 files changed, 31 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
>>> index eb066cb..f25b58f 100644
>>> --- a/drivers/power/twl4030.c
>>> +++ b/drivers/power/twl4030.c
>>> @@ -59,16 +59,9 @@ void twl4030_power_reset_init(void)
>>> }
>>> }
>>>
>>> -
>>> /*
>>> * Power Init
>>> */
>>> -#define DEV_GRP_P1 0x20
>>> -#define VAUX3_VSEL_28 0x03
>>> -#define DEV_GRP_ALL 0xE0
>>> -#define VPLL2_VSEL_18 0x05
>>> -#define VDAC_VSEL_18 0x03
>>> -
>>> void twl4030_power_init(void)
>>> {
>>> unsigned char byte;
>>> @@ -98,8 +91,6 @@ void twl4030_power_init(void)
>>> TWL4030_PM_RECEIVER_VDAC_DEDICATED);
>>> }
>>>
>>> -#define VMMC1_VSEL_30 0x02
>>> -
>>> void twl4030_power_mmc_init(void)
>>> {
>>> unsigned char byte;
>>> @@ -113,3 +104,18 @@ void twl4030_power_mmc_init(void)
>>> twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
>>> TWL4030_PM_RECEIVER_VMMC1_DEDICATED);
>>> }
>>> +
>>> +/*
>>> + * Generic function to select Device Group and Voltage
>>> + */
>>> +void twl4030_pmrecv_vsel_cfg(u8 vsel_reg, u8 vsel_val,
>>> + u8 dev_grp, u8 dev_grp_sel)
>>> +{
>>> + /* Select the Voltage */
>>> + twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, vsel_val,
>>> + vsel_reg);
>>> +
>>> + /* Select the Device Group */
>>> + twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, dev_grp_sel,
>>> + dev_grp);
>>> +}
>>> diff --git a/include/twl4030.h b/include/twl4030.h
>>> index 2b2f5ae..9bdd3ea 100644
>>> --- a/include/twl4030.h
>>> +++ b/include/twl4030.h
>>> @@ -471,6 +471,22 @@
>>> #define TWL4030_USB_PHY_CLK_CTRL_STS 0xFF
>>>
>>> /*
>>> + * Voltage Selection in PM Receiver Module
>>> + */
>>> +#define VAUX2_VSEL_18 0x05
>>> +#define VDD1_VSEL_14 0x40
>>> +#define VAUX3_VSEL_28 0x03
>>> +#define VPLL2_VSEL_18 0x05
>>> +#define VDAC_VSEL_18 0x03
>>> +#define VMMC1_VSEL_30 0x02
>>> +
>> Remain consistent with existing naming
>> Use the TWL4030_PM_RECEIVER prefix
>>
> Are you sure, you want to do this
>
> VMMC1_VSEL_30
>
> Changed to
>
> TWL4030_PM_RECEIVER_VMMC1_VSEL_30
>
> It looks very awkward to me, More over the prefix is used for register
> definition already. This is bit value - Kindly confirm
Yes
The goal is to be consistent.
Tom
>
> Regards,
> Khasim
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-25 15:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-18 13:56 [U-Boot] TI:OMAP: [PATCH 3/7] API to set twl4030 voltage and dev group Khasim Syed Mohammed
2010-01-24 0:07 ` Tom
2010-01-25 14:08 ` Khasim Syed Mohammed
2010-01-25 15:06 ` Tom
-- strict thread matches above, loose matches on Subject: below --
2010-01-12 19:03 Khasim Syed Mohammed
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox