How to use USB to do charger detection instead of PMIC?

点击打开链接



Question:Many customers want to use USB based charger detection instead of PMIC, because of the problem of PMIC, or customer do not adopt QC PMIC component in hardware design,  How to use USB to do charger detection instead of PMIC?


Answer:
On platforms like 8939,8916, USB side SW&HW have support for charger detection. If customer want to use USB PHY to do charger detection, need to call below in charger driver to activate USB.
    power_supply_set_charge_type(chip->usb_psy, POWER_SUPPLY_TYPE_UNKNOWN);
    power_supply_set_present(chip->usb_psy, TRUE);
    
If the charger type set to unknown, USB will start charger detection. 
Please note on new platforms like 9x40, we do not support USB charger detection.

猜你喜欢

转载自blog.csdn.net/loongembedded/article/details/80745341