Skip to content

Update device trees to match 6.18 kernel, to fix issues with USB on M1 series. - #31

Open
ObiKeahloa wants to merge 15 commits into
AsahiLinux:asahifrom
ObiKeahloa:usb-dts-fix
Open

Update device trees to match 6.18 kernel, to fix issues with USB on M1 series.#31
ObiKeahloa wants to merge 15 commits into
AsahiLinux:asahifrom
ObiKeahloa:usb-dts-fix

Conversation

@ObiKeahloa

Copy link
Copy Markdown

This synchronizes the device trees with those that are in the 6.18 kernel.
Ideally, it will fix the issue of USB not working for users post update to 6.18 kernels.
These now match the current state of the device trees on the asahi branch of the Asahi Linux github repository.

Please let me know if I have to add a sign off onto the commit.

marcan and others added 14 commits December 21, 2025 15:26
The MTP HID driver will reuse this code, so split it off into another
file.

Signed-off-by: Hector Martin <marcan@marcan.st>
Apple M2 devices have an MTP coprocessor in charge of keyboard/trackpad
handling, communicating over a DockChannel interface. Add a simple
driver for this.

The keyboard does not require any initialization messages, but we have a
problem: we cannot reset the MTP so Linux can start it fresh, and it
delivers a number of informative packets on startup. To work around
this, we buffer those messages and re-inject them into the FIFO (which
is big enough to hold all of them) on shutdown, so Linux finds them when
it initializes its driver. The actual MTP coprocessor is quiesced, which
does work properly.

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
Find the appropriate EFI system partition on the internal NVMe
storage and set the U-Boot environment variables such that
the file system firmware loader can load firmware from it.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Add a variant of readl_poll_sleep_timeout that reads a single
byte to match the readb_poll_timeout API that Linux has.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
The ASMedia XHCI controller found on some of the Apple Silicon
machines needs firmware to operate.  Use the file system
firmware loader interface to read the firmware and load it
onto the controller.  This allows keyboards connected to the
type-A ports on these machines to function in U-Boot.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Now that we have a way to find the appropriate EFI system
partition on the internal NVMe storage, store the U-Boot
environment there.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Now that we have a way to find the appropriate EFI system
partition on the internal NVMe storage, nail it down as the
preferred EFI system partition such that we can use it to
store EFI variables.  This allows multiple OS installations to
exist on Apple Silicon machines without interfering with eachother.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Asahi Lina <lina@asahilina.net>
This synchronizes the device trees with those that are in the
process of being upstreamed into Linux. These now match the
current state of the device trees on the asahi branch of the
Asahi Linux github repository.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Device trees for the 14" and 16" MacBook Pro and the Mac Studio.
Taken from the asahi branch of the Asahi Linux github repository.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Device trees for the M2 MacBook Air and the M2 13" MacBook Pro.
Taken from the asahi branch of the Asahi Linux github repository.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Device trees for the 14" and 16" MacBook Pro and the Mac mini.
Taken from the asahi branch of the Asahi Linux github repository.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
When booting from a block io device, prefer the EFI system
partition over other partitions.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
This synchronizes the device trees with those that are in the 6.18 kernel.
Ideally, it will fix the issue of USB not working for users post update to 6.18 kernels.
These now match the current state of the device trees on the asahi branch of the Asahi Linux github repository.

Signed-off-by: Mayukh Bejoy <mayukhbejoy@tutamail.com>
Signed-off-by: ObiKeahloa <63236194+ObiKeahloa@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants