Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ Dengcheng Zhu <dzhu@wavecomp.com> <dengcheng.zhu@mips.com>
<dev.kurt@vandijck-laurijssen.be> <kurt.van.dijck@eia.be>
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> <dikshita@codeaurora.org>
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> <quic_dikshita@quicinc.com>
Dj <hey@djdev.me> <43033058+DjDeveloperr@users.noreply.github.com>
Dmitry Baryshkov <lumag@kernel.org> <dbaryshkov@gmail.com>
Dmitry Baryshkov <lumag@kernel.org> <[dbaryshkov@gmail.com]>
Dmitry Baryshkov <lumag@kernel.org> <dmitry_baryshkov@mentor.com>
Expand Down
78 changes: 78 additions & 0 deletions Documentation/arch/arm64/aurora-apif-centauri.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
.. SPDX-License-Identifier: GPL-2.0-only

N1 firmware and PCI transport
=============================

The Control function owns the firmware bootstrap and its DMA allocations.
Alpha and Beta use their own PCI-function DMA mappings. The driver requires
an APIF host with the supported isolated Gen3 x1 reset layout. All endpoint
DMA/MSI must be quiesced and the endpoint left in the stopped ROM personality;
live sessions cannot be adopted by this interface.

The Control PCI DT node supplies ``firmware-name``,
``apple,centauri-platform-id`` and ``apple,centauri-protocol = <27>``. The
platform identifier and personalized FTAB must agree with the actual device.
These are firmware inputs supplied by the boot producer, rather than a
machine-name lookup in the driver. No firmware or calibration data is shipped
in this series. The driver loads the firmware directly and starts asynchronously;
a missing file or failed phase requires correcting the input and reprobe.

The host's native DART reset requires exclusive Linux ownership and no retained
firmware streams on that unit. The boot producer must resolve ownership before
handoff. This driver cannot discard retained streams to make a reset succeed.
A failed link transition prevents further endpoint accesses. Published DMA and
vectors remain pinned when shutdown cannot be proved; a platform reset is then
required. This is an error path, not a supported live-session handoff.

Bootstrap command rings are bounded and used once. Radio data-plane ring sizes
and batching are separate from bootstrap. The transport builds without the
Wi-Fi consumer; it still starts the shared firmware for the later Alpha/Beta
consumers. Wi-Fi and Bluetooth are separate follow-up changes. Hardware
qualification of this cleaned series, including suspend/resume, remains pending.

Wi-Fi station consumer
----------------------

``CONFIG_APPLE_CENTAURI_WIFI`` adds the Alpha cfg80211/netdev consumer within
this transport module. It supports the protocol-27 command profile, active
2.4/5 GHz scanning and WPA2-PSK/CCMP station connections with firmware handshake
offload. The matched profile uses a raw 32-byte PMK supplied by cfg80211;
there is no separate passphrase interface. Unknown profiles are rejected by
the Control driver. Passive scan encoding is not established, so disabled and
NO_IR channels are excluded from active scans. WPA3, 6 GHz, roaming and wider
security/radio qualification remain outside the established driver scope.

Data uses the original 2,048-entry rings and coalesced completions. IRQs and
queued packets schedule the consumer; no periodic data poller or diagnostic
packet flow is added. Malformed frames and completion spans cannot index beyond
the coherent window. A lost command completion poisons further commands and
stops new transmission. Its key payload is cleared only after the transfer-ring
tail proves consumption; uncertain ownership keeps backing memory pinned.
Safe IPC teardown scrubs buffers after verified DMA shutdown. The cleaned
consumer still needs hardware traffic and suspend/resume qualification.

Bluetooth consumer
------------------

``CONFIG_BT_HCICENTAURI`` adds the Beta HCI/ACL PCI driver. A managed device
link requires the Control supplier to have established shared firmware and
orders removal and suspend against it. The Beta DT node supplies the factory
``local-mac-address`` in network byte order; no board-name or temporary-address
fallback selects initialization behavior.

