#
✕ nick:marcan
#asahi · 2021-11-18 12:19
marcancorrect
#asahi · 2021-11-18 12:18
marcanfirefox317: are you sure you made the right change?
#asahi · 2021-11-18 11:59
marcanI'm about to test that hypothesis now :p
#asahi · 2021-11-18 11:59
marcanwhich suggests you read the wrong register
#asahi · 2021-11-18 11:59
marcanwhat tipped me off was that you ended up reading more bytes than expected
#asahi · 2021-11-18 11:59
marcanallowing the SMC interface to change the read pointer
#asahi · 2021-11-18 11:59
marcana repeat start will not release the lock, but a stop will
#asahi · 2021-11-18 11:59
marcanmy hypothesis was that the chip handles i2c transactions on both i2c ports with the *same* pointer register (and of course they are interlocked, so it will clock stretch transactions on one port while another one is busy)
#asahi · 2021-11-18 11:58
marcanit doesn't care if you issue a stop or not
#asahi · 2021-11-18 11:58
marcanthe write sets the pointer, the read reads from the pointer
#asahi · 2021-11-18 11:58
marcanthe way this works is the chip has a pointer register
#asahi · 2021-11-18 11:54
marcanrepeat start is the more common way of doing it
#asahi · 2021-11-18 11:52
marcanpage 79
#asahi · 2021-11-18 11:52
marcanit's the same
#asahi · 2021-11-18 11:52
marcanno stop bit
#asahi · 2021-11-18 11:52
marcanS Unique Address Wr A Register Number A Sr Unique Address Rd A ...
#asahi · 2021-11-18 11:52
marcanSr -> repeated start
#asahi · 2021-11-18 11:52
marcanpage 79
#asahi · 2021-11-18 11:52
marcanTPS65983B
#asahi · 2021-11-18 11:51
marcanradnic: it does not.
#asahi · 2021-11-18 10:04
marcan(I guess you'll have to rebuild and install it...)
#asahi · 2021-11-18 10:01
marcan+ if (i2c_xfer_write(dev, addr, 1, 0, &reg, 1))
#asahi · 2021-11-18 10:01
marcan- if (i2c_xfer_write(dev, addr, 1, 1, &reg, 1))
#asahi · 2021-11-18 10:01
marcanradnic: try this in i2c_smbus_read:
#asahi · 2021-11-18 09:59
marcanI can try changing that to do a repeatstart and see if that fixes it
#asahi · 2021-11-18 09:58
marcanyes but if there is a shared register pointer, SMC could sneak in between our two transactions and change the register pointer
#asahi · 2021-11-18 09:58
marcannormally read txns would be more properly pipelined as start-write-repeatstart-read-stop
#asahi · 2021-11-18 09:57
marcanhypothesis: right now we do start-write-stop start-read-stop
#asahi · 2021-11-18 09:57
marcansven: I wonder if the two I2C ports are not properly interlocked
#asahi · 2021-11-18 09:55
marcanit would be nice to find a way to abort the reboot more reliably...
#asahi · 2021-11-18 09:55
marcanit's possible that sometimes it loses the race, but I've never seen it myself
#asahi · 2021-11-18 09:55
marcanif you closed it then of course it won't work
#asahi · 2021-11-18 09:54
marcanthe installer was still running in the terminal at that point?
#asahi · 2021-11-18 09:54
marcanlike with what error code/message?
#asahi · 2021-11-18 09:53
marcanradnic: where exatly does it fail?
#asahi · 2021-11-18 09:53
marcanit's not supposed to do that, we do an (ugly) race to kill the boot picker before it reboots, assuming you didn't kill the installer
#asahi · 2021-11-18 09:52
marcanmps: so when you clicked "reboot" the machine actually rebooted?
#asahi · 2021-11-18 09:47
marcandid that not show up somehow? or did the machine just reboot or shut down?
#asahi · 2021-11-18 09:47
marcanmps: when the installer tells you to choose the boot volume in the picker, after you do so it tells you about step2 and the steps needed to complete the installation
#asahi · 2021-11-18 00:38
marcanapple did make some changes though, I found a few new registers by poking around
#asahi · 2021-11-18 00:38
marcanbut it's the same thing in i2c-pasemi in linux (which we also use)
#asahi · 2021-11-18 00:38
marcanI actually have the hardware spec for it but it's not publicly available and I can't share it, unfortunately
#asahi · 2021-11-18 00:38
marcansame thing as in pasemi PowerPC chips
#asahi · 2021-11-18 00:37
marcanI2C is pasemi
#asahi · 2021-11-18 00:37
marcanI'll be back later, but hopefully this helps your debugging :)
#asahi · 2021-11-18 00:36
marcanport 0 only matters if you want serial (from another mac or a custom interface) or to DFU
#asahi · 2021-11-18 00:35
marcanm1n1 doesn't care
#asahi · 2021-11-18 00:35
marcanno, you can use any port
#asahi · 2021-11-18 00:35
marcanso port 1 should work?
#asahi · 2021-11-18 00:34
marcanbut hpm1 works?

plus ›