#asahi-dev · 2023-03-02 14:54
opticronIs the reader even UHS-2 capable?#asahi-dev · 2023-03-02 14:52
kettenisin theory at least#asahi-dev · 2023-03-02 14:52
ChaosPrincessbut not sure whether such cards exist on the market#asahi-dev · 2023-03-02 14:52
ChaosPrincessuhs-2 can do that#asahi-dev · 2023-03-02 14:44
jannauare there SD cards faster than PCIe1 x1? apple apparently expect the SD card reader to use PCIe2 x1. the ADT has maximum-link-speed, initial-link-speed, expected-link-speed and target-link-speed properties#asahi-dev · 2023-03-02 13:06
jannausigh, no. that doesn't work. I just broke pcie port init completely#asahi-dev · 2023-03-02 12:43
jannauseems to be enough to clear PORT_APPCLK_EN and PORT_PERST_OFF#asahi-dev · 2023-03-02 12:33
jannauminor annoyance with that is that we have to rely on a constant offset between rc and phy reg as the latter is not in the devicetree#asahi-dev · 2023-03-02 12:30
kettenisah, I didn't think about looking at what m1n1 did#asahi-dev · 2023-03-02 12:16
jannauand doing the same as m1n1 on pcie shutdown in u-boot fixes the ethernet controller#asahi-dev · 2023-03-02 12:09
jannauprobably ok as workaround as long as we don't support it. A little annoying when support is added as the gpio is on at boot#asahi-dev · 2023-03-02 12:07
jannauskipping the port setup for ports with "pwren-gpios" in u-boot fixes the usb hci#asahi-dev · 2023-03-02 10:52
jannaucycling pwren is not enough I guess the pcie port needs to be reset as well to recover#asahi-dev · 2023-03-02 10:48
kettenisbut maybe accessing the chip without the proper firmware crashes it?#asahi-dev · 2023-03-02 10:47
jannauBus xhci_pci: Register 400087f NbrPorts 4#asahi-dev · 2023-03-02 10:47
kettenisthen the link must be up at that stage#asahi-dev · 2023-03-02 10:47
jannauyes#asahi-dev · 2023-03-02 10:46
kettenisdoas the asmedia chip show up in u-boot at all?#asahi-dev · 2023-03-02 10:42
jannaunot missing on j375#asahi-dev · 2023-03-02 10:39
jannauthe asmedia hci still doesn't work. the link is not detected as up. I'll try to cycle its missing pwren-gpio#asahi-dev · 2023-03-02 10:37
jannaushort circuiting #PERST if the link is already up works for ethernet#asahi-dev · 2023-03-02 09:48
kettenismaybe u-boot should bring the link down again; we'd have to figure out how to do that#asahi-dev · 2023-03-02 09:47
kettenisthe OpenBSD driver short-circuits if it detects that the link is already up#asahi-dev · 2023-03-02 09:42
sven*clear#asahi-dev · 2023-03-02 09:41
svenyeah, if you clean it more stuff seems to be reset (at least on usb4)#asahi-dev · 2023-03-02 09:41
jannauit does rmw_set(PORT_PERST_OFF, port->base + PORT_PERST); but never clears the bit#asahi-dev · 2023-03-02 09:40
sveniirc that then disables the app clk as well which also disables the pcie dart #asahi-dev · 2023-03-02 09:39
svenif you set/clear that bit in the MMIO at least on the usb4 one additional stuff seems to be reset #asahi-dev · 2023-03-02 09:38
ketteniscorrect#asahi-dev · 2023-03-02 09:38
sveniirc port setup doesn’t actually set the bit in the MMIO, it just uses that gpio#asahi-dev · 2023-03-02 09:35
kettenistunables even#asahi-dev · 2023-03-02 09:35
kettenistunable survive a PERST# cycle#asahi-dev · 2023-03-02 09:35
jannauwhat do you mean by perst cycle? the port setup in apple_pcie_setup_port() or something else?#asahi-dev · 2023-03-02 09:27
sven(at least it’s possible to recover from that for the usb4 pcie)#asahi-dev · 2023-03-02 09:27
svenit should be possible to recover from that by going through a perst cycle but that might need tunable to be reapplied :/#asahi-dev · 2023-03-02 09:25
jannaufor pci@3,0 as well#asahi-dev · 2023-03-02 09:24
jannaujust "pcie-apple 590000000.pcie: /soc/die0/pcie@590000000/pci@2,0 link didn't come up"#asahi-dev · 2023-03-02 09:21
kettenisdoes linux provide some clues why it is unhappy?#asahi-dev · 2023-03-02 09:14
jannauusb hci and ethernet work with PCI_APPLE disabled#asahi-dev · 2023-03-02 08:47
jannaukettenis: u-boot with pcie support doesn't fail over the firmware less asmedia usb hci but possibly breaks the pcie links for the hci and ethernet adapter on the studio#asahi-dev · 2023-03-02 06:21
dottedmagoops, sorry#asahi-dev · 2023-03-02 06:20
dottedmagtelerga#asahi-dev · 2023-03-01 21:53
mazyeah, and I remember that this lock isn't even enough to deal with VF "hotplug" event (it is pretty easy to bring Linux down...)#asahi-dev · 2023-03-01 21:52
svenI guess no one could predict we’d be running pcie over very thin wires with crazy topologies when that was originally written ;)#asahi-dev · 2023-03-01 21:51
sventhere’s also a big fat “rescan, remove or add pci device” lock#asahi-dev · 2023-03-01 21:51
svenhotplug seems to have mostly been written with plugging in a single card into a slot#asahi-dev · 2023-03-01 21:50
svenI have a usb4 hub and connecting two docks to that one already breaks at least one xhci controller on them #asahi-dev · 2023-03-01 21:50
svensounds like the issues I’m running into #asahi-dev · 2023-03-01 21:49
gruetzkopfif you want to hard-hand lenovo firmware, try booting with a too-wide conventional pcie switch tree attached via thunderbolt#asahi-dev · 2023-03-01 21:48
gruetzkopfit was really surprising to me how bad it was when TBT started, when we had pci/pcie hotplug in enduser devices for decades with cardbus and expresscard