Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0-only
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/gpu/arm,mali-midgard.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: ARM Mali Midgard GPU
0008 
0009 maintainers:
0010   - Rob Herring <robh@kernel.org>
0011 
0012 properties:
0013   $nodename:
0014     pattern: '^gpu@[a-f0-9]+$'
0015   compatible:
0016     oneOf:
0017       - items:
0018           - enum:
0019               - samsung,exynos5250-mali
0020           - const: arm,mali-t604
0021       - items:
0022           - enum:
0023               - samsung,exynos5420-mali
0024           - const: arm,mali-t628
0025       - items:
0026           - enum:
0027               - allwinner,sun50i-h6-mali
0028           - const: arm,mali-t720
0029       - items:
0030           - enum:
0031               - amlogic,meson-gxm-mali
0032               - realtek,rtd1295-mali
0033           - const: arm,mali-t820
0034       - items:
0035           - enum:
0036               - arm,juno-mali
0037           - const: arm,mali-t624
0038       - items:
0039           - enum:
0040               - rockchip,rk3288-mali
0041               - samsung,exynos5433-mali
0042           - const: arm,mali-t760
0043       - items:
0044           - enum:
0045               - rockchip,rk3399-mali
0046           - const: arm,mali-t860
0047 
0048           # "arm,mali-t830"
0049           # "arm,mali-t880"
0050 
0051   reg:
0052     maxItems: 1
0053 
0054   interrupts:
0055     items:
0056       - description: Job interrupt
0057       - description: MMU interrupt
0058       - description: GPU interrupt
0059 
0060   interrupt-names:
0061     items:
0062       - const: job
0063       - const: mmu
0064       - const: gpu
0065 
0066   clocks:
0067     minItems: 1
0068     maxItems: 2
0069 
0070   clock-names:
0071     minItems: 1
0072     items:
0073       - const: core
0074       - const: bus
0075 
0076   mali-supply: true
0077   opp-table: true
0078 
0079   power-domains:
0080     maxItems: 1
0081 
0082   resets:
0083     minItems: 1
0084     maxItems: 2
0085 
0086   operating-points-v2: true
0087 
0088   "#cooling-cells":
0089     const: 2
0090 
0091   dma-coherent: true
0092 
0093   dynamic-power-coefficient:
0094     $ref: '/schemas/types.yaml#/definitions/uint32'
0095     description:
0096       A u32 value that represents the running time dynamic
0097       power coefficient in units of uW/MHz/V^2. The
0098       coefficient can either be calculated from power
0099       measurements or derived by analysis.
0100 
0101       The dynamic power consumption of the GPU is
0102       proportional to the square of the Voltage (V) and
0103       the clock frequency (f). The coefficient is used to
0104       calculate the dynamic power as below -
0105 
0106       Pdyn = dynamic-power-coefficient * V^2 * f
0107 
0108       where voltage is in V, frequency is in MHz.
0109 
0110 required:
0111   - compatible
0112   - reg
0113   - interrupts
0114   - interrupt-names
0115   - clocks
0116 
0117 additionalProperties: false
0118 
0119 allOf:
0120   - if:
0121       properties:
0122         compatible:
0123           contains:
0124             const: allwinner,sun50i-h6-mali
0125     then:
0126       properties:
0127         clocks:
0128           minItems: 2
0129       required:
0130         - clock-names
0131         - resets
0132   - if:
0133       properties:
0134         compatible:
0135           contains:
0136             const: amlogic,meson-gxm-mali
0137     then:
0138       properties:
0139         resets:
0140           minItems: 2
0141       required:
0142         - resets
0143 
0144 examples:
0145   - |
0146     #include <dt-bindings/interrupt-controller/irq.h>
0147     #include <dt-bindings/interrupt-controller/arm-gic.h>
0148 
0149     gpu@ffa30000 {
0150       compatible = "rockchip,rk3288-mali", "arm,mali-t760";
0151       reg = <0xffa30000 0x10000>;
0152       interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
0153              <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
0154              <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
0155       interrupt-names = "job", "mmu", "gpu";
0156       clocks = <&cru 0>;
0157       mali-supply = <&vdd_gpu>;
0158       operating-points-v2 = <&gpu_opp_table>;
0159       power-domains = <&power 0>;
0160       #cooling-cells = <2>;
0161     };
0162 
0163     gpu_opp_table: opp-table {
0164       compatible = "operating-points-v2";
0165 
0166       opp-533000000 {
0167         opp-hz = /bits/ 64 <533000000>;
0168         opp-microvolt = <1250000>;
0169       };
0170       opp-450000000 {
0171         opp-hz = /bits/ 64 <450000000>;
0172         opp-microvolt = <1150000>;
0173       };
0174       opp-400000000 {
0175         opp-hz = /bits/ 64 <400000000>;
0176         opp-microvolt = <1125000>;
0177       };
0178       opp-350000000 {
0179         opp-hz = /bits/ 64 <350000000>;
0180         opp-microvolt = <1075000>;
0181       };
0182       opp-266000000 {
0183         opp-hz = /bits/ 64 <266000000>;
0184         opp-microvolt = <1025000>;
0185       };
0186       opp-160000000 {
0187         opp-hz = /bits/ 64 <160000000>;
0188         opp-microvolt = <925000>;
0189       };
0190       opp-100000000 {
0191         opp-hz = /bits/ 64 <100000000>;
0192         opp-microvolt = <912500>;
0193       };
0194     };
0195 
0196 ...