Automatic powering on and not staying powered off - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Hardware (https://forum.pine64.org/forumdisplay.php?fid=122) +--- Thread: Automatic powering on and not staying powered off (/showthread.php?tid=13399) |
Automatic powering on and not staying powered off - dsimic - 03-15-2021 Hello, This thread is a fork from another thread, as requested by the OP. First, here's a sum-up of what's been already discussed: (03-09-2021, 11:15 AM)dsimic Wrote: When the phone is connected to the official dock, and a charger is plugged into the dock, shutting down the operating system causes the phone to power off and, unexpectedly, power back on immediately. I've tested it more than a few times, and it always (mis)behaves like that. (03-09-2021, 11:15 AM)dsimic Wrote:(03-01-2021, 12:24 AM)GregH Wrote: Another side effect is that the device will not stay off with DCIN powered - no charging while switched off, it keeps booting up again :-( (03-14-2021, 08:29 PM)bokomaru Wrote: Phone -> USB C to A cable -> old "dumb" power brick -> AC wall outlet: Connecting the first time causes the phone to power on. But I can power the phone off from software, and then it stays "off". (03-14-2021, 08:29 PM)bokomaru Wrote:(03-14-2021, 07:42 AM)megous Wrote: anx7688 doesn't do anything unless the pinephone is powered on, so there's some fun to be had when charging via USB-PD chargers when the phone is off. RE: Automatic powering on and staying powered off - dsimic - 03-15-2021 Here are a couple of responses from my side: (03-14-2021, 08:29 PM)bokomaru Wrote: Phone -> convergence dock -> USB C to a cable -> old "dumb" power brick -> AC wall outlet: Connecting the first time causes the phone to power on. After powering off the phone from software, the phone powers back on; won't stay "off". Thank you very much for confirming this! The only reasonable explanation is that plugging a charger into the official dock causes the dock to provide 5 V prior to any negotiation with the upstream USB port (i.e. the phone), which in turn causes the PMIC to enter the power-on procedure. This is probably a bug in the official dock. (03-14-2021, 08:29 PM)bokomaru Wrote:(03-14-2021, 07:42 AM)megous Wrote: anx7688 doesn't do anything unless the pinephone is powered on, so there's some fun to be had when charging via USB-PD chargers when the phone is off. As already noted, this is simply part of the behavior of the AXP803; if it detects valid input voltage, it automatically starts the power-on procedure. Here are a couple of quotations from page 25 of the AXP803 datasheet that describe this: Quote:Power on source Quote:Power on from charger insertion It could very well be that I'm missing something, but the AXP803 datasheet describes no means to change this behavior of the AXP803. RE: Automatic powering on and not staying powered off - xalius - 03-16-2021 I think this is the way Allwinner intended it to work, what happens on Android phones or tablets is that they boot into a 'charger image' instead of the real OS, this just displays the battery icon/charge status, and they do that by checking the power-on reason register (REG 02H: Power up/down reason register in the AXP803). So what really is needed is imho to extend u-boot in a way to handle that case and configure the ANX7688 as well... RE: Automatic powering on and not staying powered off - dsimic - 03-16-2021 It would be very good to actually start using Ondrej's p-boot in some of the Linux distributions for the PinePhone. Many features are already available in p-boot, and I'd suppose that it would be possible to add support for the interaction with ANX7688. RE: Automatic powering on and not staying powered off - bokomaru - 03-25-2021 (03-16-2021, 07:36 AM)xalius Wrote: I think this is the way Allwinner intended it to work, what happens on Android phones or tablets is that they boot into a 'charger image' instead of the real OS, this just displays the battery icon/charge status... I agree. The "auto power on" part is expected, and it's up to the software side to decide how to behave. (like an Android phone, or just power on normally, or whatever you want) @dsimic, about "not staying powered off": With an Android phone that I have, the same thing actually happens. If you think about it, it's still totally expected. (1) I'm booted into the "normal" OS. (2) I connect a charger, and the OS shows me that I'm charging. (3) I tell software to power down. (4) The phone turns off. (5) The phone automatically turns back on and goes into the 'charger image' to show a battery fuel gauge. So I don't think this is a bug in the phone nor the convergence dock. If anything is odd, it's just the one case with the "dumb" power brick where my phone seemed _not_ to power back on automatically. To be fair, I can't be totally sure that the A64 really was off; this was just the default Manjaro image, and its boot loader doesn't display anything on the screen. (Although, I _think_ it's the boot loader that turns on the notification LED, and that wasn't on) RE: Automatic powering on and not staying powered off - dsimic - 03-26-2021 The weird, inconsistent part is that the phone doesn't always power on automatically. As already described, when the phone is connected to a "dumb" (USB BC) charger, the phone stays powered off after system shutdown. If the same charger is connected to the official dock, and the dock is connected to the phone, the phone powers on automatically after system shutdown. Something weird is going on there. However, I do agree that the automatic powering on upon plugging in a charger is actually useful, but we'd need to start using it as a feature, by having something in place that displays the status of battery charging instead of booting into the OS. To me, p-boot seems to be the way to go. |