Repository navigation
Apple M6 (T8152) PCIe-C tunnel on the rear port (on top of #191 and the USB4 PR) - #198
joshuaswarren wants to merge 20 commits into
Conversation
The T8152 GPIO block has the same layout as the T8140 one. Match "apple,t8152-pinctrl" with the T8140 hardware data. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
T8152 has a SART with a new register layout: the per-entry config, physical address and size registers sit at 0x00, 0x60 and 0xc0. Add the operations for it and match "apple,t8152-sart". The binding lists the new compatible as a stand-alone entry. Measured on an M6 Mac mini with an earlier form of this change: the machine boots and runs its root file system from NVMe, which uses this SART. This version is compile-checked only. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
On T8152 the queue setup registers (admin queue, IO queues, the linear submission queue control) live at different offsets, and a few of them accept writes but read back zero. Add a register translation for that layout, skip the read-back checks that cannot work, and describe the controller with a new hardware data block matched by "apple,t8152-nvme-ans2". The ANS is a virtual PMGR device on this SoC and has no reset line, so the hardware data block carries a no_reset_control flag. Only T8152 skips the reset lookup. Every other SoC still requires a reset control and fails the probe without one, as before. The binding gets the new compatible. On T8152 the resets, power-domains and power-domain-names properties are not required, and the controller has two register regions (the NVMMU registers live in the first one). Measured on an M6 Mac mini with an earlier form of this change: the machine boots and runs its root file system from NVMe. This version is compile-checked only. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
|
Receipts at head
|
[Medium impact] No new blocking issue was established; the PR appears safe to merge within its stated bring-up limits. SummaryAdds the T8152 rear-port PCIe-C tunnel, its binding, cold-start order, and shifted reset registers. The branch also carries the M6 base and USB4 support.
|
|
GREEN at 21ef6df for the three new commits (9455ab1 binding, ee003c0 PCI driver, 21ef6df dts). The four ACIO commits below them are #197 a70664c, where I posted my review. Read: the three diffs and pcie-apple.c at this head (tunnel release_reset, reinitialize, stop, preinit parsing around line 1700). Checked:
Findings:
Not checked: addresses, interrupts and ranges against the ADT; compile and dt check receipts are the author's, not reproduced; nothing run on hardware. |
|
New head
Receipts at this head: arm64 clang |
21ef6df to
9227680
Compare
|
GREEN at 9227680 Read: the seven commits above the #191 head against what I reviewed (the four ACIO commits at a70664c in #197, the three PCIe-C commits at 21ef6df here), compared as diffs with the hash lines removed. The four ACIO commits are the same as #197 df61647 (comment changes only). The PCI binding commit is identical. Resolved from my review:
Not run: build. Compile and dt check receipts are the author's, not reproduced; addresses are not checked against the ADT. Merge still needs CI and a second non-author GREEN. |
|
GREEN at 9227680 Read: the three commits above the #197 head (57e9e19 binding, c8df94c PCI driver, 9227680 dts); Checked
Findings (not blocking)
Not checkedCompile receipts, checkpatch beyond the |
71a4b66 to
fb0d081
Compare
|
New head Receipts at this head (CT-local, arm64 clang |
fb0d081 to
f877c81
Compare
|
Rebased on the new #197 head |
|
GREEN at f877c81 Read: the nineteen commits against the ones I reviewed at 9227680, compared per commit as diffs with the hash lines removed.
|
00beab3 to
0db54fd
Compare
On T8152 the ATC USB blocks (and the GPU) are behind a per-slot service request in the power state director, on top of the normal PMGR power states. Expose each slot, or a group of slots that must come up together, as a generic power domain. Power-on writes the slot request and waits for the acknowledge; power-off requests state 6 in reverse order. Add the devicetree binding. When a power-on request times out, the slot that timed out is put back to idle with the slots before it, because its acknowledge was not seen but it may still start. When a group power-off fails, every slot is put back to its active state, including a slot whose off request timed out and may still finish stopping, because genpd keeps the domain marked on after a failed power-off and would skip power_on at the next resume. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
The fixed host ports on T8152 need only the USB2 part of the PHY. Add a driver that applies the bootloader-supplied calibration, handles host and device mode, and leaves the USB3 and USB4 lanes alone. Add the devicetree binding. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
A hub with the Apple ID 05ac:800f sits behind the front ports of the M6 Mac mini. Add that ID to the hub quirk table with HUB_QUIRK_DISABLE_AUTOSUSPEND so the kernel keeps it powered. The match is on the vendor and product ID alone. Every hub with this ID loses autosuspend, not only the one on this machine. The constant is named after the ID, USB_PRODUCT_APPLE_HUB_800F, because the ID is Apple's and the part behind it was not identified from the descriptor. This quirk was not measured on its own: it only keeps the hub awake. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
Add a peripherals fragment to the M6 Mac mini board file: the always-on GPIO controller with the reset hog for the front-port USB hub, and the four PSD service slots for the USB ports. The NVMe controller, its mailbox and its address filter are not described here. The NVMe node needs a mailbox driver change that is not in this tree yet. The fragment holds only addresses, interrupt numbers and wiring. The boot loader adds the register tunables that some blocks need. The PMGR power domains are not described yet, so nodes that need them are left out. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
Add the DART of the Apple M6 (T8152), a third-generation DART whose topology is fixed by the hardware. Its streams are described by static parameters instead of being probed, and it takes no MMIO access until the first use, because the block can be power gated behind the ATC USB domains. The binding requires a second register region (the TLB invalidate doorbell) for the T8152 compatible only. The change adds: - the apple,t8152-dart compatible and its hardware description; - static topology and "first use" initialisation of every DART; - the Gen3 TLB invalidate and the fault handler; - the reset path for DARTs that the boot loader leaves locked. A DART that the boot loader leaves locked is held powered for its lifetime. That applies to Gen3 hardware only. The other generations keep their behaviour. The first-use initialisation re-reads the parameters and fails if the page size differs from the one assumed at probe. It runs under a spinlock, and every function it calls is non-sleeping (register accesses and an atomic poll). Measured on an M6 Mac mini with the earlier form of this change: the display controller DART attaches locked on every boot. This version is rebased on current integration/aurora and was compile-checked only. The USB DART paths need the T8152 PSD power domains and were not run on their own. The doorbell store and the TLBI of the Gen3 invalidate are arm64 instructions: they are built only with CONFIG_ARM64, and other architectures (COMPILE_TEST) get a stub that returns -EOPNOTSUPP. A locked Gen3 DART no longer takes the range flush through TLB_CMD, which Gen3 does not accept; it uses the full-stream Gen3 callback. Gen3 does not take commands through TLB_CMD, so the unlock after a lock-on-error exception is not sent there: the DART logs once that this is not supported. The stale-exception drain of a reset does not read 0x704 on Gen3, like the fault handler. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
Add the apple,t8152-dwc3 compatible to the Apple dwc3 glue. The ATC ports of the M6 (T8152) controller never switch roles through the Type-C controller. The glue starts the controller as a fixed host, with or without a hub child, or as a fixed peripheral when the node sets dr_mode = "peripheral". The T8152 profile is USB2 only: it needs maximum-speed = "high-speed", takes no reset line, and its USB3 PHY is optional. The calibration lists come from the device tree (apple,tunable-* properties that the boot loader fills in at runtime; the binding does not require them in the board file) and are applied to the register windows in a fixed order after the core is reset. The pipe handler is set up for the selected role. The apple,t8103-dwc3 paths keep their behaviour. The controller stays a syscore device while it runs, as before: no separate suspend or resume path is added for T8152. The earlier form of this change ran on an M6 Mac mini USB2 front port. This version is rebased on current integration/aurora and was compile-checked only. SuperSpeed does not train yet and is not part of this change. A fixed peripheral does not require the host-only calibration lists at probe, since it never applies them. The binding lists exactly four iommus entries, two stream IDs on each of two DARTs. If the T8152 USB2 PHY fails to initialise or power on during core start, the failure goes through the same shutdown as a failed core init, so the reset and syscore flags set earlier are cleared again. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
Describe the power management blocks and the USB controllers of the Mac mini (M6, J873) next to the peripherals fragment: - the two PMGR blocks and their power domains, in t8152-j873-pmgr.dtsi; - for each of the four USB ports (usb0, usb1, usb2 and usb3 of the SoC): two DART instances, the USB2 PHY and the dwc3 controller. The register windows, interrupts and DART tunables are the values of the Apple device tree of the machine. The boot loader adds the apple,tunable-* lists of the USB2 PHY and the controller at runtime. The bindings list the apple,t8152-pmgr and apple,t8152-pmgr-pwrstate compatibles, and the dwc3 and USB2 PHY bindings take the tunable lists as optional, because the boot loader adds them. The fragment is a plain description of the hardware. The ports that the change describes run USB2 only: SuperSpeed and USB4 are not part of it. This commit compiles to a device tree blob with dtc without warnings. It was not booted. The bring-up it comes from enumerated the front-port USB2 hub and a USB disk at 480 Mb/s. The four PSD service slots get their PMGR domains (the aon and the port domain of their port) as parents, so genpd powers them before the slot request. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
|
NOT GREEN at 0db54fd The four PCIe-C commits are fine; the PR is blocked by the mailbox compatible in the #197 commits below it (details in my comment on #197): Checked in the four PCIe-C commits
Not checkedCompile receipts (the author's), hardware (the prepare path is stated as unmeasured), and any T6000 or T8103 behavior beyond reading the device trees. |
0db54fd to
7902704
Compare
On T8152 the macOS driver starts the ACIO CPU through the coprocessor wrapper block (the "cpu" region, acio-cpu reg[1]): write 0x10 to +0x28, idle state is +0x44 bit 1. That is the block t6030 already uses, so add a T8152 entry to the per-SoC table with mxwrap set and no rc M3_CTRL start (whether T8152 has that bit at all is not decoded). The apple,t8152-usb4-acio compatible selects it. T8152 never shows M3_STAT ready, so this entry does not wait for it (a 500 ms poll would time out on every start): the RTKit boot of the co-processor is the readiness check instead. Measured on an Apple M6 (T8152) Mac mini, rear USB-C port (ACIO3), with this start sequence in an older tree: M3_STAT never becomes ready, the NHI answers the first HOP_COUNT read (12 hops), and the USB4 domain plus host router enumerate. Not measured: this patch on this base (compiled only), the non-posted mapping of the "cpu" region on T8152 (the driver maps it non-posted as for t6030), and any other SoC; their table entries and code paths are unchanged. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
T8152 has no "pdf" range: the ACIO+0xdb0000 block that M1/M2 device trees map there aborts on a read, and macOS never writes the RX ring options+4 word either. Treat the range as optional: map it only when the node describes it, and when it is absent program the ring options without the RX options+4 and PDF writes. Measured on an Apple M6 (T8152) Mac mini, rear USB-C port (ACIO3): a read of the M1/M2 pdf offset takes a synchronous external abort; with the ring options programmed and both the options+4 and PDF writes skipped, all rings start, the first TX and RX ring interrupts fire and the USB4 domain enumerates. The location of the RX sof/eof mask on T8152 is unknown; receive frames arrive without it. M1/M2 keep the existing behaviour whenever the node carries the range. A M1/M2 device tree that loses its "pdf" range now probes without the PDF writes and without an error or a message. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
Add the apple,t8152-usb4-acio and apple,t8152-usb4-nhi compatibles,
describe the co-processor wrapper ("cpu") register range of the acio
node, and make the NHI "pdf"
range optional: T8152 has no PDF range at all. T8152 binds one DART
stream per ring like t6030/t6031/t8122, so it takes the 24-iommu
case.
The "cpu" range is required for apple,t6030-usb4-acio and
apple,t8152-usb4-acio, whose driver does not probe without it, and is
not allowed for the other compatibles. The t6030 device trees already
carry it as a fourth range after the PCIe adapter, which the binding
did not allow; T8152 has no PCIe adapter range and lists rc, sram and
cpu.
Existing boards are unaffected: their reg entries stay valid as they
are, and they still require the reset. apple,t8152-usb4-acio does not
require it: its reset driver is separate work and the board tree does
not describe the reset yet.
Measured: the device tree built from these bindings enumerates the
USB4 host router on the Mac mini (M6, T8152) on an older tree. Not
measured: dt-schema validation of this patch.
Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
The ACIO (USB4/Thunderbolt) co-processor of the T8152 talks to the application processor through a mailbox with its own register layout: a 0x80-byte window with the receive FIFO at +0, the transmit FIFO at +0x10 and a status word at +0x20 that counts the receive occupancy and the free transmit slots. That is neither the classic ASC layout of apple,asc-mailbox-v4 nor the older M3 layout, so the compatible has no fallback. Only two of its interrupts are known, the receive-not-empty and the send-empty line, as for the ANE mailboxes; the interrupt constraints are the ones of the ANE mailboxes. The layout was read from the macOS driver and ran on hardware in an older tree: it carried the RTKit boot of the co-processor. Not measured: this binding on this base. Measured: the device tree that uses it passes the schema check. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
apple,t8152-acio-mailbox has a different register interface than the ASC mailboxes: the status word at +0x20 holds the receive occupancy in bits 3:0 and the number of free transmit slots in bits 11:8, the receive FIFO is at +0, the transmit FIFO at +0x10, and each 128-bit message is moved with one paired 64-bit access. Reading or writing the classic ASC offsets (control at +0x110, send at +0x800, receive at +0x830) from this window would touch unrelated registers of the wrapper block. Add a counted_fifo flag to the hardware table, test "transmit full" and "receive empty" through two helpers that honour it, and move the message read and write into helpers that use one load or store pair for the counted layout (arm64 only; the entry is refused elsewhere). Every other hardware table keeps its flags unchanged and its two separate 64-bit accesses. Measured here: arm64 compile. Run on hardware in an older tree: this layout and the paired access carried the RTKit boot of the ACIO co-processor. Not measured: this patch on this base, the send-empty interrupt path of this mailbox. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
Describe the free rear USB-C port (ATC3, ACIO3) of the Mac mini (M6,
T8152): four ATC3 power-state-director slots, the ACIO coprocessor
mailbox, the acio node with its rc, sram and coprocessor-wrapper
("cpu") registers, and the NHI with its 24 ring interrupts and all 24
ring DART stream ids bound (tx ring N = SID N, rx ring N = SID 16+N).
Behind the acio node sits its own Gen3 DART with a static topology.
The acio node carries no "pdf" range, no reset and no Type-C graph:
the ATC3 PHY CIO-mode link and the hpm3 wiring are separate work. The
PCIe-C tunnel container is not part of this patch.
Addresses are physical: ADT bus address + 0x200000000 for every ADT
address below 0x400000000. The boot loader fills the apple,tunable-*
properties and apple,thunderbolt-drom through the usb4-3 aliases.
Measured on the Mac mini (M6, T8152) with these nodes on an older
tree, plus the power-domain, DART, reset and mailbox support they
need: the ACIO firmware boots, the NHI answers, rings start, and the
USB4 domain and host router enumerate. Not measured: this patch on
this base (device tree compile only); ACIO0 and ACIO1 (NCM tether,
Studio Display) are not described and there is no ACIO2; the
interrupt order of the ring interrupts was confirmed for rings 0 of
both directions only.
Depends on support outside this patch: apple,t8152-dart (in this
tree), the apple,t8152-psd domains with the ps_atc3_usb_aon parent for
the three CIO slots (the parent is a guess), and a reset driver for the
CIO reconfigure pair. The mailbox compatible is described by the
previous patch. Without that reset the ACIO cannot be powered, so this
node describes hardware and does not boot it by itself; the binding does
not require resets for apple,t8152-usb4-acio until that driver exists.
Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
|
Review at 7902704: I withdraw my GREEN at f877c81 until the mailbox finding on #197 is fixed, since this PR carries the same ACIO and mailbox commits. The three PCIe-C commits of this PR are unchanged from what I cleared, and the base is the #191 head 9fbb356 (delta review posted there: PSD power-on rollback includes the failed slot, PSD power-off restores every slot, Gen3 DART drain and unlock changes). I will re-read the mailbox change by exact head when it lands. |
7902704 to
e21d7e6
Compare
|
New head |
|
GREEN at e21d7e6 Read: the twenty commits against the ones I reviewed at 7902704, compared per commit as diffs with the hash lines removed. The four PCIe-C commits of this PR (binding, tunneled-DART detection, PCI driver, PCIe-C dts) and the ACIO start, NHI pdf and ACIO binding commits are identical. The mailbox binding commit, the new counted-FIFO mailbox driver commit and the ACIO3 dts compatible are the ones I reviewed in #197 at f40f1bb (see that comment); the base is the #191 head 9fbb356. This restores my GREEN that I withdrew for the mailbox finding. Not run: build; the author's compile and dt receipts are not reproduced. Merge still needs CI and a second non-author GREEN. |
|
GREEN at e21d7e6 The four PCIe-C commits are identical to the ones I reviewed at
Not checked: compile receipts (the author's), hardware (the cold-start prepare path is stated as unmeasured). Merge still needs CI and the owner's word. |
The PCIe-C tunnel port of the T8152 needs its own compatible: its tunnel reset registers sit at different offsets than on t8103 and its start order differs (see the driver patch that follows). Like the t8112 entry it falls back to apple,t8103-pciec, so the register, interrupt and iommu constraints of that compatible apply unchanged. Also document apple,pciec-preinit-status, which the driver already reads and which the boot loader sets on SoCs that have a handoff. Measured: the schema check of the board tree with the tunnel node (see the device tree patch). Not measured: the binding alone. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
apple_dart_probe() decided that a DART belongs to a PCIe-C tunnel by
the prefix of its parent's node name ("usb4-pcie-tunnel-"). That
treats a tunneled DART as an ordinary one as soon as a board names the
container differently (a container with a non-empty ranges property
needs a unit address, and the schema checks of the T8152 tree
require one): the registers are then mapped posted and without the
non-posted ordering, and the first reset of the DART can end in an
asynchronous external abort.
Look for the PCIe-C root complex instead: a DART whose parent also
holds an apple,t8103-pciec or apple,t6000-pciec node (every PCIe-C
compatible in the tree falls back to one of the two) is tunneled. The
old name test stays as a second, additional test, so no existing device
tree changes its behaviour.
Measured: arm64 compile of apple-dart.c. Not measured: on hardware; the
existing tunnel containers (t8103, t8112, t600x, t602x, t6030) were
checked by reading the device trees, not by booting them.
Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
…gisters The PCIe-C port of the T8152 differs from the t8103 one in two ways that matter for bringing up a tunneled root port: - The tunnel reset control and status registers sit 0x700 higher (+0x1088 and +0x108c instead of +0x988 and +0x98c). The t8103 offsets read as zero on T8152, so releasing the tunnel reset through them has no effect and the link never trains. - The first config-space access has to come after the port clock is running and PORT_STATUS reports READY. The t8103 replay order configures the root complex first and hangs the machine on T8152. Add apple,t8152-pciec with a hw_info that carries the register offset delta (tun_delta) and selects the start order (cold_order): PERST off, APPCLK on, wait for READY, clear the clock-gate disable, then the root complex tunables. The other hardware tables keep tun_delta = 0 and cold_order = false, so their register offsets and order do not change. PORT_TUNCTRL and PORT_TUNSTAT now take the port to find the delta. T8152 has no boot-loader handoff for this port, so cold_order also counts as a valid preinit status: the board tree does not have to claim a handoff that does not exist, and the start path replays the port from its stopped state. Measured on the Mac mini (M6, T8152), with this logic in a copy of the driver built on an older tree: three boots, each with a Thunderbolt 3 dock on the ATC3 port. The link comes up on the first attempt, the tunneled root port (106b:101b) enumerates and the dock's two Intel bridges (8086:15da) appear behind it. Before the two changes the host bridge hung the machine, and then probed but never linked. Not measured: this patch on this base (compiled only); an endpoint behind the dock (the dock's slot link did not train with either of two cards, also on other hosts); the stop and suspend paths with the shifted registers; cable removal and reconnect. ACIO starts the tunnel only when apple_cio_pcie_tunnel_is_preinitialized() accepts the PCIe-C node, which asks apple_pcie_tunnel_needs_cold_init() for nodes without a handoff property. That guard accepted only apple,t6000-pciec on the T600x/T602x machines, so a T8152 node (with no handoff property, as it has no handoff) was refused: the tunnel stayed off, and the cold start below was never reached from ACIO. The guard now also accepts apple,t8152-pciec on an apple,t8152 machine. The tunnel_kernel_init parameter and the check for DART tunables still apply, and no bootloader handoff is claimed. The ACIO side already looks at nodes with the apple,t8103-pciec fallback, which the T8152 node lists, so it needed no change. The node now also takes the T600x cold-init paths of suspend and resume, which are not measured on T8152. Cold start: the tunnel DART is the first child and probes as soon as it is created, so apple_pcie_tunnel_prepare() has to clock the port before the children are populated. It selected only ports with apple,pciec-kernel-init and the supported T600x and T602x ports; a T8152 tunnel matched neither, so its DART could probe before the port clock ran. A port whose hardware table has cold_order is now selected too, and its cold init uses the same order as the replay path: READY, then the clock-gate disable, then the root complex tunables. The T8152 DART defers its register access to the first use, which is why this did not show up in the runs on hardware (those used the replay path). Not measured: the prepare path on T8152 hardware. apple_pcie_walk_tunnel_darts() now also visits apple,t8152-dart, so apple_pcie_tunnel_quiesce() gates the commands of the T8152 tunnel DART before APPCLK stops; without it the walker skipped that DART. The save and restore steps still return -EOPNOTSUPP for it (it is not a DART_T8020 hardware table), so suspend with a tunnel remains unsupported on T8152; only the command gating is new. Not measured on hardware. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
Describe the PCIe-C tunnel of the rear USB-C port (ATC3, ACIO3) of the Mac mini (M6, T8152): the tunnel's own Gen3 DART with 256 streams and a static topology, and the PCIe-C root complex with its ECAM, rc, port0, fabric, debug and intr2axi register windows, read from the ADT. The acio node gets its apple,pcie-tunnel link. The tunnel address ranges are identity per port (PCI address = CPU address): a device behind the tunnel decodes the address it is given. Measured on the Mac mini (M6, T8152) with these nodes on an older tree and a Thunderbolt 3 dock on ACIO3: three boots, the tunnel link comes up on the first attempt, the tunneled root port (106b:101b) enumerates and the dock's two Intel bridges (8086:15da) appear behind it. Identity ranges were also measured on an M2 Max (another board, by another contributor): with a GPU in a USB4 enclosure, BAR0 returned data. Not measured: this patch on this base (device tree compile and schema check only); an endpoint behind the dock on the M6 (the dock's slot link did not train with either of two cards, also on other hosts); MSI delivery (the vector slice 1975 is unverified; enumeration does not use MSI); the interrupt number of the PCIe-C port. The container has a unit address so that dtc and the schema accept its non-empty identity ranges; the DART driver finds a tunneled DART by its PCIe-C sibling (the previous iommu patch) and no longer by the container name. DMA window: the ADT gives the tunnel DART vm-base 0x10080000000 and vm-size 0x7ff00000. That is the 1 TiB alias of the endpoint-visible window 0x80000000..0xfff00000, the upper 2 GiB of the 32-bit bus space minus the top MiB (the MSI doorbell is at 0xfffff000); the T602x PCIe-C DARTs are described the same way. So apple,dma-range is the endpoint-visible window and apple,dma-offset is the alias: endpoints see 32-bit bus addresses and a 32-bit-DMA card gets an address it can use. This is inferred from the ADT numbers and the T602x description; no endpoint DMA through this tunnel was measured on T8152. The boot loader supplies the register tunables of the tunnel nodes. The node carries no apple,pciec-preinit-status: the driver treats the T8152 hardware table as its own start path. The MSI vector slice at 1975 is not checked against the other PCIe controllers of the SoC. The ltssm range (0x410020000, 0x4000) is the sixth register range of this port's ADT node; the driver does not map it. Depends on the ACIO3 nodes (series A) and on the PCIe-C driver patch for apple,t8152-pciec. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
e21d7e6 to
f4d8c00
Compare
|
New head |
|
GREEN at f4d8c00 Compared with my GREEN at
Not checked: compile receipts (the author's) and hardware. Merge still needs CI and the owner's word. |
|
Status at head |
|
GREEN at f4d8c00 Correction first: my comment at e21d7e6 said the PCI driver commit was identical to what I had cleared. I compared it against 7902704, which I had not reviewed, instead of against f877c81. This review compares the PCI driver commit at this head (676f026) directly against the one I read at f877c81 (37275f5); the other three PCIe-C commits and the base layers are identical per commit (the #197 f40f1bb layers were cleared in #197).
|
|
[Joshua's agent] This PR is awaiting maintainer review. Is anything else needed from us? |
Summary
The PCIe-C tunnel of the Apple M6 (T8152) Mac mini, rear USB-C port (ACIO3): the binding, the start order and the shifted reset registers in
pcie-apple, and the tunnel device tree. Three commits.The first fourteen commits of this branch are #191 (the M6 base, ten commits) and #197 (the USB4 PR, four commits). Only the last three commits are new here: the diff shows the rest too until those merge, then I rebase. Review the last three.
It is not needed for the release candidate, and there is no rush to review or merge it.
Commits
apple,t8103-pciecfallback; documentsapple,pciec-preinit-status, which the driver already readt8152_pciec_hwwith a cold start order and a tunnel register delta of 0x700usb4-pcie-tunnel@0with an identityranges; the LTSSM window is from the ADT register list of the controllerMeasured, on an M6 Mac mini (an older tree, the same logic in a copy of the driver)
Not measured
make dtbs_check/dt_binding_check(a hand-rundt-validateof the board file is in the first comment).Not included
Receipts
arm64 clang,
W=1, 16K pages,PCIE_APPLE=m,USB4_APPLE_SOC=m:drivers/pci/controller/pcie-apple.o,drivers/thunderbolt/apple.o, the eight objects of #191 andt8152-j873g.dtb, all rc 0, 0 warnings.check-commits: Signed-off-by on all 17 commits; no checkpatch errors (warnings: MAINTAINERS notice).