Commit graph

20 commits

Author SHA1 Message Date
Hector Martin
18408d37b1 dart: Handle locked DARTs & preserving page tables
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Sven Peter
1254b4bee6 pmgr: s/clock/power/
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-16 18:53:29 +09:00
Hector Martin
95ef45fd11 usb: Squelch DART error for missing USB devices
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-24 17:17:54 +09:00
Hector Martin
de6979fc7b Revert "usb: Add usb_idx_from_address() to find a dev by its MMIO addr"
This is no longer needed, so put things back the way they were.

This reverts commit e689ceb263.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-23 23:36:14 +09:00
Janne Grunau
46c945ac95 usb: use dynamic paths for usb related ADT nodes
Adds support for the 3rd USB-C port on 2021 Macbook Pros.
Currently up to 8 USB-C ports are supported which should be sufficient
for expected future devices.

Tested on Macbook Pro 14" and Mac Mini.

Signed-off-by: Janne Grunau <j@jannau.net>
2021-11-12 23:48:32 +09:00
Janne Grunau
5064b93b2f usb: dynamically allocate and register usb iodevs
Preparation for devices with more than 2 USB-C ports.

Signed-off-by: Janne Grunau <j@jannau.net>
2021-11-12 23:48:32 +09:00
Janne Grunau
2724d69f4c iodev: usb: replace secondary usb iodevs with single vuart iodev
Signed-off-by: Janne Grunau <j@jannau.net>
2021-11-12 23:48:32 +09:00
Hector Martin
e689ceb263 usb: Add usb_idx_from_address() to find a dev by its MMIO addr
This will be used to match up ADT and FDT USB devices, to pass through
enable status.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
a383ef0b5a iodev: Protect iodevs with spinlocks
This makes SMP IRQ reports less flaky

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:53:39 +09:00
Hector Martin
d7bd21d51c usb: Use new DART code to autoselect compatible mode
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-01 21:00:56 +09:00
Hector Martin
31bf2b5ac9 iodev: Make iodev_can_read() return the queued byte count
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-23 17:00:14 +09:00
Sven Peter
856a9dbd1b usb: don't initialize more than once
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-07-10 16:29:05 +09:00
Janne Grunau
98076ef693 usb: disable tps6598x interrupts
Restore the interrupt masks on chainload or HV guest start. The
interrupt mask is not restored on the USB-C port used by the hypervisor.
This prevents an interrupt storm in the guest when the other USB-C port
is exposed to the guest. Both tps6598x share unfortunately an interrupt
line.

Signed-off-by: Janne Grunau <j@jannau.net>
2021-06-18 14:26:54 +09:00
Sven Peter
9529ec2b4f usb: add hpm_init and split usb_init and usb_iodev_init
This allows to bringup the USB PHY and the HPM for the
payload without having to initialize the CDC ACM driver
at the same time.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-06-09 19:45:38 +09:00
Hector Martin
7abebaec88 iodev: Add iodev_queue() API to queue data without kicking transmission
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-16 19:04:51 +09:00
Hector Martin
58489bf72c iodev, usb: Add flush() call to flush buffers to the host
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 21:47:22 +09:00
Janne Grunau
a742f05532 usb/hv: add second CDC ACM interface for virtualized UART
Signed-off-by: Janne Grunau <j@jannau.net>
2021-05-15 19:47:08 +09:00
Hector Martin
7dfe24ee2c Rework kboot/chainload flow to shut down before calling the next stage
Next stage boots now exit back to main() after replying to the proxy
command, allowing shutdown functions to be called. Introduces a new
P_VECTOR proxy op, distinct from P_CALL. The Python side is reworked
to remain compatible with older versions that do not support this.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-17 18:12:59 +09:00
Hector Martin
bcece01769 usb: Hook up to iodev and bring up after payload boot attempt
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-17 16:47:43 +09:00
Sven Peter
add04246e7 usb: add clock/power/phy bringup
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-15 18:39:33 +09:00