From 75dc3dc94edad2a4fc58a21109c73a59d0946d43 Mon Sep 17 00:00:00 2001 From: brooksytech <1673861+brooksytech@users.noreply.github.com> Date: Thu, 25 Jan 2024 01:07:43 +0000 Subject: [PATCH] RK3399: enable turbo clocks --- .../platforms/RK3399/002-turbo-mode_config | 7 +++ .../linux/patches/RK3399/001-rk3399-opp.patch | 49 +++++++++++++------ 2 files changed, 42 insertions(+), 14 deletions(-) create mode 100644 packages/hardware/quirks/platforms/RK3399/002-turbo-mode_config diff --git a/packages/hardware/quirks/platforms/RK3399/002-turbo-mode_config b/packages/hardware/quirks/platforms/RK3399/002-turbo-mode_config new file mode 100644 index 000000000..e78c24e2f --- /dev/null +++ b/packages/hardware/quirks/platforms/RK3399/002-turbo-mode_config @@ -0,0 +1,7 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2024 JELOS (https://github.com/JustEnoughLinuxOS) + +cat </storage/.config/profile.d/002-turbo-mode_config +DEVICE_TURBO_MODE="true" +EOF diff --git a/projects/Rockchip/packages/linux/patches/RK3399/001-rk3399-opp.patch b/projects/Rockchip/packages/linux/patches/RK3399/001-rk3399-opp.patch index becfaa8b5..1faa26360 100644 --- a/projects/Rockchip/packages/linux/patches/RK3399/001-rk3399-opp.patch +++ b/projects/Rockchip/packages/linux/patches/RK3399/001-rk3399-opp.patch @@ -1,7 +1,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi linux/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi ---- linux.orig/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi 2024-01-02 16:20:12.770155149 +0000 -+++ linux/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi 2024-01-02 21:04:45.168352345 +0000 -@@ -9,34 +9,30 @@ +--- linux.orig/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi 2024-01-23 23:55:32.438476475 +0000 ++++ linux/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi 2024-01-24 14:42:44.077563119 +0000 +@@ -9,34 +9,35 @@ opp-shared; opp00 { @@ -42,10 +42,15 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi linux/arc + opp-hz = /bits/ 64 <1608000000>; + opp-microvolt = <1200000>; + }; ++ opp06 { ++ opp-hz = /bits/ 64 <1704000000>; ++ opp-microvolt = <1225000>; ++ turbo-mode; ++ }; }; cluster1_opp: opp-table-1 { -@@ -44,40 +40,32 @@ +@@ -44,42 +45,39 @@ opp-shared; opp00 { @@ -93,8 +98,15 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi linux/arc + opp-hz = /bits/ 64 <2088000000>; opp-microvolt = <1250000>; }; ++ opp07 { ++ opp-hz = /bits/ 64 <2208000000>; ++ opp-microvolt = <1350000>; ++ turbo-mode; ++ }; }; -@@ -90,46 +78,30 @@ + + gpu_opp_table: opp-table-2 { +@@ -90,46 +88,36 @@ opp-microvolt = <800000>; }; opp01 { @@ -122,6 +134,12 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi linux/arc + opp-hz = /bits/ 64 <900000000>; + opp-microvolt = <1150000>; + }; ++ opp04 { ++ opp-hz = /bits/ 64 <950000000>; ++ opp-microvolt = <1175000>; ++ turbo-mode; ++ }; ++ }; dmc_opp_table: opp-table-3 { @@ -132,19 +150,22 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi linux/arc - opp-microvolt = <900000>; - }; - opp01 { - opp-hz = /bits/ 64 <666000000>; - opp-microvolt = <900000>; - }; +- opp-hz = /bits/ 64 <666000000>; +- opp-microvolt = <900000>; +- }; - opp02 { - opp-hz = /bits/ 64 <800000000>; -+ opp01 { -+ opp-hz = /bits/ 64 <856000000>; - opp-microvolt = <900000>; - }; +- opp-microvolt = <900000>; +- }; - opp03 { - opp-hz = /bits/ 64 <928000000>; -- opp-microvolt = <925000>; -- }; ++ opp-hz = /bits/ 64 <933000000>; + opp-microvolt = <925000>; + }; ++ //opp01 { ++ // opp-hz = /bits/ 64 <856000000>; ++ // opp-microvolt = <900000>; ++ //}; }; };