2021-01-05
03:51comex has joined #asahi-re
04:18_whitelogger has joined #asahi-re
05:27_whitelogger has joined #asahi-re
06:27JTL has quit [Quit: WeeChat 1.7.1]
07:38rwhitbymarcan: https://gist.github.com/rwhitby/c7547dfe648a2554ca9b337154d97e26 shows the action list responses for Alpine Ridge and Titan Ridge laptops. I updated https://github.com/AsahiLinux/docs/wiki/Hardware:USB-PD and will continue to add information as I explore the 0x11 and 0x12 responses. I need to acquire 1.2V UART capability before going further :-)
07:51rwhitbymarcan: Re: 0x012: Bit24: "Persist through soft reset. This doesn't seem to work on M1 Macs (the PD controller reboots when the system reboots)." - I think that's referring to a USB-PD Soft Reset rather than a system reboot (or am I misreading what you've written there?).
08:00rwhitbymarcan: are you familiar with the MIPI Narrow Interface for Debug and Test (MIPI NIDnT) https://www.mipi.org/specifications/nidnt ? It contains a structured VDM protocol for remapping debug pins on a Type-C connector. At first glance it doesn't seem to match here, but I'm wondering if any of the concepts have been reused, so thought you might be interested if you haven't seen it before.
08:12rwhitbyIn other news, it seems my 16" MacBook Pro has the same PD controller (CD3217B12) as the M1. So I will document it as well and see if they match.
09:04marcanrwhitby: that came from the t8021 guys, and they said it works on the Intel ones maybe? but I'm not sure tbh
09:05marcankeep in mind those controllers have a flashed firmware that overrides ROM methods, but I *think* Apple uses the same exact firmware for all Intel macs and probably the M1 ones too? only the parameter area varies for each Intel one
09:06marcanI have the flash area decompiled, but it only overrides some hookable ROM functions, so it's hard to see the overall code flow, you only get what they added/redid
09:10rwhitbyThe PD controller firmware should be in an external SPI flash if it's the same as the regular TI devices. The TBT controller usually shares the flash.
09:34marcanrwhitby: the PD controller firmware on those TI devices is actually an internal OTP/ROM thing; the external SPI flash only loads *overrides* for the internal ROM code
09:35marcanbasically the SPI code gets loaded at a (hieously unaligned) SRAM offset, called, and it overrides function pointer table entries that the ROM uses. The ROM has thunks that call through those pointers to itself (initially), and the SRAM code has more thunks that call back into the ROM functions.
09:36marcanit's not hard to dump the ROM, you can use SWD on the chip pins or just flash some firmware that dumps the ROM out, but I haven't bothered to go there yet
10:21rwhitbySOP"_Debug Apple Unknown VDM Command (0x11) (02 05 00 00) | 8 bytes (11 81 AC 05 02 05 00 00)
10:21rwhitbySOP"_Debug Apple Unknown VDM Command (0x11) Ack (85 03 03 01, 00 00 00 00) | 12 bytes (51 80 AC 05 85 03 03 01 00 00 00 00)
10:21rwhitbySOP"_Debug Apple Unknown VDM Command (0x11) (02 05 00 00) | 8 bytes (11 81 AC 05 02 05 00 00)
10:21rwhitbySOP"_Debug Apple Unknown VDM Command (0x11) Ack (03 01 01 05, 00 00 85 03) | 12 bytes (51 80 AC 05 03 01 01 05 00 00 85 03)
10:23marcanthey use 16-bit tokens, so that looks like 0x385,0x103 for the first, and 0x103,0x501,0x385 for the second
10:25rwhitbythe same actionId on different ports of the same device seemed to return the same data (for a limited subset I looked at)
10:27rwhitbyboth are Big Sur, but I just realised the 14,1 is a minor version behind, so I'll update it and see if it changes things.
10:37marcanthis ACE2 firmware speaks of "A127X" but A1278 is a 2010 macbook which *definitely* wasn't using ACE2
10:38rwhitbylooking at TBT firmware versions, the Titan Ridge 16" 16,1 is at 55.3 (but it's still running OSX 10.15.17 cause I've got things that need to be updated for Big Sur), the Titan Ridge 13" 15,2 is at 47.4 (OSX 11.1) and the Alpine Ridge 13" 14,2 is at 41.4 (OSX 11.1)
10:51rwhitby14,2 response to actionId 0x205 is unchanged after updating to OSX 11.1, so remains different to 15,2 response.
10:55marcan15,2/Mac-827FB448E656EC26 is ACE1, so is 14,2/Mac-CAD6701F7CEA0921. 16,1/Mac-E1008331FDC96864 is ACE2.
10:58rwhitbyHmm, the 14,2 is "expendable" to me, the 15,2 is important and the 16,1 is my main laptop. I was hoping to be able to experiment on the 14,2 first so I don't damage the others :-)
11:00marcanthe ACE1 ones outright say TPS65983 in the firmware, so I'm pretty sure CD3215C00 == TPS65983 with different OTP/ROM code
11:09rwhitbyinteresting, the 65983 EVM photo in https://www.ti.com/lit/ug/slvuap1a/slvuap1a.pdf is the same board I have, and shows a 65982 mounted on it.
11:10rwhitbymarcan: the CD3217B12 on the M1 and 16,1 doesn't happen to correspond to the TPS65987 does it?
11:23rwhitbyMarcan probably already knows all this, but for the benefit of others, this document describes the "patch bundles" in the external SPI flash for the PD controller: https://www.ti.com/lit/an/slvae21a/slvae21a.pdf
11:58Necrosporusrwhitby, so you got some intel macs with T1 or T2? Or some M1 too?
11:58rwhitbyIntel Macs only at the moment. alpine ridge and titan ridge used for TBT3 interoperability testing
11:59NecrosporusI don't know those letters
11:59NecrosporusAnd I don't know what those ridges are either
12:01Necrosporusrwhitby, do you have a regular PC with GNU/Linux?
12:01NecrosporusAnd USB port
12:04NecrosporusBecause marcan did post log of linux dmesg when a macmini was connected by USB-A to USB-C cable
12:04NecrosporusSo I was wondering if intel macs report different USB id or same
12:06Necrosporususb 2-4: New USB device found, idVendor=05ac, idProduct=1901, bcdDevice= 9.01
12:06NecrosporusThat's from mac mini M1 ^^
12:10Necrosporusrwhitby, I have tried to connect my OrangePi4 board via USB typeC (it's only device I have with TypeC port except external HDD case) it wasn't visible as a device
12:10rwhitbyoh, I can get that from the PD Discover Identity. 15,2 is PID 0x166F and BCD 16.0 14,2 is PID 0x1669 and BCD 5.9 16,1 is PID 0x1670 and BCD 20.4.6
12:17marcan[111379.083055] usb 1-10: New USB device found, idVendor=05ac, idProduct=1670, bcdDevice=20.46
13:47roxfan2 has joined #asahi-re
13:49roxfan has quit [Ping timeout: 260 seconds]
14:07svenpeter[m]1 is now known as svenpeter[m]
18:42comexfor Intel Macs with T2 the ARM core *can* act as a USB device https://support.apple.com/guide/apple-configurator-2/revive-or-restore-an-intel-based-mac-apdebea5be51/mac
18:47roxfan2 is now known as roxfan
18:49minicom has joined #asahi-re
18:50artemist has joined #asahi-re
18:52sferrini has joined #asahi-re
18:52_ghost_ has joined #asahi-re
18:55ransom has joined #asahi-re
18:55sven has quit [Quit: ZNC 1.7.4 - https://znc.in]
18:59jcs has joined #asahi-re
18:59Jasper[m] has joined #asahi-re
18:59eta has joined #asahi-re
18:59marcan has quit [Quit: Now where's my screwdriver...]
19:01maximus64 has joined #asahi-re
19:03Shiz has joined #asahi-re
19:03gruetzkopf has joined #asahi-re
19:04Raqbit has joined #asahi-re
19:09GaveUp has joined #asahi-re
19:10josiahmendes[m] has joined #asahi-re
19:14jn__ has joined #asahi-re
19:14Fanfwe has joined #asahi-re
19:14austriancoder has joined #asahi-re
19:18DrWhax has joined #asahi-re
19:19flokk has joined #asahi-re
19:19Yuzu has joined #asahi-re
19:21DarthCloud has joined #asahi-re
19:21titanous has joined #asahi-re
19:22x56 has joined #asahi-re
19:22jld has joined #asahi-re
19:28nufflee[m] has joined #asahi-re
19:31konstanter has joined #asahi-re
19:31marcan has joined #asahi-re
19:33sven has joined #asahi-re
19:38chuskywalker has joined #asahi-re
19:38akemin_dayo has joined #asahi-re
19:40nkaretnikov has joined #asahi-re
19:40nemith has joined #asahi-re
19:43flokk has quit [Quit: Leaving]
19:49pg12 has joined #asahi-re
19:51marcan has quit [Ping timeout: 246 seconds]
19:51sven has quit [Read error: Connection reset by peer]
19:51marcan has joined #asahi-re
19:52davidrysk[m]Apple places firmware in /usr/standalone/firmware on macOS
19:52davidrysk[m]I'm not sure if that is merely a staging repository, though
19:54m42uko has joined #asahi-re
19:55sven has joined #asahi-re
19:56davidrysk[m]and also in /usr/share/firmware/wifi
19:56davidrysk[m]err, /usr/share/firmware
20:00davidrysk[m]the wifi device appears to be a BCM4378, which does have firmware, as there is a kext called com.apple.driver.BCMWLANFirmware4378.Hashstore.
20:03mogery has joined #asahi-re
20:09davidrysk[m]yeah I think it's likely that brcm firmware will be needed
20:11prusnak has joined #asahi-re
20:14pdrew has joined #asahi-re
20:14davidrysk[m]Looking at the kexts in general I see a handful of firmware related ones, but I can't tell how many are actually loading firmware. A bunch are loaded though.
20:20Bluerise has joined #asahi-re
20:22BlueriseI figure the BCM4378 should be just another FullMAC, so it'll definitely need firmware. That said, the firmware interface probably doesn't differ a lot from the regular Broadcom FullMACs. At least that's my hope.
20:24BlueriseThere's not a lot to gain in changing the interface anyway. All that p2p stuff is already supported by the normal Broadcom FullMACs.
20:26davidrysk[m]Where do we stand regarding the BCM4375, which I would expect it to be derived from?
20:26Bluerisefirmware, clm blob, nvram. unencrypted, just laying there. the hardest part is figuring out which file to use.
20:26BlueriseBCM4375 seems to be supported by bcmdhd: https://android.googlesource.com/platform/hardware/broadcom/wlan/+/master/bcmdhd/firmware/bcm4375/
20:27BlueriseSo, once we find out which file's to use, OpenBSD's bwfm(4) probably works out of the box, and I'm sure Linux' brcmfmac will work as well.
20:29davidrysk[m]Tangential to this, one of the main annoyances I've run into is lackluster Linux support for bcm4360, which is widely used in routers and older Macs
20:29davidrysk[m]From the bits and pieces that we know about that chip, it's built of hacks upon hacks
20:30Necrosporus has quit [Read error: Connection reset by peer]
20:30Necrosporus_ has joined #asahi-re
20:42davidrysk[m]okay I think it's highly likely that the only firmware blob that will be needed is the bcm one.
20:42davidrysk[m]I see most of the others that are managed by kexts present in the Preboot volume
20:47dgb has joined #asahi-re
20:53crabbedhaloablut has joined #asahi-re
20:53bostjan has joined #asahi-re
21:04mogery has quit [Read error: Connection reset by peer]
21:15Simonx22 has joined #asahi-re
21:19HeN has joined #asahi-re
21:21stemnic has joined #asahi-re
21:26jabamin has joined #asahi-re
21:26bostjan has quit [Quit: Leaving]
21:27linkmauve has joined #asahi-re
21:29bostjan has joined #asahi-re
21:29davidrysk[m]artemist: it might be difficult to find another source... hm
21:32blazra[m] has joined #asahi-re
21:32jabamin has quit [Quit: Textual IRC Client: www.textualapp.com]
21:39bostjan is now known as crucifix
21:40sharpiro has joined #asahi-re
21:41grumble has joined #asahi-re
21:42os[m] has joined #asahi-re
21:50dibas has joined #asahi-re
21:51henni has joined #asahi-re
22:06dstzd has joined #asahi-re
22:14larbob has joined #asahi-re
22:15riker77 has joined #asahi-re
22:27TonyRedondo has joined #asahi-re
22:31damia has joined #asahi-re
22:48brinly has joined #asahi-re
22:48max_thrun has joined #asahi-re
22:49max_thrun is now known as bear24rw
22:52ransom has quit [Read error: Connection reset by peer]
22:54chuskywalker has quit [Remote host closed the connection]
22:55kevincox[m] has joined #asahi-re
23:02Namidairo has joined #asahi-re
23:14doof has joined #asahi-re
23:23Stary has joined #asahi-re
23:25ransom has joined #asahi-re
23:26hthh_ has joined #asahi-re
23:27damia has quit [Quit: damia]
23:28damia has joined #asahi-re
23:32mofux[m] has joined #asahi-re
23:45mcnight[m] has joined #asahi-re