ARM: dts: rockchip: add Utgard Mali nodes for some socs
Subsystems (4)
Heiko Stuebner
maintainerv2 cover ARM: dts: rockchip: add Utgard Mali nodes for some socs
This adds a mali-supply similar to the Midgard binding, the compatibles for 3 Rockchip socs and the nodes for these.
The rk3036 and rk3188 gpus were tested, on the boards that get their gpus enabled, using the current Lima resurrection project and were able to probe the gpus sucessfully and draw a nice red-triangle in an off-screen application.
The only special thing Rockchip Malis do, is that all MMUs have a shared interrupt and all PPs also have a shared interrupt, but that works out well with the current binding.
changes in v2:
- adapt to Rob's comment for the compatibles, not sure how I could miss the long compatible list at the top in the first place :-)
- add Rob's Ack for patch 2 and adapt styling to match the other properties
- add power-domains as optional property
The power-domains are missing from the actual devicetree patches for now, as the rk3036 does not have any and I just submitted power-domain support for rk3188 in a separate series. So while the rk3188 needs a power-domain it's driver is still in-flight :-)
Heiko Stuebner (8):
dt-bindings: gpu: mali-utgard: Add Rockchip Utgard Malis
dt-bindings: gpu: mali-utgard: add optional supply regulator
dt-bindings: gpu: mali-utgard: add optional power-domain reference
ARM: dts: rockchip: add rk3036 gpu node
ARM: dts: rockchip: enable the gpu on rk3036-kylin boards
ARM: dts: rockchip: add rk322x gpu node
ARM: dts: rockchip: add gpu nodes on rk3066/rk3188
ARM: dts: rockchip: enable gpu on rk3188-radxarock
.../devicetree/bindings/gpu/arm,mali-utgard.txt | 16 +++++++++++++++ arch/arm/boot/dts/rk3036-kylin.dts | 5 +++++ arch/arm/boot/dts/rk3036.dtsi | 19 +++++++++++++++++ arch/arm/boot/dts/rk3066a.dtsi | 24 ++++++++++++++++++++++ arch/arm/boot/dts/rk3188-radxarock.dts | 4 ++++ arch/arm/boot/dts/rk3188.dtsi | 24 ++++++++++++++++++++++ arch/arm/boot/dts/rk322x.dtsi | 21 +++++++++++++++++++ arch/arm/boot/dts/rk3xxx.dtsi | 11 ++++++++++ 8 files changed, 124 insertions(+)
Signature · 1 line
2.14.1
Heiko Stuebner
maintainerPATCH v2 1/8 dt-bindings: gpu: mali-utgard: Add Rockchip Utgard Malis
Some (older or lower power) Rockchip socs use Utgard-based Mali-GPUs. So add the necessary compatibles for them. As the setup is the same for all of them (needing only the additional reset line), they get added in a somewhat condensed form, to not inflate the document unnecessary.
--- Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt | 8 ++++++++ 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt +8 -0
@@ -13,6 +13,10 @@ Required properties: + allwinner,sun50i-h5-mali + amlogic,meson-gxbb-mali + amlogic,meson-gxl-mali + + rockchip,rk3036-mali + + rockchip,rk3066-mali + + rockchip,rk3188-mali + + rockchip,rk3228-mali + stericsson,db8500-mali - reg: Physical base address and length of the GPU registers
@@ -63,6 +67,10 @@ to specify one more vendor-specific compatible, among: Required properties: * resets: phandle to the reset line for the GPU + - Rockchip variants: + Required properties: + * resets: phandle to the reset line for the GPU + - stericsson,db8500-mali Required properties: * interrupt-names and interrupts:
Signature · 1 line
2.14.1
Rob Herring
maintainerPATCH v2 1/8 dt-bindings: gpu: mali-utgard: Add Rockchip Utgard Malis
Quoted 9 lines · Heiko Stuebner
Some (older or lower power) Rockchip socs use Utgard-based Mali-GPUs. So add the necessary compatibles for them. As the setup is the same for all of them (needing only the additional reset line), they get added in a somewhat condensed form, to not inflate the document unnecessary.
Signed-off-by Heiko Stuebner <[email protected]>--- Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt | 8 ++++++++ 1 file changed, 8 insertions(+)
Heiko Stuebner
maintainerPATCH v2 2/8 dt-bindings: gpu: mali-utgard: add optional supply regulator
In reply to Heiko StuebnerMali GPUs have a separate supplying regulator in a lot of socs, so describe a mali-supply property. The already described operating points will likely also need access to this regulator.
--- Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt +4 -0
@@ -44,6 +44,10 @@ Optional properties: Memory region to allocate from, as defined in Documentation/devicetree/bindi/reserved-memory/reserved-memory.txt + - mali-supply: + Phandle to regulator for the Mali device, as defined in + Documentation/devicetree/bindings/regulator/regulator.txt for details. + - operating-points-v2: Operating Points for the GPU, as defined in Documentation/devicetree/bindings/opp/opp.txt
Signature · 1 line
2.14.1
Heiko Stuebner
maintainerPATCH v2 3/8 dt-bindings: gpu: mali-utgard: add optional power-domain reference
In reply to Heiko StuebnerOn some socs Mali Utgard gpu have both soc power-domains and external supplying regulators, so add an optional power-domains property for reference.
--- Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt +4 -0
@@ -52,6 +52,10 @@ Optional properties: Operating Points for the GPU, as defined in Documentation/devicetree/bindings/opp/opp.txt + - power-domains: + A power domain consumer specifier as defined in + Documentation/devicetree/bindings/power/power_domain.txt + Vendor-specific bindings ------------------------
Signature · 1 line
2.14.1
Rob Herring
maintainerPATCH v2 3/8 dt-bindings: gpu: mali-utgard: add optional power-domain reference
Quoted 8 lines · Heiko Stuebner
On some socs Mali Utgard gpu have both soc power-domains and external supplying regulators, so add an optional power-domains property for reference.
Signed-off-by Heiko Stuebner <[email protected]>--- Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt | 4 ++++ 1 file changed, 4 insertions(+)
Heiko Stuebner
maintainerPATCH v2 4/8 ARM: dts: rockchip: add rk3036 gpu node
In reply to Heiko StuebnerThe rk3036 uses a Mali400 GPU with one pixel processor. This adds the core node for it, which can be enabled in board devicetrees.
Rockchip Mali GPUs use only one clock line for both bus and core.
--- arch/arm/boot/dts/rk3036.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
arch/arm/boot/dts/rk3036.dtsi +19 -0
@@ -152,6 +152,25 @@ }; }; + gpu: gpu at 10090000 { + compatible = "rockchip,rk3036-mali", "arm,mali-400"; + reg = <0x10090000 0x10000>; + interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "gp", + "gpmmu", + "pp0", + "pp0mmu"; + assigned-clocks = <&cru SCLK_GPU>; + assigned-clock-rates = <100000000>; + clocks = <&cru SCLK_GPU>, <&cru SCLK_GPU>; + clock-names = "core", "bus"; + resets = <&cru SRST_GPU>; + status = "disabled"; + }; + vop: vop at 10118000 { compatible = "rockchip,rk3036-vop"; reg = <0x10118000 0x19c>;
Signature · 1 line
2.14.1
Heiko Stuebner
maintainerPATCH v2 5/8 ARM: dts: rockchip: enable the gpu on rk3036-kylin boards
In reply to Heiko StuebnerEnable the gpu node and add the gpu supply for it.
--- arch/arm/boot/dts/rk3036-kylin.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/rk3036-kylin.dts +5 -0
@@ -135,6 +135,11 @@ status = "okay"; }; +&gpu { + mali-supply = <&vdd_gpu>; + status = "okay"; +}; + &hdmi { status = "okay"; };
Signature · 1 line
2.14.1
Heiko Stuebner
maintainerPATCH v2 6/8 ARM: dts: rockchip: add rk322x gpu node
In reply to Heiko StuebnerThe rk3228/3229 uses a Mali400 GPU with two pixel processors. This adds the core node for it, which can be enabled in board devicetrees.
--- arch/arm/boot/dts/rk322x.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm/boot/dts/rk322x.dtsi +21 -0
@@ -558,6 +558,27 @@ status = "disabled"; }; + gpu: gpu at 20000000 { + compatible = "rockchip,rk3228-mali", "arm,mali-400"; + reg = <0x20000000 0x10000>; + interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "gp", + "gpmmu", + "pp0", + "pp0mmu", + "pp1", + "pp1mmu"; + clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>; + clock-names = "core", "bus"; + resets = <&cru SRST_GPU_A>; + status = "disabled"; + }; + vpu_mmu: iommu at 20020800 { compatible = "rockchip,iommu"; reg = <0x20020800 0x100>;
Signature · 1 line
2.14.1
Heiko Stuebner
maintainerPATCH v2 7/8 ARM: dts: rockchip: add gpu nodes on rk3066/rk3188
In reply to Heiko StuebnerThe old Cortex-A9 socs use Mali400 GPUs with 4 pixel processors. This adds the core gpu nodes with the per-soc interrupts but sharing the core node.
Rockchip SoCs use only one clock to supply the GPUs
--- arch/arm/boot/dts/rk3066a.dtsi | 24 ++++++++++++++++++++++++ arch/arm/boot/dts/rk3188.dtsi | 24 ++++++++++++++++++++++++ arch/arm/boot/dts/rk3xxx.dtsi | 11 +++++++++++ 3 files changed, 59 insertions(+)
arch/arm/boot/dts/rk3066a.dtsi +24 -0
@@ -610,6 +610,30 @@ }; }; +&gpu { + compatible = "rockchip,rk3066-mali", "arm,mali-400"; + interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "gp", + "gpmmu", + "pp0", + "pp0mmu", + "pp1", + "pp1mmu", + "pp2", + "pp2mmu", + "pp3", + "pp3mmu"; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_xfer>;
arch/arm/boot/dts/rk3188.dtsi +24 -0
@@ -553,6 +553,30 @@ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>; }; +&gpu { + compatible = "rockchip,rk3188-mali", "arm,mali-400"; + interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "gp", + "gpmmu", + "pp0", + "pp0mmu", + "pp1", + "pp1mmu", + "pp2", + "pp2mmu", + "pp3", + "pp3mmu"; +}; + &i2c0 { compatible = "rockchip,rk3188-i2c"; pinctrl-names = "default";
arch/arm/boot/dts/rk3xxx.dtsi +11 -0
@@ -117,6 +117,17 @@ clock-output-names = "xin24m"; }; + gpu: gpu at 10090000 { + compatible = "arm,mali-400"; + reg = <0x10090000 0x10000>; + clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>; + clock-names = "core", "bus"; + assigned-clocks = <&cru ACLK_GPU>; + assigned-clock-rates = <100000000>; + resets = <&cru SRST_GPU>; + status = "disabled"; + }; + L2: l2-cache-controller at 10138000 { compatible = "arm,pl310-cache"; reg = <0x10138000 0x1000>;
Signature · 1 line
2.14.1
Heiko Stuebner
maintainerPATCH v2 8/8 ARM: dts: rockchip: enable gpu on rk3188-radxarock
In reply to Heiko StuebnerEnable the gpu node on that board.
--- arch/arm/boot/dts/rk3188-radxarock.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/rk3188-radxarock.dts +4 -0
@@ -176,6 +176,10 @@ cpu0-supply = <&vdd_arm>; }; +&gpu { + status = "okay"; +}; + &i2c1 { status = "okay"; clock-frequency = <400000>;
Signature · 1 line
2.14.1
Heiko Stuebner
maintainerv2 cover ARM: dts: rockchip: add Utgard Mali nodes for some socs
In reply to Heiko StuebnerAm Freitag, 15. September 2017, 11:18:04 CEST schrieb Heiko Stuebner:
Quoted 11 lines
This adds a mali-supply similar to the Midgard binding, the compatibles for 3 Rockchip socs and the nodes for these.
The rk3036 and rk3188 gpus were tested, on the boards that get their gpus enabled, using the current Lima resurrection project and were able to probe the gpus sucessfully and draw a nice red-triangle in an off-screen application.
The only special thing Rockchip Malis do, is that all MMUs have a shared interrupt and all PPs also have a shared interrupt, but that works out well with the current binding.
applied all 8 for 4.15 with Rob's Acks for the binding changes.