2021-04-17
00:02klaus has quit [Ping timeout: 240 seconds]
00:08raster has quit [Quit: Gettin' stinky!]
00:12DarkShadow44 has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
00:13DarkShadow44 has joined #asahi
00:14bgianf has quit [Remote host closed the connection]
00:25ephe_meral1 has quit [Ping timeout: 246 seconds]
00:32klaus has joined #asahi
00:37klaus has quit [Ping timeout: 252 seconds]
00:40odmir has quit [Remote host closed the connection]
00:41odmir has joined #asahi
00:45odmir has quit [Ping timeout: 240 seconds]
00:52klaus has joined #asahi
00:53bgianf has joined #asahi
01:10klaus has quit [Ping timeout: 246 seconds]
01:12odmir has joined #asahi
01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:22Emantor has joined #asahi
01:23klaus has joined #asahi
01:28klaus has quit [Ping timeout: 246 seconds]
01:30odmir has quit [Remote host closed the connection]
01:30odmir has joined #asahi
01:40klaus has joined #asahi
01:44klaus has quit [Ping timeout: 240 seconds]
02:28klaus has joined #asahi
02:33klaus has quit [Ping timeout: 240 seconds]
02:34Necrosporus has quit [Ping timeout: 252 seconds]
02:37robinp has quit [Read error: Connection reset by peer]
02:38robinp has joined #asahi
02:41odmir has quit [Remote host closed the connection]
02:47Necrosporus has joined #asahi
02:50phiologe has quit [Ping timeout: 250 seconds]
02:50phiologe has joined #asahi
03:09klaus has joined #asahi
03:14klaus has quit [Ping timeout: 246 seconds]
03:26marvin24 has quit [Ping timeout: 250 seconds]
03:26marvin24 has joined #asahi
03:57klaus has joined #asahi
04:02klaus has quit [Ping timeout: 252 seconds]
04:25mxw39 has quit [Ping timeout: 240 seconds]
04:25mxw39 has joined #asahi
04:29method_ has joined #asahi
04:32klaus has joined #asahi
04:37klaus has quit [Ping timeout: 246 seconds]
04:49maknho____ has joined #asahi
04:50maknho___ has quit [Ping timeout: 240 seconds]
05:05klaus has joined #asahi
05:10klaus has quit [Ping timeout: 240 seconds]
05:42klaus has joined #asahi
05:46klaus has quit [Ping timeout: 240 seconds]
06:19klaus has joined #asahi
06:24klaus has quit [Ping timeout: 268 seconds]
06:52klaus has joined #asahi
06:57klaus has quit [Ping timeout: 252 seconds]
07:06armarcan: just wondering, will you apply for a pid from openmoko, use something random, or actually buy your own vid?
07:08method_Hey marcan, since you're online and sent a message recently I felt its a good time to ask, Is it alright if I use a bot that relays message to / from discord I wrote, I keep it private to myself of course
07:09method_Just asking because I use discord a lot more than irc, and forget to check my client often
07:24VinDuv has joined #asahi
07:40klaus has joined #asahi
07:51vlixa has quit [Remote host closed the connection]
08:04jeffmiw_ has joined #asahi
08:04jeffmiw_ has quit [Client Quit]
08:44Chainsaw has joined #asahi
08:46marcanok, USB is done and hooked up to the proxy, and I made Linux boot work properly with it, shutting down and such
08:47marcanso you can now do linux.py --tty /dev/<some uart> with M1N1DEVICE=/dev/ttyACM0 (the m1n1 ACM device)
08:47marcanit's all still backwards compatible with ancient versions. I want to see how long I can get away with my old installed m1n1 that doesn't even support the MMU :)
08:48marcan(well, it's not actually backwards compatible at the protocol level, but proxy.py tries the new way before falling back to the old way)
08:48marcanfixed some fail in USB too (it wasn't actually kicking tx/rx properly, same issue we had with the UART in linux)
08:49svenyeah, i at least know two or three parts in my usb code that weren't exactly compliant to the spec
09:03vimal has quit [Ping timeout: 260 seconds]
09:05maknho____ has quit [Ping timeout: 252 seconds]
09:08maknho____ has joined #asahi
09:18raster has joined #asahi
09:37totebagel has quit [Quit: Leaving]
09:51vlixa has joined #asahi
10:06Bublik_ has quit [Ping timeout: 252 seconds]
10:08Bublik_ has joined #asahi
10:33ephe_meral1 has joined #asahi
10:55sveni've looked at the whole dwc register space using RegMonitor and I didn't see any interesting bits flip when connecting a usb cable
11:07sven0x502200024 starts at 0xa2000042, then goes to 0xa1000042 after i connect the cable and then finally to 0xa0000042 when i disconnect the cable again
11:14svenmarcan: i mean.. it works if i just manually force the dwc3 part to reinit the device even without touching the phy
12:28odmir has joined #asahi
12:29kettenisso that raises the question where to put properties like reset-gpios and max-link-speed
13:46Chainsaw has quit [Remote host closed the connection]
14:04arndkettenis: are you sure we actually need these properties? Do you ever need to configure the link speed or trigger a reset using gpio?
14:07ketteniswould be merely an optimization to not try the higher link speeds on peripherals that don't support them
14:07kettenisit seems the SoC supports pci gen4, but the peripherals are gen3 (wifi) gen2 (xhci) and gen1 (ethernet)
14:08kettenisit also seems that the SoC supports clkreq (no surprise for what's essentially a phone SoC)
14:10kettenisbut the refclk-always-on-2 property in the corellium tree suggests that clkreq may not be supported for the ethernet device
14:11arndmy hope was that this would all be part of what m1n1 can do before u-boot does the bus scan
14:12arnda lot of the server chips actually use dw-pcie implementations, but all the phy handling is done in firmware before it gets handed off to the OS
14:14kettenisbringing up the links could be moved in m1n1, but then you'd lose the ability to turn them off for suspend
14:16kettenisif we can express all this using proprties from the standard pci-bus binding I don't see why we shouldn't
14:18kettenisif my reading of the pci-bus.yaml schema is correct it is allowed to have reset-gpios and max-link-speed on pci-pci bridge nodes
14:19kettenisnot sure if using the dw-pcie driver code in linux makes a lot of sense as there is very little actual logic that you'd be able to re-use
14:22arndthat makes sense, since you can have nested buses. I think part of the problem is the the DT bindings for PCI largely go back to the pre-pcie days where a lot of things worked differently, and that the dw-pcie hardware in particular only normally implements a single port rather than a root complex
14:23arndIt might be helpful to look at what the older Marvell PCIe driver does, since that emulates a root complex with multiple ports on top of hardware that is somewhat similar to the separate dw-pcie ports
14:24arndso I think the the mvebu pcie binding reflects the root complex that does not actually exist in hardware
14:26arndBut since it seems that Apple actually implemented a proper root complex with multiple ports, we wouldn't need to emulate one here, just adjust the Linux driver to properly deal with multiple ports
14:33kettenisneeds some msi-related properties added to it, but maz already had a suggestion for that
14:36kettenisthe "pci@2,0" node will be needed anyway to add the child device node for the ethernet controller such that we can stick the "local-mac-address" property there
14:38arndright, it seems that the binding is not actually the problem here, it's more a question of how to convince the linux dw-pcie driver to handle it correctly
14:40ketteniscurrently there are seperate standalone drivers for all the dwc variants u-boot supports
14:42arndthat might actually help here. In the Linux driver, the common code for dw-pcie makes the assumption that port==root_complex==host_bridge, unlike the tegra driver you found and the mvebu driver that fakes a root complex
14:44arndNot sure how much this needs to be reworked, but if we need to introduce the concept of actual ports, the dw_pcie 'struct pcie_port' probably needs to be split into the port specific bits and those that are shared for the root complex
14:48arndThere is already a 'struct dw_pcie' that is looks like it should represent the root complex, but it contains a single 'struct pcie_port', along with members that should be port specific (num_lanes, link_gen, ...), while the 'struct pcie_port' seems to only have members that should be part of the root complex
14:50arnd'dw_pcie' contains the information for both modes, while 'pcie_port' only contains the bits that are specific to host mode
15:03arndkettenis: so what is left beyond what the generic pcie host support gives us? only suspend mode, or something beyond that?
15:05arndMSI doesn't have to be done in the pci host bridge driver, I think it's usually done in there because it shares the register space, but in this case there are no registers for MSI
15:07arndwhat do the registers do? I think when I read the corellium driver a while back, it didn't touch any registers for MSI, just passed everything down to the AIC
15:10arndbut isn't that someting that could be done in m1n1 or u-boot rather than having the OS know about it?
15:14kettenisyou still have to have something that mappes an MSI vector number to an AIC vector number
15:43arndkettenis: does the wifi device show up at all if you don't enable the power? As long as the driver can bind to the device, it can read a custom property to do whatever is necessary
15:44arndif the power needs to be enabled first, we may have to add the equivalent of drivers/mmc/core/pwrseq.c for pci
15:45arndkettenis: regarding the MSI mapping, I'm aware that this needs to be done somewhere, but as I said that does not involve registers, so it could be outside of the PCI host bridge driver if that ends up being easier
16:18klaus has quit [Ping timeout: 252 seconds]
16:24klaus has joined #asahi
16:42choozy has joined #asahi
16:58artemist has joined #asahi
17:06arndany idea if macos toggles it at runtime? if not, it's probably enough again to have u-boot turn it on before starting Linux
17:07arndif we decide that it is needed, then a copy of Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml for PCI should work
17:09vimal has joined #asahi
17:09arndMMC currently has a generic "simple" power sequencing driver that handle almost all devices, plus two device specific ones for those that are not as easily abstracted
17:10arndcompliant MMC/SDIO devices shouldn't need any of those, but it's fairly common to have to kick an SDIO device in some for (clock-enable, reset, regulator, ...) before it can be probed
17:11arndIn theory, SDIO is not different from USB or PCI here, but I don't recall it being needed on these so far
17:12kettenisnot sure why the corellium folks came up with code that supports somewhat more complicated power sequencing
17:13arndit probably comes down to how much power we can save by turning it off then, compared to just doing the regular PCIe ASPM
17:16arndIn that case, I suspect it could be modeled as a platform specific rfkill device, as long as pcie hotplug works correctly to bring it back up
17:24odmir has quit [Remote host closed the connection]
17:25odmir has joined #asahi
17:30odmir has quit [Ping timeout: 240 seconds]
17:50odmir has joined #asahi
18:21m42uko has quit [Quit: Leaving.]
18:21m42uko has joined #asahi
18:22pipcet[m]so I was looking for the most trivial device in my MacBook Pro's ADT, and I think I found it: I've figured out enough about the keyboard backlight PWM for it to be useful, I think; I can control it from m1n1 or Linux now, no driver code yet though
18:34marcanarnd: I don't want to waste time on PM stuff until I know that there are savings worth having
18:39pipcet[m]the built-in power metering/energy budgeting looks fairly sophisticated (plus there are all those temperature sensors), so maybe we don't need that meter...
18:46Chainsaw has joined #asahi
18:57maknho____ has quit [Ping timeout: 265 seconds]
19:00maknho____ has joined #asahi
19:03marcanI'd probably still want to cross-check with external metering just to be sure we understand it though :)
19:05pipcet[m]probably a good idea. No idea about the hardware side of it, I just saw it in the device tree (and I think it was mentioned in the Corellium code or docs somewhere...)
19:36jeffmiw has quit [Read error: Connection reset by peer]
19:50odmir has quit [Remote host closed the connection]
19:50LucasTorrobaHenn has joined #asahi
19:51odmir has joined #asahi
19:55odmir has quit [Ping timeout: 240 seconds]
20:06maknho____ has quit [Quit: WeeChat 2.3]
20:07maknho has joined #asahi
20:12pipcet[m]does anyone happen to know which API keyboard backlights are supposed to use? pwm-leds or pwm-backlight?
20:22jeffmiw has joined #asahi
20:25odmir has joined #asahi
20:29jannaupipcet[m]: I'd say backlight is for displays, existing keyboard backlight seem to use led_classdev
20:48VinDuv has quit [Quit: Leaving.]
20:55odmir has quit [Ping timeout: 240 seconds]
20:57kettenisthat suggests this is another hardware block that survises from when Apple used Samsung SoCs in their phones
20:59pipcet[m]I had a quick look at pwm-* and they seemed different, but I'll have another look at that one...
21:06pipcet[m]there's certainly no prescaler in +0x00 that affects anything, and +0x08 doesn't show anything in the bits corresponding to channel 1.
21:09odmir has joined #asahi
21:10vlixa has quit [Remote host closed the connection]
21:22choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
21:29ephe_meral1 has quit [Ping timeout: 252 seconds]
21:41vlixa has joined #asahi
21:43odmir has quit [Ping timeout: 268 seconds]
21:44Caloludr has quit [Quit: Textual IRC Client: www.textualapp.com]
21:44Caloludr has joined #asahi
21:55odmir has joined #asahi
22:02jeffmiw_ has joined #asahi
22:04odmir has quit [Remote host closed the connection]
22:05odmir has joined #asahi
22:34vlixa has quit [Remote host closed the connection]
22:38vlixa has joined #asahi
23:56jeffmiw_ has quit [Remote host closed the connection]