Add more DVFS/THS patches for H5

This commit is contained in:
zador-blood-stained 2017-05-07 21:13:49 +03:00
parent 1bc816135d
commit 77d8707c01
2 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,46 @@
From 563b07168a2727813385db0d255779c6eeb7bfe1 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Sun, 26 Feb 2017 16:05:58 +0100
Subject: [PATCH] ARM: dts: sun8i: Add thermal sensor node to H3 dts
Signed-off-by: Ondrej Jirman <megous@megous.com>
---
arch/arm/boot/dts/sunxi-h3-h5.dtsi | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index 47a9aac..92f9222 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -420,6 +420,18 @@
};
};
+ ths: ths@01c25000 {
+ #thermal-sensor-cells = <0>;
+ compatible = "allwinner,sun8i-h3-ths";
+ reg = <0x01c25000 0x400>,
+ <0x01c14234 0x4>;
+ interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&ccu RST_BUS_THS>;
+ reset-names = "ahb";
+ clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
+ clock-names = "ahb", "ths";
+ };
+
timer@01c20c00 {
compatible = "allwinner,sun4i-a10-timer";
reg = <0x01c20c00 0xa0>;
@@ -655,4 +667,12 @@
};
};
};
+
+ thermal-zones {
+ cpu_thermal: cpu_thermal {
+ polling-delay-passive = <330>;
+ polling-delay = <1000>;
+ thermal-sensors = <&ths 0>;
+ };
+ };
};

View File

@ -344,3 +344,27 @@ index 6b347d4..cf8dc27 100644
+ depends on MACH_SUN9I || COMPILE_TEST
endif
From 5e38e4e910c70d15d53d3d9221d0397986591e14 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Mon, 21 Nov 2016 01:58:49 +0100
Subject: [PATCH] clk: sunxi-ng: Fix "BUG: schedule in idle" while waiting for
PLL lock
---
drivers/clk/sunxi-ng/ccu_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/sunxi-ng/ccu_common.c b/drivers/clk/sunxi-ng/ccu_common.c
index 9d87247..9518c0e 100644
--- a/drivers/clk/sunxi-ng/ccu_common.c
+++ b/drivers/clk/sunxi-ng/ccu_common.c
@@ -38,7 +38,8 @@ void ccu_helper_wait_for_lock(struct ccu_common *common, u32 lock)
else
addr = common->base + common->reg;
- WARN_ON(readl_relaxed_poll_timeout(addr, reg, reg & lock, 100, 70000));
+ WARN_ON(readl_relaxed_poll_timeout_atomic(addr, reg,
+ reg & lock, 5, 70000));
}
/*