USB charging 2S Li-On
You are confusing/conflating two different things. I read between the lines that you want to charge your batteries &quot;most optimally&quot;, and thus want to determine the port power capability. The method to charge the 2S battery geometry is an entirely different question.
First, you don't need to &quot;Enumerate the USB port&quot; (more accurately, you have no control over this, the port will be enumerated from host USB software if your device supports USB data protocol) to &quot;decide how much current you can draw&quot;. Port enumeration has nothing to do with power available over VBUS supply.
If you mean the classic USB-A port, you can start with testing if it has BC 1.x support (using appropriate ICs that have the built-in BC algorithm). If no success, you can switch to QC method, but again, this would apply to &quot;charging ports&quot; only, no data transfer.
If you want to outsmart and want to determine if the Type-A port is USB2 or USB3 (and thus has guaranteed 500 mA or 900 mA), there are simplified methods to make this distinction besides having full USB3 interface engine and condition your current intake depending on the mode it gets enumerated into.
You should understand that the USB port power is not bounded on upper side by USB specifications. The spec require &quot;at least&quot; 500 or 900 mA from classic USB ports, with no &quot;max&quot;. The power is bounded by manufacturers to ensure safe fire-proof operation of USB ports under every possible condition, including partial &quot;short&quot;.
Yet another method is to gradually increase the load and monitor resulting voltage. Charging ports must provide gradual decrease (&quot;soft&quot;) in supplied voltage when the load approaches port design limit. Again, do this with a reasonable assumption of connector pin limit, which is usually under 2A.
If you are thinking of Type-C ports, everything is built into Power Delivery protocol, so you must use proper IC that supports PD, understands Discovery methods, and reports to your device the uncovered link power capability. Again, this process occurs completely outside the USB data enumeration process.
Regarding the way to charge the 2-S battery configuration, your proposition to &quot;charge the cells individually&quot; will likely be cost prohibitive, since you will need to employ a complex system of high-current (low milli-Ohms grade) switches, which are expensive. So the only meaningful solution is to boost the VBUS voltage to about ~9V and use a standard 2-S balanced charger IC.