Protocol-27 initialization provisions the address, completes firmware setup
and supplies a fresh random seed. The connection-command adaptation is enabled
only after the firmware's capability bit confirms support. Status and connection
completion events are normalized to the standard HCI command being tracked.
The firmware duplicate filter is reset in the HCI command-sync path before
filtered scanning starts; other drivers without that callback keep their
existing behavior. Standard report lengths are checked before applying the
matched legacy scan-response fixup.

The driver uses IRQ-triggered work and the original ring geometry. Diagnostic
capture, unrelated auxiliary rings, manual mode switches and success logging
are excluded. SCO and ISO delivery are not implemented. Coordinated firmware
teardown remains unqualified: a published Beta arena stays pinned on detach,
and rebinding requires a fresh shared-firmware boot. This is not a reset of the
Wi-Fi function. The cleaned driver still needs hardware HCI/ACL, repeated-scan
and suspend/resume qualification.
109 changes: 109 additions & 0 deletions Documentation/arch/arm64/aurora-apif-platform.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
.. SPDX-License-Identifier: GPL-2.0-only

M5 Pro non-GPU platform series
=============================

The APIF platform series separates transport/provider support from device
consumers. The shared ``t6050/base`` PR targets ``integration/aurora`` on
Linux 7.3; every other PR targets ``t6050/base``. Consumer dependencies are
recorded separately, so the review branches do not form a linear chain.
The source snapshot is ``t6050-gpu`` at ``ee68abb105200``. This review map
covers its non-GPU platform changes; hardware qualification of the rebased
combination remains separate.

.. list-table:: Review branches
:header-rows: 1

* - Area
- Branch
* - APIF transport, DART and SART
- `t6050/base <https://github.com/aurora-silicon/linux/tree/t6050/base>`_
* - Native ANS/NVMe queues
- `t6050/nvme <https://github.com/aurora-silicon/linux/tree/t6050/nvme>`_
* - Preinitialized PCIe and MSI
- `t6050/pcie <https://github.com/aurora-silicon/linux/tree/t6050/pcie>`_
* - PMP firmware registry
- `t6050/pmp <https://github.com/aurora-silicon/linux/tree/t6050/pmp>`_
* - Guest DT conversion
- `t6050/guest-wiring <https://github.com/aurora-silicon/linux/tree/t6050/guest-wiring>`_
* - Generation-4 SPMI
- `t6050/spmi <https://github.com/aurora-silicon/linux/tree/t6050/spmi>`_
* - SPMI PMU RTC
- `t6050/pmu-rtc <https://github.com/aurora-silicon/linux/tree/t6050/pmu-rtc>`_
* - SMC consumers and pcIO GPIO
- `t6050/smc <https://github.com/aurora-silicon/linux/tree/t6050/smc>`_
* - DP/USB combo PHY and crossbar
- `t6050/display-phy <https://github.com/aurora-silicon/linux/tree/t6050/display-phy>`_
* - CPU frequency profile
- `t6050/cpufreq <https://github.com/aurora-silicon/linux/tree/t6050/cpufreq>`_
* - N1 firmware and PCI lifetime
- `t6050/centauri-core <https://github.com/aurora-silicon/linux/tree/t6050/centauri-core>`_
* - N1 Wi-Fi
- `t6050/centauri-wifi <https://github.com/aurora-silicon/linux/tree/t6050/centauri-wifi>`_
* - N1 Bluetooth
- `t6050/centauri-bluetooth <https://github.com/aurora-silicon/linux/tree/t6050/centauri-bluetooth>`_
* - Firmware-27 AFK, DCP and DPTX
- `t6050/dcp <https://github.com/aurora-silicon/linux/tree/t6050/dcp>`_
* - Host GPIO interrupt groups
- `t6050/gpio-irqs <https://github.com/aurora-silicon/linux/tree/t6050/gpio-irqs>`_
* - Initial SPMI Type-C events
- `t6050/typec-events <https://github.com/aurora-silicon/linux/tree/t6050/typec-events>`_
* - DWC3 controller
- `t6050/usb <https://github.com/aurora-silicon/linux/tree/t6050/usb>`_
* - Power-domain handoff
- `t6050/pmgr <https://github.com/aurora-silicon/linux/tree/t6050/pmgr>`_
* - MTP keyboard reports
- `t6050/mtp <https://github.com/aurora-silicon/linux/tree/t6050/mtp>`_
* - Composed platform configuration
- `t6050/platform-wiring <https://github.com/aurora-silicon/linux/tree/t6050/platform-wiring>`_

