diff --git a/drivers/soc/apple/t6030-j516s-pmp.dtso b/drivers/soc/apple/t6030-j516s-pmp.dtso index 2100879ee7285..10b2a0c6b011a 100644 --- a/drivers/soc/apple/t6030-j516s-pmp.dtso +++ b/drivers/soc/apple/t6030-j516s-pmp.dtso @@ -78,6 +78,21 @@ status = "disabled"; }; + /* + * The GPU's request: AGX, soc-device record 4 in the ADT + * iop-pmp-nub. macOS 27.2 holds it while its GPU driver runs, + * withdraws it before GFX goes off for a sleep and makes it + * again once GFX is back. The gate links the GPU to it + * (apple,pmp-report-entry); the GPU driver makes it. + */ + pmp_report_agx: report@4 { + compatible = "apple,t6000-pmp-v2-report-entry"; + reg = <0x4>; + label = "pmp-agx"; + #power-domain-cells = <0>; + phandle = <0x103>; + }; + pmp_report_ans: report@10 { compatible = "apple,t6000-pmp-v2-report-entry"; reg = <0x10>; diff --git a/drivers/soc/apple/t6030-pmp.dtso b/drivers/soc/apple/t6030-pmp.dtso index 9aa9b3127e9ba..ea468db479518 100644 --- a/drivers/soc/apple/t6030-pmp.dtso +++ b/drivers/soc/apple/t6030-pmp.dtso @@ -78,6 +78,21 @@ status = "disabled"; }; + /* + * The GPU's request: AGX, soc-device record 4 in the ADT + * iop-pmp-nub. macOS 27.2 holds it while its GPU driver runs, + * withdraws it before GFX goes off for a sleep and makes it + * again once GFX is back. The gate links the GPU to it + * (apple,pmp-report-entry); the GPU driver makes it. + */ + pmp_report_agx: report@4 { + compatible = "apple,t6000-pmp-v2-report-entry"; + reg = <0x4>; + label = "pmp-agx"; + #power-domain-cells = <0>; + phandle = <0x103>; + }; + pmp_report_ans: report@10 { compatible = "apple,t6000-pmp-v2-report-entry"; reg = <0x10>; diff --git a/tools/asahi/t6030-pmp-graph-tests.py b/tools/asahi/t6030-pmp-graph-tests.py index 6e6d1829f7cf9..c92405e9acdd2 100644 --- a/tools/asahi/t6030-pmp-graph-tests.py +++ b/tools/asahi/t6030-pmp-graph-tests.py @@ -35,11 +35,22 @@ def read_source(path): source = read_source(extract.REPORT) overlay = (ROOT / 'drivers/soc/apple/t6030-pmp.dtso').read_text() entries = [] + gpu_requests = [] for node in re.findall(r'report@[0-9a-f]+\s*\{(.*?)\n\s*\};', overlay, re.S): reg = int(re.search(r'reg = <(0x[0-9a-f]+|[0-9]+)>', node)[1], 0) + # The GPU's AGX request (reg 4) is made by the GPU driver through + # apple_pmp_report_entry_request(), never by the PMP start: keep it out + # of the startup graph, and require it to stay out of the seed. + if 'label = "pmp-agx";' in node: + gpu_requests.append(node) + assert reg == 4 + assert not any(p in node for p in ('apple,always-on;', 'apple,no-ack;', + 'apple,defer-startup-ack;', 'apple,irq-safe;')) + continue entries.append((reg, 'apple,always-on;' in node, 'apple,no-ack;' in node, 'apple,defer-startup-ack;' in node, 'apple,irq-safe;' in node)) assert len(entries) == 4 + assert len(gpu_requests) == 1 entry_data = ',\n'.join('{%d, %d, %d, %d, %d}' % e for e in entries) names = ['static int apple_pmp_report_record(', 'static int apple_pmp_report_bit(', 'static int apple_pmp_start_check_layout(', 'static int apple_pmp_start_describe(', 'static void apple_pmp_start_finish(',