build/patch/kernel/archive/sunxi-6.4/patches.megous/power-rk818-Configure-rk808-clkout2-function.patch

45 lines
1.4 KiB
Diff

From ca35e6a887add3df91d22a3e5b788c0c1cc65c3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= <ayufan@ayufan.eu>
Date: Mon, 4 Jan 2021 17:57:49 +0100
Subject: [PATCH 329/469] power: rk818: Configure `rk808-clkout2` function
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
???
Signed-of-by: Kamil Trzciński <ayufan@ayufan.eu>
---
drivers/mfd/rk8xx-core.c | 1 +
include/linux/mfd/rk808.h | 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c
index e8fc9e2ab1d0..e7450100cc25 100644
--- a/drivers/mfd/rk8xx-core.c
+++ b/drivers/mfd/rk8xx-core.c
@@ -258,6 +258,7 @@ static const struct rk808_reg_data rk818_pre_init_reg[] = {
{ RK818_H5V_EN_REG, BIT(0), RK818_H5V_EN },
{ RK808_VB_MON_REG, MASK_ALL, VB_LO_ACT |
VB_LO_SEL_3500MV },
+ { RK808_CLK32OUT_REG, CLK32KOUT2_FUNC_MASK, CLK32KOUT2_FUNC },
};
static const struct regmap_irq rk805_irqs[] = {
diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h
index 78e167a92483..4a44e8744331 100644
--- a/include/linux/mfd/rk808.h
+++ b/include/linux/mfd/rk808.h
@@ -790,6 +790,8 @@ enum rk806_dvs_mode {
#define VOUT_LO_INT BIT(0)
#define CLK32KOUT2_EN BIT(0)
+#define CLK32KOUT2_FUNC (0 << 1)
+#define CLK32KOUT2_FUNC_MASK BIT(1)
#define TEMP115C 0x0c
#define TEMP_HOTDIE_MSK 0x0c
--
2.34.1