Hi!
> > > 055555fc459 ("usb: musb: core: Fix handling of the phy notifications")
> > > 03e43528ab68 ("usb: musb: Fix unbalanced pm_runtime_enable")
> >
> > Ok, with that, I can insmod and rmmod. But I still get:
> >
> > 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
>
> I think the cm_idlest_per is fine.
>
> > ffdffebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00200042
> > 0000000d 48004a28 (fa004a28) cm_idlest3_core
>
> Bit 21 in cm_idlest1_core is for MCSPI4 so WLAN. Does that go
> down if do sleep 5; cat /sys/kernel/debug/pm_debug/count ?
>
> If not, the're PM runtime missing or broken somewhere.
>
> FYI, below is my omap3 usb test script that I use to start and
> stop USB, it also works on n900. And after stopping it n900
> continues hitting deeper idle states just fine.
You rmmod musb_hdrc, so I checked, and found:
550a7375f (Felipe Balbi 2008-07-24 12:27:36 +0300 1093)
static void musb_shutdown(struct platform_de
vice *pdev)
550a7375f (Felipe Balbi 2008-07-24 12:27:36 +0300 1094) {
550a7375f (Felipe Balbi 2008-07-24 12:27:36 +0300 1095)
struct musb *musb = dev_to_musb(&pdev
->dev);
550a7375f (Felipe Balbi 2008-07-24 12:27:36 +0300 1096)
unsigned long flags;
550a7375f (Felipe Balbi 2008-07-24 12:27:36 +0300 1097)
4f9edd2d7 (Hema HK 2011-03-22 16:02:12 +0530 1098)
pm_runtime_get_sync(musb->controller);
24307caef (Grazvydas Ignotas 2012-01-12 15:22:45 +0200 1099)
2cc65feab (Daniel Mack 2013-04-10 21:55:47 +0200 1100)
musb_host_cleanup(musb);
24307caef (Grazvydas Ignotas 2012-01-12 15:22:45 +0200 1101)
musb_gadget_cleanup(musb);
24307caef (Grazvydas Ignotas 2012-01-12 15:22:45 +0200 1102)
550a7375f (Felipe Balbi 2008-07-24 12:27:36 +0300 1103)
spin_lock_irqsave(&musb->lock, flags);
550a7375f (Felipe Balbi 2008-07-24 12:27:36 +0300 1104)
musb_platform_disable(musb);
550a7375f (Felipe Balbi 2008-07-24 12:27:36 +0300 1105)
musb_generic_disable(musb);
550a7375f (Felipe Balbi 2008-07-24 12:27:36 +0300 1106)
spin_unlock_irqrestore(&musb->lock, flags
);
550a7375f (Felipe Balbi 2008-07-24 12:27:36 +0300 1107)
120d074c5 (Grazvydas Ignotas 2010-10-10 13:52:22 -0500 1108)
musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
120d074c5 (Grazvydas Ignotas 2010-10-10 13:52:22 -0500 1109)
musb_platform_exit(musb);
120d074c5 (Grazvydas Ignotas 2010-10-10 13:52:22 -0500 1110)
4f9edd2d7 (Hema HK 2011-03-22 16:02:12 +0530 1111)
pm_runtime_put(musb->controller);
550a7375f (Felipe Balbi 2008-07-24 12:27:36 +0300 1112)
/* FIXME power down */
550a7375f (Felipe Balbi 2008-07-24 12:27:36 +0300 1113) }
I thought i was responsible for the FIXME, but apparently not... If
you happen to have some changes there, that would be useful to
know....
Ok, another attempt at shutting USB down:
00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
f7dffe9d 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00200062
0000000d 48004a28 (fa004a28) cm_idlest3_core
Tried again today:
00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
f7dffe9d 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00200062
0000000d 48004a28 (fa004a28) cm_idlest3_core
pavel@n900:/my/tui/ofone$ sleep test
00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
ffde7e9d 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218062
0000000d 48004a28 (fa004a28) cm_idlest3_core
00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
fedffe9d 48004a20 (fa004a20) cm_idlest1_core blocking bits: 01200062
0000000d 48004a28 (fa004a28) cm_idlest3_core
00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
ffde7e9d 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218062
0000000d 48004a28 (fa004a28) cm_idlest3_core
Is there documentation for the cm_idlest1_ bits?
How idle system do I need to have? Screen is blanked and machine
should be mostly idle, but there's X running on another vt with Mate
desktop, and some python scripts... GSM modem should be online.
Are you booting over USB from NOLO?
Thanks and best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
* Pavel Machek <[email protected]> [160323 05:38]:
>
> Ok, another attempt at shutting USB down:
>
> 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> f7dffe9d 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00200062
> 0000000d 48004a28 (fa004a28) cm_idlest3_core
>
> Tried again today:
>
> 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> f7dffe9d 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00200062
> 0000000d 48004a28 (fa004a28) cm_idlest3_core
> pavel@n900:/my/tui/ofone$ sleep test
>
> 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> ffde7e9d 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218062
> 0000000d 48004a28 (fa004a28) cm_idlest3_core
>
> 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> fedffe9d 48004a20 (fa004a20) cm_idlest1_core blocking bits: 01200062
> 0000000d 48004a28 (fa004a28) cm_idlest3_core
>
> 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> ffde7e9d 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218062
> 0000000d 48004a28 (fa004a28) cm_idlest3_core
>
> Is there documentation for the cm_idlest1_ bits?
Yes, see the TRM.
> How idle system do I need to have? Screen is blanked and machine
> should be mostly idle, but there's X running on another vt with Mate
> desktop, and some python scripts... GSM modem should be online.
Well I think it's the USB only you have blocking deeper idle states.
Are you sure you rmmod:ed all the USB related modules like in my
test script?
MUSB currently has an unresolved issue where it blocks idle states
if loaded.
> Are you booting over USB from NOLO?
I'm booting over smc91x using u-boot.
Regards,
Tony
On Wednesday 30 March 2016 12:12:09 Tony Lindgren wrote:
> > How idle system do I need to have? Screen is blanked and machine
> > should be mostly idle, but there's X running on another vt with Mate
> > desktop, and some python scripts... GSM modem should be online.
>
> Well I think it's the USB only you have blocking deeper idle states.
>
> Are you sure you rmmod:ed all the USB related modules like in my
> test script?
>
> MUSB currently has an unresolved issue where it blocks idle states
> if loaded.
Is somebody working on this musb issue? Is there any progress?
--
Pali Rohár
[email protected]
Hi!
> > How idle system do I need to have? Screen is blanked and machine
> > should be mostly idle, but there's X running on another vt with Mate
> > desktop, and some python scripts... GSM modem should be online.
>
> Well I think it's the USB only you have blocking deeper idle states.
>
> Are you sure you rmmod:ed all the USB related modules like in my
> test script?
I tested with rmmoding two, and then modified kernel to do equivalent
operations.
Let me try again:
phy_module=phy_twl4030_usb
udc_glue=omap2430
udc_module=musb_hdrc
Ok, I did "start" with your script. After some fiddling it seems to
work, and PC detected the values:
[25379.533127] usb 1-5: USB disconnect, device number 12
[27161.884132] usb 1-5: new high-speed USB device number 13 using
ehci-pci
[27161.996037] usb 1-5: device descriptor read/64, error -32
[27162.420048] usb 4-1: new full-speed USB device number 2 using
uhci_hcd
[27162.563098] usb 4-1: not running at top speed; connect to a high
speed hub
[27162.601106] usb 4-1: New USB device found, idVendor=1d6b,
idProduct=0106
[27162.601112] usb 4-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[27162.601115] usb 4-1: Product: Multi Gadget
[27162.601118] usb 4-1: Manufacturer: foo
[27162.601121] usb 4-1: SerialNumber: 123456789
[27162.614766] cdc_ether 4-1:1.0 usb0: register 'cdc_ether' at
usb-0000:00:1d.2-1, CDC Ethernet Device, c6:8b:83:74:f2:f3
[27163.195272] cdc_ether 4-1:1.0 usb0: kevent 12 may have been dropped
Stop seemed to work, too:
root@n900:/my/tui/ofone# ./gadgets.sh stop
rm: cannot remove `configs/c.1/acm.0': No such file or directory
rm: cannot remove `configs/c.5/acm.0': No such file or directory
rmdir: failed to remove `functions/acm.0': No such file or directory
./gadgets.sh: line 74: functions/mass_storage.0/lun.0/file: No such
file or directory
rm: cannot remove `configs/c.1/mass_storage.0': No such file or
directory
rm: cannot remove `configs/c.5/mass_storage.0': No such file or
directory
rmdir: failed to remove `functions/mass_storage.0': No such file or
directory
root@n900:/my/tui/ofone# lsmod
Module Size Used by
root@n900:/my/tui/ofone#
Display off, on wifi:
00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
f7de7ebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218042
0000000d 48004a28 (fa004a28) cm_idlest3_core
00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
ffde7ebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218042
00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
ffdffebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00200042
..so I believe gadget bits are still set.
> I'm booting over smc91x using u-boot.
I'm booting directly from NOLO over usb. Machine is running X, but
they are not active -- chvt. Screen is off.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
* Pavel Machek <[email protected]> [160404 14:31]:
>
> Display off, on wifi:
>
> 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> f7de7ebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218042
> 0000000d 48004a28 (fa004a28) cm_idlest3_core
>
> 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> ffde7ebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218042
>
> 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> ffdffebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00200042
>
> ..so I believe gadget bits are still set.
Nope, you got PM working now for the USB as it's now ending with 0x42
instead of 0x62 :) You still have bit 21 blocking, sorry don't
remember what that one is, but that's in the TRM for idlest1
register.
Regards,
Tony
* Pali Rohár <[email protected]> [160404 04:10]:
> On Wednesday 30 March 2016 12:12:09 Tony Lindgren wrote:
> > > How idle system do I need to have? Screen is blanked and machine
> > > should be mostly idle, but there's X running on another vt with Mate
> > > desktop, and some python scripts... GSM modem should be online.
> >
> > Well I think it's the USB only you have blocking deeper idle states.
> >
> > Are you sure you rmmod:ed all the USB related modules like in my
> > test script?
> >
> > MUSB currently has an unresolved issue where it blocks idle states
> > if loaded.
>
> Is somebody working on this musb issue? Is there any progress?
No idea when I might get to it.. Please take a look if you have a
chance to work on it, I think all we have to do:
1. Change musb_gadget_pullup() to run as tasklet/delayed_work to
avoid trying to access I2C PHY's from atomic context. See
3e43a0725637 ("usb: musb: core: add pm_runtime_irq_safe()")
for more info. Not sure if this should be done in a generic
way or for MUSB only. It could be that I remember wrong what
I thought needs to be done. But we want to get rid of the
pm_runtime_irq_save() as that currently forever blocks PM
for the MUSB hardware specific wrapper driver.
2. Remove pm_runtime_irq_safe() added in commit 3e43a0725637
Adding Bin to Cc, maybe he has some better fix in mind.
Regards,
Tony
On Mon 2016-04-04 15:07:49, Tony Lindgren wrote:
> * Pavel Machek <[email protected]> [160404 14:31]:
> >
> > Display off, on wifi:
> >
> > 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> > f7de7ebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218042
> > 0000000d 48004a28 (fa004a28) cm_idlest3_core
> >
> > 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> > ffde7ebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218042
> >
> > 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> > ffdffebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00200042
> >
> > ..so I believe gadget bits are still set.
>
> Nope, you got PM working now for the USB as it's now ending with 0x42
> instead of 0x62 :) You still have bit 21 blocking, sorry don't
> remember what that one is, but that's in the TRM for idlest1
> register.
Aha... I thought the "0x42" was the problem, not "0x30". That was
going on and off for me for a long while. Actually, I don't think I
did anything special with USB gadget in this boot, and it is still
0x42.
Bit 21 is wifi, AFAICT. With right sleeps between reading the debug
file and talking to wifi, I now get:
Battery 4.16V 4.18V 4.14V 95% 93% 100% 1569/1569 mAh Charging
49/650/1800 mA
fffffebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00000042
Battery 4.16V 4.18V 4.14V 95% 93% 100% 1569/1569 mAh Charging
48/650/1800 mA
fffffebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00000042
0x02 seems to be SDRC.
0x40 seems to be OMAPCTRL
I get
0x18000 randomly, too. That should be I2C1, and I2C2. But even when
idlest1_blocking_bits are 0x42, the left and right backlight on
keyboard is lit constantly -- not blinking -- indicating that it is
still not sleeping.
Full debug is:
Battery 4.15V 4.18V 4.13V 94% 93% 100% 1569/1569 mAh Charging
29/650/1800 mA
usbhost_pwrdm
(ON),OFF:12183,RET:277831,INA:0,ON:290015,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
sgx_pwrdm
(OFF),OFF:1,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
core_pwrdm
(ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0
per_pwrdm
(ON),OFF:12183,RET:0,INA:0,ON:12184,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
dss_pwrdm
(ON),OFF:12183,RET:267009,INA:0,ON:279193,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
cam_pwrdm
(ON),OFF:12183,RET:277826,INA:2,ON:290012,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
neon_pwrdm (ON),OFF:12183,RET:277832,INA:0,ON:290016,RET-LOGIC-OFF:0
mpu_pwrdm
(ON),OFF:12183,RET:277830,INA:0,ON:290014,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
iva2_pwrdm
(OFF),OFF:1,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0
usbhost_clkdm->usbhost_pwrdm (1)
sgx_clkdm->sgx_pwrdm (0)
per_clkdm->per_pwrdm (19)
cam_clkdm->cam_pwrdm (1)
dss_clkdm->dss_pwrdm (1)
d2d_clkdm->core_pwrdm (0)
iva2_clkdm->iva2_pwrdm (0)
mpu_clkdm->mpu_pwrdm (0)
core_l4_clkdm->core_pwrdm (19)
core_l3_clkdm->core_pwrdm (1)
neon_clkdm->neon_pwrdm (0)
00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
fffffebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00000042
0000000d 48004a28 (fa004a28) cm_idlest3_core
^CTraceback (most recent call last):
File "./sleepmond", line 24, in <module>
time.sleep(5)
KeyboardInterrupt
Anything else I should look at?
Thanks and best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi!
> >
> > Display off, on wifi:
> >
> > 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> > f7de7ebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218042
> > 0000000d 48004a28 (fa004a28) cm_idlest3_core
> >
> > 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> > ffde7ebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218042
> >
> > 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> > ffdffebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00200042
> >
> > ..so I believe gadget bits are still set.
>
> Nope, you got PM working now for the USB as it's now ending with 0x42
> instead of 0x62 :) You still have bit 21 blocking, sorry don't
> remember what that one is, but that's in the TRM for idlest1
> register.
Looking more through the registers... GPIO banks seem to be listed in
cm_idlest_per. You mentioned that they should be automatically
controlled? Does that still work when they are exported to the
userspace?
pavel@n900:~$ ls /sys/class/gpio/
export gpio177 gpio73 gpio75 gpiochip128 gpiochip32
gpiochip64 unexport
gpio157 gpio70 gpio74 gpiochip0 gpiochip160 gpiochip494
gpiochip96
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi!
> * Pavel Machek <[email protected]> [160404 14:31]:
> >
> > Display off, on wifi:
> >
> > 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> > f7de7ebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218042
> > 0000000d 48004a28 (fa004a28) cm_idlest3_core
> >
> > 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> > ffde7ebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00218042
> >
> > 00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
> > ffdffebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00200042
> >
> > ..so I believe gadget bits are still set.
>
> Nope, you got PM working now for the USB as it's now ending with 0x42
> instead of 0x62 :) You still have bit 21 blocking, sorry don't
> remember what that one is, but that's in the TRM for idlest1
> register.
Ok, I realized that _something_ set up my keyboard on console, too, so
I'm able to do "init 1" and still interact with the console.
cm_idlest1_core blocking bits are now 0x42 pretty consistently. But
they stay 0x42, even when screen is on (and screen on prevents low
power, right?) so I guess they are not the whole story.
I'm able to get down to 50mA power consumption with screen off. I was
getting 90mA with X, wifi in powersave and screen off.
Head proximity sensor is still on in this configuration. But I guess
that should not keep the system busy...?
Ok, wait a moment, I'm getting "Camera Focus", "Camera Capture" and
"Lock button" interrupts ... at something like 20/second. Without
touching anything. Hmm. Also "pm_wkup", but that might be
expected. Plus, 49052000.gpio and 49054000.gpio are rather
active. Might be related to the above. Also "gp_timer" and
48070000.i2c are active, perhaps also related. I don't think I have
the camera working...
"Lock button" interrupt stops increasing as long as I hold the lock
button in the "unlock" position. "Camera Focus" and "Camera Capture"
will stop increasing when I hold down the Camera button.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
* Pavel Machek <[email protected]> [160405 07:23]:
>
> Ok, I realized that _something_ set up my keyboard on console, too, so
> I'm able to do "init 1" and still interact with the console.
>
> cm_idlest1_core blocking bits are now 0x42 pretty consistently. But
> they stay 0x42, even when screen is on (and screen on prevents low
> power, right?) so I guess they are not the whole story.
Yes they stay at 0x42. And it seems you've configured the UART
idle timeouts too.
> I'm able to get down to 50mA power consumption with screen off. I was
> getting 90mA with X, wifi in powersave and screen off.
>
> Head proximity sensor is still on in this configuration. But I guess
> that should not keep the system busy...?
>
> Ok, wait a moment, I'm getting "Camera Focus", "Camera Capture" and
> "Lock button" interrupts ... at something like 20/second. Without
> touching anything. Hmm. Also "pm_wkup", but that might be
> expected. Plus, 49052000.gpio and 49054000.gpio are rather
> active. Might be related to the above. Also "gp_timer" and
> 48070000.i2c are active, perhaps also related. I don't think I have
> the camera working...
Hmm that does not sound right at all for the GPIOs. The pm_wkup
interrupt triggers every time you hit wfi pretty much, so that
should be OK.
> "Lock button" interrupt stops increasing as long as I hold the lock
> button in the "unlock" position. "Camera Focus" and "Camera Capture"
> will stop increasing when I hold down the Camera button.
I have not seen that issue last time I checked. Sorry won't
be able to test it until Thursday, maybe there's some GPIO
regression now.
Regards,
Tony
Hi!
> > Ok, I realized that _something_ set up my keyboard on console, too, so
> > I'm able to do "init 1" and still interact with the console.
> >
> > cm_idlest1_core blocking bits are now 0x42 pretty consistently. But
> > they stay 0x42, even when screen is on (and screen on prevents low
> > power, right?) so I guess they are not the whole story.
>
> Yes they stay at 0x42. And it seems you've configured the UART
> idle timeouts too.
Yes, thanks for the script ;-).
> > I'm able to get down to 50mA power consumption with screen off. I was
> > getting 90mA with X, wifi in powersave and screen off.
> >
> > Head proximity sensor is still on in this configuration. But I guess
> > that should not keep the system busy...?
> >
> > Ok, wait a moment, I'm getting "Camera Focus", "Camera Capture" and
> > "Lock button" interrupts ... at something like 20/second. Without
> > touching anything. Hmm. Also "pm_wkup", but that might be
> > expected. Plus, 49052000.gpio and 49054000.gpio are rather
> > active. Might be related to the above. Also "gp_timer" and
> > 48070000.i2c are active, perhaps also related. I don't think I have
> > the camera working...
>
> Hmm that does not sound right at all for the GPIOs. The pm_wkup
> interrupt triggers every time you hit wfi pretty much, so that
> should be OK.
Wifi was down at that point.
Some more testing: after boot, interrupt counts stay low, as
expected. But when I attempt to enable power management, they start
rising. Sometimes 60/second, sometimes less.
Things are fine as long as I don't enable the off mode; when I enable
the off mode, "echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode"
interrupt counts start rising immediately. "echo 0 >
/sys/kernel/debug/pm_debug/enable_off_mode" stops that.
But no matter what configuration, activity LEDs still indicate it is
busy, and idle power consumption is cca 53mA.
> > "Lock button" interrupt stops increasing as long as I hold the lock
> > button in the "unlock" position. "Camera Focus" and "Camera Capture"
> > will stop increasing when I hold down the Camera button.
>
> I have not seen that issue last time I checked. Sorry won't
> be able to test it until Thursday, maybe there's some GPIO
> regression now.
No problem, thanks for all the help.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi,
* Pavel Machek <[email protected]> [160405 13:52]:
> Hi!
>
> > > Ok, I realized that _something_ set up my keyboard on console, too, so
> > > I'm able to do "init 1" and still interact with the console.
> > >
> > > cm_idlest1_core blocking bits are now 0x42 pretty consistently. But
> > > they stay 0x42, even when screen is on (and screen on prevents low
> > > power, right?) so I guess they are not the whole story.
> >
> > Yes they stay at 0x42. And it seems you've configured the UART
> > idle timeouts too.
>
> Yes, thanks for the script ;-).
>
> > > I'm able to get down to 50mA power consumption with screen off. I was
> > > getting 90mA with X, wifi in powersave and screen off.
> > >
> > > Head proximity sensor is still on in this configuration. But I guess
> > > that should not keep the system busy...?
> > >
> > > Ok, wait a moment, I'm getting "Camera Focus", "Camera Capture" and
> > > "Lock button" interrupts ... at something like 20/second. Without
> > > touching anything. Hmm. Also "pm_wkup", but that might be
> > > expected. Plus, 49052000.gpio and 49054000.gpio are rather
> > > active. Might be related to the above. Also "gp_timer" and
> > > 48070000.i2c are active, perhaps also related. I don't think I have
> > > the camera working...
> >
> > Hmm that does not sound right at all for the GPIOs. The pm_wkup
> > interrupt triggers every time you hit wfi pretty much, so that
> > should be OK.
>
> Wifi was down at that point.
>
> Some more testing: after boot, interrupt counts stay low, as
> expected. But when I attempt to enable power management, they start
> rising. Sometimes 60/second, sometimes less.
>
> Things are fine as long as I don't enable the off mode; when I enable
> the off mode, "echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode"
> interrupt counts start rising immediately. "echo 0 >
> /sys/kernel/debug/pm_debug/enable_off_mode" stops that.
>
> But no matter what configuration, activity LEDs still indicate it is
> busy, and idle power consumption is cca 53mA.
Not seeing that here at all. My n900 with v4.6-rc2 and omap2plus_defconfig
booted with u-boot keeps hitting off mode with both LEDs going off just
fine. It's waking up about once a second or a litte bit more often.
Care to post your .config somewhere, I could give that a try?
Regards,
Tony
Hi!
> > > > Ok, I realized that _something_ set up my keyboard on console, too, so
> > > > I'm able to do "init 1" and still interact with the console.
> > > >
> > > > cm_idlest1_core blocking bits are now 0x42 pretty consistently. But
> > > > they stay 0x42, even when screen is on (and screen on prevents low
> > > > power, right?) so I guess they are not the whole story.
> > >
> > > Yes they stay at 0x42. And it seems you've configured the UART
> > > idle timeouts too.
> >
> > Yes, thanks for the script ;-).
> >
> > > > I'm able to get down to 50mA power consumption with screen off. I was
> > > > getting 90mA with X, wifi in powersave and screen off.
> > > >
> > > > Head proximity sensor is still on in this configuration. But I guess
> > > > that should not keep the system busy...?
> > > >
> > > > Ok, wait a moment, I'm getting "Camera Focus", "Camera Capture" and
> > > > "Lock button" interrupts ... at something like 20/second. Without
> > > > touching anything. Hmm. Also "pm_wkup", but that might be
> > > > expected. Plus, 49052000.gpio and 49054000.gpio are rather
> > > > active. Might be related to the above. Also "gp_timer" and
> > > > 48070000.i2c are active, perhaps also related. I don't think I have
> > > > the camera working...
> > >
> > > Hmm that does not sound right at all for the GPIOs. The pm_wkup
> > > interrupt triggers every time you hit wfi pretty much, so that
> > > should be OK.
> >
> > Wifi was down at that point.
> >
> > Some more testing: after boot, interrupt counts stay low, as
> > expected. But when I attempt to enable power management, they start
> > rising. Sometimes 60/second, sometimes less.
> >
> > Things are fine as long as I don't enable the off mode; when I enable
> > the off mode, "echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode"
> > interrupt counts start rising immediately. "echo 0 >
> > /sys/kernel/debug/pm_debug/enable_off_mode" stops that.
> >
> > But no matter what configuration, activity LEDs still indicate it is
> > busy, and idle power consumption is cca 53mA.
>
> Not seeing that here at all. My n900 with v4.6-rc2 and omap2plus_defconfig
> booted with u-boot keeps hitting off mode with both LEDs going off just
> fine. It's waking up about once a second or a litte bit more often.
Ok, that was 4.4 (with patches that should not be related).
I now checked with 4.6-rc2+mini_changes, and I'm getting similar results:
Battery 4.05V 4.07V 4.11V 85% 91% 98% 1546/1569 mAh Full -131/550/100
mA
00001fff 48005020 (fa005020) cm_idlest_per blocking bits: 0007e000
f7fffebd 48004a20 (fa004a20) cm_idlest1_core blocking bits: 00000042
0000000d 48004a28 (fa004a28) cm_idlest3_core
I'm booting from NOLO, and I'm _not_ loading/removing gadget modules,
as blocking bits are 0x42, so gadget is not a problem. (Let me know if
I'm wrong).
Let me retry with 4.6-rc2 (9735a22799b9214d17d3c231fe377fc852f042e9),
no modifications. Aha, but vanilla 4.6-rc2 does not have
cm_idlest1_core display in debugfs :-(.
And yes, I see the same effect in /proc/interrupts:
180: 280 49052000.gpio 4 Edge Camera Focus
181: 280 49052000.gpio 5 Edge Camera Capture
(few seconds after that)
180: 738 49052000.gpio 4 Edge Camera Focus
181: 738 49052000.gpio 5 Edge Camera Capture
after I do echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode .
> Care to post your .config somewhere, I could give that a try?
gzipped config is attached.
Note that I'm still using NOLO. I enabled the sleep, then went to
runlevel 1. LEDs still stay on, 55mA power consumption. That was with
1 in off_mode.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
* Pavel Machek <[email protected]> [160407 12:49]:
>
> gzipped config is attached.
>
> Note that I'm still using NOLO. I enabled the sleep, then went to
> runlevel 1. LEDs still stay on, 55mA power consumption. That was with
> 1 in off_mode.
Nothing idling for me with your .config.. And it seems slower to boot
compared to omap2plus_defconfig? Maybe because of the extra GPIO
interrupts?
Looks like you have 117 additional entries in .config enabled compared
to omap2plus_defconfig. Maybe go back to omap2plus_defconfig with minimal
changes and verify it idles properly first?
I'm suspecting it's some driver(s) you have enabled causing the
issue.
Regards,
Tony
Hi!
> > gzipped config is attached.
> >
> > Note that I'm still using NOLO. I enabled the sleep, then went to
> > runlevel 1. LEDs still stay on, 55mA power consumption. That was with
> > 1 in off_mode.
>
> Nothing idling for me with your .config.. And it seems slower to boot
> compared to omap2plus_defconfig? Maybe because of the extra GPIO
> interrupts?
Extra interrupts only happen when enable_off_mode is 1, so that should
not be an issue during boot.
> Looks like you have 117 additional entries in .config enabled compared
> to omap2plus_defconfig. Maybe go back to omap2plus_defconfig with minimal
> changes and verify it idles properly first?
>
> I'm suspecting it's some driver(s) you have enabled causing the
> issue.
I guess so. Do you (or anyone else) have minimum non-modular config
for N900 that boots with video? Could I get lsmod from your system?
(Yes, I still have nightmares from getting .config that works).
Thanks and best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
* Pavel Machek <[email protected]> [160407 16:02]:
> Hi!
>
> > > gzipped config is attached.
> > >
> > > Note that I'm still using NOLO. I enabled the sleep, then went to
> > > runlevel 1. LEDs still stay on, 55mA power consumption. That was with
> > > 1 in off_mode.
> >
> > Nothing idling for me with your .config.. And it seems slower to boot
> > compared to omap2plus_defconfig? Maybe because of the extra GPIO
> > interrupts?
>
> Extra interrupts only happen when enable_off_mode is 1, so that should
> not be an issue during boot.
OK maybe it's just the extra driver probe time then.
> > Looks like you have 117 additional entries in .config enabled compared
> > to omap2plus_defconfig. Maybe go back to omap2plus_defconfig with minimal
> > changes and verify it idles properly first?
> >
> > I'm suspecting it's some driver(s) you have enabled causing the
> > issue.
>
> I guess so. Do you (or anyone else) have minimum non-modular config
> for N900 that boots with video? Could I get lsmod from your system?
> (Yes, I still have nightmares from getting .config that works).
Well I've been just using omap2plus_defconfig with:
# modprobe tsc2005
# modprobe gpio_backlight
# modprobe panel_sony_acx565akm
# modprobe omapfb
# echo 255 > /sys/class/backlight/acx565akm/brightness
And then the following to blank for idle:
# echo 1 > /sys/devices/platform/omapfb/graphics/fb0/blank
But in the world of eternal regressions, I'm not seeing anything
on the framebuffer with v4.6-rc2 :( No idea what broke it or when
as my n900 is in the rack.
Anyways, below is also my lsmod output.
Regards,
Tony
Module Size Used by
panel_sharp_ls037v7dw01 4148 0
ads7846 12959 0
hwmon 4213 1 ads7846
gpio_keys 9053 0
twl4030_keypad 3896 0
matrix_keymap 2801 1 twl4030_keypad
omapfb 39255 1
cfbfillrect 3614 1 omapfb
cfbimgblt 2416 1 omapfb
cfbcopyarea 3187 1 omapfb
panel_sony_acx565akm 7895 1
omapdss 269684 4 panel_sharp_ls037v7dw01,omapfb,panel_sony_acx565akm
gpio_backlight 2804 0
tsc2005 1782 0
tsc200x_core 7337 1 tsc2005
ledtrig_default_on 1119 0
leds_gpio 3530 0
led_class 5418 1 leds_gpio
rtc_twl 6234 0
twl4030_wdt 2711 0
Hi!
> > > Looks like you have 117 additional entries in .config enabled compared
> > > to omap2plus_defconfig. Maybe go back to omap2plus_defconfig with minimal
> > > changes and verify it idles properly first?
> > >
> > > I'm suspecting it's some driver(s) you have enabled causing the
> > > issue.
> >
> > I guess so. Do you (or anyone else) have minimum non-modular config
> > for N900 that boots with video? Could I get lsmod from your system?
> > (Yes, I still have nightmares from getting .config that works).
>
> Well I've been just using omap2plus_defconfig with:
>
> # modprobe tsc2005
> # modprobe gpio_backlight
> # modprobe panel_sony_acx565akm
> # modprobe omapfb
>
> # echo 255 > /sys/class/backlight/acx565akm/brightness
>
> And then the following to blank for idle:
>
> # echo 1 > /sys/devices/platform/omapfb/graphics/fb0/blank
>
> But in the world of eternal regressions, I'm not seeing anything
> on the framebuffer with v4.6-rc2 :( No idea what broke it or when
> as my n900 is in the rack.
Well, for the record, framebuffer works in my config with v4.6-rc2. So
that is another config issue. Hopefully it is not the same issue ;-).
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi!
> > > Nothing idling for me with your .config.. And it seems slower to boot
> > > compared to omap2plus_defconfig? Maybe because of the extra GPIO
> > > interrupts?
> >
> > Extra interrupts only happen when enable_off_mode is 1, so that should
> > not be an issue during boot.
>
> OK maybe it's just the extra driver probe time then.
Heh. I had earlyprintk enabled. That should explain it.
> Well I've been just using omap2plus_defconfig with:
>
> # modprobe tsc2005
> # modprobe gpio_backlight
> # modprobe panel_sony_acx565akm
> # modprobe omapfb
>
> # echo 255 > /sys/class/backlight/acx565akm/brightness
>
> And then the following to blank for idle:
>
> # echo 1 > /sys/devices/platform/omapfb/graphics/fb0/blank
>
> But in the world of eternal regressions, I'm not seeing anything
> on the framebuffer with v4.6-rc2 :( No idea what broke it or when
> as my n900 is in the rack.
Can you try this patch to your config -- disabling lockdep? It should
fix the video for you. (And if you have the serial console... do you
see any warnings from lockdep?)
Thanks,
Pavel
--- config.def 2016-04-08 21:50:04.519622137 +0200
+++ .config 2016-04-11 10:22:52.988193318 +0200
@@ -4183,15 +4183,12 @@
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
-CONFIG_DEBUG_LOCK_ALLOC=y
-CONFIG_PROVE_LOCKING=y
-CONFIG_LOCKDEP=y
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
# CONFIG_LOCK_STAT is not set
-# CONFIG_DEBUG_LOCKDEP is not set
# CONFIG_DEBUG_ATOMIC_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_LOCK_TORTURE_TEST is not set
-CONFIG_TRACE_IRQFLAGS=y
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_BUGVERBOSE is not set
@@ -4204,8 +4201,7 @@
#
# RCU Debugging
#
-CONFIG_PROVE_RCU=y
-# CONFIG_PROVE_RCU_REPEATEDLY is not set
+# CONFIG_PROVE_RCU is not set
# CONFIG_SPARSE_RCU_POINTER is not set
# CONFIG_TORTURE_TEST is not set
# CONFIG_RCU_TORTURE_TEST is not set
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi!
> > > > gzipped config is attached.
> > > >
> > > > Note that I'm still using NOLO. I enabled the sleep, then went to
> > > > runlevel 1. LEDs still stay on, 55mA power consumption. That was with
> > > > 1 in off_mode.
> > >
> > > Nothing idling for me with your .config.. And it seems slower to boot
> > > compared to omap2plus_defconfig? Maybe because of the extra GPIO
> > > interrupts?
> >
> > Extra interrupts only happen when enable_off_mode is 1, so that should
> > not be an issue during boot.
>
> OK maybe it's just the extra driver probe time then.
Ok, I did try to minimize config differences. I'm still booting from
NOLO. Now I'm doing the tests from init=... boot. idlest1_core
blocking bits says 0042. But the LEDs still don't blink.
I made config with pretty minimal differences from defconfig (making
required drivers =y, lockdep off so that video works).
Do you think you could try with my config?
> # echo 255 > /sys/class/backlight/acx565akm/brightness
>
> And then the following to blank for idle:
>
> # echo 1 > /sys/devices/platform/omapfb/graphics/fb0/blank
Yes, I'm doing this, on console.
Thanks and best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi!
> > > > > gzipped config is attached.
> > > > >
> > > > > Note that I'm still using NOLO. I enabled the sleep, then went to
> > > > > runlevel 1. LEDs still stay on, 55mA power consumption. That was with
> > > > > 1 in off_mode.
> > > >
> > > > Nothing idling for me with your .config.. And it seems slower to boot
> > > > compared to omap2plus_defconfig? Maybe because of the extra GPIO
> > > > interrupts?
> > >
> > > Extra interrupts only happen when enable_off_mode is 1, so that should
> > > not be an issue during boot.
> >
> > OK maybe it's just the extra driver probe time then.
>
> Ok, I did try to minimize config differences. I'm still booting from
> NOLO. Now I'm doing the tests from init=... boot. idlest1_core
> blocking bits says 0042. But the LEDs still don't blink.
>
> I made config with pretty minimal differences from defconfig (making
> required drivers =y, lockdep off so that video works).
>
> Do you think you could try with my config?
Ok, it works now. I was doing tests in daylight so it was poorly
visible. The right part of keyboard stays lit (but that's expected
AFAICT), but the left part blinks.
Thanks!
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi,
Adding Tomi to Cc.
* Pavel Machek <[email protected]> [160411 02:42]:
> > I made config with pretty minimal differences from defconfig (making
> > required drivers =y, lockdep off so that video works).
> >
> > Do you think you could try with my config?
Yeah disabling lockdep by removing PROVE_LOCKING from omap2plus_defconfig
makes n900 LCD work for me again. Not getting any lockdep warnings
during boot with lockdep enabled though. So basically the following
patch makes LCD work on n900 with omap2plus_defconfig.
Tomi, got any ideas?
> Ok, it works now. I was doing tests in daylight so it was poorly
> visible. The right part of keyboard stays lit (but that's expected
> AFAICT), but the left part blinks.
During idle, both should go off and are doing so for me. Both LEDs off
indicates off mode, left LED off is for retention mode. So you still
have something blocking off mode, maybe check:
echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode
Regards,
Tony
8< -------------------
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -472,7 +472,6 @@ CONFIG_DEBUG_INFO_DWARF4=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
-CONFIG_PROVE_LOCKING=y
# CONFIG_DEBUG_BUGVERBOSE is not set
CONFIG_SECURITY=y
CONFIG_CRYPTO_MICHAEL_MIC=y
Hi!
> > > Do you think you could try with my config?
>
> Yeah disabling lockdep by removing PROVE_LOCKING from omap2plus_defconfig
> makes n900 LCD work for me again. Not getting any lockdep warnings
> during boot with lockdep enabled though. So basically the following
> patch makes LCD work on n900 with omap2plus_defconfig.
Good, at least it is consistent.
> > Ok, it works now. I was doing tests in daylight so it was poorly
> > visible. The right part of keyboard stays lit (but that's expected
> > AFAICT), but the left part blinks.
>
> During idle, both should go off and are doing so for me. Both LEDs off
> indicates off mode, left LED off is for retention mode. So you still
> have something blocking off mode, maybe check:
>
> echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode
What is the power difference between retention and off? I'm now down
to cca 25mA, which should be around 50 hours standby time. Not ideal,
but should be usable.
In the meantime, I found what is causing the rention mode to break for
me: CONFIG_HSI (aka wireless modem support). With HSI off, it seems to work.
I still get problems with the camera button, in config similar to
defconfig. For some reason, I'm even getting (autorepeating) ^@ on
console. As long as I hold camera button down, I even get it into off
mode for brief period.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi!
> > > Ok, it works now. I was doing tests in daylight so it was poorly
> > > visible. The right part of keyboard stays lit (but that's expected
> > > AFAICT), but the left part blinks.
> >
> > During idle, both should go off and are doing so for me. Both LEDs off
> > indicates off mode, left LED off is for retention mode. So you still
> > have something blocking off mode, maybe check:
> >
> > echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode
>
> What is the power difference between retention and off? I'm now down
> to cca 25mA, which should be around 50 hours standby time. Not ideal,
> but should be usable.
>
> In the meantime, I found what is causing the rention mode to break for
> me: CONFIG_HSI (aka wireless modem support). With HSI off, it seems to work.
>
> I still get problems with the camera button, in config similar to
> defconfig. For some reason, I'm even getting (autorepeating) ^@ on
> console. As long as I hold camera button down, I even get it into off
> mode for brief period.
Ok, if I turn off CONFIG_KEYBOARD_GPIO, I get it into off
mode... once per screen blank, for about a second. (Does CONFIG_KEYBOARD_GPIO also cause
problems for you?)
Any idea why it enters off mode only once after each screenblank?
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
* Pavel Machek <[email protected]> [160412 05:31]:
> Hi!
>
> > > > Ok, it works now. I was doing tests in daylight so it was poorly
> > > > visible. The right part of keyboard stays lit (but that's expected
> > > > AFAICT), but the left part blinks.
> > >
> > > During idle, both should go off and are doing so for me. Both LEDs off
> > > indicates off mode, left LED off is for retention mode. So you still
> > > have something blocking off mode, maybe check:
> > >
> > > echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode
> >
> > What is the power difference between retention and off? I'm now down
> > to cca 25mA, which should be around 50 hours standby time. Not ideal,
> > but should be usable.
The 25mA sounds way too big to me even for retention mode, some
devices must be still on.
The off mode makes a huge difference for standby time, it should cut
down the total power consumption to something like 10+ mW with modem
enabled. Aproximately the breakdown is roughly: 900 uW for omap, 5 mW
for memory and 5 or more for the modem. Sorry I don't know the exact
numbers for the modem. But with 37xx torpedo, mainline kernel is
already getting very close to the 900 uW + 5 mW numbers for the CPU
module during idle measured from the ina219 shunt on the torpedo devkit.
> > In the meantime, I found what is causing the rention mode to break for
> > me: CONFIG_HSI (aka wireless modem support). With HSI off, it seems to work.
> >
> > I still get problems with the camera button, in config similar to
> > defconfig. For some reason, I'm even getting (autorepeating) ^@ on
> > console. As long as I hold camera button down, I even get it into off
> > mode for brief period.
>
> Ok, if I turn off CONFIG_KEYBOARD_GPIO, I get it into off
> mode... once per screen blank, for about a second. (Does CONFIG_KEYBOARD_GPIO also cause
> problems for you?)
>
> Any idea why it enters off mode only once after each screenblank?
After disabling CONFIG_PROVE_LOCKING, loading the LCD modules, and
blanking the screen, my n900 hits off mode just fine about once
a second. Sounds like you still have some extra devices enabled
causing it.
With LCD enabled, both LEDs are on contantly. I think we should
be able to hit retention in that state, at least n950 is doing it
with the Nokia kernel.
Regards,
Tony
On 12/04/16 19:30, Tony Lindgren wrote:
> With LCD enabled, both LEDs are on contantly. I think we should
> be able to hit retention in that state, at least n950 is doing it
> with the Nokia kernel.
N900's display needs constant updating, where N950's display has
internal framebuffer, allowing OMAP to be off.
Tomi
* Tomi Valkeinen <[email protected]> [160412 22:53]:
>
> On 12/04/16 19:30, Tony Lindgren wrote:
>
> > With LCD enabled, both LEDs are on contantly. I think we should
> > be able to hit retention in that state, at least n950 is doing it
> > with the Nokia kernel.
>
> N900's display needs constant updating, where N950's display has
> internal framebuffer, allowing OMAP to be off.
OK, so the results are as expected then.
Regards,
Tony
Hi!
> > > > > Ok, it works now. I was doing tests in daylight so it was poorly
> > > > > visible. The right part of keyboard stays lit (but that's expected
> > > > > AFAICT), but the left part blinks.
> > > >
> > > > During idle, both should go off and are doing so for me. Both LEDs off
> > > > indicates off mode, left LED off is for retention mode. So you still
> > > > have something blocking off mode, maybe check:
> > > >
> > > > echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode
> > >
> > > What is the power difference between retention and off? I'm now down
> > > to cca 25mA, which should be around 50 hours standby time. Not ideal,
> > > but should be usable.
>
> The 25mA sounds way too big to me even for retention mode, some
> devices must be still on.
Yes, cca 60mW.
> The off mode makes a huge difference for standby time, it should cut
> down the total power consumption to something like 10+ mW with modem
> enabled. Aproximately the breakdown is roughly: 900 uW for omap, 5 mW
> for memory and 5 or more for the modem. Sorry I don't know the exact
> numbers for the modem. But with 37xx torpedo, mainline kernel is
> already getting very close to the 900 uW + 5 mW numbers for the CPU
> module during idle measured from the ina219 shunt on the torpedo
> devkit.
CONFIG_HSI breaks power management completely, so power management
with modem will be another topic.
> > > In the meantime, I found what is causing the rention mode to break for
> > > me: CONFIG_HSI (aka wireless modem support). With HSI off, it seems to work.
> > >
> > > I still get problems with the camera button, in config similar to
> > > defconfig. For some reason, I'm even getting (autorepeating) ^@ on
> > > console. As long as I hold camera button down, I even get it into off
> > > mode for brief period.
> >
> > Ok, if I turn off CONFIG_KEYBOARD_GPIO, I get it into off
> > mode... once per screen blank, for about a second. (Does CONFIG_KEYBOARD_GPIO also cause
> > problems for you?)
> >
> > Any idea why it enters off mode only once after each screenblank?
>
> After disabling CONFIG_PROVE_LOCKING, loading the LCD modules, and
> blanking the screen, my n900 hits off mode just fine about once
> a second. Sounds like you still have some extra devices enabled
> causing it.
I checked again... also with vanilla 4.6-rc2 to double check... same effect.
Aha, got it... cat-ing /sys/kernel/debug/pm_debug/count breaks the
off mode. If I don't do that (tm), it seems to work way better.
Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
* Pavel Machek <[email protected]> [160417 10:56]:
> > The off mode makes a huge difference for standby time, it should cut
> > down the total power consumption to something like 10+ mW with modem
> > enabled. Aproximately the breakdown is roughly: 900 uW for omap, 5 mW
> > for memory and 5 or more for the modem. Sorry I don't know the exact
> > numbers for the modem. But with 37xx torpedo, mainline kernel is
> > already getting very close to the 900 uW + 5 mW numbers for the CPU
> > module during idle measured from the ina219 shunt on the torpedo
> > devkit.
>
> CONFIG_HSI breaks power management completely, so power management
> with modem will be another topic.
OK
> > > > In the meantime, I found what is causing the rention mode to break for
> > > > me: CONFIG_HSI (aka wireless modem support). With HSI off, it seems to work.
> > > >
> > > > I still get problems with the camera button, in config similar to
> > > > defconfig. For some reason, I'm even getting (autorepeating) ^@ on
> > > > console. As long as I hold camera button down, I even get it into off
> > > > mode for brief period.
> > >
> > > Ok, if I turn off CONFIG_KEYBOARD_GPIO, I get it into off
> > > mode... once per screen blank, for about a second. (Does CONFIG_KEYBOARD_GPIO also cause
> > > problems for you?)
> > >
> > > Any idea why it enters off mode only once after each screenblank?
> >
> > After disabling CONFIG_PROVE_LOCKING, loading the LCD modules, and
> > blanking the screen, my n900 hits off mode just fine about once
> > a second. Sounds like you still have some extra devices enabled
> > causing it.
>
> I checked again... also with vanilla 4.6-rc2 to double check... same effect.
>
> Aha, got it... cat-ing /sys/kernel/debug/pm_debug/count breaks the
> off mode. If I don't do that (tm), it seems to work way better.
Ah I see yeah :)
Regards,
Tony
On Sunday 17 April 2016 19:55:40 Pavel Machek wrote:
> Hi!
>
> > > > > > Ok, it works now. I was doing tests in daylight so it was poorly
> > > > > > visible. The right part of keyboard stays lit (but that's expected
> > > > > > AFAICT), but the left part blinks.
> > > > >
> > > > > During idle, both should go off and are doing so for me. Both LEDs off
> > > > > indicates off mode, left LED off is for retention mode. So you still
> > > > > have something blocking off mode, maybe check:
> > > > >
> > > > > echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode
> > > >
> > > > What is the power difference between retention and off? I'm now down
> > > > to cca 25mA, which should be around 50 hours standby time. Not ideal,
> > > > but should be usable.
> >
> > The 25mA sounds way too big to me even for retention mode, some
> > devices must be still on.
>
> Yes, cca 60mW.
>
> > The off mode makes a huge difference for standby time, it should cut
> > down the total power consumption to something like 10+ mW with modem
> > enabled. Aproximately the breakdown is roughly: 900 uW for omap, 5 mW
> > for memory and 5 or more for the modem. Sorry I don't know the exact
> > numbers for the modem. But with 37xx torpedo, mainline kernel is
> > already getting very close to the 900 uW + 5 mW numbers for the CPU
> > module during idle measured from the ina219 shunt on the torpedo
> > devkit.
>
> CONFIG_HSI breaks power management completely, so power management
> with modem will be another topic.
Sebastian, any idea why power management does not work for HSI?
> > > > In the meantime, I found what is causing the rention mode to break for
> > > > me: CONFIG_HSI (aka wireless modem support). With HSI off, it seems to work.
> > > >
> > > > I still get problems with the camera button, in config similar to
> > > > defconfig. For some reason, I'm even getting (autorepeating) ^@ on
> > > > console. As long as I hold camera button down, I even get it into off
> > > > mode for brief period.
> > >
> > > Ok, if I turn off CONFIG_KEYBOARD_GPIO, I get it into off
> > > mode... once per screen blank, for about a second. (Does CONFIG_KEYBOARD_GPIO also cause
> > > problems for you?)
> > >
> > > Any idea why it enters off mode only once after each screenblank?
> >
> > After disabling CONFIG_PROVE_LOCKING, loading the LCD modules, and
> > blanking the screen, my n900 hits off mode just fine about once
> > a second. Sounds like you still have some extra devices enabled
> > causing it.
>
> I checked again... also with vanilla 4.6-rc2 to double check... same effect.
>
> Aha, got it... cat-ing /sys/kernel/debug/pm_debug/count breaks the
> off mode. If I don't do that (tm), it seems to work way better.
So what is result? Is power management working for CONFIG_KEYBOARD_GPIO?
Or problem is somewhere in CONFIG_PROVE_LOCKING?
--
Pali Rohár
[email protected]
Hi!
> > CONFIG_HSI breaks power management completely, so power management
> > with modem will be another topic.
>
> Sebastian, any idea why power management does not work for HSI?
>
> > > > > In the meantime, I found what is causing the rention mode to break for
> > > > > me: CONFIG_HSI (aka wireless modem support). With HSI off, it seems to work.
> > > > >
> > > > > I still get problems with the camera button, in config similar to
> > > > > defconfig. For some reason, I'm even getting (autorepeating) ^@ on
> > > > > console. As long as I hold camera button down, I even get it into off
> > > > > mode for brief period.
> > > >
> > > > Ok, if I turn off CONFIG_KEYBOARD_GPIO, I get it into off
> > > > mode... once per screen blank, for about a second. (Does CONFIG_KEYBOARD_GPIO also cause
> > > > problems for you?)
> > > >
> > > > Any idea why it enters off mode only once after each screenblank?
> > >
> > > After disabling CONFIG_PROVE_LOCKING, loading the LCD modules, and
> > > blanking the screen, my n900 hits off mode just fine about once
> > > a second. Sounds like you still have some extra devices enabled
> > > causing it.
> >
> > I checked again... also with vanilla 4.6-rc2 to double check... same effect.
> >
> > Aha, got it... cat-ing /sys/kernel/debug/pm_debug/count breaks the
> > off mode. If I don't do that (tm), it seems to work way better.
>
> So what is result? Is power management working for CONFIG_KEYBOARD_GPIO?
camera and unlock button GPIOs seem to break the powermanagement,
too. I disabled it for now.
Next hint I got from Sebastian was that I may need to enable power
management in /sys.
pavel@n900:/my/tui/ofone$ cat
/sys/devices/platform/68000000.ocp/48058000.ssi-controller/power/runtime_status
active
pavel@n900:/my/tui/ofone$ cat
/sys/devices/platform/68000000.ocp/48058000.ssi-controller/power/autosuspend_delay_ms
cat:
/sys/devices/platform/68000000.ocp/48058000.ssi-controller/power/autosuspend_delay_ms:
Input/output error
root@n900:/my/tui/ofone# cat
/sys/devices/platform/68000000.ocp/48058000.ssi-controller/power/control
auto
I could not get it to sleep :-(.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Thursday 21 April 2016 23:28:08 Pavel Machek wrote:
> Hi!
>
> > > CONFIG_HSI breaks power management completely, so power management
> > > with modem will be another topic.
> >
> > Sebastian, any idea why power management does not work for HSI?
> >
> > > > > > In the meantime, I found what is causing the rention mode to break for
> > > > > > me: CONFIG_HSI (aka wireless modem support). With HSI off, it seems to work.
> > > > > >
> > > > > > I still get problems with the camera button, in config similar to
> > > > > > defconfig. For some reason, I'm even getting (autorepeating) ^@ on
> > > > > > console. As long as I hold camera button down, I even get it into off
> > > > > > mode for brief period.
> > > > >
> > > > > Ok, if I turn off CONFIG_KEYBOARD_GPIO, I get it into off
> > > > > mode... once per screen blank, for about a second. (Does CONFIG_KEYBOARD_GPIO also cause
> > > > > problems for you?)
> > > > >
> > > > > Any idea why it enters off mode only once after each screenblank?
> > > >
> > > > After disabling CONFIG_PROVE_LOCKING, loading the LCD modules, and
> > > > blanking the screen, my n900 hits off mode just fine about once
> > > > a second. Sounds like you still have some extra devices enabled
> > > > causing it.
> > >
> > > I checked again... also with vanilla 4.6-rc2 to double check... same effect.
> > >
> > > Aha, got it... cat-ing /sys/kernel/debug/pm_debug/count breaks the
> > > off mode. If I don't do that (tm), it seems to work way better.
> >
> > So what is result? Is power management working for CONFIG_KEYBOARD_GPIO?
>
> camera and unlock button GPIOs seem to break the powermanagement,
> too. I disabled it for now.
So this sounds like a problem in gpio keyboard driver. Maybe you can
ping maintainers of that driver?
> Next hint I got from Sebastian was that I may need to enable power
> management in /sys.
>
> pavel@n900:/my/tui/ofone$ cat
> /sys/devices/platform/68000000.ocp/48058000.ssi-controller/power/runtime_status
> active
> pavel@n900:/my/tui/ofone$ cat
> /sys/devices/platform/68000000.ocp/48058000.ssi-controller/power/autosuspend_delay_ms
> cat:
> /sys/devices/platform/68000000.ocp/48058000.ssi-controller/power/autosuspend_delay_ms:
> Input/output error
> root@n900:/my/tui/ofone# cat
> /sys/devices/platform/68000000.ocp/48058000.ssi-controller/power/control
> auto
>
> I could not get it to sleep :-(.
>
> Best regards,
> Pavel
>
Maybe down phonet0 interface and other hsi/ssi interfaces?
--
Pali Rohár
[email protected]
Hi,
On Thu, Apr 21, 2016 at 03:04:50PM +0200, Pali Roh?r wrote:
> > CONFIG_HSI breaks power management completely, so power management
> > with modem will be another topic.
>
> Sebastian, any idea why power management does not work for HSI?
I wasn't aware, that pm_runtime_irq_safe() basically breaks runtime
PM until Tony's fix for musb (even though it's logical when thinking
about it). Currently omap-ssi and omap-ssi-port make use of
pm_runtime_irq_safe().
Since pm_runtime_get_sync/pm_runtime_put_sync is called from
tasklets in omap-ssi (and omap-ssi-port) it cannot be simply
removed. So fixing PM for the ssi controller requires reworking
the driver in a non trivial way.
-- Sebastian