Skip to content

Commit f38ea59

Browse files
wensmbgg
authored andcommitted
arm64: dts: mediatek: mt8186: Wire up GPU voltage/frequency scaling
Add the GPU's OPP table. This is from the downstream ChromeOS kernel, adapted to the new upstream opp-supported-hw binning format. Also add dynamic-power-coefficient for the GPU. Also add label for mfg1 power domain. This is to be used at the board level to add a regulator supply for the power domain. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230609072906.2784594-5-wenst@chromium.org Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
1 parent 263d2fd commit f38ea59

1 file changed

Lines changed: 139 additions & 1 deletion

File tree

arch/arm64/boot/dts/mediatek/mt8186.dtsi

Lines changed: 139 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,142 @@
647647
clock-output-names = "clk32k";
648648
};
649649

650+
gpu_opp_table: opp-table-gpu {
651+
compatible = "operating-points-v2";
652+
653+
opp-299000000 {
654+
opp-hz = /bits/ 64 <299000000>;
655+
opp-microvolt = <612500>;
656+
opp-supported-hw = <0xff>;
657+
};
658+
659+
opp-332000000 {
660+
opp-hz = /bits/ 64 <332000000>;
661+
opp-microvolt = <625000>;
662+
opp-supported-hw = <0xff>;
663+
};
664+
665+
opp-366000000 {
666+
opp-hz = /bits/ 64 <366000000>;
667+
opp-microvolt = <637500>;
668+
opp-supported-hw = <0xff>;
669+
};
670+
671+
opp-400000000 {
672+
opp-hz = /bits/ 64 <400000000>;
673+
opp-microvolt = <643750>;
674+
opp-supported-hw = <0xff>;
675+
};
676+
677+
opp-434000000 {
678+
opp-hz = /bits/ 64 <434000000>;
679+
opp-microvolt = <656250>;
680+
opp-supported-hw = <0xff>;
681+
};
682+
683+
opp-484000000 {
684+
opp-hz = /bits/ 64 <484000000>;
685+
opp-microvolt = <668750>;
686+
opp-supported-hw = <0xff>;
687+
};
688+
689+
opp-535000000 {
690+
opp-hz = /bits/ 64 <535000000>;
691+
opp-microvolt = <687500>;
692+
opp-supported-hw = <0xff>;
693+
};
694+
695+
opp-586000000 {
696+
opp-hz = /bits/ 64 <586000000>;
697+
opp-microvolt = <700000>;
698+
opp-supported-hw = <0xff>;
699+
};
700+
701+
opp-637000000 {
702+
opp-hz = /bits/ 64 <637000000>;
703+
opp-microvolt = <712500>;
704+
opp-supported-hw = <0xff>;
705+
};
706+
707+
opp-690000000 {
708+
opp-hz = /bits/ 64 <690000000>;
709+
opp-microvolt = <737500>;
710+
opp-supported-hw = <0xff>;
711+
};
712+
713+
opp-743000000 {
714+
opp-hz = /bits/ 64 <743000000>;
715+
opp-microvolt = <756250>;
716+
opp-supported-hw = <0xff>;
717+
};
718+
719+
opp-796000000 {
720+
opp-hz = /bits/ 64 <796000000>;
721+
opp-microvolt = <781250>;
722+
opp-supported-hw = <0xff>;
723+
};
724+
725+
opp-850000000 {
726+
opp-hz = /bits/ 64 <850000000>;
727+
opp-microvolt = <800000>;
728+
opp-supported-hw = <0xff>;
729+
};
730+
731+
opp-900000000-3 {
732+
opp-hz = /bits/ 64 <900000000>;
733+
opp-microvolt = <850000>;
734+
opp-supported-hw = <0x8>;
735+
};
736+
737+
opp-900000000-4 {
738+
opp-hz = /bits/ 64 <900000000>;
739+
opp-microvolt = <837500>;
740+
opp-supported-hw = <0x10>;
741+
};
742+
743+
opp-900000000-5 {
744+
opp-hz = /bits/ 64 <900000000>;
745+
opp-microvolt = <825000>;
746+
opp-supported-hw = <0x30>;
747+
};
748+
749+
opp-950000000-3 {
750+
opp-hz = /bits/ 64 <950000000>;
751+
opp-microvolt = <900000>;
752+
opp-supported-hw = <0x8>;
753+
};
754+
755+
opp-950000000-4 {
756+
opp-hz = /bits/ 64 <950000000>;
757+
opp-microvolt = <875000>;
758+
opp-supported-hw = <0x10>;
759+
};
760+
761+
opp-950000000-5 {
762+
opp-hz = /bits/ 64 <950000000>;
763+
opp-microvolt = <850000>;
764+
opp-supported-hw = <0x30>;
765+
};
766+
767+
opp-1000000000-3 {
768+
opp-hz = /bits/ 64 <1000000000>;
769+
opp-microvolt = <950000>;
770+
opp-supported-hw = <0x8>;
771+
};
772+
773+
opp-1000000000-4 {
774+
opp-hz = /bits/ 64 <1000000000>;
775+
opp-microvolt = <912500>;
776+
opp-supported-hw = <0x10>;
777+
};
778+
779+
opp-1000000000-5 {
780+
opp-hz = /bits/ 64 <1000000000>;
781+
opp-microvolt = <875000>;
782+
opp-supported-hw = <0x30>;
783+
};
784+
};
785+
650786
pmu-a55 {
651787
compatible = "arm,cortex-a55-pmu";
652788
interrupt-parent = <&gic>;
@@ -765,7 +901,7 @@
765901
#size-cells = <0>;
766902
#power-domain-cells = <1>;
767903

768-
power-domain@MT8186_POWER_DOMAIN_MFG1 {
904+
mfg1: power-domain@MT8186_POWER_DOMAIN_MFG1 {
769905
reg = <MT8186_POWER_DOMAIN_MFG1>;
770906
mediatek,infracfg = <&infracfg_ao>;
771907
#address-cells = <1>;
@@ -1558,6 +1694,8 @@
15581694
#cooling-cells = <2>;
15591695
nvmem-cells = <&gpu_speedbin>;
15601696
nvmem-cell-names = "speed-bin";
1697+
operating-points-v2 = <&gpu_opp_table>;
1698+
dynamic-power-coefficient = <4687>;
15611699
status = "disabled";
15621700
};
15631701

0 commit comments

Comments
 (0)