linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Nokia N900: twl4030-power different data in DTS and board code
@ 2016-01-02 14:13 Pali Rohár
  2016-01-02 17:14 ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Pali Rohár @ 2016-01-02 14:13 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Ivaylo Dimitrov, Pavel Machel, Sebastian Reichel, Nishanth Menon,
	Aaro Koskinen, linux-omap, linux-kernel

[-- Attachment #1: Type: Text/Plain, Size: 989 bytes --]

Hello,

now I'm looking at differences between legacy board code and DTS file
for Nokia N900 and I see some inconsistency for twl4030-power driver.

In board code are defined more twl4030 power scripts which override
defaults defined in twl4030-power code. See:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/mach-omap2/board-rx51-peripherals.c#n790

Next in DTS file is defined just "compatible" keyword, but no custom
scripts, see:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/omap3-n900.dts#n416

And the last in DTS file is defined line:

compatible = "ti,twl4030-power-n900" 

which is not in twl4030-power driver itself, see:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/mfd/twl4030-power.c#n851

So all this stuff looks like some errors when board code was ported to
DTS. Tony, can you look at this at all?

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Nokia N900: twl4030-power different data in DTS and board code
  2016-01-02 14:13 Nokia N900: twl4030-power different data in DTS and board code Pali Rohár
@ 2016-01-02 17:14 ` Tony Lindgren
  2016-01-02 21:39   ` Pali Rohár
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2016-01-02 17:14 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Ivaylo Dimitrov, Pavel Machel, Sebastian Reichel, Nishanth Menon,
	Aaro Koskinen, linux-omap, linux-kernel

* Pali Rohár <pali.rohar@gmail.com> [160102 06:14]:
> Hello,
> 
> now I'm looking at differences between legacy board code and DTS file
> for Nokia N900 and I see some inconsistency for twl4030-power driver.
> 
> In board code are defined more twl4030 power scripts which override
> defaults defined in twl4030-power code. See:
> 
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/mach-omap2/board-rx51-peripherals.c#n790
> 
> Next in DTS file is defined just "compatible" keyword, but no custom
> scripts, see:
> 
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/omap3-n900.dts#n416
> 
> And the last in DTS file is defined line:
> 
> compatible = "ti,twl4030-power-n900" 
> 
> which is not in twl4030-power driver itself, see:
> 
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/mfd/twl4030-power.c#n851
> 
> So all this stuff looks like some errors when board code was ported to
> DTS. Tony, can you look at this at all?

AFAIK it should work fine with the generic "ti,twl4030-power-idle-osc-off".
This means reboot works and regulators are cut off during off mode.

The n900 specific code was based on something before the TI generic values
were available I think. And the last time I looked at it I came to the
conclusion the n900 specific code is no better.

Or did I miss something? Are you seeing some issues with PM with dts based
code?

We can certainly add it to twl4030-power if it provides something that
the "ti,twl4030-power-idle-osc-off" does not.

Regards,

Tony

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Nokia N900: twl4030-power different data in DTS and board code
  2016-01-02 17:14 ` Tony Lindgren
@ 2016-01-02 21:39   ` Pali Rohár
  2016-01-04 16:50     ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Pali Rohár @ 2016-01-02 21:39 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Ivaylo Dimitrov, Pavel Machel, Sebastian Reichel, Nishanth Menon,
	Aaro Koskinen, linux-omap, linux-kernel

[-- Attachment #1: Type: Text/Plain, Size: 2074 bytes --]

On Saturday 02 January 2016 18:14:31 Tony Lindgren wrote:
> * Pali Rohár <pali.rohar@gmail.com> [160102 06:14]:
> > Hello,
> > 
> > now I'm looking at differences between legacy board code and DTS
> > file for Nokia N900 and I see some inconsistency for twl4030-power
> > driver.
> > 
> > In board code are defined more twl4030 power scripts which override
> > defaults defined in twl4030-power code. See:
> > 
> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tre
> > e/arch/arm/mach-omap2/board-rx51-peripherals.c#n790
> > 
> > Next in DTS file is defined just "compatible" keyword, but no
> > custom scripts, see:
> > 
> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tre
> > e/arch/arm/boot/dts/omap3-n900.dts#n416
> > 
> > And the last in DTS file is defined line:
> > 
> > compatible = "ti,twl4030-power-n900"
> > 
> > which is not in twl4030-power driver itself, see:
> > 
> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tre
> > e/drivers/mfd/twl4030-power.c#n851
> > 
> > So all this stuff looks like some errors when board code was ported
> > to DTS. Tony, can you look at this at all?
> 
> AFAIK it should work fine with the generic
> "ti,twl4030-power-idle-osc-off". This means reboot works and
> regulators are cut off during off mode.

Ok.

> The n900 specific code was based on something before the TI generic
> values were available I think. And the last time I looked at it I
> came to the conclusion the n900 specific code is no better.

Hm... if generic values are better, why old values are still there (in 
board n900 code)?

> Or did I miss something? Are you seeing some issues with PM with dts
> based code?

I'm just asking why we have different code for DST and board...

> We can certainly add it to twl4030-power if it provides something
> that the "ti,twl4030-power-idle-osc-off" does not.

But do we need 'compatible = "ti,twl4030-power-n900"' specification in 
omap3-n900.dts file at all?

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Nokia N900: twl4030-power different data in DTS and board code
  2016-01-02 21:39   ` Pali Rohár
@ 2016-01-04 16:50     ` Tony Lindgren
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2016-01-04 16:50 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Ivaylo Dimitrov, Pavel Machel, Sebastian Reichel, Nishanth Menon,
	Aaro Koskinen, linux-omap, linux-kernel

* Pali Rohár <pali.rohar@gmail.com> [160102 13:39]:
> On Saturday 02 January 2016 18:14:31 Tony Lindgren wrote:
> 
> > The n900 specific code was based on something before the TI generic
> > values were available I think. And the last time I looked at it I
> > came to the conclusion the n900 specific code is no better.
> 
> Hm... if generic values are better, why old values are still there (in 
> board n900 code)?

We never had PM working in a generic way for the legacy booting but
relied on board specific configuration instead for the ones that did
work. Probably not worth changing the board-*.c file configuration
unless you want to test that the new generic settings work.

> > Or did I miss something? Are you seeing some issues with PM with dts
> > based code?
> 
> I'm just asking why we have different code for DST and board...

OK. Yeah no reason beyond somebody taking the time to verify that the
generic settings work on n900 in legacy booting mode :)

> > We can certainly add it to twl4030-power if it provides something
> > that the "ti,twl4030-power-idle-osc-off" does not.
> 
> But do we need 'compatible = "ti,twl4030-power-n900"' specification in 
> omap3-n900.dts file at all?

Well that generally done to allow adding support for the board specific
configuration if needed with a fallback to the generic configuration.
That's used quite a bit, for example boards typically set the compatible
to the specific board but still end up booting with a generic one
sucha as "ti,omap3".

Regards,

Tony



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-04 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-02 14:13 Nokia N900: twl4030-power different data in DTS and board code Pali Rohár
2016-01-02 17:14 ` Tony Lindgren
2016-01-02 21:39   ` Pali Rohár
2016-01-04 16:50     ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).