Add Allwinner H6 Mali Midgard gpu node
cover Add Allwinner H6 Mali Midgard gpu node
Hi,
The Allwinner H6 has a Mali-T720 MP2. The drivers are out-of-tree so this serie only introduce the dt-bindings.
The first patch is from Neil Amstrong and has been already merged in linux-amlogic. It is required for this serie.
The second patch is from Icenowy Zheng where I changed the order has required by Rob Herring.
See: https://patchwork.kernel.org/patch/10699829/
The GPU opp table is taken from Jernej Škrabec's patch on LibreELEC.tv.
Thanks,
Clement
Clément Péron (7):
dt-bindings: gpu: add bus clock for Mali Midgard GPUs
dt-bindings: gpu: mali-midgard: Add h6 mali gpu compatible
arm64: dts: allwinner: Add ARM Mali GPU node for H6
arm64: dts: allwinner: Add mali GPU supply for Pine H64
arm64: dts: allwinner: Add mali GPU supply for Beelink GS1
arm64: dts: allwinner: Add mali GPU supply for OrangePi Boards
arm64: dts: allwinner: Add mali GPU supply for OrangePi 3
Neil Armstrong (1):
dt-bindings: gpu: mali-midgard: Add resets property
.../bindings/gpu/arm,mali-midgard.txt | 26 ++++++ .../dts/allwinner/sun50i-h6-beelink-gs1.dts | 5 ++ .../dts/allwinner/sun50i-h6-orangepi-3.dts | 5 ++ .../dts/allwinner/sun50i-h6-orangepi.dtsi | 5 ++ .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 5 ++ arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 80 +++++++++++++++++++ 6 files changed, 126 insertions(+)
Signature · 1 line
2.17.1
PATCH 1/8 dt-bindings: gpu: mali-midgard: Add resets property
From: Neil Armstrong <[email protected]>
The Amlogic ARM Mali Midgard requires reset controls to power on and software reset the GPU, adds these as optional in the bindings.
--- .../devicetree/bindings/gpu/arm,mali-midgard.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +14 -0
@@ -37,6 +37,20 @@ Optional properties: - operating-points-v2 : Refer to Documentation/devicetree/bindings/opp/opp.txt for details. +- resets : Phandle of the GPU reset line. + +Vendor-specific bindings +------------------------ + +The Mali GPU is integrated very differently from one SoC to +another. In order to accomodate those differences, you have the option +to specify one more vendor-specific compatible, among: + +- "amlogic,meson-gxm-mali" + Required properties: + - resets : Should contain phandles of : + + GPU reset line + + GPU APB glue reset line Example for a Mali-T760:
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 6/8 arm64: dts: allwinner: Add mali GPU supply for Beelink GS1
In reply to Clément PéronEnable and add supply to the Mali GPU node on the
Beelink GS1 board.
--- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +5 -0
@@ -70,6 +70,11 @@ status = "okay"; }; +&gpu { + mali-supply = <®_dcdcc>; + status = "okay"; +}; + &hdmi { status = "okay"; };
Signature · 1 line
2.17.1
PATCH 8/8 arm64: dts: allwinner: Add mali GPU supply for OrangePi 3
In reply to Clément PéronEnable and add supply to the Mali GPU node on the
Orange Pi 3 board.
--- arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts +5 -0
@@ -58,6 +58,11 @@ status = "okay"; }; +&gpu { + mali-supply = <®_dcdcc>; + status = "okay"; +}; + &mmc0 { vmmc-supply = <®_cldo1>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
Signature · 1 line
2.17.1
PATCH 7/8 arm64: dts: allwinner: Add mali GPU supply for OrangePi Boards
In reply to Clément PéronEnable and add supply to the Mali GPU node on the
Orange Pi One Plus and Lite2 boards.
--- arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi +5 -0
@@ -55,6 +55,11 @@ status = "okay"; }; +&gpu { + mali-supply = <®_dcdcc>; + status = "okay"; +}; + &mmc0 { vmmc-supply = <®_cldo1>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
Signature · 1 line
2.17.1
PATCH 5/8 arm64: dts: allwinner: Add mali GPU supply for Pine H64
In reply to Clément PéronEnable and add supply to the Mali GPU node on the
Pine H64 board.
--- arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts +5 -0
@@ -85,6 +85,11 @@ status = "okay"; }; +&gpu { + mali-supply = <®_dcdcc>; + status = "okay"; +}; + &hdmi { status = "okay"; };
Signature · 1 line
2.17.1
PATCH 3/8 dt-bindings: gpu: mali-midgard: Add h6 mali gpu compatible
In reply to Clément PéronThis add the H6 mali compatible in the dt-bindings to later support specific implementation.
--- .../devicetree/bindings/gpu/arm,mali-midgard.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +7 -1
@@ -15,6 +15,7 @@ Required properties: + "arm,mali-t860" + "arm,mali-t880" * which must be preceded by one of the following vendor specifics: + + "allwinner,sun50i-h6-mali" + "amlogic,meson-gxm-mali" + "rockchip,rk3288-mali" + "rockchip,rk3399-mali"
@@ -49,9 +50,14 @@ Vendor-specific bindings ------------------------ The Mali GPU is integrated very differently from one SoC to -another. In order to accomodate those differences, you have the option +another. In order to accommodate those differences, you have the option to specify one more vendor-specific compatible, among: +- "allwinner,sun50i-h6-mali" + Required properties: + - resets: Should contain phandle of : + + GPU reset line + - "amlogic,meson-gxm-mali" Required properties: - resets : Should contain phandles of :
Signature · 1 line
2.17.1
PATCH 4/8 arm64: dts: allwinner: Add ARM Mali GPU node for H6
In reply to Clément PéronAdd the mali gpu node to the H6 device-tree.
--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 80 ++++++++++++++++++++ 1 file changed, 80 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +80 -0
@@ -17,6 +17,71 @@ #address-cells = <1>; #size-cells = <1>; + gpu_opp_table: opp_table1 { + compatible = "operating-points-v2"; + + opp@756000000 { + opp-hz = /bits/ 64 <756000000>; + opp-microvolt = <1040000>; + }; + opp@624000000 { + opp-hz = /bits/ 64 <624000000>; + opp-microvolt = <950000>; + }; + opp@576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-microvolt = <930000>; + }; + opp@540000000 { + opp-hz = /bits/ 64 <540000000>; + opp-microvolt = <910000>; + }; + opp@504000000 { + opp-hz = /bits/ 64 <504000000>; + opp-microvolt = <890000>; + }; + opp@456000000 { + opp-hz = /bits/ 64 <456000000>; + opp-microvolt = <870000>; + }; + opp@432000000 { + opp-hz = /bits/ 64 <432000000>; + opp-microvolt = <860000>; + }; + opp@420000000 { + opp-hz = /bits/ 64 <420000000>; + opp-microvolt = <850000>; + }; + opp@408000000 { + opp-hz = /bits/ 64 <408000000>; + opp-microvolt = <840000>; + }; + opp@384000000 { + opp-hz = /bits/ 64 <384000000>; + opp-microvolt = <830000>; + }; + opp@360000000 { + opp-hz = /bits/ 64 <360000000>; + opp-microvolt = <820000>; + }; + opp@336000000 { + opp-hz = /bits/ 64 <336000000>; + opp-microvolt = <810000>; + }; + opp@312000000 { + opp-hz = /bits/ 64 <312000000>; + opp-microvolt = <810000>; + }; + opp@264000000 { + opp-hz = /bits/ 64 <264000000>; + opp-microvolt = <810000>; + }; + opp@216000000 { + opp-hz = /bits/ 64 <216000000>; + opp-microvolt = <810000>; + }; + }; + cpus { #address-cells = <1>; #size-cells = <0>;
@@ -157,6 +222,21 @@ allwinner,sram = <&ve_sram 1>; }; + gpu: gpu@1800000 { + compatible = "allwinner,sun50i-h6-mali", + "arm,mali-t720"; + reg = <0x01800000 0x4000>; + interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "job", "mmu", "gpu"; + clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>; + clock-names = "core", "bus"; + resets = <&ccu RST_BUS_GPU>; + operating-points-v2 = <&gpu_opp_table>; + status = "disabled"; + }; + syscon: syscon@3000000 { compatible = "allwinner,sun50i-h6-system-control", "allwinner,sun50i-a64-system-control";
Signature · 1 line
2.17.1
PATCH 2/8 dt-bindings: gpu: add bus clock for Mali Midgard GPUs
In reply to Clément PéronSome SoCs adds a bus clock gate to the Mali Midgard GPU.
Add the binding for the bus clock.
--- Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +6 -0
@@ -31,6 +31,12 @@ Optional properties: - clocks : Phandle to clock for the Mali Midgard device. +- clock-names : Specify the names of the clocks specified in clocks + when multiple clocks are present. + * core: clock driving the GPU itself (When only one clock is present, + assume it's this clock.) + * bus: bus clock for the GPU + - mali-supply : Phandle to regulator for the Mali device. Refer to Documentation/devicetree/bindings/regulator/regulator.txt for details.
Signature · 1 line
2.17.1
Re: [PATCH 3/8] dt-bindings: gpu: mali-midgard: Add h6 mali gpu compatible
In reply to Clément PéronQuoted 23 lines · Clément Péron
This add the H6 mali compatible in the dt-bindings to later support specific implementation.
Signed-off-by Clément Péron <[email protected]>--- .../devicetree/bindings/gpu/arm,mali-midgard.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +1
-0@@ -15,6 +15,7 @@ Required properties: + "arm,mali-t860" + "arm,mali-t880" * which must be preceded by one of the following vendor specifics: + + "allwinner,sun50i-h6-mali" + "amlogic,meson-gxm-mali" + "rockchip,rk3288-mali" + "rockchip,rk3399-mali"@@ -49,9 +50,14 @@ Vendor-specific bindings ------------------------
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt Vendor-specific bindings · line 60
Quoted 10 lines
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +6
-1The Mali GPU is integrated very differently from one SoC to -another. In order to accomodate those differences, you have the option +another. In order to accommodate those differences, you have the option to specify one more vendor-specific compatible, among: +- "allwinner,sun50i-h6-mali" + Required properties: + - resets: Should contain phandle of : + + GPU reset line +
And clocks, I assume?
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.
Re: [PATCH 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6
In reply to Clément PéronQuoted 70 lines · Clément Péron
Add the mali gpu node to the H6 device-tree.
Signed-off-by Clément Péron <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 80 ++++++++++++++++++++ 1 file changed, 80 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +55
-0@@ -17,6 +17,71 @@ #address-cells = <1>; #size-cells = <1>; + gpu_opp_table: opp_table1 { + compatible = "operating-points-v2"; + + opp@756000000 { + opp-hz = /bits/ 64 <756000000>; + opp-microvolt = <1040000>; + }; + opp@624000000 { + opp-hz = /bits/ 64 <624000000>; + opp-microvolt = <950000>; + }; + opp@576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-microvolt = <930000>; + }; + opp@540000000 { + opp-hz = /bits/ 64 <540000000>; + opp-microvolt = <910000>; + }; + opp@504000000 { + opp-hz = /bits/ 64 <504000000>; + opp-microvolt = <890000>; + }; + opp@456000000 { + opp-hz = /bits/ 64 <456000000>; + opp-microvolt = <870000>; + }; + opp@432000000 { + opp-hz = /bits/ 64 <432000000>; + opp-microvolt = <860000>; + }; + opp@420000000 { + opp-hz = /bits/ 64 <420000000>; + opp-microvolt = <850000>; + }; + opp@408000000 { + opp-hz = /bits/ 64 <408000000>; + opp-microvolt = <840000>; + }; + opp@384000000 { + opp-hz = /bits/ 64 <384000000>; + opp-microvolt = <830000>; + }; + opp@360000000 { + opp-hz = /bits/ 64 <360000000>; + opp-microvolt = <820000>; + }; + opp@336000000 { + opp-hz = /bits/ 64 <336000000>; + opp-microvolt = <810000>; + }; + opp@312000000 { + opp-hz = /bits/ 64 <312000000>; + opp-microvolt = <810000>; + };
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi line 84
Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +10
-0+ opp@264000000 { + opp-hz = /bits/ 64 <264000000>; + opp-microvolt = <810000>; + }; + opp@216000000 { + opp-hz = /bits/ 64 <216000000>; + opp-microvolt = <810000>; + }; + }; +
How were those OPPs tested?
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.
Re: [PATCH 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6
Hi,
Quoted 76 lines · Maxime Ripard
Quoted 74 lines · Clément Péron
Add the mali gpu node to the H6 device-tree.
Signed-off-by Clément Péron <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 80 ++++++++++++++++++++ 1 file changed, 80 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +59
-0@@ -17,6 +17,71 @@ #address-cells = <1>; #size-cells = <1>; + gpu_opp_table: opp_table1 { + compatible = "operating-points-v2"; + + opp@756000000 { + opp-hz = /bits/ 64 <756000000>; + opp-microvolt = <1040000>; + }; + opp@624000000 { + opp-hz = /bits/ 64 <624000000>; + opp-microvolt = <950000>; + }; + opp@576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-microvolt = <930000>; + }; + opp@540000000 { + opp-hz = /bits/ 64 <540000000>; + opp-microvolt = <910000>; + }; + opp@504000000 { + opp-hz = /bits/ 64 <504000000>; + opp-microvolt = <890000>; + }; + opp@456000000 { + opp-hz = /bits/ 64 <456000000>; + opp-microvolt = <870000>; + }; + opp@432000000 { + opp-hz = /bits/ 64 <432000000>; + opp-microvolt = <860000>; + }; + opp@420000000 { + opp-hz = /bits/ 64 <420000000>; + opp-microvolt = <850000>; + }; + opp@408000000 { + opp-hz = /bits/ 64 <408000000>; + opp-microvolt = <840000>; + }; + opp@384000000 { + opp-hz = /bits/ 64 <384000000>; + opp-microvolt = <830000>; + }; + opp@360000000 { + opp-hz = /bits/ 64 <360000000>; + opp-microvolt = <820000>; + }; + opp@336000000 { + opp-hz = /bits/ 64 <336000000>; + opp-microvolt = <810000>; + }; + opp@312000000 { + opp-hz = /bits/ 64 <312000000>; + opp-microvolt = <810000>; + }; + opp@264000000 { + opp-hz = /bits/ 64 <264000000>; + opp-microvolt = <810000>; + };
Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi line 84
Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +6
-0+ opp@216000000 { + opp-hz = /bits/ 64 <216000000>; + opp-microvolt = <810000>; + }; + }; +How were those OPPs tested?
They are taken from the vendor device tree.
https://github.com/Allwinner-Homlet/H6-BSP4.9-linux/blob/master/arch/arm64/boot/dts/sunxi/sun50iw6p1.dtsi#L2121
Clement
Quoted 7 lines
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.
Re: [PATCH 3/8] dt-bindings: gpu: mali-midgard: Add h6 mali gpu compatible
In reply to Maxime RipardHi,
Quoted 30 lines · Maxime Ripard
Quoted 28 lines · Clément Péron
This add the H6 mali compatible in the dt-bindings to later support specific implementation.
Signed-off-by Clément Péron <[email protected]>--- .../devicetree/bindings/gpu/arm,mali-midgard.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +2
-1@@ -15,6 +15,7 @@ Required properties: + "arm,mali-t860" + "arm,mali-t880" * which must be preceded by one of the following vendor specifics: + + "allwinner,sun50i-h6-mali" + "amlogic,meson-gxm-mali" + "rockchip,rk3288-mali" + "rockchip,rk3399-mali"@@ -49,9 +50,14 @@ Vendor-specific bindings ------------------------ The Mali GPU is integrated very differently from one SoC to -another. In order to accomodate those differences, you have the option +another. In order to accommodate those differences, you have the option to specify one more vendor-specific compatible, among:
Quoted 7 lines
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt Vendor-specific bindings · line 60
Quoted 5 lines
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +5
-0+- "allwinner,sun50i-h6-mali" + Required properties: + - resets: Should contain phandle of : + + GPU reset line +And clocks, I assume?
Yes you're right clocks are also required for the H6.
Clement
Quoted 7 lines
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Re: [PATCH 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6
In reply to Clément PéronQuoted 88 lines · Clément Péron
Hi,
Quoted 76 lines · Maxime Ripard
Quoted 74 lines · Clément Péron
Add the mali gpu node to the H6 device-tree.
Signed-off-by Clément Péron <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 80 ++++++++++++++++++++ 1 file changed, 80 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +59
-0@@ -17,6 +17,71 @@ #address-cells = <1>; #size-cells = <1>; + gpu_opp_table: opp_table1 { + compatible = "operating-points-v2"; + + opp@756000000 { + opp-hz = /bits/ 64 <756000000>; + opp-microvolt = <1040000>; + }; + opp@624000000 { + opp-hz = /bits/ 64 <624000000>; + opp-microvolt = <950000>; + }; + opp@576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-microvolt = <930000>; + }; + opp@540000000 { + opp-hz = /bits/ 64 <540000000>; + opp-microvolt = <910000>; + }; + opp@504000000 { + opp-hz = /bits/ 64 <504000000>; + opp-microvolt = <890000>; + }; + opp@456000000 { + opp-hz = /bits/ 64 <456000000>; + opp-microvolt = <870000>; + }; + opp@432000000 { + opp-hz = /bits/ 64 <432000000>; + opp-microvolt = <860000>; + }; + opp@420000000 { + opp-hz = /bits/ 64 <420000000>; + opp-microvolt = <850000>; + }; + opp@408000000 { + opp-hz = /bits/ 64 <408000000>; + opp-microvolt = <840000>; + }; + opp@384000000 { + opp-hz = /bits/ 64 <384000000>; + opp-microvolt = <830000>; + }; + opp@360000000 { + opp-hz = /bits/ 64 <360000000>; + opp-microvolt = <820000>; + }; + opp@336000000 { + opp-hz = /bits/ 64 <336000000>; + opp-microvolt = <810000>; + }; + opp@312000000 { + opp-hz = /bits/ 64 <312000000>; + opp-microvolt = <810000>; + }; + opp@264000000 { + opp-hz = /bits/ 64 <264000000>; + opp-microvolt = <810000>; + };Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi line 84
Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +6
-0+ opp@216000000 { + opp-hz = /bits/ 64 <216000000>; + opp-microvolt = <810000>; + }; + }; +How were those OPPs tested?
Quoted 2 lines
They are taken from the vendor device tree.
https://github.com/Allwinner-Homlet/H6-BSP4.9-linux/blob/master/arch/arm64/boot/dts/sunxi/sun50iw6p1.dtsi#L2121
Please remove them if you haven't tested them then.
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com