CPU identification, idle register preservation and delay handling are
already represented by the base. Existing public interrupt-controller,
USB, I2C/SPI, DockChannel HID, MTP helper and standard platform drivers are
preserved rather than replaced with older copies. The fragment enables
their dependencies alongside the new providers and consumers.

AGX acceleration, its dedicated mailbox transports and diagnostic system
register probes are outside this series. Firmware binaries, board
calibration data and factory addresses are not included.

Configuration
-------------

Apply aurora-apif.config after defconfig and asahi.config, then run
olddefconfig. The fragment makes the selected platform consumers built-in;
firmware and loader metadata are still required.

The existing HID interface uses explicit apple,power-method and
apple,firmware-managed-reset properties. The latter is valid only for a
power-method-2 multi-touch interface with firmware-owned reset. The loader
must describe the actual ownership; no board-name or firmware-filename
guess selects it.

Loader and qualification requirements
-------------------------------------

* NVMe needs a stopped RTKit session and four distinct, reserved queue
pages. The new profile does not adopt an unqualified live queue session.
* N1 cold bootstrap needs its packed platform identifier, protocol 27,
factory Bluetooth address and an exclusively owned PCIe/DART unit.
Unqualified live-session adoption is not enabled.
* CPU frequency control requires an explicit, qualified firmware thermal
ownership claim covering every exposed OPP, including after PMP setup.
The DT conversion tool does not invent that claim.
* DCP needs a running firmware-27 session, inherited framebuffer region,
ordered provider clock table and the coprocessor physical register view
when guest resource addresses differ.
* GPIO interrupt groups and HID reset ownership must match the loader's
retained firmware ownership.

The conversion tool validates supplied metadata; it cannot establish that
firmware has stopped using a queue, stream, reset line or clock policy.

Validation
----------

The series has native driver builds and host protocol/bounds tests.
Hardware qualification must separately cover boot, storage I/O, network
traffic, physical Type-C attach/detach, display, brightness and suspend.
Retained firmware/DMA state is not reset as a fallback after a timeout.
7 changes: 7 additions & 0 deletions Documentation/arch/arm64/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ ARM64 Architecture

acpi_object_usage
amu
../../driver-api/firmware/aurora-apif
../../driver-api/firmware/aurora-apif-nvme
../../driver-api/firmware/aurora-apif-pcie
../../driver-api/firmware/aurora-apif-pmp
../../driver-api/firmware/aurora-apif-display
aurora-apif-centauri
aurora-apif-platform
apple-j813
apple-m6-cpu
arm-acpi
Expand Down
36 changes: 36 additions & 0 deletions Documentation/devicetree/bindings/firmware/aurora,apif-mmio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/firmware/aurora,apif-mmio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Aurora Platform Interface over Memory-Mapped I/O

maintainers:
- Dj <hey@djdev.me>

description: |
Synthetic MMIO transport supplied by Aura's EL2-resident monitor. Version 2
forwards native SPTM selectors and arguments and provides memory-ownership
services. Peripheral policy belongs to consumers, which reference this node
through the aurora,apif phandle. The register page must be absent from the
guest stage-2 mappings so accesses reach Aura.

properties:
compatible:
const: aurora,apif-mmio
reg:
maxItems: 1

required:
- compatible
- reg

additionalProperties: false

examples:
- |
apif: firmware@61ff0000 {
compatible = "aurora,apif-mmio";
reg = <0x61ff0000 0x4000>;
};
84 changes: 84 additions & 0 deletions Documentation/devicetree/bindings/iommu/apple,dart-apif.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/iommu/apple,dart-apif.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple DART mediated through Aura APIF

