From 181223696e219db6edfe40f82690d2e48f4264af Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 22:23:20 +1100 Subject: [PATCH 1/5] arm64: dts: apple: t600x, t8112: describe the AOP motion sensor on every laptop The AOP accelerometer and gyroscope children were described only in t6000-j316s.dts and t8112-j413.dts, the two machines whose Apple device trees were at hand. The other 14" and 16" M1 Pro/Max MacBook Pros (J314s, J314c, J316c) and the other M2 laptops (J415, J493) share the same AOP and are left without them. Nothing in the description is board specific. The AOP core creates a service device only when the firmware announces the "accel" or "gyro" service, and gives it the AOP child of the same name. The driver then starts the sensor only with the calibration the bootloader copies into that child from the Apple device tree, and returns -ENODEV with one info line otherwise. On a machine without the sensor the child stays unused. Move the children to t600x-j314-j316.dtsi, next to the AOP enable of every M1 Pro/Max laptop, and to the AOP node in t8112.dtsi, next to the las and als services that are already there. The T8112 Mac mini (J473) keeps its AOP disabled, so the children are inert there. The J316s and J413 DTBs are byte-identical before and after. Fixes: 165f4bd7ffcf ("arm64: dts: apple: describe reference Mac motion and peripheral endpoints") Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6000-j316s.dts | 10 ---------- arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi | 16 +++++++++++++++- arch/arm64/boot/dts/apple/t8112-j413.dts | 8 -------- arch/arm64/boot/dts/apple/t8112.dtsi | 14 ++++++++++++++ 4 files changed, 29 insertions(+), 19 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6000-j316s.dts b/arch/arm64/boot/dts/apple/t6000-j316s.dts index 7643def3427d2..f471286b9c132 100644 --- a/arch/arm64/boot/dts/apple/t6000-j316s.dts +++ b/arch/arm64/boot/dts/apple/t6000-j316s.dts @@ -81,16 +81,6 @@ apple,machine-kind = "MacBook Pro"; }; -&aop { - accel { - compatible = "apple,t6000-aop-accel", "apple,aop-accel"; - }; - - gyro { - compatible = "apple,t6000-aop-gyro", "apple,aop-gyro"; - }; -}; - &nub_spmi1 { pmic@e { compatible = "apple,maverick-pmic", "apple,spmi-nvmem"; diff --git a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi index f9bb3d9d03497..ab3fc1edd5dff 100644 --- a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi @@ -855,7 +855,21 @@ }; &aop { - status = "okay"; + status = "okay"; + + /* + * Every 14" and 16" M1 Pro/Max MacBook Pro has the same AOP-hosted + * inertial sensor. The child only binds once the AOP firmware announces + * the service, and the sensor starts only with the calibration that the + * bootloader copies in from the Apple device tree. + */ + accel { + compatible = "apple,t6000-aop-accel", "apple,aop-accel"; + }; + + gyro { + compatible = "apple,t6000-aop-gyro", "apple,aop-gyro"; + }; }; / { diff --git a/arch/arm64/boot/dts/apple/t8112-j413.dts b/arch/arm64/boot/dts/apple/t8112-j413.dts index ff99c23afb7a9..4e7dea85c1f47 100644 --- a/arch/arm64/boot/dts/apple/t8112-j413.dts +++ b/arch/arm64/boot/dts/apple/t8112-j413.dts @@ -192,14 +192,6 @@ &aop { status = "okay"; - - accel { - compatible = "apple,t8112-aop-accel", "apple,aop-accel"; - }; - - gyro { - compatible = "apple,t8112-aop-gyro", "apple,aop-gyro"; - }; }; &aop_audio { diff --git a/arch/arm64/boot/dts/apple/t8112.dtsi b/arch/arm64/boot/dts/apple/t8112.dtsi index d6787eff621bb..451e114e87450 100644 --- a/arch/arm64/boot/dts/apple/t8112.dtsi +++ b/arch/arm64/boot/dts/apple/t8112.dtsi @@ -1755,6 +1755,20 @@ las { compatible = "apple,t8112-aop-las", "apple,aop-las"; }; + + /* + * The AOP-hosted inertial sensor. The children only + * bind once the AOP firmware announces the service, + * and the sensor starts only with the calibration the + * bootloader copies in from the Apple device tree. + */ + accel { + compatible = "apple,t8112-aop-accel", "apple,aop-accel"; + }; + + gyro { + compatible = "apple,t8112-aop-gyro", "apple,aop-gyro"; + }; }; mtp: mtp@24e400000 { From 90dd5ee91122d86fc6780692b5649a4d28270e87 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 22:26:03 +1100 Subject: [PATCH 2/5] arm64: dts: apple: t6022-j180d: alias the die 0 SIO The Mac Pro's die 0 HDMI port has its audio controller (dpaudio1) enabled, and that controller takes its DMA from the die 0 SIO. The loader sets up and enables each SIO it finds through an alias, and t6022-jxxxd.dtsi only aliases the die 1 SIO (sio1), so the die 0 SIO stays disabled and the die 0 HDMI port has no audio. Add the sio alias for the die 0 SIO. The Mac Studio (J475d) is not changed: all its display outputs, and their audio, run from die 1. This is the SIO hunk of linux#1115, split from that PR's Neural Engine changes so it can be reviewed on its own. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6022-j180d.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t6022-j180d.dts b/arch/arm64/boot/dts/apple/t6022-j180d.dts index 1d1705144e732..152b5b47a652b 100644 --- a/arch/arm64/boot/dts/apple/t6022-j180d.dts +++ b/arch/arm64/boot/dts/apple/t6022-j180d.dts @@ -33,6 +33,12 @@ ethernet1 = ðernet1; nvram = &nvram; serial0 = &serial0; + /* + * The loader sets up and enables each SIO it finds by alias. + * The die 0 HDMI port's audio (dpaudio1) is fed by the die 0 + * SIO; t6022-jxxxd.dtsi only aliases the die 1 one as sio1. + */ + sio = &sio; usb4-0-acio = &usb4_0_acio; usb4-0-nhi = &usb4_0_nhi; usb4-1-acio = &usb4_1_acio; From 6f0d2c1deacd0a2c1d765ddeeefbf95cd688672a Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 22:26:51 +1100 Subject: [PATCH 3/5] media: apple: scaler: add the M2 Pro, Max and Ultra engines The scaler matched T8103, T6000, T8112 and the M4/A18 Pro engines, but not T6020, T6021 or T6022. Their device trees describe the MSR engines (one on M2 Pro, two on M2 Max, four on M2 Ultra) and keep them disabled because nothing would bind. The driver needs two things from a variant: the number of register ranges and whether the engine has the MSR20 control block (M4 and later). The T602x nodes have the T8112 register map: three ranges of 0x28000, 0x4000 and 0x4000 bytes at +0, +0x210000 and +0x204000, two DART streams, and the "apple,scaler" fallback. The scaler binding already puts apple,t6020/t6021/t6022-scaler in the same constraint group as apple,t8112-scaler. They are M2-generation engines, before MSR20. Use the T8112 data for them. Enable the engines and their DARTs in the T6020, T6021 and T6022 peripheral trees, so every board with the SoC gets them. The DARTs name the MSR domain of their own die since commit 410949741839 ("arm64: dts: apple: t602x: give the scaler and external DCP DARTs their power domains"), so the DART's first register read finds its block powered. The engines additionally vote the T602x media fabric domain (ps_afr), which the driver links through its power-domain list. T8103, T6000/T6001/T6002 and T8112 device trees are unchanged. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6020-peripherals.dtsi | 4 ++-- arch/arm64/boot/dts/apple/t6021-peripherals.dtsi | 8 ++++---- arch/arm64/boot/dts/apple/t6022-peripherals.dtsi | 16 ++++++++-------- .../platform/apple/scaler/apple-scaler-drv.c | 7 +++++++ 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6020-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6020-peripherals.dtsi index 85559c68c0fac..6fd4e1d84050c 100644 --- a/arch/arm64/boot/dts/apple/t6020-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6020-peripherals.dtsi @@ -602,7 +602,7 @@ ; iommus = <&m2_dart_scaler0 0>, <&m2_dart_scaler0 1>; power-domains = <&ps_msr0>, <&ps_afr>, <&ps_msr0_ase_core>; - status = "disabled"; + status = "okay"; }; m2_dart_scaler0: iommu@40b200000 { @@ -612,7 +612,7 @@ interrupts = ; power-domains = <&ps_msr0>; #iommu-cells = <1>; - status = "disabled"; + status = "okay"; }; m2_dart_ave0_2: iommu@40d020000 { diff --git a/arch/arm64/boot/dts/apple/t6021-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6021-peripherals.dtsi index b25c2b22cd37b..296650a0481fb 100644 --- a/arch/arm64/boot/dts/apple/t6021-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6021-peripherals.dtsi @@ -780,7 +780,7 @@ ; iommus = <&m2_dart_scaler0 0>, <&m2_dart_scaler0 1>; power-domains = <&ps_msr0>, <&ps_afr>, <&ps_msr0_ase_core>; - status = "disabled"; + status = "okay"; }; m2_dart_scaler0: iommu@40b200000 { @@ -790,7 +790,7 @@ interrupts = ; power-domains = <&ps_msr0>; #iommu-cells = <1>; - status = "disabled"; + status = "okay"; }; m2_dart_ave0_2: iommu@40d020000 { @@ -873,7 +873,7 @@ ; iommus = <&m2_dart_scaler1 0>, <&m2_dart_scaler1 1>; power-domains = <&ps_msr1>, <&ps_afr>, <&ps_msr1_ase_core>; - status = "disabled"; + status = "okay"; }; m2_dart_scaler1: iommu@491200000 { @@ -883,7 +883,7 @@ interrupts = ; power-domains = <&ps_msr1>; #iommu-cells = <1>; - status = "disabled"; + status = "okay"; }; m2_dart_ave1_2: iommu@507020000 { diff --git a/arch/arm64/boot/dts/apple/t6022-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6022-peripherals.dtsi index 19d27e47a3b5a..8384140a12627 100644 --- a/arch/arm64/boot/dts/apple/t6022-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6022-peripherals.dtsi @@ -1142,7 +1142,7 @@ ; iommus = <&m2_dart_scaler0 0>, <&m2_dart_scaler0 1>; power-domains = <&ps_msr0>, <&ps_afr>, <&ps_msr0_ase_core>; - status = "disabled"; + status = "okay"; }; m2_dart_scaler0: iommu@40b200000 { @@ -1152,7 +1152,7 @@ interrupts = ; power-domains = <&ps_msr0>; #iommu-cells = <1>; - status = "disabled"; + status = "okay"; }; m2_dart_ave0_2: iommu@40d020000 { @@ -1301,7 +1301,7 @@ ; iommus = <&m2_dart_scaler1 0>, <&m2_dart_scaler1 1>; power-domains = <&ps_msr1>, <&ps_afr>, <&ps_msr1_ase_core>; - status = "disabled"; + status = "okay"; }; m2_dart_scaler1: iommu@491200000 { @@ -1311,7 +1311,7 @@ interrupts = ; power-domains = <&ps_msr1>; #iommu-cells = <1>; - status = "disabled"; + status = "okay"; }; m2_dart_ave1_2: iommu@507020000 { @@ -1959,7 +1959,7 @@ ; iommus = <&m2_dart_scaler2 0>, <&m2_dart_scaler2 1>; power-domains = <&ps_msr0_die1>, <&ps_afr_die1>, <&ps_msr0_ase_core_die1>; - status = "disabled"; + status = "okay"; }; m2_dart_scaler2: iommu@40b200000 { @@ -1969,7 +1969,7 @@ interrupts = ; power-domains = <&ps_msr0_die1>; #iommu-cells = <1>; - status = "disabled"; + status = "okay"; }; m2_dart_ave2_2: iommu@40d020000 { @@ -2118,7 +2118,7 @@ ; iommus = <&m2_dart_scaler3 0>, <&m2_dart_scaler3 1>; power-domains = <&ps_msr1_die1>, <&ps_afr_die1>, <&ps_msr1_ase_core_die1>; - status = "disabled"; + status = "okay"; }; m2_dart_scaler3: iommu@491200000 { @@ -2128,7 +2128,7 @@ interrupts = ; power-domains = <&ps_msr1_die1>; #iommu-cells = <1>; - status = "disabled"; + status = "okay"; }; m2_dart_ave3_2: iommu@507020000 { diff --git a/drivers/media/platform/apple/scaler/apple-scaler-drv.c b/drivers/media/platform/apple/scaler/apple-scaler-drv.c index d9707d2aec068..fb28e8b3386f9 100644 --- a/drivers/media/platform/apple/scaler/apple-scaler-drv.c +++ b/drivers/media/platform/apple/scaler/apple-scaler-drv.c @@ -895,6 +895,13 @@ static const struct of_device_id asc_of_match[] = { { .compatible = "apple,t8103-scaler", .data = &apple_scaler_t8103 }, { .compatible = "apple,t6000-scaler", .data = &apple_scaler_t6000 }, { .compatible = "apple,t8112-scaler", .data = &apple_scaler_t8112 }, + /* + * M2 Pro/Max/Ultra: the M2 engine. Same three register ranges at the + * same offsets, two DART streams, and the binding's T8112 contract. + */ + { .compatible = "apple,t6020-scaler", .data = &apple_scaler_t8112 }, + { .compatible = "apple,t6021-scaler", .data = &apple_scaler_t8112 }, + { .compatible = "apple,t6022-scaler", .data = &apple_scaler_t8112 }, { .compatible = "apple,t8132-scaler", .data = &apple_scaler_t8132 }, { .compatible = "apple,t6041-scaler", .data = &apple_scaler_t6041 }, { .compatible = "apple,t8140-scaler", .data = &apple_scaler_t8140 }, From b693335a25ff727f1b5335603712d1973149e58f Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 23:17:56 +1100 Subject: [PATCH 4/5] media: apple: scaler: add the M3, M3 Pro, Max and Ultra engines The scaler driver did not match the M3 generation, so the disabled scaler and scaler-DART nodes Ryan Murray described for T8122, T6030, T6031 (also used by T6034) and T6032 in 982f3305722c and 4c28191ae7b9 had no driver and stayed off. The M3 engines report hardware-version 16 (T8122) and 17 (T6030, T6031, T6032) in the hardware description of every M3 board. Compared with the engines the driver already knows: - MSR aperture 0x30000: larger than the 0x28000 of hardware-version 10 to 14, smaller than the 0x38000 of the MSR20 engines (20 to 22). - Two interrupts (MSR, PIODMA) and a T8110 DART with the pixel stream at SID 0 and the PIODMA mapper at SID 1, as on every other engine. - T8122: three register ranges like T6000/T8112. T6030/T6031/T6032: the fourth, PMGR-facing range of the later engines. Add one variant for each hardware version and run them on the common job without the MSR20 control block, the job that hardware-version 12, 13 and 14 engines already run. Whether hardware-version 16/17 also has the MSR20 block inside its larger aperture is not visible in the hardware description; a job that does not complete is caught by the 500 ms watchdog. Enable the scaler and its DART in the SoC dtsi files: one engine on M3 and M3 Pro, two on M3 Max, four on M3 Ultra (two per die). Every board of each SoC has these engines. The existing nodes were checked against the hardware description of each board and our own IODeviceTree capture of a J615: register ranges, interrupts, DART SIDs and the MSR / MSR ASE core power domains all match, so only the status changes. In the binding, require exactly three ranges on T8122, four on T6030/T6031, and both DART streams on all three. Signed-off-by: Ryan Murray --- .../bindings/media/apple,scaler.yaml | 25 +++++++++++++++++++ .../boot/dts/apple/t6030-peripherals.dtsi | 4 +-- .../boot/dts/apple/t6031-peripherals.dtsi | 8 +++--- .../boot/dts/apple/t6032-peripherals.dtsi | 16 ++++++------ .../boot/dts/apple/t8122-peripherals.dtsi | 4 +-- .../platform/apple/scaler/apple-scaler-drv.c | 22 ++++++++++++++++ 6 files changed, 63 insertions(+), 16 deletions(-) diff --git a/Documentation/devicetree/bindings/media/apple,scaler.yaml b/Documentation/devicetree/bindings/media/apple,scaler.yaml index e7e041337193b..55c3274e4812a 100644 --- a/Documentation/devicetree/bindings/media/apple,scaler.yaml +++ b/Documentation/devicetree/bindings/media/apple,scaler.yaml @@ -222,6 +222,31 @@ allOf: power-domains: minItems: 1 maxItems: 2 + iommus: + minItems: 2 + maxItems: 2 + - if: + properties: + compatible: + contains: + const: apple,t8122-scaler + then: + properties: + reg: + minItems: 3 + maxItems: 3 + - if: + properties: + compatible: + contains: + enum: + - apple,t6030-scaler + - apple,t6031-scaler + then: + properties: + reg: + minItems: 4 + maxItems: 4 - if: properties: compatible: diff --git a/arch/arm64/boot/dts/apple/t6030-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6030-peripherals.dtsi index 637d5067cce1a..72273beca25d1 100644 --- a/arch/arm64/boot/dts/apple/t6030-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6030-peripherals.dtsi @@ -19,7 +19,7 @@ interrupts = ; #iommu-cells = <1>; power-domains = <&ps_msr>; - status = "disabled"; + status = "okay"; }; dart_jpeg0: iommu@299004000 { @@ -468,7 +468,7 @@ ; power-domains = <&ps_msr>, <&ps_msr_ase_core>; iommus = <&dart_scaler 0>, <&dart_scaler 1>; - status = "disabled"; + status = "okay"; }; jpeg0: jpeg@299000000 { diff --git a/arch/arm64/boot/dts/apple/t6031-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6031-peripherals.dtsi index c75802ef5f94e..1339895e6d00b 100644 --- a/arch/arm64/boot/dts/apple/t6031-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6031-peripherals.dtsi @@ -19,7 +19,7 @@ interrupts = ; #iommu-cells = <1>; power-domains = <&ps_msr0>; - status = "disabled"; + status = "okay"; }; dart_scaler1: iommu@3c7200000 { @@ -29,7 +29,7 @@ interrupts = ; #iommu-cells = <1>; power-domains = <&ps_msr1>; - status = "disabled"; + status = "okay"; }; dart_apr00: iommu@2c5028000 { @@ -789,7 +789,7 @@ ; power-domains = <&ps_msr0>, <&ps_msr0_ase_core>; iommus = <&dart_scaler0 0>, <&dart_scaler0 1>; - status = "disabled"; + status = "okay"; }; scaler1: scaler@3c7000000 { @@ -803,7 +803,7 @@ ; power-domains = <&ps_msr1>, <&ps_msr1_ase_core>; iommus = <&dart_scaler1 0>, <&dart_scaler1 1>; - status = "disabled"; + status = "okay"; }; apr0: video-codec@2c5000000 { diff --git a/arch/arm64/boot/dts/apple/t6032-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6032-peripherals.dtsi index fd9e11eea31d9..d7cc89526d2ac 100644 --- a/arch/arm64/boot/dts/apple/t6032-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6032-peripherals.dtsi @@ -19,7 +19,7 @@ interrupts = ; #iommu-cells = <1>; power-domains = <&ps_msr0>; - status = "disabled"; + status = "okay"; }; ultra_dart_scaler10: iommu@3c7200000 { @@ -29,7 +29,7 @@ interrupts = ; #iommu-cells = <1>; power-domains = <&ps_msr1>; - status = "disabled"; + status = "okay"; }; ultra_dart_apr00: iommu@2c5028000 { @@ -426,7 +426,7 @@ power-domains = <&ps_msr0>, <&ps_msr0_ase_core>; iommus = <&ultra_dart_scaler00 0>, <&ultra_dart_scaler00 1>; clocks = <&ultra_clocks 414>; - status = "disabled"; + status = "okay"; }; ultra_scaler1: scaler@3c7000000 { @@ -441,7 +441,7 @@ power-domains = <&ps_msr1>, <&ps_msr1_ase_core>; iommus = <&ultra_dart_scaler10 0>, <&ultra_dart_scaler10 1>; clocks = <&ultra_clocks 415>; - status = "disabled"; + status = "okay"; }; ultra_apr0: video-codec@2c5000000 { @@ -541,7 +541,7 @@ interrupts = ; #iommu-cells = <1>; power-domains = <&ps_msr0_die1>; - status = "disabled"; + status = "okay"; }; ultra_dart_scaler30: iommu@3c7200000 { @@ -551,7 +551,7 @@ interrupts = ; #iommu-cells = <1>; power-domains = <&ps_msr1_die1>; - status = "disabled"; + status = "okay"; }; ultra_dart_apr20: iommu@2c5028000 { @@ -756,7 +756,7 @@ power-domains = <&ps_msr0_die1>, <&ps_msr0_ase_core_die1>; iommus = <&ultra_dart_scaler20 0>, <&ultra_dart_scaler20 1>; clocks = <&ultra_clocks 268435870>; - status = "disabled"; + status = "okay"; }; ultra_scaler3: scaler@3c7000000 { @@ -771,7 +771,7 @@ power-domains = <&ps_msr1_die1>, <&ps_msr1_ase_core_die1>; iommus = <&ultra_dart_scaler30 0>, <&ultra_dart_scaler30 1>; clocks = <&ultra_clocks 268435871>; - status = "disabled"; + status = "okay"; }; ultra_apr2: video-codec@2c5000000 { diff --git a/arch/arm64/boot/dts/apple/t8122-peripherals.dtsi b/arch/arm64/boot/dts/apple/t8122-peripherals.dtsi index 355199f3a6a86..8f0dabb078b7e 100644 --- a/arch/arm64/boot/dts/apple/t8122-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t8122-peripherals.dtsi @@ -19,7 +19,7 @@ interrupts = ; #iommu-cells = <1>; power-domains = <&ps_msr>; - status = "disabled"; + status = "okay"; }; dart_jpeg0: iommu@299004000 { @@ -393,7 +393,7 @@ ; power-domains = <&ps_msr>, <&ps_msr_ase_core>; iommus = <&dart_scaler 0>, <&dart_scaler 1>; - status = "disabled"; + status = "okay"; }; jpeg0: jpeg@299000000 { diff --git a/drivers/media/platform/apple/scaler/apple-scaler-drv.c b/drivers/media/platform/apple/scaler/apple-scaler-drv.c index fb28e8b3386f9..d8702a7e51186 100644 --- a/drivers/media/platform/apple/scaler/apple-scaler-drv.c +++ b/drivers/media/platform/apple/scaler/apple-scaler-drv.c @@ -872,6 +872,24 @@ static const struct apple_scaler_variant apple_scaler_t8112 = { .num_reg = 3, }; +/* + * M3 (hardware-version 16) and M3 Pro/Max/Ultra (hardware-version 17): the + * hardware description gives a 0x30000 MSR aperture, between the 0x28000 of + * the M1/M2 engines and the 0x38000 of the MSR20 engines, and the same two + * interrupts and two DART streams. They run the common job without the + * MSR20 control block, as every engine up to hardware-version 14 does. M3 + * Pro/Max/Ultra add the PMGR-facing fourth range of the later engines. + */ +static const struct apple_scaler_variant apple_scaler_t8122 = { + .hw_version = 16, + .num_reg = 3, +}; + +static const struct apple_scaler_variant apple_scaler_t6030 = { + .hw_version = 17, + .num_reg = 4, +}; + /* M4: the first engine with the MSR20 control block. */ static const struct apple_scaler_variant apple_scaler_t8132 = { .hw_version = 20, @@ -902,6 +920,10 @@ static const struct of_device_id asc_of_match[] = { { .compatible = "apple,t6020-scaler", .data = &apple_scaler_t8112 }, { .compatible = "apple,t6021-scaler", .data = &apple_scaler_t8112 }, { .compatible = "apple,t6022-scaler", .data = &apple_scaler_t8112 }, + { .compatible = "apple,t8122-scaler", .data = &apple_scaler_t8122 }, + { .compatible = "apple,t6030-scaler", .data = &apple_scaler_t6030 }, + { .compatible = "apple,t6031-scaler", .data = &apple_scaler_t6030 }, + { .compatible = "apple,t6032-scaler", .data = &apple_scaler_t6030 }, { .compatible = "apple,t8132-scaler", .data = &apple_scaler_t8132 }, { .compatible = "apple,t6041-scaler", .data = &apple_scaler_t6041 }, { .compatible = "apple,t8140-scaler", .data = &apple_scaler_t8140 }, From 395db97d043b97567a589cc937b3329ffc2b5cb1 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Mon, 23 Nov 2026 23:32:25 +1100 Subject: [PATCH 5/5] media: apple: scaler: keep CAPTURE at the OUTPUT size An odd RGB OUTPUT size and a 4:2:0 CAPTURE request round the CAPTURE dimensions up. The format ioctls succeed, but the job builder rejects the resulting unequal-size pair. Keep the active OUTPUT dimensions for CAPTURE and use the existing RGB fallback if the requested format cannot represent them. Preserve compatible format requests and existing OUTPUT negotiation. Signed-off-by: Ryan Murray --- .../platform/apple/scaler/apple-scaler-drv.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/apple/scaler/apple-scaler-drv.c b/drivers/media/platform/apple/scaler/apple-scaler-drv.c index d9707d2aec068..9273e2d54a245 100644 --- a/drivers/media/platform/apple/scaler/apple-scaler-drv.c +++ b/drivers/media/platform/apple/scaler/apple-scaler-drv.c @@ -353,13 +353,20 @@ static void asc_fill(struct v4l2_pix_format_mplane *pix, const struct v4l2_pix_f u32 default_fourcc) { const struct asc_format *f = asc_find_format(pix->pixelformat); - u32 w = ref ? ref->width : pix->width, h = ref ? ref->height : pix->height; struct v4l2_pix_format_mplane in = *pix; + u32 w, h; - if (!f) + /* Use a same-size RGB format when CAPTURE cannot subsample OUTPUT. */ + if (!f || (ref && (!IS_ALIGNED(ref->width, f->hsub) || + !IS_ALIGNED(ref->height, f->vsub)))) f = asc_find_format(default_fourcc); - w = clamp_t(u32, ALIGN(w, f->hsub), ASC_MIN_SIZE, ASC_MAX_SIZE); - h = clamp_t(u32, ALIGN(h, f->vsub), ASC_MIN_SIZE, ASC_MAX_SIZE); + if (ref) { + w = ref->width; + h = ref->height; + } else { + w = clamp_t(u32, ALIGN(pix->width, f->hsub), ASC_MIN_SIZE, ASC_MAX_SIZE); + h = clamp_t(u32, ALIGN(pix->height, f->vsub), ASC_MIN_SIZE, ASC_MAX_SIZE); + } memset(pix, 0, sizeof(*pix)); if (f->lossless) {