brintos

brintos / linux-shallow public Read only

0
0
Text · 7.1 KiB · 278399a Raw
322 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only2%YAML 1.23---4$id: http://devicetree.org/schemas/gpu/arm,mali-bifrost.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: ARM Mali Bifrost GPU8 9maintainers:10  - Rob Herring <robh@kernel.org>11 12properties:13  $nodename:14    pattern: '^gpu@[a-f0-9]+$'15 16  compatible:17    oneOf:18      - items:19          - enum:20              - amlogic,meson-g12a-mali21              - mediatek,mt8183-mali22              - mediatek,mt8183b-mali23              - mediatek,mt8186-mali24              - realtek,rtd1619-mali25              - renesas,r9a07g044-mali26              - renesas,r9a07g054-mali27              - rockchip,px30-mali28              - rockchip,rk3568-mali29          - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable30      - items:31          - enum:32              - mediatek,mt8195-mali33          - const: mediatek,mt8192-mali34          - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable35      - items:36          - enum:37              - mediatek,mt8188-mali38              - mediatek,mt8192-mali39          - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable40 41  reg:42    maxItems: 143 44  interrupts:45    minItems: 346    items:47      - description: Job interrupt48      - description: MMU interrupt49      - description: GPU interrupt50      - description: Event interrupt51 52  interrupt-names:53    minItems: 354    items:55      - const: job56      - const: mmu57      - const: gpu58      - const: event59 60  clocks:61    minItems: 162    maxItems: 363 64  clock-names: true65 66  mali-supply: true67 68  sram-supply: true69 70  operating-points-v2: true71 72  power-domains:73    minItems: 174    maxItems: 575 76  power-domain-names:77    minItems: 278    maxItems: 579 80  resets:81    minItems: 182    maxItems: 383 84  reset-names: true85 86  "#cooling-cells":87    const: 288 89  dynamic-power-coefficient:90    $ref: /schemas/types.yaml#/definitions/uint3291    description:92      A u32 value that represents the running time dynamic93      power coefficient in units of uW/MHz/V^2. The94      coefficient can either be calculated from power95      measurements or derived by analysis.96 97      The dynamic power consumption of the GPU is98      proportional to the square of the Voltage (V) and99      the clock frequency (f). The coefficient is used to100      calculate the dynamic power as below -101 102      Pdyn = dynamic-power-coefficient * V^2 * f103 104      where voltage is in V, frequency is in MHz.105 106  dma-coherent: true107 108  nvmem-cell-names:109    items:110      - const: speed-bin111 112  nvmem-cells:113    maxItems: 1114 115required:116  - compatible117  - reg118  - interrupts119  - interrupt-names120  - clocks121 122additionalProperties: false123 124allOf:125  - if:126      properties:127        compatible:128          contains:129            const: amlogic,meson-g12a-mali130    then:131      properties:132        power-domains:133          maxItems: 1134        power-domain-names: false135      required:136        - resets137  - if:138      properties:139        compatible:140          contains:141            enum:142              - renesas,r9a07g044-mali143              - renesas,r9a07g054-mali144    then:145      properties:146        interrupts:147          minItems: 4148        interrupt-names:149          minItems: 4150        clocks:151          minItems: 3152        clock-names:153          items:154            - const: gpu155            - const: bus156            - const: bus_ace157        power-domains:158          maxItems: 1159        power-domain-names: false160        resets:161          minItems: 3162        reset-names:163          items:164            - const: rst165            - const: axi_rst166            - const: ace_rst167      required:168        - clock-names169        - power-domains170        - resets171        - reset-names172  - if:173      properties:174        compatible:175          contains:176            const: mediatek,mt8183-mali177    then:178      properties:179        power-domains:180          minItems: 3181          maxItems: 3182        power-domain-names:183          items:184            - const: core0185            - const: core1186            - const: core2187 188      required:189        - sram-supply190        - power-domains191        - power-domain-names192    else:193      properties:194        sram-supply: false195  - if:196      properties:197        compatible:198          contains:199            enum:200              - mediatek,mt8183b-mali201              - mediatek,mt8188-mali202    then:203      properties:204        power-domains:205          minItems: 3206          maxItems: 3207        power-domain-names:208          items:209            - const: core0210            - const: core1211            - const: core2212      required:213        - power-domains214        - power-domain-names215  - if:216      properties:217        compatible:218          contains:219            const: mediatek,mt8186-mali220    then:221      properties:222        power-domains:223          minItems: 2224          maxItems: 2225        power-domain-names:226          items:227            - const: core0228            - const: core1229      required:230        - power-domains231        - power-domain-names232  - if:233      properties:234        compatible:235          contains:236            const: mediatek,mt8192-mali237    then:238      properties:239        power-domains:240          minItems: 5241        power-domain-names:242          items:243            - const: core0244            - const: core1245            - const: core2246            - const: core3247            - const: core4248      required:249        - power-domains250        - power-domain-names251  - if:252      properties:253        compatible:254          contains:255            const: rockchip,rk3568-mali256    then:257      properties:258        clocks:259          minItems: 2260        clock-names:261          items:262            - const: gpu263            - const: bus264        power-domains:265          maxItems: 1266        power-domain-names: false267      required:268        - clock-names269 270examples:271  - |272    #include <dt-bindings/interrupt-controller/irq.h>273    #include <dt-bindings/interrupt-controller/arm-gic.h>274 275    gpu@ffe40000 {276      compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost";277      reg = <0xffe40000 0x10000>;278      interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,279             <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,280             <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;281      interrupt-names = "job", "mmu", "gpu";282      clocks = <&clk 1>;283      mali-supply = <&vdd_gpu>;284      operating-points-v2 = <&gpu_opp_table>;285      resets = <&reset 0>, <&reset 1>;286    };287 288    gpu_opp_table: opp-table {289      compatible = "operating-points-v2";290 291      opp-533000000 {292        opp-hz = /bits/ 64 <533000000>;293        opp-microvolt = <1250000>;294      };295      opp-450000000 {296        opp-hz = /bits/ 64 <450000000>;297        opp-microvolt = <1150000>;298      };299      opp-400000000 {300        opp-hz = /bits/ 64 <400000000>;301        opp-microvolt = <1125000>;302      };303      opp-350000000 {304        opp-hz = /bits/ 64 <350000000>;305        opp-microvolt = <1075000>;306      };307      opp-266000000 {308        opp-hz = /bits/ 64 <266000000>;309        opp-microvolt = <1025000>;310      };311      opp-160000000 {312        opp-hz = /bits/ 64 <160000000>;313        opp-microvolt = <925000>;314      };315      opp-100000000 {316        opp-hz = /bits/ 64 <100000000>;317        opp-microvolt = <912500>;318      };319    };320 321...322