Pogo pins power clarification - reading schematics
#17
(02-13-2021, 08:03 PM)dsimic Wrote: I've finally managed to go through the PinePhone schematic, so here are my thoughts.

Thanks for giving it a go, it helps to have more people look at this :-)  Do be sure to read through all the previous posts in the thread, too; we've already worked a lot of it out.

I agree with most of what you wrote, but I also have comments.

(02-13-2021, 08:03 PM)dsimic Wrote: Thus, the pogo pin #5 (USB-5V) provides stabilised 5 V on USB-5V, up to 1.5 A, which can also be switched on and off using a GPIO line on the SoC.  I do not see the use of that GPIO line in the PinePhone DTS file.

Yes it _can_ be, but also, to be clear, pogo pin #5 is not _always_ a stabilised 5 V. We've confirmed that by measuring with a multimeter. Like you said, the LP6226 can be enabled/disabled. If a power source is not plugged into the USB C port, nor attached to pogo pin #1, and if the LP6226 is disabled (which apparently it was when I tested), then pogo pin #5 will basically be equal to PS, which is basically battery voltage in this case. (Probably why the wiki is confused)

I'm sure it depends on which version of Linux kernel source you're looking at. But I do know that the person who runs xnux.eu has a 5.9 kernel that uses PD8 (PD8-VCC5V_EN) in sun50i-a64-pinephone.dtsi.

