From d18323fcc358ddd5bd0836c4853cbc281b6293c6 Mon Sep 17 00:00:00 2001 From: Aditya Prayoga Date: Mon, 5 Oct 2020 20:28:37 +0700 Subject: [PATCH] Improve Helios64 Stability (#2239) * helios64: adjust big cpu regulator ramp delay existing value make clock transisition time large and could causing random kernel crash. info: https://forum.odroid.com/viewtopic.php?t=30303 * rk3399-legacy: dts: helios64: remove DMC and DFI to improve stability * helios64: rework patch due to dts renaming --- .../rk3399-legacy/helios64-add-board.patch | 52 ++----------------- .../helios64-remove-pcie-ep-gpios.patch | 10 ++-- .../add-board-helios64.patch | 6 +-- .../helios64-remove-pcie-ep-gpios.patch | 10 ++-- 4 files changed, 17 insertions(+), 61 deletions(-) diff --git a/patch/kernel/rk3399-legacy/helios64-add-board.patch b/patch/kernel/rk3399-legacy/helios64-add-board.patch index e4140ded18..a1b158e17d 100644 --- a/patch/kernel/rk3399-legacy/helios64-add-board.patch +++ b/patch/kernel/rk3399-legacy/helios64-add-board.patch @@ -20,14 +20,14 @@ index dbebbf9fe..2b1e29649 100644 rk3399-nanopi4-rev22.dtb \ + rk3399-kobol-helios64.dtb \ rk3399-firefly.dtb - + dtb-$(CONFIG_ARCH_ROCKCHIP) += \ diff --git a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts new file mode 100644 index 000000000..ef95aa489 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts -@@ -0,0 +1,1263 @@ +@@ -0,0 +1,1219 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2020 Aditya Prayoga (aditya@kobol.io) @@ -494,10 +494,6 @@ index 000000000..ef95aa489 + cpu-supply = <&vdd_cpu_b>; +}; + -+&dfi { -+ status = "okay"; -+}; -+ +&display_subsystem { + status = "okay"; + @@ -513,46 +509,6 @@ index 000000000..ef95aa489 + }; +}; + -+&dmc { -+ status = "okay"; -+ center-supply = <&vdd_center>; -+ upthreshold = <40>; -+ downdifferential = <20>; -+ system-status-freq = < -+ /*system status freq(KHz)*/ -+ SYS_STATUS_NORMAL 933000 -+ SYS_STATUS_REBOOT 400000 -+ SYS_STATUS_SUSPEND 400000 -+ SYS_STATUS_VIDEO_1080P 416000 -+ SYS_STATUS_VIDEO_4K 933000 -+ SYS_STATUS_VIDEO_4K_10B 933000 -+ SYS_STATUS_PERFORMANCE 933000 -+ SYS_STATUS_BOOST 416000 -+ SYS_STATUS_DUALVIEW 856000 -+ SYS_STATUS_ISP 856000 -+ >; -+ vop-bw-dmc-freq = < -+ /* min_bw(MB/s) max_bw(MB/s) freq(KHz) */ -+ 0 1893 416000 -+ 1894 99999 856000 -+ >; -+ auto-min-freq = <400000>; -+}; -+ -+&dmc_opp_table { -+ opp-416000000 { -+ opp-hz = /bits/ 64 <416000000>; -+ opp-microvolt = <900000>; -+ }; -+ opp-528000000 { -+ status = "disable"; -+ }; -+ opp-856000000 { -+ opp-hz = /bits/ 64 <856000000>; -+ opp-microvolt = <900000>; -+ }; -+}; -+ +&emmc_phy { + status = "okay"; +}; @@ -753,7 +709,7 @@ index 000000000..ef95aa489 + regulator-name = "vdd_cpu_b"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1500000>; -+ regulator-ramp-delay = <1000>; ++ regulator-ramp-delay = <40000>; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc5v0_sys>; @@ -1291,6 +1247,6 @@ index 000000000..ef95aa489 +&vopl_mmu { + status = "okay"; +}; --- +-- Created with Armbian build tools https://github.com/armbian/build diff --git a/patch/kernel/rk3399-legacy/helios64-remove-pcie-ep-gpios.patch b/patch/kernel/rk3399-legacy/helios64-remove-pcie-ep-gpios.patch index 0abb4226d8..6774bb1362 100644 --- a/patch/kernel/rk3399-legacy/helios64-remove-pcie-ep-gpios.patch +++ b/patch/kernel/rk3399-legacy/helios64-remove-pcie-ep-gpios.patch @@ -8,18 +8,18 @@ Signed-off-by: Aditya Prayoga arch/arm64/boot/dts/rockchip/rk3399-helios64.dts | 1 - 1 file changed, 1 deletion(-) -diff --git a/arch/arm64/boot/dts/rockchip/rk3399-helios64.dts b/arch/arm64/boot/dts/rockchip/rk3399-helios64.dts +diff --git a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts index d5401fd67..7d553a52a 100644 ---- a/arch/arm64/boot/dts/rockchip/rk3399-helios64.dts -+++ b/arch/arm64/boot/dts/rockchip/rk3399-helios64.dts +--- a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts @@ -822,7 +822,6 @@ - + &pcie0 { bus-scan-delay-ms = <2000>; - ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; num-lanes = <2>; max-link-speed = <2>; pinctrl-names = "default"; --- +-- Created with Armbian build tools https://github.com/armbian/build diff --git a/patch/kernel/rockchip64-current/add-board-helios64.patch b/patch/kernel/rockchip64-current/add-board-helios64.patch index ddf1057d8c..281af06400 100644 --- a/patch/kernel/rockchip64-current/add-board-helios64.patch +++ b/patch/kernel/rockchip64-current/add-board-helios64.patch @@ -655,7 +655,7 @@ index 000000000..fae17f416 + regulator-name = "vdd_cpu_b"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1500000>; -+ regulator-ramp-delay = <1000>; ++ regulator-ramp-delay = <40000>; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc5v0_sys>; @@ -878,7 +878,7 @@ index 000000000..fae17f416 + + pmic { + pmic_int_l: pmic-int-l { -+ rockchip,pins = ++ rockchip,pins = + <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + @@ -1113,6 +1113,6 @@ index 000000000..fae17f416 + status = "okay"; +}; \ No newline at end of file --- +-- Created with Armbian build tools https://github.com/armbian/build diff --git a/patch/kernel/rockchip64-current/helios64-remove-pcie-ep-gpios.patch b/patch/kernel/rockchip64-current/helios64-remove-pcie-ep-gpios.patch index 9ef0d9fd1c..d7a94963dd 100644 --- a/patch/kernel/rockchip64-current/helios64-remove-pcie-ep-gpios.patch +++ b/patch/kernel/rockchip64-current/helios64-remove-pcie-ep-gpios.patch @@ -8,18 +8,18 @@ Signed-off-by: Aditya Prayoga arch/arm64/boot/dts/rockchip/rk3399-helios64.dts | 1 - 1 file changed, 1 deletion(-) -diff --git a/arch/arm64/boot/dts/rockchip/rk3399-helios64.dts b/arch/arm64/boot/dts/rockchip/rk3399-helios64.dts +diff --git a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts index c065ba82d..002c93912 100644 ---- a/arch/arm64/boot/dts/rockchip/rk3399-helios64.dts -+++ b/arch/arm64/boot/dts/rockchip/rk3399-helios64.dts +--- a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts @@ -721,7 +721,6 @@ }; - + &pcie0 { - ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; num-lanes = <2>; max-link-speed = <2>; pinctrl-names = "default"; --- +-- Created with Armbian build tools https://github.com/armbian/build