On MT8188 the GPU timestamp counter only counts once a register in the MFG configuration block routes the SoC system timer to it, and the setting is lost whenever the GPU power domain is turned off. The GPU driver has to restore it on every power-up, so it needs a reference to that block.
Add an optional mediatek,mfgcfg phandle. Allow it on MT8370 as well, which shares the GPU and the MFG block with MT8188 and its GPU node in mt8188.dtsi. It is optional so that existing devicetrees stay valid; without it the timestamp counter reads zero, as before. Signed-off-by: Michał Kopeć <[email protected]> --- .../bindings/gpu/arm,mali-bifrost.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 9db9f84ad964b..08c1c22a270cb 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -122,6 +122,12 @@ properties: nvmem-cells: maxItems: 1 + mediatek,mfgcfg: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the MFG configuration block, which routes the SoC system + timer to the GPU timestamp counter. + required: - compatible - reg @@ -226,6 +232,17 @@ allOf: required: - power-domains - power-domain-names + - if: + properties: + compatible: + not: + contains: + enum: + - mediatek,mt8188-mali + - mediatek,mt8370-mali + then: + properties: + mediatek,mfgcfg: false - if: properties: compatible: -- 2.55.0
