#
✕ nick:sven
#asahi · 2021-11-14 16:55
svennice
#asahi · 2021-11-14 16:50
svenhm, intersting. at least i hope just initializing those chips should be enough to make the ports work
#asahi · 2021-11-14 16:44
svendo you have the ADT somewhere?
#asahi · 2021-11-14 16:41
svenhuh
#asahi · 2021-11-14 16:38
svenat least i'd expect them to just work then
#asahi · 2021-11-14 16:38
sven?
#asahi · 2021-11-14 16:38
svenbut still connected over pci-e
#asahi · 2021-11-14 16:37
sveni guess those are then driven by the xhci controller that drives the usb-a ports on the mini?
#asahi · 2021-11-14 16:36
svenalso, wait, the iMacs have non-thunderbolt usb-c ports?
#asahi · 2021-11-14 16:26
svenotherwise we might end up with devicetrees on people's machines that have some issues and then we might get into trouble keeping backwards compatibility
#asahi · 2021-11-14 16:24
svenimho we should only add device trees to m1n1 after they've at least been reviewed on the mailing lists
#asahi · 2021-11-14 12:28
sventhe example in there just has "apple,t8103-i2c" :/
#asahi · 2021-11-14 12:25
svenbut i'm also happy if someone else just submits those :D
#asahi · 2021-11-14 12:25
svenj_ey: yeah, i just have some commits to add the i2c, cd321x and usb nodes but they're all blocked on getting the apple,dwc3 bindings in
#asahi · 2021-11-14 12:24
svenurgh... i just realized that i probably messed up the i2c compatible in the bindings. it should've been "apple,t8103-i2c", "apple,i2c" but right now you can only either do "apple,t8103-i2c" or "apple,i2c"
#asahi · 2021-11-14 11:59
svenso the base model just has two usb-c ports and not even a single usb a port?
#asahi · 2021-11-09 11:50
sventhat sounds very similar to how WiFi is enabled
#asahi · 2021-11-09 11:49
svenor maybe that was just for display port :/
#asahi · 2021-11-09 11:49
svenbut iirc it needed some tunables from sysconf
#asahi · 2021-11-09 11:48
svenI have some disgusting hack to make it work which is essentially just put the write32s from a hv trace in there
#asahi · 2021-11-09 11:48
sven“works”
#asahi · 2021-11-09 10:51
sventhunderbolt will at least require us to pass through tunables from the ADT to the atc-phy driver because different ones need to be applied whenever USB3 or TBT is enabled, add support for a co-processor, turn the NIH driver to a platform device and somehow tie all that together with pcie and the usb pd chip
#asahi · 2021-11-09 10:47
sveni'm still not looking forward to the mess that will be thunderbolt
#asahi · 2021-11-09 10:46
svenand plug detect works for usb2/3 host/device mode but i think the driver needs additional work to also identify thunderbolt/displayport iirc
#asahi · 2021-11-09 10:46
sventhe first two are essentially automatic. for the third we won't use extcon but the typec / usb-role-switch infrastructure
#asahi · 2021-11-09 10:45
sventype c is also "done" for usb2/3 but will need more work for thunderbolt/displayport
#asahi · 2021-11-08 18:54
svenI don’t blame them..
#asahi · 2021-11-08 18:46
sven:D
#asahi · 2021-11-08 08:23
svendo you see any messages on the m1n1 serial output?
#asahi · 2021-11-08 07:28
svenmarcan: it uses llvm instead of my random gcc toolchain but seems to still work otherwise
#asahi · 2021-11-07 16:39
svenor just send a one-off commit, that'll work as well
#asahi · 2021-11-07 16:39
svenbut it kinda depends on that usb reset quirk
#asahi · 2021-11-07 16:38
svenyeah, my series that adds all those nodes has a commit to fix that
#asahi · 2021-11-07 12:17
svenI think SMC is also somehow involved in the charging process but iboot already initializes that one
#asahi · 2021-11-07 12:16
svenI guess it just needs to be woken up when the port has to act as a power source
#asahi · 2021-11-07 12:16
svenI guess charging also works when the pd chip is in hibernation mode then. Usb device mode on the normal usb-c ports works there as well fwiw
#asahi · 2021-11-06 12:21
sventhey're also known as ACE1 and ACE2 for some reason
#asahi · 2021-11-06 12:20
sveni think it started at cd3216 or so for the T2 macs
#asahi · 2021-11-06 12:15
svenpretty sure we've seen CD3218 before
#asahi · 2021-11-06 11:30
svenyeah, could be. i only know for sure that the chip needs to be woken up to make the port act as a power source
#asahi · 2021-11-06 11:27
sven(or maybe charging even work in hibernation mode. i've never actually tried)
#asahi · 2021-11-06 11:27
svenand i'm willing to bet it also starts out in hibernation and needs to be woken up
#asahi · 2021-11-06 11:26
svenUSB PD for magsafe is likely handled by yet another CD321x chip
#asahi · 2021-11-06 11:26
svenuh, there should be a HPM entry in the ADT for magsafe
#asahi · 2021-11-06 11:15
svenfor charging at least the SPSS command sent over I2C should be enough
#asahi · 2021-11-06 10:47
svenNice!
#asahi · 2021-11-05 10:29
svenprobably a good idea to talk to dougall :)
#asahi · 2021-11-05 10:28
svenif you also add google to those tools there's also https://github.com/dougallj/applecpu/blob/main/timer-hacks/bench.py#L85
#asahi · 2021-11-05 10:19
svengrep and strings
#asahi · 2021-11-05 09:54
svenFIXED_CYCLES / CYCLE is fixed_counter: 0 and FIXED_INSTRUCTIONS / INST_ALL is fixed_counter: 1

plus ›