From 0d344a87751c17d4257cb704e42b56cdcc7d62a0 Mon Sep 17 00:00:00 2001 From: Dante Loi Date: Fri, 27 Nov 2026 15:34:15 +0100 Subject: [PATCH 1/3] arm64: dts: apple: t6001: Enable PMP memory DVFS and DRAM OPPs on J316c Add the M1 Max 512-bit LPDDR5-6400 DRAM OPP table and bandwidth properties to t6001.dtsi, wire the PMP memory floor and media block report power domains under APPLE_USE_PMP matching t6000.dtsi, and enable APPLE_USE_PMP on the 16-inch M1 Max (J316c). Signed-off-by: Dante Loi --- arch/arm64/boot/dts/apple/t6001-j316c.dts | 6 ++ .../boot/dts/apple/t6001-peripherals.dtsi | 8 ++ arch/arm64/boot/dts/apple/t6001.dtsi | 89 +++++++++++++++++++ 3 files changed, 103 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t6001-j316c.dts b/arch/arm64/boot/dts/apple/t6001-j316c.dts index f2aa92e7a79f3..4f952df029f1b 100644 --- a/arch/arm64/boot/dts/apple/t6001-j316c.dts +++ b/arch/arm64/boot/dts/apple/t6001-j316c.dts @@ -9,6 +9,12 @@ /dts-v1/; +/* + * Enable PMP on the 16-inch M1 Max (J316c) so the GPU AGX vote (PS-REQ bit 9) + * and CPU memory floor lift memory DVFS out of its idle floor. + */ +#define APPLE_USE_PMP + #include "t6001.dtsi" #include "t600x-j314-j316.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6001-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6001-peripherals.dtsi index d5f8b4f31d06c..927be1c9bca87 100644 --- a/arch/arm64/boot/dts/apple/t6001-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6001-peripherals.dtsi @@ -76,7 +76,11 @@ reg = <0x4 0x09000000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; +#ifdef APPLE_USE_PMP + power-domains = <&pmp_report_jpg>; +#else power-domains = <&ps_jpg>; +#endif clocks = <&peripheral_clocks 354>, <&peripheral_clocks 355>; iommus = <&jpeg0_dart 0>; status = "okay"; @@ -97,7 +101,11 @@ reg = <0x4 0x09008000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; +#ifdef APPLE_USE_PMP + power-domains = <&pmp_report_jpg>; +#else power-domains = <&ps_jpg>; +#endif clocks = <&peripheral_clocks 354>, <&peripheral_clocks 355>; iommus = <&jpeg1_dart 0>; status = "okay"; diff --git a/arch/arm64/boot/dts/apple/t6001.dtsi b/arch/arm64/boot/dts/apple/t6001.dtsi index ff8a5a2f4f485..0533bfbe80b8f 100644 --- a/arch/arm64/boot/dts/apple/t6001.dtsi +++ b/arch/arm64/boot/dts/apple/t6001.dtsi @@ -150,6 +150,79 @@ }; #ifndef APPLE_T6000_SUBSET +/* + * DRAM interface class for M1 Max (512-bit LPDDR5-6400, 400 GB/s class). + * State IDs below describe firmware DCS states, not PMGR codes. + */ +/ { + dram_opp: opp-table-dram { + compatible = "operating-points-v2-apple-dram"; + opp-shared; + + opp-0 { + opp-level = <0>; + }; + + opp-1 { + opp-level = <1>; + }; + + opp-2 { + opp-level = <2>; + }; + + opp-3 { + opp-level = <3>; + opp-hz = /bits/ 64 <3200000000>; + apple,data-rate = /bits/ 64 <6400000000>; + }; + }; +}; + +&pmp_report { + operating-points-v2 = <&dram_opp>; + apple,dram-type = "lpddr5"; + apple,data-bus-width = <512>; + apple,dcs-state-count = <4>; + apple,peak-bandwidth-bytes-per-second = /bits/ 64 <409600000000>; + apple,bandwidth-class-bytes-per-second = /bits/ 64 <400000000000>; +}; + +#ifdef APPLE_USE_PMP +/* + * With the PMP managing DCS and fabric, request the CPU memory floor (DRAM + * class 0x21 level 3, fabric class 0x25 level 2) and attach media blocks to + * their PMP report entries, matching t6000.dtsi. + */ +&pmp_report { + apple,pmp-tables = <&pmp>; + apple,cpu-memory-floor = <0x21 3 0x25 2>; +}; + +&pmp_report_venc_sys { + apple,adt-dvfs; + status = "okay"; +}; + +&pmp_report_avd_sys { + apple,adt-dvfs; +}; + +&pmp_report_jpg { + apple,adt-dvfs; +}; + +&pmp_report_msr0 { + apple,adt-dvfs; + status = "okay"; +}; + +&pmp_report_scodec { + apple,adt-dvfs; + status = "okay"; +}; +#endif + #include "t6001-peripherals.dtsi" #include "t6001-aux-spmi.dtsi" #include "t6001-display-extra.dtsi" @@ -169,5 +242,21 @@ &ave { status = "okay"; +#ifdef APPLE_USE_PMP + power-domains = <&ps_venc_dma>, <&ps_venc_pipe4>, + <&ps_venc_pipe5>, <&ps_venc_me0>, <&ps_venc_me1>, + <&pmp_report_venc_sys>; + power-domain-names = "dma", "pipe4", "pipe5", "me0", "me1", "perf"; +#endif }; + +#ifdef APPLE_USE_PMP +&scaler0 { + power-domains = <&pmp_report_msr0>, <&ps_msr0_ase_core>; +}; + +&apr0 { + power-domains = <&pmp_report_scodec>; +}; +#endif #endif From 73ef025cd09b61de4cc3554d9a2152ba656cc7ed Mon Sep 17 00:00:00 2001 From: Dante Loi Date: Fri, 27 Nov 2026 17:05:54 +0100 Subject: [PATCH 2/3] arm64: dts: apple: t6001: Drop the ProRes PMP wiring and document the DRAM scope ProRes (apr0) is disabled on T6001, so its PMP report power domain and the pmp_report_scodec entry did nothing; drop them. Say in t6001.dtsi that the DRAM description applies to every T6001 board, PMP or not, and is only validated and published read-only by the report, and that the floor levels are the top of the four DCS and three fabric states in the PMP's DVFS domain table. Note in t6001-j316c.dts that only the J316c is qualified for PMP. Signed-off-by: Dante Loi --- arch/arm64/boot/dts/apple/t6001-j316c.dts | 6 +++-- arch/arm64/boot/dts/apple/t6001.dtsi | 31 +++++++++++++---------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6001-j316c.dts b/arch/arm64/boot/dts/apple/t6001-j316c.dts index 4f952df029f1b..c60845fc6c6ab 100644 --- a/arch/arm64/boot/dts/apple/t6001-j316c.dts +++ b/arch/arm64/boot/dts/apple/t6001-j316c.dts @@ -10,8 +10,10 @@ /dts-v1/; /* - * Enable PMP on the 16-inch M1 Max (J316c) so the GPU AGX vote (PS-REQ bit 9) - * and CPU memory floor lift memory DVFS out of its idle floor. + * PMP manages system power states, as on the J314s and J316s: the GPU's AGX + * vote and the CPU memory floor lift DCS and fabric out of their idle + * states, and the AVD, JPEG, scaler and video encoder report to it. Only + * the J316c has been qualified; the J314c and J375c keep PMP off. */ #define APPLE_USE_PMP diff --git a/arch/arm64/boot/dts/apple/t6001.dtsi b/arch/arm64/boot/dts/apple/t6001.dtsi index 0533bfbe80b8f..64d01684d763a 100644 --- a/arch/arm64/boot/dts/apple/t6001.dtsi +++ b/arch/arm64/boot/dts/apple/t6001.dtsi @@ -151,8 +151,14 @@ #ifndef APPLE_T6000_SUBSET /* - * DRAM interface class for M1 Max (512-bit LPDDR5-6400, 400 GB/s class). - * State IDs below describe firmware DCS states, not PMGR codes. + * DRAM interface class for M1 Max: 512-bit LPDDR5-6400, the 400 GB/s class. + * As on T6000, width and maximum rate are inferred from topology and the + * published bandwidth class, and lower-state rates remain unqualified; the + * PMP's DVFS domain table lists four DCS states. State IDs below describe + * firmware DCS states, not PMGR codes. + * + * This describes the SoC on every T6001 board, PMP or not: the report only + * validates it and publishes it read-only (its dram/ sysfs group). */ / { dram_opp: opp-table-dram { @@ -190,9 +196,16 @@ #ifdef APPLE_USE_PMP /* - * With the PMP managing DCS and fabric, request the CPU memory floor (DRAM - * class 0x21 level 3, fabric class 0x25 level 2) and attach media blocks to - * their PMP report entries, matching t6000.dtsi. + * With the PMP managing DCS and fabric, CPU-only load stays at the idle + * memory state; the CPU clients' floor raises it while the CPUs are busy: + * request class 0x21 (DRAM) at 3 and class 0x25 (fabric) at 2, the top of + * the four DCS and three fabric states in this SoC's PMP DVFS domain table, + * as on T6000. + * + * The video encoder, AVD, the JPEG codecs and the scaler also report to the + * PMP while they are powered. The bootloader fills each entry's performance + * levels from this machine's ADT (apple,adt-dvfs); an entry it leaves + * unfilled sends the power request only. */ &pmp_report { apple,pmp-tables = <&pmp>; @@ -217,10 +230,6 @@ status = "okay"; }; -&pmp_report_scodec { - apple,adt-dvfs; - status = "okay"; -}; #endif #include "t6001-peripherals.dtsi" @@ -254,9 +263,5 @@ &scaler0 { power-domains = <&pmp_report_msr0>, <&ps_msr0_ase_core>; }; - -&apr0 { - power-domains = <&pmp_report_scodec>; -}; #endif #endif From 029a5dd64ca883eb412a9bfd1961c0351a5328a1 Mon Sep 17 00:00:00 2001 From: Dante Loi Date: Fri, 27 Nov 2026 17:36:00 +0100 Subject: [PATCH 3/3] arm64: dts: apple: t6001: Let the PMP manage memory DVFS on every M1 Max The PMP's fabric and DCS management, the CPU memory floor and the media report entries describe the SoC: the PMP firmware, its DVFS domain table (four DCS and three fabric states) and the report layout are the same on every T6001 board. Define APPLE_USE_PMP in t6001.dtsi rather than in the J316c's board file, so the J314c and J375c get the same description; t6001-j316c.dtb does not change. Measured on J316c (M1 Max, 64 GiB) with this series merged into main: GPU fill, gpubench diag.fill depth 4 172 GB/s (AGX vote off) 287-292 GB/s (vote on) P-core / E-core pointer chase, 512 MiB 139 / 152 ns -> 128 / 141 ns with the floor, GPU idle STREAM 1T triad 67 -> 68-69 GB/s with the floor PMP DVFS-STATE under CPU load 0x...0103 -> 0x...0203 with it JPEG0/1, scaler0 and AVD took their PMP report domains on while working and off after, five runs each, before and after each of three s2idle cycles (3/3 resumed, floor re-admitted, GPU fill 292-297 GB/s after). The video encoder does not probe on that machine (its m1n1 does not hand over the encoder firmware); its PMP entry stays off. Signed-off-by: Dante Loi --- arch/arm64/boot/dts/apple/t6001-j316c.dts | 8 -------- arch/arm64/boot/dts/apple/t6001.dtsi | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6001-j316c.dts b/arch/arm64/boot/dts/apple/t6001-j316c.dts index c60845fc6c6ab..f2aa92e7a79f3 100644 --- a/arch/arm64/boot/dts/apple/t6001-j316c.dts +++ b/arch/arm64/boot/dts/apple/t6001-j316c.dts @@ -9,14 +9,6 @@ /dts-v1/; -/* - * PMP manages system power states, as on the J314s and J316s: the GPU's AGX - * vote and the CPU memory floor lift DCS and fabric out of their idle - * states, and the AVD, JPEG, scaler and video encoder report to it. Only - * the J316c has been qualified; the J314c and J375c keep PMP off. - */ -#define APPLE_USE_PMP - #include "t6001.dtsi" #include "t600x-j314-j316.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6001.dtsi b/arch/arm64/boot/dts/apple/t6001.dtsi index 64d01684d763a..783348570df7f 100644 --- a/arch/arm64/boot/dts/apple/t6001.dtsi +++ b/arch/arm64/boot/dts/apple/t6001.dtsi @@ -22,6 +22,17 @@ #define APPLE_T600X_NON_ULTRA +#ifndef APPLE_T6000_SUBSET +/* + * The PMP manages system power states on every M1 Max: m1n1 boots it, it + * takes over the fabric and DCS p-states, and the GPU's AGX vote, the CPU + * memory floor and the AVD, JPEG, scaler and video encoder report to it. + * The PMP firmware, its DVFS domain table and the report layout are the + * SoC's, the same on every T6001 board. + */ +#define APPLE_USE_PMP +#endif + #include "t600x-common.dtsi" / { @@ -157,8 +168,8 @@ * PMP's DVFS domain table lists four DCS states. State IDs below describe * firmware DCS states, not PMGR codes. * - * This describes the SoC on every T6001 board, PMP or not: the report only - * validates it and publishes it read-only (its dram/ sysfs group). + * The report only validates this description and publishes it read-only + * (its dram/ sysfs group); nothing else reads it. */ / { dram_opp: opp-table-dram {