mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 23:03:57 -04:00
Rework the PowerVR Rogue GPU binding to use an explicit, per variant style for defining power domain properties and add support for the T-HEAD TH1520 SoC's GPU. To improve clarity and precision, the binding is refactored so that power domain items are listed explicitly for each variant [1]. The previous method relied on an implicit, positional mapping between the `power-domains` and `power-domain-names` properties. This change replaces the generic rules with self contained if/then blocks for each GPU variant, making the relationship between power domains and their names explicit and unambiguous. The generic if block for img,img-rogue, which previously required power-domains and power-domain-names for all variants, is removed. Instead, each specific GPU variant now defines its own power domain requirements within a self-contained if/then block, making the schema more explicit. This new structure is then used to add support for the `thead,th1520-gpu`. While its BXM-4-64 IP has two conceptual power domains, the TH1520 SoC integrates them behind a single power gate. The new binding models this with a specific rule that enforces a single `power-domains` entry and disallows the `power-domain-names` property. Link: https://lore.kernel.org/all/4d79c8dd-c5fb-442c-ac65-37e7176b0cdd@linaro.org/ [1] Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Matt Coster <matt.coster@imgtec.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Link: https://lore.kernel.org/r/20250822-apr_14_for_sending-v13-2-af656f7cc6c3@samsung.com Signed-off-by: Matt Coster <matt.coster@imgtec.com>
165 lines
3.6 KiB
YAML
165 lines
3.6 KiB
YAML
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
# Copyright (c) 2023 Imagination Technologies Ltd.
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/gpu/img,powervr-rogue.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: Imagination Technologies PowerVR and IMG Rogue GPUs
|
|
|
|
maintainers:
|
|
- Frank Binns <frank.binns@imgtec.com>
|
|
|
|
properties:
|
|
compatible:
|
|
oneOf:
|
|
- items:
|
|
- enum:
|
|
- ti,am62-gpu
|
|
- const: img,img-axe-1-16m
|
|
# This deprecated element must be kept around to allow old kernels to
|
|
# work with newer dts.
|
|
- const: img,img-axe
|
|
- const: img,img-rogue
|
|
- items:
|
|
- enum:
|
|
- thead,th1520-gpu
|
|
- const: img,img-bxm-4-64
|
|
- const: img,img-rogue
|
|
- items:
|
|
- enum:
|
|
- ti,j721s2-gpu
|
|
- const: img,img-bxs-4-64
|
|
- const: img,img-rogue
|
|
|
|
# This legacy combination of compatible strings was introduced early on
|
|
# before the more specific GPU identifiers were used.
|
|
- items:
|
|
- enum:
|
|
- ti,am62-gpu
|
|
- const: img,img-axe
|
|
deprecated: true
|
|
|
|
reg:
|
|
maxItems: 1
|
|
|
|
clocks:
|
|
minItems: 1
|
|
maxItems: 3
|
|
|
|
clock-names:
|
|
items:
|
|
- const: core
|
|
- const: mem
|
|
- const: sys
|
|
minItems: 1
|
|
|
|
interrupts:
|
|
maxItems: 1
|
|
|
|
power-domains:
|
|
minItems: 1
|
|
maxItems: 2
|
|
|
|
power-domain-names:
|
|
items:
|
|
- const: a
|
|
- const: b
|
|
minItems: 1
|
|
|
|
dma-coherent: true
|
|
|
|
resets:
|
|
maxItems: 1
|
|
|
|
required:
|
|
- compatible
|
|
- reg
|
|
- clocks
|
|
- clock-names
|
|
- interrupts
|
|
|
|
additionalProperties: false
|
|
|
|
allOf:
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
const: img,img-axe-1-16m
|
|
then:
|
|
properties:
|
|
power-domains:
|
|
items:
|
|
- description: Power domain A
|
|
power-domain-names:
|
|
maxItems: 1
|
|
required:
|
|
- power-domains
|
|
- power-domain-names
|
|
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
const: thead,th1520-gpu
|
|
then:
|
|
properties:
|
|
clocks:
|
|
minItems: 3
|
|
clock-names:
|
|
minItems: 3
|
|
power-domains:
|
|
items:
|
|
- description: The single, unified power domain for the GPU on the
|
|
TH1520 SoC, integrating all internal IP power domains.
|
|
power-domain-names: false
|
|
required:
|
|
- power-domains
|
|
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
const: img,img-bxs-4-64
|
|
then:
|
|
properties:
|
|
power-domains:
|
|
items:
|
|
- description: Power domain A
|
|
- description: Power domain B
|
|
power-domain-names:
|
|
minItems: 2
|
|
required:
|
|
- power-domains
|
|
- power-domain-names
|
|
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
enum:
|
|
- ti,am62-gpu
|
|
- ti,j721s2-gpu
|
|
then:
|
|
properties:
|
|
clocks:
|
|
maxItems: 1
|
|
|
|
examples:
|
|
- |
|
|
#include <dt-bindings/interrupt-controller/irq.h>
|
|
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
|
#include <dt-bindings/soc/ti,sci_pm_domain.h>
|
|
|
|
gpu@fd00000 {
|
|
compatible = "ti,am62-gpu", "img,img-axe-1-16m", "img,img-axe",
|
|
"img,img-rogue";
|
|
reg = <0x0fd00000 0x20000>;
|
|
clocks = <&k3_clks 187 0>;
|
|
clock-names = "core";
|
|
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
|
|
power-domains = <&k3_pds 187 TI_SCI_PD_EXCLUSIVE>;
|
|
power-domain-names = "a";
|
|
};
|