Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f103d0a5 authored by Shilpa Suresh's avatar Shilpa Suresh
Browse files

rtc: rtc-pm8xxx: add support for PM8916 RTC



Add support for the RTC peripheral found in PM8916 PMIC chips.

Change-Id: I9f0369569169a1f1c01afb91a8327c2ad9c062d9
Signed-off-by: default avatarShilpa Suresh <sbsure@codeaurora.org>
parent 05d7be5f
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2010-2011, 2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2010-2011, 2020-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/of.h>
@@ -470,6 +470,16 @@ static const struct pm8xxx_rtc_regs pmk8350_regs = {
	.alarm_en	= BIT(7),
};

static const struct pm8xxx_rtc_regs pm8916_regs = {
	.ctrl		= 0x6046,
	.write		= 0x6040,
	.read		= 0x6048,
	.alarm_rw	= 0x6140,
	.alarm_ctrl	= 0x6146,
	.alarm_ctrl2	= 0x6148,
	.alarm_en	= BIT(7),
};

/*
 * Hardcoded RTC bases until IORESOURCE_REG mapping is figured out
 */
@@ -479,6 +489,7 @@ static const struct of_device_id pm8xxx_id_table[] = {
	{ .compatible = "qcom,pm8058-rtc", .data = &pm8058_regs },
	{ .compatible = "qcom,pm8941-rtc", .data = &pm8941_regs },
	{ .compatible = "qcom,pmk8350-rtc", .data = &pmk8350_regs },
	{ .compatible = "qcom,pm8916-rtc", .data = &pm8916_regs },
	{ },
};
MODULE_DEVICE_TABLE(of, pm8xxx_id_table);