diff --git a/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi index 23321dc73794..e5977d8d193d 100644 --- a/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi @@ -608,6 +608,50 @@ data-lanes = <0 1 2 3>; }; +/* Adreno 540 GPU */ +&gpucc { + status = "okay"; +}; + +&gpu_mem { + compatible = "shared-dma-pool"; +}; + +&adreno_gpu { + status = "okay"; + + zap-shader { + memory-region = <&zap_shader_region>; // gpu_mem? + firmware-name = "qcom/msm8998/oneplus/a540_zap.mbn"; + }; + + /* + * We are lacking support for the GPU regulator. Hence, disable higher + * frequencies for now to prevent the platform from hanging on high + * graphics loads. Perhaps the pm8005_s1 voltage below could be + * adjusted but I'd rather not touch it. + */ + opp-table { + /delete-node/ opp-710000097; + /delete-node/ opp-670000048; + /delete-node/ opp-596000097; + /delete-node/ opp-515000097; + }; +}; + +&adreno_smmu { + status = "okay"; +}; + +/* + * HACK: Shoot GPU voltage high to stabilize Adreno 540 at high frequencies + * until the GPU CPR is brought up. + */ +&pm8005_s1 { + regulator-min-microvolt = <988000>; /* 0,524V -> 0,988V */ + //regulator-max-microvolt = <1100000>; +}; + &tlmm { gpio-reserved-ranges = <0 4>, <81 4>;