From 430706840e44f0600ac8b98331c3327b5dac2d36 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Tue, 25 Aug 2020 04:34:36 +0800 Subject: [PATCH] rockchip: add cpu idle state for rk3328 Signed-off-by: CN_SZTL --- ...add-hwmon-support-for-SoCs-and-GPUs.patch} | 0 ...4-dts-rockchip-Add-RK3328-idle-state.patch | 74 +++++++++++++++++++ ...r8152-add-LED-configuration-from-OF.patch} | 0 ...t-add-RTL8152-binding-documentation.patch} | 0 ...-add-i2c0-controller-for-nanopi-r2s.patch} | 0 5 files changed, 74 insertions(+) rename target/linux/rockchip/patches-5.4/{104-rockchip-add-hwmon-support-for-SoCs-and-GPUs.patch => 002-rockchip-add-hwmon-support-for-SoCs-and-GPUs.patch} (100%) create mode 100644 target/linux/rockchip/patches-5.4/005-arm64-dts-rockchip-Add-RK3328-idle-state.patch rename target/linux/rockchip/patches-5.4/{005-net-usb-r8152-add-LED-configuration-from-OF.patch => 006-net-usb-r8152-add-LED-configuration-from-OF.patch} (100%) rename target/linux/rockchip/patches-5.4/{006-dt-bindings-net-add-RTL8152-binding-documentation.patch => 007-dt-bindings-net-add-RTL8152-binding-documentation.patch} (100%) rename target/linux/rockchip/patches-5.4/{002-rockchip-rk3328-add-i2c0-controller-for-nanopi-r2s.patch => 104-rockchip-rk3328-add-i2c0-controller-for-nanopi-r2s.patch} (100%) diff --git a/target/linux/rockchip/patches-5.4/104-rockchip-add-hwmon-support-for-SoCs-and-GPUs.patch b/target/linux/rockchip/patches-5.4/002-rockchip-add-hwmon-support-for-SoCs-and-GPUs.patch similarity index 100% rename from target/linux/rockchip/patches-5.4/104-rockchip-add-hwmon-support-for-SoCs-and-GPUs.patch rename to target/linux/rockchip/patches-5.4/002-rockchip-add-hwmon-support-for-SoCs-and-GPUs.patch diff --git a/target/linux/rockchip/patches-5.4/005-arm64-dts-rockchip-Add-RK3328-idle-state.patch b/target/linux/rockchip/patches-5.4/005-arm64-dts-rockchip-Add-RK3328-idle-state.patch new file mode 100644 index 0000000000..a65f04011c --- /dev/null +++ b/target/linux/rockchip/patches-5.4/005-arm64-dts-rockchip-Add-RK3328-idle-state.patch @@ -0,0 +1,74 @@ +From 4f279f9fbca54464173240f7e73b145a136dfa1e Mon Sep 17 00:00:00 2001 +From: Robin Murphy +Date: Sun, 29 Dec 2019 20:16:17 +0000 +Subject: arm64: dts: rockchip: Add RK3328 idle state + +Downstream RK3328 DTBs describe a CPU idle state matching that present +on other SoCs like RK3399. This works with upstream Trusted Firmware-A +too, so let's add it here. + +Signed-off-by: Robin Murphy +Link: https://lore.kernel.org/r/a8c83e705d387446ea8121516d410e38b2d9c57b.1577640736.git.robin.murphy@arm.com +Signed-off-by: Heiko Stuebner +--- + arch/arm64/boot/dts/rockchip/rk3328.dtsi | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi +index 91306ebed4da2..c9ff1188bd7b1 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi +@@ -41,6 +41,7 @@ + reg = <0x0 0x0>; + clocks = <&cru ARMCLK>; + #cooling-cells = <2>; ++ cpu-idle-states = <&CPU_SLEEP>; + dynamic-power-coefficient = <120>; + enable-method = "psci"; + next-level-cache = <&l2>; +@@ -53,6 +54,7 @@ + reg = <0x0 0x1>; + clocks = <&cru ARMCLK>; + #cooling-cells = <2>; ++ cpu-idle-states = <&CPU_SLEEP>; + dynamic-power-coefficient = <120>; + enable-method = "psci"; + next-level-cache = <&l2>; +@@ -65,6 +67,7 @@ + reg = <0x0 0x2>; + clocks = <&cru ARMCLK>; + #cooling-cells = <2>; ++ cpu-idle-states = <&CPU_SLEEP>; + dynamic-power-coefficient = <120>; + enable-method = "psci"; + next-level-cache = <&l2>; +@@ -77,12 +80,26 @@ + reg = <0x0 0x3>; + clocks = <&cru ARMCLK>; + #cooling-cells = <2>; ++ cpu-idle-states = <&CPU_SLEEP>; + dynamic-power-coefficient = <120>; + enable-method = "psci"; + next-level-cache = <&l2>; + operating-points-v2 = <&cpu0_opp_table>; + }; + ++ idle-states { ++ entry-method = "psci"; ++ ++ CPU_SLEEP: cpu-sleep { ++ compatible = "arm,idle-state"; ++ local-timer-stop; ++ arm,psci-suspend-param = <0x0010000>; ++ entry-latency-us = <120>; ++ exit-latency-us = <250>; ++ min-residency-us = <900>; ++ }; ++ }; ++ + l2: l2-cache0 { + compatible = "cache"; + }; +-- +cgit 1.2.3-1.el7 + diff --git a/target/linux/rockchip/patches-5.4/005-net-usb-r8152-add-LED-configuration-from-OF.patch b/target/linux/rockchip/patches-5.4/006-net-usb-r8152-add-LED-configuration-from-OF.patch similarity index 100% rename from target/linux/rockchip/patches-5.4/005-net-usb-r8152-add-LED-configuration-from-OF.patch rename to target/linux/rockchip/patches-5.4/006-net-usb-r8152-add-LED-configuration-from-OF.patch diff --git a/target/linux/rockchip/patches-5.4/006-dt-bindings-net-add-RTL8152-binding-documentation.patch b/target/linux/rockchip/patches-5.4/007-dt-bindings-net-add-RTL8152-binding-documentation.patch similarity index 100% rename from target/linux/rockchip/patches-5.4/006-dt-bindings-net-add-RTL8152-binding-documentation.patch rename to target/linux/rockchip/patches-5.4/007-dt-bindings-net-add-RTL8152-binding-documentation.patch diff --git a/target/linux/rockchip/patches-5.4/002-rockchip-rk3328-add-i2c0-controller-for-nanopi-r2s.patch b/target/linux/rockchip/patches-5.4/104-rockchip-rk3328-add-i2c0-controller-for-nanopi-r2s.patch similarity index 100% rename from target/linux/rockchip/patches-5.4/002-rockchip-rk3328-add-i2c0-controller-for-nanopi-r2s.patch rename to target/linux/rockchip/patches-5.4/104-rockchip-rk3328-add-i2c0-controller-for-nanopi-r2s.patch