From 52f9f8cfcc67162d2a7d571a4c5cfefd1f6b9c2e Mon Sep 17 00:00:00 2001 From: David Collins Date: Tue, 3 Dec 2019 17:48:37 -0800 Subject: [PATCH] rtc: rtc-pm8xxx: add support for PMK8350 RTC Add support for the RTC peripheral found in PMK8350 PMIC chips. Change-Id: Id4b93ae8017a174f577496078ed8ab8d73eabff8 Signed-off-by: David Collins --- drivers/rtc/rtc-pm8xxx.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index f5a30e0f16c2..bbe013f39250 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only -/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. - */ +/* Copyright (c) 2010-2011, 2019, The Linux Foundation. All rights reserved. */ + #include #include #include @@ -432,6 +432,16 @@ static const struct pm8xxx_rtc_regs pm8941_regs = { .alarm_en = BIT(7), }; +static const struct pm8xxx_rtc_regs pmk8350_regs = { + .ctrl = 0x6146, + .write = 0x6140, + .read = 0x6148, + .alarm_rw = 0x6240, + .alarm_ctrl = 0x6246, + .alarm_ctrl2 = 0x6248, + .alarm_en = BIT(7), +}; + /* * Hardcoded RTC bases until IORESOURCE_REG mapping is figured out */ @@ -440,6 +450,7 @@ static const struct of_device_id pm8xxx_id_table[] = { { .compatible = "qcom,pm8018-rtc", .data = &pm8921_regs }, { .compatible = "qcom,pm8058-rtc", .data = &pm8058_regs }, { .compatible = "qcom,pm8941-rtc", .data = &pm8941_regs }, + { .compatible = "qcom,pmk8350-rtc", .data = &pmk8350_regs }, { }, }; MODULE_DEVICE_TABLE(of, pm8xxx_id_table);