map220v / sm8150-mainline

WIP Mainline kernel for Xiaomi Pad 5
Other
29 stars 15 forks source link

Ln8000 typec charging voltage and it controller #11

Closed catmengi closed 3 months ago

catmengi commented 3 months ago

Which driver control charging voltage, tcpm.c (saw things about PD and PPS) or ln8000_charger.c or ln8000_charger.c configure ln8000 and it automatically control PD VBUS? Which voltage is standart 5v, 9v or even 12v?

map220v commented 3 months ago

tcpm.c should control PD protocol, ln8000 chip doesn't know anything about PD and it is only connected to usb vbus, PD protocol uses CC line of Type-C to do PD negotiation with charger. Voltage is also selected by tcpm.c, it should use best available PD profile that charger sent using PD protocol. PD capabilities and voltage limits specified in sink-pdos.

catmengi commented 3 months ago

tcpm.c should control PD protocol, ln8000 chip doesn't know anything about PD and it is only connected to usb vbus, PD protocol uses CC line of Type-C to do PD negotiation with charger. Voltage is also selected by tcpm.c, it should use best available PD profile that charger sent using PD protocol. PD capabilities and voltage limits specified in sink-pdos.

Where sink-pdos is specified?

catmengi commented 3 months ago

I already found sink-pdos, should it be 5v-12v 3a?

map220v commented 3 months ago

I already found sink-pdos, should it be 5v-12v 3a?

Yes, it is 5v-12v and 3a or less.