xnux/megous cgit (In the future, when this link breaks, I originally found this repository linked from https://www.xnux.eu)

Code:
reg_usb_5v: usb-5v {
    compatible = "regulator-fixed";
    regulator-name = "usb-5v";
    regulator-min-microvolt = <5000000>;
    regulator-max-microvolt = <5000000>;
    gpio = <&pio 3 8 GPIO_ACTIVE_HIGH>; /* PD8 */
    enable-active-high;
};

(02-13-2021, 08:03 PM)dsimic Wrote: Thus, the pogo pin #5 (USB-5V) can also be used as a USB power source, depending on the OTG state of the phone's USB port.

This is very strange.  I really don't know whether this is me misreading the schematic, or a bug in the schematic, but I cannot figure out why should the pogo pin #5 behave differently depending on the mode of the phone's USB port (current sink or source)?

Interesting! Are you saying that when the LPW5206 is enabled, you could actually provide 5 V as a power input to the Pinephone at pogo pin #5? I'm definitely scared to try that without understanding better :-)

I made the assumption that, since USB-5V comes from PS, it's an output only, and providing your own 5V there would be a bad idea because you'd be connecting two power sources together (the Pinephone's PS, plus your external supply at pogo pin #5). However, now I'm also noticing the diode D600, which I suppose could actually protect PS from USB-5V.

Anway, I do think that the LPW5206's intended purpose is only for the Pinephone to provide 5V to the USB C port when it's acting as the USB host. Like you're saying, depending on the OTG state.

Also note that USB-5V definitely isn't _only_ controlled by the state of the USB port. I've already showed (by actually measuring) that if you only apply 5 V at DCIN, without touching any other USB pins (e.g. D+/-), the voltage of USB-5V will follow PS as it increases from battery voltage to 5 V. We also assume that you could otherwise enable the LP6226 (via the Allwinner A64's PD8 GPIO) to boost from PS from battery voltage to 5 V.

My guess at why the Pinephone hardware developers chose to put pogo pin #5 at USB-5V? Because 1) you can still power something while the phone's USB port isn't in host mode, and 2) if we were going to supply 5 V anyway, I guess we may as well reuse the LP6226's that we already need for when we're a USB host.

Of course the funny thing is, we don't always actually supply 5 V there. It's funny to imagine designing a "pogo pins expansion board", where you'll have a regulated 5 V sometimes, but you can't count on it. Sometimes, when the battery is under load and almost dead and the LP6226 is off, you'll only have 3 V :-)

(02-13-2021, 08:03 PM)dsimic Wrote: The pogo pin #1 (DCIN) is connected directly to the phone's USB power input (i.e. USB charger).  Again, this is very strange because the wiki page states that one of the pogo pins (VBAT) is connected to the battery, which simply isn't right.  Again, it might be just me misreading the schematic, so please correct me if I'm wrong.

Yup, we've already confirmed it :-)

Yes, pogo pin #1 (DCIN) goes to the PMIC's input ACIN/VBUS.

Yes, the wiki states that one of the pogo pins is "VBAT, which connects to the battery voltage". And yes, it isn't true.

And it gets better: What the wiki calls "5V / VBUS" is actually DCIN. What the wiki calls "VBAT" is actually USB-5V! (See earlier posts where I confirm the physical locations of each pogo pin.)

(02-13-2021, 08:03 PM)dsimic Wrote: If my findings are correct, the recently announced keyboard case will need to have built-in logic for the battery charging, using 5 V from the DCIN pogo pin, as well as the logic for boosting the battery voltage to 5 V while discharging it and feeding power back to the DCIN pogo pin.  That would be inefficient, but there's no connection to the phone's battery through the pogo pins, so the only way for the keyboard case to exchange power is through the pogo pin #1 (DCIN), which runs at 5 V.

Furthermore, the keyboard case will need to have even more built-in logic that would ensure to stop discharging the case battery upon detecting that a USB charger is connected to the phone, because the case battery must not feed power to the DCIN pogo pin when a USB charger is connected.  This is all rather complicated, pretty inefficient, and, quite frankly, messy. :/

I agree!

I'm definitely scared of what happens when you attach power supplies to both the USB C port and to pogo pin #1... that's just shorting together two power supplies. I've pointed this out already.

The inefficiency thing in converting voltages, I'm not so worried about. Nobody besides the PMIC's battery charger should be able to directly charge the battery at battery voltage. Otherwise, it'd be unsafe, and there would be no way to control which source is charging.

Actually, I wonder if the ACIN and VBUS power input pins on the PMIC should just be isolated from each other. In other words, pogo pin #1 should go to one of those, and the USB C port should go to the other. The PMIC is supposed to seamlessly switch between one or the other (and the battery) as a power input.

(02-13-2021, 08:03 PM)dsimic Wrote:
(02-11-2021, 09:51 AM)bokomaru Wrote: Otherwise, it's also still not clear _what_ the current-carrying capacity is. The wiki says 500 mA in one case, but why is that? Did the author of that just assume that it's 500 mA because that's what one of the USB standards is supposed to provide? Or can somebody show that some component in the schematics actually provides 500 mA (or more, or less)?

Unfortunately, I am not sure about that.  The above-described LP6226 regulator, which when enabled provides 5 V on the USB-5V line, has 1.5 A as the current limit.

Hey, that's at least more info than we had before!

By extension, I guess I would hope that it's safe to draw 1.5 A from USB-5V. If not, then it seems like nothing else prevents us from drawing too much current via the pogo pin or USB port and heating/damaging something.

Maybe the PMIC also monitors current and is able to turn off PS. Otherwise, after the LP6226 "turns off" due to overcurrent, I suppose you could actually still draw more even more current than 1.5 A. It just wouldn't be boosted, so it would be at battery voltage instead of 5 V. Maybe then, the LPW5206 would turn off. I don't know.
  Reply


Messages In This Thread
RE: Pogo pins power clarification - reading schematics - by bokomaru - 02-14-2021, 12:50 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  power circuit can't charge battery and can't supply enough power for modem or wifi vortex 2 542 02-17-2024, 04:15 PM
Last Post: vortex
  Pinephone - broken power button rorus 10 9,261 05-18-2023, 09:11 AM
Last Post: kbm
Thumbs Down Battery Issue or Power Management IC? bcoyle 2 1,531 03-20-2023, 12:54 AM
Last Post: bcoyle
  Power supply vs battery albafrati 11 4,663 06-22-2022, 06:04 PM
Last Post: albafrati
  pine64 keyboard pogo 'no-go' pins --- 3 2,528 04-29-2022, 04:59 AM
Last Post: Humid Stylus
  what are these pins above modem chip? zetabeta 1 1,614 12-13-2021, 04:38 AM
Last Post: kqlnut
  Power consumption during the call some_pinephone_user 0 1,151 10-29-2021, 06:03 AM
Last Post: some_pinephone_user
  on off power button stopped working dcinoz 3 2,577 09-01-2021, 03:26 AM
Last Post: dcinoz
  Won't boot until connected to power after sudden power loss brb78 1 1,734 08-30-2021, 12:41 AM
Last Post: bcnaz
  Regarding USB Power and Modem Initialization vidual 2 2,735 08-26-2021, 11:48 PM
Last Post: vidual

Forum Jump:


Users browsing this thread: 1 Guest(s)