RK3328 GPU DMC OPP tables (#3088)

* [ RK3328 ] boost GPU voltages to avoid starving Memory controller

The RK3328 has the dynamic memory controller and GPU on the same power rail.
Both are able to be dynamically clocked, both have opp tables.

 - DMC min voltage:  1.075V
 - GPU min voltage:  0.950V

On boards with only the GPU enabled, they memory controller can be under-voltaged.
On boards attempting to use both, the disagreeing opps result in the GPU failing to init

This patch applies a mV range opp to the GPU and fixed opps to the DMC on rk3328-roc-cc
to allow everything to get alongin all possible devfreq situations.

* [ rockchip64 ] clean up disabled patches

* [ rock64 ] add mali supply and remove unused 5V supply

- New Mali opps will keep from starving ram controller

- extra supply was causing dmesg errors.

As it shares enable with another supply and both were marked "always on"
I removed the second.  Neither are referenced by any ports/devices.
This commit is contained in:
Tony 2021-08-09 02:24:51 -04:00 committed by GitHub
parent 9c45885554
commit ee610096bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 169 additions and 0 deletions

View File

@ -0,0 +1,47 @@
From d0950717ad74ea4c85ccf7bc205b8545758de1df Mon Sep 17 00:00:00 2001
From: tonymac32 <tonymckahan@gmail.com>
Date: Sun, 8 Aug 2021 11:49:27 -0400
Subject: [PATCH] board_rock64_mali-usb-supply
Signed-off-by: tonymac32 <tonymckahan@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
index b5f5513c6..df51ade34 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
@@ -43,17 +43,6 @@ vcc_host_5v: vcc-host-5v-regulator {
vin-supply = <&vcc_sys>;
};
- vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
- compatible = "regulator-fixed";
- gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
- pinctrl-names = "default";
- pinctrl-0 = <&usb20_host_drv>;
- regulator-name = "vcc_host1_5v";
- regulator-always-on;
- regulator-boot-on;
- vin-supply = <&vcc_sys>;
- };
-
vcc_sys: vcc-sys {
compatible = "regulator-fixed";
regulator-name = "vcc_sys";
@@ -143,6 +132,11 @@ &emmc {
status = "okay";
};
+&gpu {
+ status = "okay";
+ mali-supply = <&vdd_logic>;
+};
+
&gmac2io {
assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
--
Created with Armbian build tools https://github.com/armbian/build

View File

@ -0,0 +1,122 @@
From 6b9fa5fb3eaa4a0b3ff0babcdeb5f92b8cccb949 Mon Sep 17 00:00:00 2001
From: tonymac32 <tonymckahan@gmail.com>
Date: Wed, 4 Aug 2021 00:14:33 -0400
Subject: [PATCH] hjghj
Signed-off-by: tonymac32 <tonymckahan@gmail.com>
---
.../arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 27 ++++++++++---------
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 14 +++++++---
2 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
index c50bf3ba4..ba82fe0df 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
@@ -58,31 +58,31 @@ dmc_opp_table: dmc-opp-table {
opp-786000000 {
opp-hz = /bits/ 64 <786000000>;
- opp-microvolt = <1075000>;
- opp-microvolt-L0 = <1075000>;
- opp-microvolt-L1 = <1050000>;
+ opp-microvolt = <1150000>;
+ opp-microvolt-L0 = <1150000>;
+ opp-microvolt-L1 = <1150000>;
};
opp-798000000 {
opp-hz = /bits/ 64 <798000000>;
- opp-microvolt = <1075000>;
- opp-microvolt-L0 = <1075000>;
- opp-microvolt-L1 = <1050000>;
+ opp-microvolt = <1150000>;
+ opp-microvolt-L0 = <1150000>;
+ opp-microvolt-L1 = <1150000>;
};
opp-840000000 {
opp-hz = /bits/ 64 <840000000>;
- opp-microvolt = <1075000>;
- opp-microvolt-L0 = <1075000>;
- opp-microvolt-L1 = <1050000>;
+ opp-microvolt = <1150000>;
+ opp-microvolt-L0 = <1150000>;
+ opp-microvolt-L1 = <1150000>;
};
opp-924000000 {
opp-hz = /bits/ 64 <924000000>;
- opp-microvolt = <1100000>;
- opp-microvolt-L0 = <1100000>;
- opp-microvolt-L1 = <1075000>;
+ opp-microvolt = <1150000>;
+ opp-microvolt-L0 = <1150000>;
+ opp-microvolt-L1 = <1150000>;
};
opp-1068000000 {
opp-hz = /bits/ 64 <1068000000>;
- opp-microvolt = <1175000>;
+ opp-microvolt = <1175000>;
opp-microvolt-L0 = <1175000>;
opp-microvolt-L1 = <1150000>;
};
@@ -232,6 +232,7 @@ &gmac2io {
};
&gpu {
+ status = "okay";
mali-supply = <&vdd_logic>;
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index a576953ec..e6459baa8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -147,22 +147,22 @@ gpu_opp_table: gpu-opp-table {
opp-200000000 {
opp-hz = /bits/ 64 <200000000>;
- opp-microvolt = <950000>;
+ opp-microvolt = <1150000 1150000 1175000>;
};
opp-300000000 {
opp-hz = /bits/ 64 <300000000>;
- opp-microvolt = <975000>;
+ opp-microvolt = <1150000 1150000 1175000>;
};
opp-400000000 {
opp-hz = /bits/ 64 <400000000>;
- opp-microvolt = <1050000>;
+ opp-microvolt = <1150000 1150000 1175000>;
};
opp-500000000 {
opp-hz = /bits/ 64 <500000000>;
- opp-microvolt = <1150000>;
+ opp-microvolt = <1150000 1150000 1175000>;
};
};
@@ -591,6 +591,11 @@ map0 {
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
contribution = <4096>;
};
+ map1 {
+ trip = <&target>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ contribution = <4096>;
+ };
};
};
@@ -675,6 +680,7 @@ gpu: gpu@ff300000 {
power-domains = <&power RK3328_PD_GPU>;
resets = <&cru SRST_GPU_A>;
operating-points-v2 = <&gpu_opp_table>;
+ #cooling-cells = <2>;
};
h265e_mmu: iommu@ff330200 {
--
Created with Armbian build tools https://github.com/armbian/build