beo_6
Posts: 10
Joined: Sat Mar 31, 2018 7:05 pm

Raspberry Pi 3b+ and I2C to MXL7704 PMIC

Thu Apr 12, 2018 7:48 pm

I was wandering about the communication to the PMIC of the raspberry pi 3b+ since I heard that the mxl7704 has I2C.

How can I access the chip over the bus?
I tried

Code: Select all

i2cdetect -y 1
i2cdetect -y 0
But it doesn't show anything connected.

I want to get more information from the chip. At least the voltages for the rails. But the current would be super cool.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8102
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Raspberry Pi 3b+ and I2C to MXL7704 PMIC

Thu Apr 12, 2018 8:06 pm

You can't. In order to avoid users blowing up Pis the PMIC is controlled by the firmware as part of the thermal management.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

beo_6
Posts: 10
Joined: Sat Mar 31, 2018 7:05 pm

Re: Raspberry Pi 3b+ and I2C to MXL7704 PMIC

Thu Apr 12, 2018 9:08 pm

Thank you 6by9 for the quick answer.

I get your point.
But how could I do any harm by reading certain values?
And I would risk it, if I could enable it by setting a warranty_void flag. Like you do with the overvolting.

Are there any useful information on the PMIC? More than the voltages?

My hope is, that there are some cool features hidden.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2238
Joined: Thu Jul 11, 2013 2:37 pm

Re: Raspberry Pi 3b+ and I2C to MXL7704 PMIC

Fri Apr 13, 2018 8:42 am

The VC4 firmware will periodically read from the PMIC in order to poll for the undervoltage flag.

If you did try bitbashing the relevant GPIOs (the PMIC is not connected to any pins that map to the I2C peripheral) then the firmware would trample on your communication and you'd get nothing but nonsense back (and so would the firmware).
Rockets are loud.
https://astro-pi.org

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8102
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Raspberry Pi 3b+ and I2C to MXL7704 PMIC

Fri Apr 13, 2018 9:04 am

There's no way of exposing a read-only I2C bus, therefore publically documenting details gives you write access and the potential to kill your Pi. And if you're doing it from Linux then the firmware doesn't know about it so can't set a warranty bit.

I can't speak 100% officially, but I'd be quite surprised if a mechanism was added to talk to the PMIC registers from Linux.

I'll add to jdb's comment that there are other devices on that I2C bus that are polled pretty frequently, so you are very likely to get trampled comms.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Advanced users”