Homebrew Discussion Team-Xecuter gives hint to Battery Desync issue

PRAGMA

Well-Known Member
OP
Member
Joined
Dec 29, 2015
Messages
2,258
Trophies
1
Location
Ireland
Website
github.com
XP
5,036
Country
Ireland
"If we had to give the community a hint as to where to start looking into this "battery desync" problem we'd suggest looking into how the Fuel Gauge IC (MAX17050, I2C1 addr 36) is being used by Nintendo's OS and by Linux."

[topic=507049]Source[/topic]

:switch: :switch: :switch:
 

m4xw

Ancient Deity
Developer
Joined
May 25, 2018
Messages
2,442
Trophies
1
Age
119
XP
6,958
Country
Germany
Oh yeah? Show us please. No one gives a fuck if someone knew it. Clearly it wasnt being posted anywhere, but now it is.

I've personally looked at the Issue just a few days after shofel release, wanna show my search requests for the MX chipset?

Just dropped it because of lack of time

--------------------- MERGED ---------------------------

pretty sure its a hint on how to fix it and not a hint that it exists

It just gives us a IC name as well as a I2C addr, both are well known even before homebrew existed on the switch in the form we know it

"Look and compare", I mean, thats common sense among coders. I mean come on..

Edit: I actually looked it up, while I have this exact chipset for some reason in my search history related to the Issues (probably looked up most of the maxim chipsets :P ) , I only find information to MAX77620, because those header files were copied, for the Power Management IC.

Edit2: https://github.com/fail0verflow/switch-linux/issues/6

So it was actually know. I really should stop now. I tricked myself

I didn't find any results to the actual fuel gauge used

Now, this gets interesting

Note: This probably isn't it, just funny in function https://github.com/torvalds/linux/blob/master/drivers/power/supply/max17042_battery.c#L717
(Tho it's a different file, too much beer, sry :P )

It is actually the driver for the batt as said by tardyp
"/* Write dQ_acc to 200% of Capacity and dP_acc to 200% */"

This probably isn't related, but given it drops at 50%, I already had the thought that maybe the capacity is written as double the amount (but since we can discharge it to low% if there isn't a load, can't really confirm it, but given horizon shuts off, it could just think there is no gas left, but the other way around could be valid too. According to the issue a different module gets loaded so it's maybe reading a 100% but expecting a 200% value, since the other module doesn't initialize the battery properly. Or it can be something completely different, it was late at night and I didn't skip through too much code)

So that actually looks suspicous, given I already had the idea of it
 
Last edited by m4xw,

Centergaming

Well-Known Member
Member
Joined
Apr 17, 2016
Messages
695
Trophies
0
XP
923
Country
United States
I've personally looked at the Issue just a few days after shofel release, wanna show my search requests for the MX chipset?

Just dropped it because of lack of time

--------------------- MERGED ---------------------------



It just gives us a IC name as well as a I2C addr, both are well known even before homebrew existed on the switch in the form we know it

"Look and compare", I mean, thats common sense among coders. I mean come on..

Edit: I actually looked it up, while I have this exact chipset for some reason in my search history related to the Issues (probably looked up most of the maxim chipsets :P ) , I only find information to MAX77620, because those header files were copied, for the Power Management IC.

I didn't find any results to the actual fuel gauge used

Now, this gets interesting

Note: This probably isn't it, just funny in function https://github.com/torvalds/linux/blob/master/drivers/power/supply/max17042_battery.c#L717

"/* Write dQ_acc to 200% of Capacity and dP_acc to 200% */"

This probably isn't related, but given it drops at 50%, I already had the thought that maybe the capacity is written as double the amount (but since we can discharge it to low% if there isn't a load, can't really confirm it, but given horizon shuts off, it could just think there is no gas left)

So that actually looks suspicous, given I already had the idea of it

Would you be able to fix this issue?
 
  • Like
Reactions: Red1Reaper

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: good night