armbian-build/patch/u-boot/u-boot-sunxi/add-h616-THS-workaround.patch
Kali Prasad b29527c697
Thermal sensor support for H616 SoC. (#3153)
Signed-off-by: Kali Prasad <kprasadvnsi@protonmail.com>
2021-09-19 12:10:59 +02:00

34 lines
928 B
Diff

From 07bdfe1e2ebc51a434dbe66733378a979530abb0 Mon Sep 17 00:00:00 2001
From: Kali Prasad <kprasadvnsi@protonmail.com>
Date: Sat, 18 Sep 2021 22:57:05 +0530
Subject: [PATCH] Adding h616 THS workaround.
Signed-off-by: Kali Prasad <kprasadvnsi@protonmail.com>
---
board/sunxi/board.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 1a46100e40..9f0c6d99ba 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -293,6 +293,15 @@ int board_init(void)
}
}
+#if CONFIG_MACH_SUN50I_H616
+ /*
+ * The bit[16] of register reg[0x03000000] must be zero for the THS
+ * driver to work properly in the kernel. The BSP u-boot is putting
+ * the whole register to zero so we are doing the same.
+ */
+ writel(0x0, SUNXI_SRAMC_BASE);
+#endif
+
#if CONFIG_IS_ENABLED(DM_I2C)
/*
* Temporary workaround for enabling I2C clocks until proper sunxi DM
--
2.25.1