#
✕ nick:kettenis
#asahi · 2021-04-19 20:04
kettenisbtw, gP0d is the key used to control power to the WiFi chip
#asahi · 2021-04-19 19:55
kettenisI don't see why that would be a problem
#asahi · 2021-04-17 21:03
kettenisregisters match if the backlight uses channel 1
#asahi · 2021-04-17 20:57
kettenisdis you check pwm-samsung.c?
#asahi · 2021-04-17 20:57
kettenisthat suggests this is another hardware block that survises from when Apple used Samsung SoCs in their phones
#asahi · 2021-04-17 20:56
kettenispipcet[m]: "apple,fpwm-s5l8920x"
#asahi · 2021-04-17 20:40
kettenis#define LED_FUNCTION_KBD_BACKLIGHT "kbd_backlight"
#asahi · 2021-04-17 17:26
kettenisthe root ports don't advertise native pcie hutplug support though
#asahi · 2021-04-17 17:24
kettenisright, I'll see if I can figure out what happens if I turn it on after booting OpenBSD
#asahi · 2021-04-17 17:12
kettenisnot sure why the corellium folks came up with code that supports somewhat more complicated power sequencing
#asahi · 2021-04-17 17:11
kettenisno clue about what osx does, but it appears to be a simple on/off toggle
#asahi · 2021-04-17 17:05
kettenisso maybe having the SMC manage thing indepently from pcie is an option
#asahi · 2021-04-17 17:04
kettenisjudging from the ADT contents, the SMC is involved in power management and wakeup
#asahi · 2021-04-17 16:58
kettenisarnd: the device doesn't show up at all if you don't power it up
#asahi · 2021-04-17 15:19
kettenisI didn't find a precedent for hardware that needs to explicitly power on a pcie device
#asahi · 2021-04-17 15:18
kettenisbut it may make more sense to make it a power domain
#asahi · 2021-04-17 15:18
ketteniscorellium modelled the wifi power control using some sort of emulated GPIO
#asahi · 2021-04-17 15:14
kettenisyou still have to have something that mappes an MSI vector number to an AIC vector number
#asahi · 2021-04-17 15:08
kettenishost ridge registers need to be initiaized to make that happen
#asahi · 2021-04-17 15:06
kettenisso really that has to be handled by the host bridge driver
#asahi · 2021-04-17 15:06
kettenisthere are registers for MSI
#asahi · 2021-04-17 15:05
kettenisthis done by sending commands to the SMC
#asahi · 2021-04-17 15:05
kettenisthere is an issue that the wifi chip needs to be powered on
#asahi · 2021-04-17 15:04
kettenisand beside the msi support?
#asahi · 2021-04-17 14:57
kettenisat that point you might as well pretend it isn't designware at all ;)
#asahi · 2021-04-17 14:57
kettenisso most if pcie-designware-host.c is useless as well
#asahi · 2021-04-17 14:57
kettenisand ECAM is properly implemented
#asahi · 2021-04-17 14:56
kettenisthe interrupt code is also completely different
#asahi · 2021-04-17 14:56
kettenisthat means almost all code in pcie-designware.c would be unused
#asahi · 2021-04-17 14:55
kettenisso as far as I can tell, Apple didn't integrate the DesignWare ATU
#asahi · 2021-04-17 14:49
ketteniseverything upside down
#asahi · 2021-04-17 14:41
kettenisbut even then I think you end up with 90% of the code being overrides
#asahi · 2021-04-17 14:40
kettenisI've seen a patch series to unify them in some way
#asahi · 2021-04-17 14:40
ketteniscurrently there are seperate standalone drivers for all the dwc variants u-boot supports
#asahi · 2021-04-17 14:39
kettenisnot as far as I can tell
#asahi · 2021-04-17 14:36
kettenisthe "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
#asahi · 2021-04-17 14:33
kettenisneeds some msi-related properties added to it, but maz already had a suggestion for that
#asahi · 2021-04-17 14:31
kettenisthat is an example of how it could be done
#asahi · 2021-04-17 14:31
kettenishttps://github.com/AsahiLinux/docs/wiki/HW:APCIe#dt-bindings
#asahi · 2021-04-17 14:31
kettenisright; the example I found of a RC with actual ports is the "old" tegra20 one
#asahi · 2021-04-17 14:20
kettenisbut I guess that's up to whoever is going to write the linux driver
#asahi · 2021-04-17 14:19
kettenisnot 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
#asahi · 2021-04-17 14:18
kettenisif 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
#asahi · 2021-04-17 14:16
kettenisif we can express all this using proprties from the standard pci-bus binding I don't see why we shouldn't
#asahi · 2021-04-17 14:15
kettenisthat's something most server SoCs don't worry about...
#asahi · 2021-04-17 14:14
kettenisbringing up the links could be moved in m1n1, but then you'd lose the ability to turn them off for suspend
#asahi · 2021-04-17 14:12
ketteniscorellium has some code dealing with the link speed that uses a max-speed-2 property
#asahi · 2021-04-17 14:11
kettenislooks like it is special glue logic like on most/all dwc pcie controllers
#asahi · 2021-04-17 14:10
kettenisbut the refclk-always-on-2 property in the corellium tree suggests that clkreq may not be supported for the ethernet device
#asahi · 2021-04-17 14:08
kettenisit also seems that the SoC supports clkreq (no surprise for what's essentially a phone SoC)

plus ›