Skip to content

avd support - #527

Closed
sofus13 wants to merge 214 commits into
AsahiLinux:asahi-wipfrom
sofus13:avd-wip
Closed

avd support#527
sofus13 wants to merge 214 commits into
AsahiLinux:asahi-wipfrom
sofus13:avd-wip

Conversation

@sofus13

@sofus13 sofus13 commented Jun 30, 2026

Copy link
Copy Markdown

(basic) support has been tested on most SoC's.
The driver is based (very much) on rockchip's rkvdec driver, so most of the v4l2 stuff should be ok.

Codec stuff would not have been possible without eiln's work

marcan and others added 30 commits June 20, 2026 16:47
Signed-off-by: Hector Martin <marcan@marcan.st>
Co-developed-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
t8103:
- WLAN (SMC PMU GPIO AsahiLinux#13)

Signed-off-by: Hector Martin <marcan@marcan.st>
- WLAN (SMC PMU GPIO AsahiLinux#13)
- SD (SMC PMU GPIO AsahiLinux#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Hector Martin <marcan@marcan.st>
This causes flakiness if shut down; don't do it until we find out
what's going on.

Signed-off-by: Hector Martin <marcan@marcan.st>
This should now work properly with power domain dependencies.

With "apple,always-on" removed from ps_pmp add it as dependency for the
dcp* power-domains. Fixes dcp crashes on power state changes.
TODO: investigate if it is enough to power ps_pmp on during
SetPowerState calls.

Signed-off-by: Janne Grunau <j@jannau.net>
Enables keyboard and touchpad input on MacBook Air (M1, 2020) and
MacBook Pro (13-inch, M1, 2020).

Signed-off-by: Janne Grunau <j@jannau.net>
Enables keyboard and touchpad input on MacBook Pro (14/16-inch,
M1 Pro/Max, 2021).

Signed-off-by: Janne Grunau <j@jannau.net>
Those provide trackpad and keyboard for j413/j493.
Add keyboard alias & layout props for t8112 laptops

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
arm64: dts: apple: t8103-j274: Add speaker I/V sense slots

Specify TDM slots for the speaker amp IC to transmit I/V sense
measurements in.

arm64: dts: apple: j293/j313: Model SDZ GPIO as a regulator

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Co-developed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
arm64: dts: apple: t600x-j314-j316: Add speaker I/V sense slots

Specify TDM slots for the speaker amp IC to transmit I/V sense
measurements in. Make sure the channel order mirrors that of the
playback PCM.

arm64: dts: apple: t600x-j314-j316: Zero out unused speaker sense slots

Make one left codec and one right codec zero out the unused slots on
their respective speaker sense buses. Internally, inside the SoC, the
left and right sense buses are ORed, and zeroing-out the unused slots
on one bus is required so as not to corrupt the data on the other.

arm64: dts: apple: t600x: describe shared SDZ GPIO for tas2764

machines with the tas2764 amp codec share a GPIO line for
asserting/deasserting the SDZ pin on the chips. describe
this as a regulator to facilitate chip reset on suspend/resume

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Co-developed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
Co-developed-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
arm64: dts: apple: t8112: describe shared SDZ GPIO for tas2764

machines with the tas2764 amp codec share a GPIO line for
asserting/deasserting the SDZ pin on the chips. describe
this as a regulator to facilitate chip reset on suspend/resume

Co-developed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
Co-developed-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
The Mac Studio M1 Max (t6001) model has a built-in USB3 hub. This hub
has a firmware flash which is also connected to an AP SPI controller.
The hub starts out in reset and the host is expected to bring it out of
reset, potentially after upgrading/validating the firmware.

We won't be doing anything with the firmware, so just use gpio-hog to
flip the two GPIOs needed to bring up the hub chip.

Signed-off-by: Hector Martin <marcan@marcan.st>
The dcp co-processor crashes on HDMI unplug while it apparently tries
to notify pmp. Handle "notify_pmp" as a parent dependency for
"ps_disp0_fe" and "ps_dispext_fe".

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
The display system is initialized by the bootloader to provide a simple
framebuffer at startup. Memory for the framebuffer and heap for the
display co-processor are alreay mapped through the IOMMU. IOMMU
intialization must preserve this mappings to avoid crashing the display
co-processor. The exisitng mappings are caried in the devicetree. They
are applied during device attach to ensure the IOMMU framework is aware
of these mapping.

Mappings are filled by m1n1 during boot.

Based on https://lore.kernel.org/asahi/20220923123557.866972-1-thierry.reding@gmail.com

arch: arm64: apple: t8103: Add connector type property for DCP*

arch: arm64: apple: Add dcp panel node for t8103 based laptops and imacs

The panel node will contain among other properties backlight control
related properties from the "backlight" node in the ADT.

arm64: dts: apple: t8103: Add "ps_disp0_cpu0" as resets for dcp

Signed-off-by: Janne Grunau <j@jannau.net>
The display system is initialized by the bootloader to provide a simple
framebuffer at startup. Memory for the framebuffer and heap for the
display co-processor are alreay mapped through the IOMMU. IOMMU
intialization must preserve this mappings to avoid crashing the display
co-processor. The exisitng mappings are caried in the devicetree. They
are applied during device attach to ensure the IOMMU framework is aware
of these mapping.

Mappings are filled by m1n1 during boot.

Based on https://lore.kernel.org/asahi/20220923123557.866972-1-thierry.reding@gmail.com

arch: arm64: apple: t600x: Add connector type property for DCP*

arch: arm64: apple: Add dcp panel node for t600x based laptops

The panel node will contain among other properties backlight control
related properties from the "backlight" node in the ADT.

arm64: dts: apple: t600x: Add "ps_disp0_cpu0" as resets for dcp

Signed-off-by: Janne Grunau <j@jannau.net>
arm64: dts: apple: t8112: Add "ps_disp0_cpu0" as resets for dcp

arm64: dts: apple: t8112-j473: Add dptx-phy power-domain

The HDMI output used by framebuffer0 requires the display controller and
external DP phy power-domains to remain active.

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Hector Martin <marcan@marcan.st>
Removes the "apple,always-on" property from ps_disp0_fe/cpu0.

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Asahi Lina <lina@asahilina.net>
to be dropped

Signed-off-by: Asahi Lina <lina@asahilina.net>
@sofus13 sofus13 changed the title avd (h264) support avd support Jul 6, 2026
@sofus13
sofus13 force-pushed the avd-wip branch 2 times, most recently from 4019766 to cffde49 Compare July 7, 2026 07:42
sofus13 added 7 commits July 7, 2026 11:15
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
@sofus13
sofus13 force-pushed the avd-wip branch 4 times, most recently from f962ea2 to 852f1ec Compare July 7, 2026 11:25
sofus13 added 3 commits July 8, 2026 10:45
Allows restoring state after a reset

Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
@jannau

jannau commented Jul 9, 2026

Copy link
Copy Markdown
Member

manually merged into bits/000-devicetree, bits/020-dart and bits/240-isp (due to media/platform/apple dir dependency)

@jannau jannau closed this Jul 9, 2026
@mkurz

mkurz commented Jul 10, 2026

Copy link
Copy Markdown

Does this already support AV1 hardware decoding on M3?

@sofus13

sofus13 commented Jul 10, 2026

Copy link
Copy Markdown
Author

no, only h264 and vp9

@mkurz

mkurz commented Jul 10, 2026

Copy link
Copy Markdown

no, only h264 and vp9

do you have plans to add support for av1 on supported devices?

@sofus13

sofus13 commented Jul 10, 2026

Copy link
Copy Markdown
Author

i would love to, but i only have an m2. I hope to find a solution after i add support for hevc

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.