ChanServ changed the topic of #aarch64-laptops to: Linux support for AArch64 Laptops (Asus NovaGo TP370QL - HP Envy x2 - Lenovo Mixx 630 - Lenovo Yoga C630)
macc24 has joined #aarch64-laptops
iivanov has joined #aarch64-laptops
ardb has joined #aarch64-laptops
iivanov_ has joined #aarch64-laptops
iivanov has quit [Ping timeout: 480 seconds]
iivanov_ has quit [Remote host closed the connection]
iivanov has joined #aarch64-laptops
arnd_ has quit []
arnd has joined #aarch64-laptops
<calebccff> Hi, does anyone know the current state of battery fuel gauge / charger support on C630?
<bamse> calebccff: some-battery is just one of the features exposed by the EC, another one is plug-detect for usb-c/displayport...so what remains is to figure out how the type-c mux really works and then polish up the whole thing
<bamse> calebccff: and come up with a name for it
<bamse> calebccff: i made an attempt to teach drm/msm/dp about type-c hpd a while ago, which was shot down...and have been reworking that...so once we have that side in place it should be trivial to test the ec-driver-side of the puzzle
<bamse> calebccff: the one thing that worries me is that in the GPU node in acpi there's a reference to an i2c bus...which could imply that there's something like an SBU mux that we need to drive as well (per how other boards are designed)
xnox has joined #aarch64-laptops
<calebccff> bamse: huh interesting, so it doesn't use the smb2/fuel gauge exposed by pmi8998?
<bamse> calebccff: no, battery management is entirely hidden by the EC
<bamse> calebccff: i suspect that pmi8998 doesn't support the type of batteries used in the laptop, because in flex 5g they use a pair of smb pmics again, but at least Lenovo follows the qualcomm reference design there
optimumcond has joined #aarch64-laptops
optimumcond has quit [Killed (dwfreed (No reason))]
<calebccff> huh interesting, thanks.
<steev> calebccff: you gonna work on it? :D
<calebccff> steev: I'm working on pmi8998 fuel gauge and smb2 charger support for the oneplus 6 and some other devices, unfortunately i don't own a c630
<steev> ah, yeah i saw those patches the other day
<calebccff> i was hopeful that we'd have some common goals and that would maybe make my life a bit easier aha
<calebccff> oh? they're a bit off a mess right now as I'm desperately trying to figure out why the op6 won't draw more than 500ma no matter what where the other devices that have been tested will happily draw much more
<calebccff> the downstream regmaps are HUUUUGE and zero docs make it quite tough to figure out what's what. especially fun when the driver doesn't use a bunch of the registers
<steev> just because i saw them doesn't mean i understand or can help, sadly
<steev> i'd had the same thought re c630 battery
<macc24> calebccff: what's the source for vendor's battery driver?
<bamse> calebccff: i would expect that there's some logic in the downstream kernel to adjust the current limit in the charger based on usb state
<bamse> calebccff: analog to the SMBB_USB_IMAX register in smbb
Lucanis has quit [Ping timeout: 480 seconds]
<calebccff> macc24: https://github.com/LineageOS/android_kernel_oneplus_sdm845/tree/lineage-18.1/drivers/power/supply/qcom files "qpnp-smb2.c", "qpnp-fg-gen3.c" and "smb-lib.c" are most relevant, this fork also contains a bunch of oneplus specific hacks on top
<calebccff> bamse: yeah there are *several* current limit registers, which seem to behave correctly on some other devices but simply don't on the oneplus 6... It's a special case as oneplus made a lot of changes to support their proprietary fast charge implementation
<calebccff> they have a whole STM8 which may or may not have a say in it somehow, as well as a bq27xxx fuel gauge which seems to live on the battery iteslf https://wiki.postmarketos.org/wiki/OnePlus_6_(oneplus-enchilada)/Hacking#UART_Muxing
<macc24> calebccff: i've seen worse.
<calebccff> macc24: honestly i don't want to know XD
<calebccff> The MCU is hooked up to VBAT_AD, VBUS_ADC, V_ADC (?), and 3 temperature probes, it talks to the SoC via some bitbang SPI for some reason, I'm wary to turn it on
<macc24> as i don't have the device myself, that's all i can do. you're on your own. good luck :)
* macc24 goes to sleep
<calebccff> cheers
Lucanis has joined #aarch64-laptops
iivanov_ has joined #aarch64-laptops
iivanov has quit [Ping timeout: 480 seconds]
ardb has quit [Quit: Leaving.]
macc24 has quit [Ping timeout: 480 seconds]