Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: Convert Arm Mali Utgard GPU to DT schema

Convert the Arm Utgard GPU binding to DT schema format.

'allwinner,sun8i-a23-mali' compatible was not documented, so add it.

The 'clocks' property is now required. This simplifies the schema as
effectively all the users require 'clocks' already and the upstream
driver requires clocks.

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Rob Herring <robh@kernel.org>

+168 -129
-129
Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
··· 1 - ARM Mali Utgard GPU 2 - =================== 3 - 4 - Required properties: 5 - - compatible 6 - * Must be one of the following: 7 - + "arm,mali-300" 8 - + "arm,mali-400" 9 - + "arm,mali-450" 10 - * And, optionally, one of the vendor specific compatible: 11 - + allwinner,sun4i-a10-mali 12 - + allwinner,sun7i-a20-mali 13 - + allwinner,sun8i-h3-mali 14 - + allwinner,sun50i-a64-mali 15 - + allwinner,sun50i-h5-mali 16 - + amlogic,meson8-mali 17 - + amlogic,meson8b-mali 18 - + amlogic,meson-gxbb-mali 19 - + amlogic,meson-gxl-mali 20 - + samsung,exynos4210-mali 21 - + rockchip,rk3036-mali 22 - + rockchip,rk3066-mali 23 - + rockchip,rk3188-mali 24 - + rockchip,rk3228-mali 25 - + rockchip,rk3328-mali 26 - + stericsson,db8500-mali 27 - + hisilicon,hi6220-mali 28 - 29 - - reg: Physical base address and length of the GPU registers 30 - 31 - - interrupts: an entry for each entry in interrupt-names. 32 - See ../interrupt-controller/interrupts.txt for details. 33 - 34 - - interrupt-names: 35 - * ppX: Pixel Processor X interrupt (X from 0 to 7) 36 - * ppmmuX: Pixel Processor X MMU interrupt (X from 0 to 7) 37 - * pp: Pixel Processor broadcast interrupt (mali-450 only) 38 - * gp: Geometry Processor interrupt 39 - * gpmmu: Geometry Processor MMU interrupt 40 - 41 - - clocks: an entry for each entry in clock-names 42 - - clock-names: 43 - * bus: bus clock for the GPU 44 - * core: clock driving the GPU itself 45 - 46 - Optional properties: 47 - - interrupt-names and interrupts: 48 - * pmu: Power Management Unit interrupt, if implemented in hardware 49 - 50 - - memory-region: 51 - Memory region to allocate from, as defined in 52 - Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt 53 - 54 - - mali-supply: 55 - Phandle to regulator for the Mali device, as defined in 56 - Documentation/devicetree/bindings/regulator/regulator.txt for details. 57 - 58 - - operating-points-v2: 59 - Operating Points for the GPU, as defined in 60 - Documentation/devicetree/bindings/opp/opp.txt 61 - 62 - - power-domains: 63 - A power domain consumer specifier as defined in 64 - Documentation/devicetree/bindings/power/power_domain.txt 65 - 66 - Vendor-specific bindings 67 - ------------------------ 68 - 69 - The Mali GPU is integrated very differently from one SoC to 70 - another. In order to accomodate those differences, you have the option 71 - to specify one more vendor-specific compatible, among: 72 - 73 - - allwinner,sun4i-a10-mali 74 - Required properties: 75 - * resets: phandle to the reset line for the GPU 76 - 77 - - allwinner,sun7i-a20-mali 78 - Required properties: 79 - * resets: phandle to the reset line for the GPU 80 - 81 - - allwinner,sun50i-a64-mali 82 - Required properties: 83 - * resets: phandle to the reset line for the GPU 84 - 85 - - allwinner,sun50i-h5-mali 86 - Required properties: 87 - * resets: phandle to the reset line for the GPU 88 - 89 - - amlogic,meson8-mali and amlogic,meson8b-mali 90 - Required properties: 91 - * resets: phandle to the reset line for the GPU 92 - 93 - - Rockchip variants: 94 - Required properties: 95 - * resets: phandle to the reset line for the GPU 96 - 97 - - stericsson,db8500-mali 98 - Required properties: 99 - * interrupt-names and interrupts: 100 - + combined: combined interrupt of all of the above lines 101 - 102 - - hisilicon,hi6220-mali 103 - Required properties: 104 - * resets: phandles to the reset lines for the GPU 105 - 106 - Example: 107 - 108 - mali: gpu@1c40000 { 109 - compatible = "allwinner,sun7i-a20-mali", "arm,mali-400"; 110 - reg = <0x01c40000 0x10000>; 111 - interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, 112 - <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, 113 - <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, 114 - <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, 115 - <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, 116 - <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, 117 - <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>; 118 - interrupt-names = "gp", 119 - "gpmmu", 120 - "pp0", 121 - "ppmmu0", 122 - "pp1", 123 - "ppmmu1", 124 - "pmu"; 125 - clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>; 126 - clock-names = "bus", "core"; 127 - resets = <&ccu RST_BUS_GPU>; 128 - }; 129 -
+168
Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/gpu/arm,mali-utgard.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: ARM Mali Utgard GPU 8 + 9 + maintainers: 10 + - Rob Herring <robh@kernel.org> 11 + - Maxime Ripard <maxime.ripard@free-electrons.com> 12 + - Heiko Stuebner <heiko@sntech.de> 13 + 14 + properties: 15 + $nodename: 16 + pattern: '^gpu@[a-f0-9]+$' 17 + compatible: 18 + oneOf: 19 + - items: 20 + - const: allwinner,sun8i-a23-mali 21 + - const: allwinner,sun7i-a20-mali 22 + - const: arm,mali-400 23 + - items: 24 + - enum: 25 + - allwinner,sun4i-a10-mali 26 + - allwinner,sun7i-a20-mali 27 + - allwinner,sun8i-h3-mali 28 + - allwinner,sun50i-a64-mali 29 + - rockchip,rk3036-mali 30 + - rockchip,rk3066-mali 31 + - rockchip,rk3188-mali 32 + - rockchip,rk3228-mali 33 + - samsung,exynos4210-mali 34 + - stericsson,db8500-mali 35 + - const: arm,mali-400 36 + - items: 37 + - enum: 38 + - allwinner,sun50i-h5-mali 39 + - amlogic,meson8-mali 40 + - amlogic,meson8b-mali 41 + - amlogic,meson-gxbb-mali 42 + - amlogic,meson-gxl-mali 43 + - hisilicon,hi6220-mali 44 + - rockchip,rk3328-mali 45 + - const: arm,mali-450 46 + 47 + # "arm,mali-300" 48 + 49 + reg: 50 + maxItems: 1 51 + 52 + interrupts: 53 + minItems: 4 54 + maxItems: 20 55 + 56 + interrupt-names: 57 + allOf: 58 + - additionalItems: true 59 + minItems: 4 60 + maxItems: 20 61 + items: 62 + # At least enforce the first 2 interrupts 63 + - const: gp 64 + - const: gpmmu 65 + - items: 66 + # Not ideal as any order and combination are allowed 67 + enum: 68 + - gp # Geometry Processor interrupt 69 + - gpmmu # Geometry Processor MMU interrupt 70 + - pp # Pixel Processor broadcast interrupt (mali-450 only) 71 + - pp0 # Pixel Processor X interrupt (X from 0 to 7) 72 + - ppmmu0 # Pixel Processor X MMU interrupt (X from 0 to 7) 73 + - pp1 74 + - ppmmu1 75 + - pp2 76 + - ppmmu2 77 + - pp3 78 + - ppmmu3 79 + - pp4 80 + - ppmmu4 81 + - pp5 82 + - ppmmu5 83 + - pp6 84 + - ppmmu6 85 + - pp7 86 + - ppmmu7 87 + - pmu # Power Management Unit interrupt (optional) 88 + - combined # stericsson,db8500-mali only 89 + 90 + clocks: 91 + maxItems: 2 92 + 93 + clock-names: 94 + items: 95 + - const: bus 96 + - const: core 97 + 98 + memory-region: true 99 + 100 + mali-supply: 101 + maxItems: 1 102 + 103 + power-domains: 104 + maxItems: 1 105 + 106 + resets: 107 + maxItems: 1 108 + 109 + operating-points-v2: true 110 + 111 + required: 112 + - compatible 113 + - reg 114 + - interrupts 115 + - interrupt-names 116 + - clocks 117 + - clock-names 118 + 119 + allOf: 120 + - if: 121 + properties: 122 + compatible: 123 + contains: 124 + enum: 125 + - allwinner,sun4i-a10-mali 126 + - allwinner,sun7i-a20-mali 127 + - allwinner,sun50i-a64-mali 128 + - allwinner,sun50i-h5-mali 129 + - amlogic,meson8-mali 130 + - amlogic,meson8b-mali 131 + - hisilicon,hi6220-mali 132 + - rockchip,rk3036-mali 133 + - rockchip,rk3066-mali 134 + - rockchip,rk3188-mali 135 + - rockchip,rk3228-mali 136 + - rockchip,rk3328-mali 137 + then: 138 + required: 139 + - resets 140 + 141 + examples: 142 + - | 143 + #include <dt-bindings/interrupt-controller/irq.h> 144 + #include <dt-bindings/interrupt-controller/arm-gic.h> 145 + 146 + mali: gpu@1c40000 { 147 + compatible = "allwinner,sun7i-a20-mali", "arm,mali-400"; 148 + reg = <0x01c40000 0x10000>; 149 + interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, 150 + <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, 151 + <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, 152 + <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, 153 + <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, 154 + <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, 155 + <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>; 156 + interrupt-names = "gp", 157 + "gpmmu", 158 + "pp0", 159 + "ppmmu0", 160 + "pp1", 161 + "ppmmu1", 162 + "pmu"; 163 + clocks = <&ccu 1>, <&ccu 2>; 164 + clock-names = "bus", "core"; 165 + resets = <&ccu 1>; 166 + }; 167 + 168 + ...