Repository navigation
arm64: dts: apple: t6050: apr1 on every T6050, both ave1 DART streams - #2422
Draft
RyanTheTide wants to merge 1 commit into
Draft
RyanTheTide wants to merge 1 commit into
RyanTheTide wants to merge 1 commit into
Conversation
The second ProRes engine (apr1) was described only when T6050_J873S was defined. The J873s is an M5 Pro Mac mini, and its ADT (the public GravityLinux adt-collection dump, macOS 27.0) has apr1 only in the children for the M5 Max and Ultra die variants (:sotra_h17c, h17cr1, h17cr2, h17d), not for the M5 Pro (h17s). Its DART, apr1_dart, is already described for every T6050. Move the node out of the board block next to its DART, name its two windows (core, wrapper, in apr0's order) and leave it disabled: unlike apr0 it has no SCODEC aux/ctrl windows, which the T6050 ProRes variant needs. ave1's iommus listed only SID 0 of its two DARTs. That ADT's dart-ave1 has the same SIDs as dart-ave0, 0 and 12 (the temporal filter), and ave0 already lists both: do the same for ave1. ave1 stays disabled. The J873s DTB gains only reg-names on apr1. Every other T6050 DTB gains the disabled apr1 node and the two ave1 streams. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The M5 Max has two video encoders and two ProRes engines (Apple's tech specs). In our T6050 tree the second ProRes engine,
apr1, was described only under#if defined(T6050_J873S). The J873s is the M5 Pro Mac mini, so that was the wrong gate: no Max or Ultra board had the node, and the one board that had it is a Pro. The second encoder,ave1, listed only SID 0 of its two DARTs.ave0lists SIDs 0 and 12.Change
apr1out of the board block. It now sits next toapr1_dart, which is already described for every T6050. Give itreg-names = "core", "wrapper"and keep it disabled. The ADT hasapr1only under the M5 Max and Ultra die variants (:sotra_h17c,h17cr1,h17cr2,h17d) and not under the M5 Pro (h17s). Every single-die T6050 board, Pro or Max, includes the same SoC description (t6050-max.dtsiis the one-die base despite its name). So there is no Max-only file to move the node into, and a disabled node in the shared description is the honest option.ave1:iommusnow lists SIDs 0 and 12 on both DARTs, the same asave0. The ADT'sdart-ave1has the samesidproperty asdart-ave0(0 and 12).apr1has no SCODEC windows (aux,ctrl), which the driver's T6050 variant requires.ave1needs a firmware handoff for a second encoder (see below).Testing
unit_address_vs_reg,avoid_unnecessary_addr_size,alias_paths,simple_bus_reg). Same warning count on every board, and none come from these nodes.reg-namesonapr1. Every other board gains the disabledapr1node, a phandle onapr1_dart, and the two extraave1streams. Everything else is phandle renumbering.apr1orave1. The ProRes binding already allows two windows for a T6050 instance.Still to run (M5 Max owner: J714c, J716c, J775c, K114c, K116c; Ultra J775d)
ave1? From the aura log, or from the ADT in macOS:ioreg -l -p IODeviceTree -n ave1 | grep -E 'segment-ranges|reg'. With aura#334 plus aura#341, the line to look for isFDT: AVE ... from ADT /arm-io/ave1, with twomemory-regionentries on/proc/device-tree/soc*/video-encoder@23a3100000.apr1absent from the live ADT (ioreg -l -p IODeviceTree -n apr1)? Isave1present, and is it preloaded?gst-launch-1.0 videotestsrc num-buffers=600 ! video/x-raw,format=NV12,width=3840,height=2160,framerate=60/1 ! v4l2h265enc ! fakesinkon each node at once, fps for each).apr1: needs a driver variant for the two-window "apr,n1" engine first. That variant needs a Max owner's ADTapr1node and a register dump. Not in this PR.Why there is no driver or boot loader change here
ave-drv.cfixedapple-avedebugfs directory,ave-fw.cone set of CRCs in/chosen) are already fixed generically by media: apple: ave: add the T6021 (M2 Max) encoder #2374 (ludagoo, commits "give each encoder its own debugfs directory" and "read the firmware CRC and IOVA per encoder":aurora,crc32per reservation, severaliommu-addressestuples). T6050 can reuse those as they are.ave1is matched and reserved if the ADT preloads it, and stays disabled in the DT. aura#341 adds the per-reservation CRC that two encoders with different DATA images need. With both merged and rebased, enablingave1(and its DARTs and VENC1 power states) for T6050 is a DT-only follow-up, gated by the preload the boot loader finds and not by a board list. It waits for row 1.apr1is a different engine ("apr,n1": two windows, two interrupts, its own reset). Its init rows are not known, so a variant for it would be guesswork.ave2,ave3,apr2,apr3,jpeg2,jpeg3,scaler2,scaler3) has no nodes, and die 1's VENC/PRORES/SCODEC power states are not described either. That is DT fill work for the DTFILL-T6050 lane and is left out here.ADT facts used (public J873s dump, GravityLinux adt-collection, macOS 27.0)
apr1(compatibleapr,n1, interrupts 1763 and 1762, clock gate 639): only under/arm-io/:sotra_h17cr1_42,:sotra_h17cr2_42,:sotra_h17c_48and:sotra_h17d_97. Its reg is two windows, 0x210b000000 (0x4000) and 0x210a000000 (0x1000000), which are 0x230b000000 and 0x230a000000 after arm-io's ranges.apr0(apr,n0) has five.dart-apr1is a plain/arm-iochild, as in the DT.dart-ave0anddart-ave1: both havesid = 0xc00000000, which is SIDs 0 and 12. Their registers matchave0_dart/ave0_dart1andave1_dart/ave1_dart1.Assisted-by: LLM (Claude:Opus 5.5)