maintainers:
- Dj <hey@djdev.me>

description: |
A DART instance accessed through native SPTM calls rather than guest MMIO.
Linux owns stream grouping, table setup, mapping rollback and DMA apertures.
Firmware-owned streams are adopted without replacing their roots or replaying
retained mappings. Unit identifiers are firmware metadata, not chip IDs.

properties:
compatible:
const: apple,dart-apif
'#iommu-cells':
const: 1
description: Stream identifier.
aurora,apif:
$ref: /schemas/types.yaml#/definitions/phandle
description: APIF version-2 transport provider.
power-domains:
maxItems: 1
description: |
Native register-clock dependency needed before the first APIF DART call.
The provider must be powered independently of consumer probe ordering.
For T6050 ATC2 USB DART this is the ATC2_USB domain shared with DWC3.
apple,apif-dart-id:
$ref: /schemas/types.yaml#/definitions/uint32
maximum: 255
description: Native SPTM DART unit identifier.
apple,apif-num-streams:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 256
default: 256
description: Number of streams supported by this unit.
apple,apif-retained-sids:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 256
uniqueItems: true
items:
maximum: 255
description: Firmware-owned stream IDs which Aura adopted at bootstrap.
apple,apif-iova-force:
$ref: /schemas/types.yaml#/definitions/uint64
enum: [0, 1099511627776]
description: |
Optional native bit-40 force mask for a low-address device DMA view.
Must not overlap apple,dma-range. Omit for a native DVA aperture.
apple,apif-reserve-last-page:
type: boolean
description: Native aperture forbids allocating its final 16 KiB granule.
apple,dma-range:
$ref: /schemas/types.yaml#/definitions/uint64-array
minItems: 2
maxItems: 2
description: |
Device-visible DMA aperture base and size, aligned to 16 KiB and within
42 bits. Defaults to the low 4 GiB. This is not a CPU mapping.

required:
- compatible
- '#iommu-cells'
- aurora,apif
- apple,apif-dart-id

additionalProperties: false

examples:
- |
iommu {
compatible = "apple,dart-apif";
#iommu-cells = <1>;
aurora,apif = <&apif>;
apple,apif-dart-id = <5>;
apple,apif-num-streams = <16>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
$id: http://devicetree.org/schemas/mailbox/apple,ascwrap-v6.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple ASCWrap v6 GPU mailbox
title: Apple ASCWrap v6 mailbox

maintainers:
- Ryan Murray <ryan@aurorasilicon.org>

description:
Mailbox interface of the GPU coprocessors of the T8140 and T6040. The
Mailbox interface of the GPU coprocessors of the T8140, T6040 and T6050. The
wrapper resource contains the coprocessor control registers and mailbox
FIFOs. A separate resource provides the coprocessor vector-base register.
The firmware role identifies which GPU firmware instance uses the mailbox;
Expand All @@ -21,6 +21,9 @@ properties:
enum:
- apple,t6040-ascwrap-v6
- apple,t8140-ascwrap-v6
- apple,t6050-apif-ascwrap-v6
- apple,t6050-ascwrap-v6
- apple,t6050-x1n1-ascwrap-v6

reg:
items:
Expand Down
35 changes: 35 additions & 0 deletions Documentation/devicetree/bindings/soc/apple/apple,sart-apif.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/soc/apple/apple,sart-apif.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple SART mediated through Aura APIF

maintainers:
- Dj <hey@djdev.me>

description: |
SART provider using native SPTM table-5 calls. Existing consumers reference
this provider through their apple,sart phandle. Linux tracks only its own
regions; unknown firmware grants are not reported as inherited regions.

properties:
compatible:
const: apple,sart-apif
aurora,apif:
$ref: /schemas/types.yaml#/definitions/phandle
description: APIF version-2 transport provider.

required:
- compatible
- aurora,apif

additionalProperties: false

examples:
- |
sart {
compatible = "apple,sart-apif";
aurora,apif = <&apif>;
};
Loading