Skip to content

Commit 64bc5bd

Browse files
dliviubbrezillon
authored andcommitted
dt-bindings: gpu: mali-valhall-csf: Add support for Arm Mali CSF GPUs
Arm has introduced a new v10 GPU architecture that replaces the Job Manager interface with a new Command Stream Frontend. It adds firmware driven command stream queues that can be used by kernel and user space to submit jobs to the GPU. Add the initial schema for the device tree that is based on support for RK3588 SoC. The minimum number of clocks is one for the IP, but on Rockchip platforms they will tend to expose the semi-independent clocks for better power management. v6: - Add Maxime's and Heiko's acks v5: - Move the opp-table node under the gpu node v4: - Fix formatting issue v3: - Cleanup commit message to remove redundant text - Added opp-table property and re-ordered entries - Clarified power-domains and power-domain-names requirements for RK3588. - Cleaned up example Note: power-domains and power-domain-names requirements for other platforms are still work in progress, hence the bindings are left incomplete here. v2: - New commit Signed-off-by: Liviu Dudau <[email protected]> Cc: Krzysztof Kozlowski <[email protected]> Cc: Rob Herring <[email protected]> Cc: Conor Dooley <[email protected]> Cc: [email protected] Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Rob Herring <[email protected]> Acked-by: Maxime Ripard <[email protected]> Acked-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent d72f049 commit 64bc5bd

File tree

1 file changed

+147
-0
lines changed

1 file changed

+147
-0
lines changed
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/gpu/arm,mali-valhall-csf.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ARM Mali Valhall GPU
8+
9+
maintainers:
10+
- Liviu Dudau <[email protected]>
11+
- Boris Brezillon <[email protected]>
12+
13+
properties:
14+
$nodename:
15+
pattern: '^gpu@[a-f0-9]+$'
16+
17+
compatible:
18+
oneOf:
19+
- items:
20+
- enum:
21+
- rockchip,rk3588-mali
22+
- const: arm,mali-valhall-csf # Mali Valhall GPU model/revision is fully discoverable
23+
24+
reg:
25+
maxItems: 1
26+
27+
interrupts:
28+
items:
29+
- description: Job interrupt
30+
- description: MMU interrupt
31+
- description: GPU interrupt
32+
33+
interrupt-names:
34+
items:
35+
- const: job
36+
- const: mmu
37+
- const: gpu
38+
39+
clocks:
40+
minItems: 1
41+
maxItems: 3
42+
43+
clock-names:
44+
minItems: 1
45+
items:
46+
- const: core
47+
- const: coregroup
48+
- const: stacks
49+
50+
mali-supply: true
51+
52+
operating-points-v2: true
53+
opp-table:
54+
type: object
55+
56+
power-domains:
57+
minItems: 1
58+
maxItems: 5
59+
60+
power-domain-names:
61+
minItems: 1
62+
maxItems: 5
63+
64+
sram-supply: true
65+
66+
"#cooling-cells":
67+
const: 2
68+
69+
dynamic-power-coefficient:
70+
$ref: /schemas/types.yaml#/definitions/uint32
71+
description:
72+
A u32 value that represents the running time dynamic
73+
power coefficient in units of uW/MHz/V^2. The
74+
coefficient can either be calculated from power
75+
measurements or derived by analysis.
76+
77+
The dynamic power consumption of the GPU is
78+
proportional to the square of the Voltage (V) and
79+
the clock frequency (f). The coefficient is used to
80+
calculate the dynamic power as below -
81+
82+
Pdyn = dynamic-power-coefficient * V^2 * f
83+
84+
where voltage is in V, frequency is in MHz.
85+
86+
dma-coherent: true
87+
88+
required:
89+
- compatible
90+
- reg
91+
- interrupts
92+
- interrupt-names
93+
- clocks
94+
- mali-supply
95+
96+
additionalProperties: false
97+
98+
allOf:
99+
- if:
100+
properties:
101+
compatible:
102+
contains:
103+
const: rockchip,rk3588-mali
104+
then:
105+
properties:
106+
clocks:
107+
minItems: 3
108+
power-domains:
109+
maxItems: 1
110+
power-domain-names: false
111+
112+
examples:
113+
- |
114+
#include <dt-bindings/clock/rockchip,rk3588-cru.h>
115+
#include <dt-bindings/interrupt-controller/irq.h>
116+
#include <dt-bindings/interrupt-controller/arm-gic.h>
117+
#include <dt-bindings/power/rk3588-power.h>
118+
119+
gpu: gpu@fb000000 {
120+
compatible = "rockchip,rk3588-mali", "arm,mali-valhall-csf";
121+
reg = <0xfb000000 0x200000>;
122+
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH 0>,
123+
<GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH 0>,
124+
<GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH 0>;
125+
interrupt-names = "job", "mmu", "gpu";
126+
clock-names = "core", "coregroup", "stacks";
127+
clocks = <&cru CLK_GPU>, <&cru CLK_GPU_COREGROUP>,
128+
<&cru CLK_GPU_STACKS>;
129+
power-domains = <&power RK3588_PD_GPU>;
130+
operating-points-v2 = <&gpu_opp_table>;
131+
mali-supply = <&vdd_gpu_s0>;
132+
sram-supply = <&vdd_gpu_mem_s0>;
133+
134+
gpu_opp_table: opp-table {
135+
compatible = "operating-points-v2";
136+
opp-300000000 {
137+
opp-hz = /bits/ 64 <300000000>;
138+
opp-microvolt = <675000 675000 850000>;
139+
};
140+
opp-400000000 {
141+
opp-hz = /bits/ 64 <400000000>;
142+
opp-microvolt = <675000 675000 850000>;
143+
};
144+
};
145+
};
146+
147+
...

0 commit comments

Comments
 (0)