Re: Nokia N900 - audio TPA6130A2 problems

From: Mark Brown
Date: Mon Mar 21 2016 - 07:46:01 EST


On Sun, Mar 20, 2016 at 06:17:04AM +0100, Sebastian Reichel wrote:
> On Sat, Mar 19, 2016 at 10:49:57AM +0200, Ivaylo Dimitrov wrote:

> > [ 7.215728] twl4030reg_is_enabled VMMC2 state 0x0000002e
> > [ 7.223205] twl4030reg_is_enabled VMMC2 state 0x0000002e

> Ok, so normal power up results in running VMMC2 (always-on works),
> but voltage is not configured correctly. 2.6V is default according
> to the TRM. I think this is a "bug" in the regulator framework. It
> should setup the minimum allowed voltage before enabling the
> always-on regulator.

No, if the voltage is variable we can't tell what the current
constraints are without something telling us so we just don't vary the
voltage until we're told to do this. If we immediately lower the
voltage to the minimum supported voltage that's going to break things.

> In case of the tpa6130a2/tpa6140a2 driver it may also be nice to add
> something like this to the driver (Vdd may be between 2.5V and 5.5V
> according to both datasheets):

> if (regulator_can_change_voltage(data->supply))
> regulator_set_voltage(data->supply, 2500000, 5500000);

This is completely broken. A consumer should never need to check to see
if the voltage can be varied and if the device doesn't actually need to
change the voltage as a part of the functionality it delivers then it
should just leave it up to the board constraints to set something, the
actual constaints will be much tighter than the device constraints and
there's a reasonable chance that there may be software compatible
variants of the device with different supply requirements.

Attachment: signature.asc
Description: PGP signature