Mainline has poweroff support for TWL6030/32 pmics, just a system-power-controller property
at the pmic main node is needed. No need for 0005-Add-TWL6030-power-driver-with-minimal-support-for-power-off.patch
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
Yep, exactly how the previous patch worked as well. I'll compare the two (mainline and older) patches tomorrow and also give it a test with just mainline to see if its working, one a quick skimming I do see the values for regs to be different, plus they've used a downstream kernel as a base for the values so will need to check before dropping our patch
hmm, it might not necessarily apply to all devices using it. At least with the power off property for the 4030 this is not done that way. It is in the individual dts files
As far as i know the espresso is only device having twl6032 so having the prop either in twl6032.dtsi or espresso-common.dtsi shouldnt make much of a difference, I'll follow how you've done it and add it to espresso
Seems to break everything for me, lost my wlan and usb support, neither does ui want to start now, I'll have to create a new img with fbkeyboard for further testing to get logs.
Apparently pmOS gets detected as 1-2 18d1:d001 Android ADB Recovery Interface now lol.
hmm, that is strange, it just makes no sense that enabling power off has such much consequences. Are you sure you are booting what you expect to boot (i.e. modules are in place)?
There is some issue with probe order here regarding USB on 603[02]. I worked around by compiling the musb driver as builtin (CONFIG_USB_MUSB_OMAP2PLUS=y) and the phy as module (CONFIG_TWL6030_USB=m). Maybe you unveiled some issues like that.
Oh didnt know about the embt2ws, I'll upstream the 6032 dtsi then :D
Shouldnt be a modules issue since i installed the linux-pmos-omap package but again without logs its hard to pinpoint the issue. I'll rebuild with those changes in defconfig that you mentioned. Again it shouldnt be an issue with just changing the power off driver, could be something else is at play (some race condition or kernel panic).
I'll try ttyescape and get back (no usb/uart/wlan :( ).
@akemnade tried out a build now, the fix for USB doesnt seem to work fine, i always get device id not found on my pc, and with your patches for power controller, poweroff no longer works, device was at 75% before power off and after 15-20 minutes (after running sudo poweroff assuming that the device has shut down) it was hot to the touch and dropped 11% battery doing noting :P (went to 64%). I'd still want the previous patch then to atleast make the device shut down properly
before submitting that patch I have tested it with twl6032 and twl6030. embt2ws was not getting warm, no loss of charge noticed. Do we have other stuff registering as power off handler?
I am playing around with a 6.10-rc1 kernel to upstream things for embt, there I have
reliable power off via echo -n o >/proc/sysrq-trigger, but not via halt command. even though I see reboot: System halted
Oh, I'll try with latest upstream and build again, using same config from linux-postmarketos-omap and patches 0001, 0002, 0003, 0004 thats it. Then just modifying my twl node as to use system-power-controller; like shown above.
Going back to baby steps, I just need to have CLK_TWL built (built-in/module) right? And the #clock-cells = <1> in my twl node, and finally clocks = <&twl 0>; ?
It doesnt work with sound node (clk32kaudio - wm8994 driver throws 517 when finding for this clk) and wlan_pwrseq (clk32kg - no logs)