xref: /freebsd/sys/contrib/device-tree/Bindings/gpu/arm,mali-bifrost.yaml (revision 2eb4d8dc723da3cf7d735a3226ae49da4c8c5dbc)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/gpu/arm,mali-bifrost.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: ARM Mali Bifrost GPU
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Rob Herring <robh@kernel.org>
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel Vadotproperties:
13c66ec88fSEmmanuel Vadot  $nodename:
14c66ec88fSEmmanuel Vadot    pattern: '^gpu@[a-f0-9]+$'
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel Vadot  compatible:
17c66ec88fSEmmanuel Vadot    items:
18c66ec88fSEmmanuel Vadot      - enum:
19c66ec88fSEmmanuel Vadot          - amlogic,meson-g12a-mali
20c66ec88fSEmmanuel Vadot          - realtek,rtd1619-mali
21c66ec88fSEmmanuel Vadot          - rockchip,px30-mali
22c66ec88fSEmmanuel Vadot      - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable
23c66ec88fSEmmanuel Vadot
24c66ec88fSEmmanuel Vadot  reg:
25c66ec88fSEmmanuel Vadot    maxItems: 1
26c66ec88fSEmmanuel Vadot
27c66ec88fSEmmanuel Vadot  interrupts:
28c66ec88fSEmmanuel Vadot    items:
29c66ec88fSEmmanuel Vadot      - description: Job interrupt
30c66ec88fSEmmanuel Vadot      - description: MMU interrupt
31c66ec88fSEmmanuel Vadot      - description: GPU interrupt
32c66ec88fSEmmanuel Vadot
33c66ec88fSEmmanuel Vadot  interrupt-names:
34c66ec88fSEmmanuel Vadot    items:
35c66ec88fSEmmanuel Vadot      - const: job
36c66ec88fSEmmanuel Vadot      - const: mmu
37c66ec88fSEmmanuel Vadot      - const: gpu
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot  clocks:
40c66ec88fSEmmanuel Vadot    maxItems: 1
41c66ec88fSEmmanuel Vadot
42c66ec88fSEmmanuel Vadot  mali-supply: true
43c66ec88fSEmmanuel Vadot
44c66ec88fSEmmanuel Vadot  operating-points-v2: true
45c66ec88fSEmmanuel Vadot
46c66ec88fSEmmanuel Vadot  power-domains:
47c66ec88fSEmmanuel Vadot    maxItems: 1
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel Vadot  resets:
50c66ec88fSEmmanuel Vadot    maxItems: 2
51c66ec88fSEmmanuel Vadot
52c66ec88fSEmmanuel Vadot  "#cooling-cells":
53c66ec88fSEmmanuel Vadot    const: 2
54c66ec88fSEmmanuel Vadot
555def4c47SEmmanuel Vadot  dynamic-power-coefficient:
565def4c47SEmmanuel Vadot    $ref: '/schemas/types.yaml#/definitions/uint32'
575def4c47SEmmanuel Vadot    description:
585def4c47SEmmanuel Vadot      A u32 value that represents the running time dynamic
595def4c47SEmmanuel Vadot      power coefficient in units of uW/MHz/V^2. The
605def4c47SEmmanuel Vadot      coefficient can either be calculated from power
615def4c47SEmmanuel Vadot      measurements or derived by analysis.
625def4c47SEmmanuel Vadot
635def4c47SEmmanuel Vadot      The dynamic power consumption of the GPU is
645def4c47SEmmanuel Vadot      proportional to the square of the Voltage (V) and
655def4c47SEmmanuel Vadot      the clock frequency (f). The coefficient is used to
665def4c47SEmmanuel Vadot      calculate the dynamic power as below -
675def4c47SEmmanuel Vadot
685def4c47SEmmanuel Vadot      Pdyn = dynamic-power-coefficient * V^2 * f
695def4c47SEmmanuel Vadot
705def4c47SEmmanuel Vadot      where voltage is in V, frequency is in MHz.
715def4c47SEmmanuel Vadot
72*2eb4d8dcSEmmanuel Vadot  dma-coherent: true
73*2eb4d8dcSEmmanuel Vadot
74c66ec88fSEmmanuel Vadotrequired:
75c66ec88fSEmmanuel Vadot  - compatible
76c66ec88fSEmmanuel Vadot  - reg
77c66ec88fSEmmanuel Vadot  - interrupts
78c66ec88fSEmmanuel Vadot  - interrupt-names
79c66ec88fSEmmanuel Vadot  - clocks
80c66ec88fSEmmanuel Vadot
81c66ec88fSEmmanuel VadotadditionalProperties: false
82c66ec88fSEmmanuel Vadot
83c66ec88fSEmmanuel VadotallOf:
84c66ec88fSEmmanuel Vadot  - if:
85c66ec88fSEmmanuel Vadot      properties:
86c66ec88fSEmmanuel Vadot        compatible:
87c66ec88fSEmmanuel Vadot          contains:
88c66ec88fSEmmanuel Vadot            const: amlogic,meson-g12a-mali
89c66ec88fSEmmanuel Vadot    then:
90c66ec88fSEmmanuel Vadot      required:
91c66ec88fSEmmanuel Vadot        - resets
92c66ec88fSEmmanuel Vadot
93c66ec88fSEmmanuel Vadotexamples:
94c66ec88fSEmmanuel Vadot  - |
95c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
96c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
97c66ec88fSEmmanuel Vadot
98c66ec88fSEmmanuel Vadot    gpu@ffe40000 {
99c66ec88fSEmmanuel Vadot      compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost";
100c66ec88fSEmmanuel Vadot      reg = <0xffe40000 0x10000>;
101c66ec88fSEmmanuel Vadot      interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
102c66ec88fSEmmanuel Vadot             <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
103c66ec88fSEmmanuel Vadot             <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
104c66ec88fSEmmanuel Vadot      interrupt-names = "job", "mmu", "gpu";
105c66ec88fSEmmanuel Vadot      clocks = <&clk 1>;
106c66ec88fSEmmanuel Vadot      mali-supply = <&vdd_gpu>;
107c66ec88fSEmmanuel Vadot      operating-points-v2 = <&gpu_opp_table>;
108c66ec88fSEmmanuel Vadot      resets = <&reset 0>, <&reset 1>;
109c66ec88fSEmmanuel Vadot    };
110c66ec88fSEmmanuel Vadot
111c66ec88fSEmmanuel Vadot    gpu_opp_table: opp_table0 {
112c66ec88fSEmmanuel Vadot      compatible = "operating-points-v2";
113c66ec88fSEmmanuel Vadot
114c66ec88fSEmmanuel Vadot      opp-533000000 {
115c66ec88fSEmmanuel Vadot        opp-hz = /bits/ 64 <533000000>;
116c66ec88fSEmmanuel Vadot        opp-microvolt = <1250000>;
117c66ec88fSEmmanuel Vadot      };
118c66ec88fSEmmanuel Vadot      opp-450000000 {
119c66ec88fSEmmanuel Vadot        opp-hz = /bits/ 64 <450000000>;
120c66ec88fSEmmanuel Vadot        opp-microvolt = <1150000>;
121c66ec88fSEmmanuel Vadot      };
122c66ec88fSEmmanuel Vadot      opp-400000000 {
123c66ec88fSEmmanuel Vadot        opp-hz = /bits/ 64 <400000000>;
124c66ec88fSEmmanuel Vadot        opp-microvolt = <1125000>;
125c66ec88fSEmmanuel Vadot      };
126c66ec88fSEmmanuel Vadot      opp-350000000 {
127c66ec88fSEmmanuel Vadot        opp-hz = /bits/ 64 <350000000>;
128c66ec88fSEmmanuel Vadot        opp-microvolt = <1075000>;
129c66ec88fSEmmanuel Vadot      };
130c66ec88fSEmmanuel Vadot      opp-266000000 {
131c66ec88fSEmmanuel Vadot        opp-hz = /bits/ 64 <266000000>;
132c66ec88fSEmmanuel Vadot        opp-microvolt = <1025000>;
133c66ec88fSEmmanuel Vadot      };
134c66ec88fSEmmanuel Vadot      opp-160000000 {
135c66ec88fSEmmanuel Vadot        opp-hz = /bits/ 64 <160000000>;
136c66ec88fSEmmanuel Vadot        opp-microvolt = <925000>;
137c66ec88fSEmmanuel Vadot      };
138c66ec88fSEmmanuel Vadot      opp-100000000 {
139c66ec88fSEmmanuel Vadot        opp-hz = /bits/ 64 <100000000>;
140c66ec88fSEmmanuel Vadot        opp-microvolt = <912500>;
141c66ec88fSEmmanuel Vadot      };
142c66ec88fSEmmanuel Vadot    };
143c66ec88fSEmmanuel Vadot
144c66ec88fSEmmanuel Vadot...
145