2017-07-01 12:56:20

by Jacob Chen

[permalink] [raw]
Subject: [PATCH 1/3] arm64: dts: rockchip: add ARM Mali GPU node for rk3399

Add Mali GPU device tree node for the rk3399 SoC.
Tested with rockchip-forwardports repo.

Signed-off-by: Jacob Chen <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 1cbd7a2..e795135 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1443,6 +1443,18 @@
status = "disabled";
};

+ gpu: mali@ff9a0000 {
+ compatible = "rockchip,rk3399-mali", "arm,mali-t860", "arm,mali-midgard";
+ reg = <0x0 0xff9a0000 0x0 0x10000>;
+ interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupt-names = "gpu", "job", "mmu";
+ clocks = <&cru ACLK_GPU>;
+ power-domains = <&power RK3399_PD_GPU>;
+ status = "disabled";
+ };
+
pinctrl: pinctrl {
compatible = "rockchip,rk3399-pinctrl";
rockchip,grf = <&grf>;
--
2.7.4


2017-07-01 12:56:24

by Jacob Chen

[permalink] [raw]
Subject: [PATCH 2/3] arm64: dts: rockchip: add gpu opp table for rk3399

midgard-t860 gpu in rk3399 support run in 800MHz.

Signed-off-by: Jacob Chen <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 33 ++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
index c83460d..3d88ba2 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
@@ -110,6 +110,35 @@
opp-microvolt = <1200000>;
};
};
+
+ gpu_opp_table: opp-table2 {
+ compatible = "operating-points-v2";
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ opp-microvolt = <800000>;
+ };
+ opp-297000000 {
+ opp-hz = /bits/ 64 <297000000>;
+ opp-microvolt = <800000>;
+ };
+ opp-400000000 {
+ opp-hz = /bits/ 64 <400000000>;
+ opp-microvolt = <825000>;
+ };
+ opp-500000000 {
+ opp-hz = /bits/ 64 <500000000>;
+ opp-microvolt = <875000>;
+ };
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ opp-microvolt = <925000>;
+ };
+ opp-800000000 {
+ opp-hz = /bits/ 64 <800000000>;
+ opp-microvolt = <1100000>;
+ };
+ };
};

&cpu_l0 {
@@ -135,3 +164,7 @@
&cpu_b1 {
operating-points-v2 = <&cluster1_opp>;
};
+
+&gpu {
+ operating-points-v2 = <&gpu_opp_table>;
+};
--
2.7.4

2017-07-01 12:56:37

by Jacob Chen

[permalink] [raw]
Subject: [PATCH 3/3] arm64: dts: rockchip: enable ARM Mali GPU on rk3399-firefly

Add reference to the Mali GPU device tree node on rk3399-firefly

Signed-off-by: Jacob Chen <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
index ba1d981..601f62e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
@@ -254,6 +254,11 @@
status = "okay";
};

+&gpu {
+ mali-supply = <&vdd_gpu>;
+ status = "okay";
+};
+
&i2c0 {
clock-frequency = <400000>;
i2c-scl-rising-time-ns = <168>;
--
2.7.4

2017-07-01 16:04:48

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH 1/3] arm64: dts: rockchip: add ARM Mali GPU node for rk3399

Hi Jacob,

Am Samstag, 1. Juli 2017, 20:56:08 CEST schrieb Jacob Chen:
> Add Mali GPU device tree node for the rk3399 SoC.
> Tested with rockchip-forwardports repo.
>
> Signed-off-by: Jacob Chen <[email protected]>
> ---
> arch/arm64/boot/dts/rockchip/rk3399.dtsi | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 1cbd7a2..e795135 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -1443,6 +1443,18 @@
> status = "disabled";
> };
>
> + gpu: mali@ff9a0000 {
> + compatible = "rockchip,rk3399-mali", "arm,mali-t860", "arm,mali-midgard";

this is missing a separate patch adding rockchip,rk3399-mali to
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt

Also arm,mali-midgard is not part of the binding. I just saw that it slipped
into the example in the binding file and also the rk3288.dtsi - which should
be fixed. But the driver should bind against the arm,mali-t860 alone, not
the mali-midgard.


Heiko

2017-07-01 16:27:01

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH 2/3] arm64: dts: rockchip: add gpu opp table for rk3399

Hi Jacob,

Am Samstag, 1. Juli 2017, 20:56:09 CEST schrieb Jacob Chen:
> midgard-t860 gpu in rk3399 support run in 800MHz.
>
> Signed-off-by: Jacob Chen <[email protected]>
> ---
> arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 33 ++++++++++++++++++++++++++++

Could you also provide the opp table for op1-variants please?


Thanks
Heiko