Skip to content

Commit 7e7954c

Browse files
hoshinolinamarcan
authored andcommitted
arm64: dts: apple: Add T602x GPU node
Signed-off-by: Asahi Lina <[email protected]>
1 parent 14426d8 commit 7e7954c

3 files changed

Lines changed: 129 additions & 1 deletion

File tree

arch/arm64/boot/dts/apple/t6021.dtsi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
#ifndef GPU_REPEAT
2020
# define GPU_REPEAT(x) <x x x x>
2121
#endif
22+
#ifndef GPU_DIE_REPEAT
23+
# define GPU_DIE_REPEAT(x) <x>
24+
#endif
2225

2326
#include "t602x-common.dtsi"
2427

arch/arm64/boot/dts/apple/t602x-common.dtsi

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
#address-cells = <2>;
1010
#size-cells = <2>;
1111

12+
aliases {
13+
gpu = &gpu;
14+
};
15+
1216
cpus {
1317
#address-cells = <2>;
1418
#size-cells = <0>;
@@ -434,6 +438,80 @@
434438
};
435439
};
436440

441+
gpu_cs_opp: opp-table-gpu-cs {
442+
compatible = "operating-points-v2";
443+
444+
/*
445+
* NOTE: The voltage and power values are device-specific and
446+
* must be filled in by the bootloader.
447+
*/
448+
opp00 {
449+
opp-hz = /bits/ 64 <24>;
450+
opp-microvolt = GPU_DIE_REPEAT(668000);
451+
};
452+
opp01 {
453+
opp-hz = /bits/ 64 <444000000>;
454+
opp-microvolt = GPU_DIE_REPEAT(668000);
455+
};
456+
opp02 {
457+
opp-hz = /bits/ 64 <612000000>;
458+
opp-microvolt = GPU_DIE_REPEAT(678000);
459+
};
460+
opp03 {
461+
opp-hz = /bits/ 64 <808000000>;
462+
opp-microvolt = GPU_DIE_REPEAT(737000);
463+
};
464+
opp04 {
465+
opp-hz = /bits/ 64 <1024000000>;
466+
opp-microvolt = GPU_DIE_REPEAT(815000);
467+
};
468+
opp05 {
469+
opp-hz = /bits/ 64 <1140000000>;
470+
opp-microvolt = GPU_DIE_REPEAT(862000);
471+
};
472+
opp06 {
473+
opp-hz = /bits/ 64 <1236000000>;
474+
opp-microvolt = GPU_DIE_REPEAT(893000);
475+
};
476+
};
477+
478+
gpu_afr_opp: opp-table-gpu-afr {
479+
compatible = "operating-points-v2";
480+
481+
/*
482+
* NOTE: The voltage and power values are device-specific and
483+
* must be filled in by the bootloader.
484+
*/
485+
opp00 {
486+
opp-hz = /bits/ 64 <24>;
487+
opp-microvolt = GPU_DIE_REPEAT(668000);
488+
};
489+
opp01 {
490+
opp-hz = /bits/ 64 <400000000>;
491+
opp-microvolt = GPU_DIE_REPEAT(668000);
492+
};
493+
opp02 {
494+
opp-hz = /bits/ 64 <552000000>;
495+
opp-microvolt = GPU_DIE_REPEAT(678000);
496+
};
497+
opp03 {
498+
opp-hz = /bits/ 64 <760000000>;
499+
opp-microvolt = GPU_DIE_REPEAT(737000);
500+
};
501+
opp04 {
502+
opp-hz = /bits/ 64 <980000000>;
503+
opp-microvolt = GPU_DIE_REPEAT(815000);
504+
};
505+
opp05 {
506+
opp-hz = /bits/ 64 <1098000000>;
507+
opp-microvolt = GPU_DIE_REPEAT(862000);
508+
};
509+
opp06 {
510+
opp-hz = /bits/ 64 <1200000000>;
511+
opp-microvolt = GPU_DIE_REPEAT(893000);
512+
};
513+
};
514+
437515
pmu-e {
438516
compatible = "apple,blizzard-pmu";
439517
interrupt-parent = <&aic>;

arch/arm64/boot/dts/apple/t602x-die0.dtsi

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,55 @@
593593
apple,firmware-compat = <0 0 0>;
594594

595595
operating-points-v2 = <&gpu_opp>;
596-
/* TODO perf stuff */
596+
apple,cs-opp = <&gpu_cs_opp>;
597+
apple,afr-opp = <&gpu_afr_opp>;
598+
599+
apple,min-sram-microvolt = <790000>;
600+
apple,csafr-min-sram-microvolt = <812000>;
597601
apple,perf-base-pstate = <1>;
602+
603+
apple,avg-power-filter-tc-ms = <300>;
604+
apple,avg-power-ki-only = <1.5125>;
605+
apple,avg-power-kp = <0.38>;
606+
apple,avg-power-min-duty-cycle = <40>;
607+
apple,avg-power-target-filter-tc = <1>;
608+
apple,fast-die0-integral-gain = <700.0>;
609+
apple,fast-die0-proportional-gain = <34.0>;
610+
apple,perf-boost-ce-step = <50>;
611+
apple,perf-boost-min-util = <90>;
612+
apple,perf-filter-drop-threshold = <0>;
613+
apple,perf-filter-time-constant = <5>;
614+
apple,perf-filter-time-constant2 = <200>;
615+
apple,perf-integral-gain = <1.62>;
616+
apple,perf-integral-gain2 = <1.62>;
617+
apple,perf-integral-min-clamp = <0>;
618+
apple,perf-proportional-gain2 = <5.4>;
619+
apple,perf-proportional-gain = <5.4>;
620+
apple,perf-tgt-utilization = <85>;
621+
apple,power-sample-period = <8>;
622+
apple,ppm-filter-time-constant-ms = <34>;
623+
apple,ppm-ki = <18.0>;
624+
apple,ppm-kp = <0.1>;
625+
apple,pwr-filter-time-constant = <313>;
626+
apple,pwr-integral-gain = <0.0202129>;
627+
apple,pwr-integral-min-clamp = <0>;
628+
apple,pwr-min-duty-cycle = <40>;
629+
apple,pwr-proportional-gain = <5.2831855>;
630+
apple,pwr-sample-period-aic-clks = <200000>;
631+
apple,se-engagement-criteria = <700>;
632+
apple,se-filter-time-constant = <9>;
633+
apple,se-filter-time-constant-1 = <3>;
634+
apple,se-inactive-threshold = <2500>;
635+
apple,se-ki = <-50.0>;
636+
apple,se-ki-1 = <-100.0>;
637+
apple,se-kp = <-5.0>;
638+
apple,se-kp-1 = <-10.0>;
639+
apple,se-reset-criteria = <50>;
640+
641+
apple,core-leak-coef = GPU_REPEAT(1200.0);
642+
apple,sram-leak-coef = GPU_REPEAT(20.0);
643+
apple,cs-leak-coef = GPU_DIE_REPEAT(400.0);
644+
apple,afr-leak-coef = GPU_DIE_REPEAT(200.0);
598645
};
599646

600647
agx_mbox: mbox@406408000 {

0 commit comments

Comments
 (0)