From nobody Mon Dec 1 22:37:31 2025 Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF34E32E126 for ; Thu, 27 Nov 2025 11:20:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764242426; cv=none; b=aflKFCXwEUcO3z+Lt7enl4vk+9MBhqUG4vvCDYxafR8piOhTCvUyzLCVgx06DFnaKWuBRe1AMDXcuaROFgMNca7PFsQySmUF08uCQBZxACkk1dZiB7SRq0TrOtS9fJsSHRkngH+hPNXLgZUEb+hULByvbm5cWyhq7kQ/94RYTtQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764242426; c=relaxed/simple; bh=/bhEhgIZ10odWQhd7BEnNlQipHa+7r4+ki37G3/Ti6M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eu301aBg3r5iBubw1x7iUun0GYAzmXupZb8ayBwe9raky5Z8VjoSiI7KV/g9pVdarRYpQyT3x4NoI03zsA4lBa/dAbXTWvYjehCeOxrnpY7LAzzRL9OB0qBZ94tzmQ3GPwjrB3lYZ5hU5ppl/8W9xTznP1rw2tjFnToiJNpEm/I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=T4F1gjY8; arc=none smtp.client-ip=91.218.175.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="T4F1gjY8" Date: Thu, 27 Nov 2025 13:20:14 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1764242421; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=cBBbP/+7yhtEcgih7HLUWEZl3U2Lrtk/1kjXQYWg4Ws=; b=T4F1gjY8/G3QydudJRDw4+19dDT2r/T4JGoxJJR7BHrb3c8IVLND4MQjvxWA0osBUZJVCL WFJdNs/KQBJiB035sU5tH/oKV3EGpEBhNTNNEqtyya8QOE55utHPfV9zIgcaSDx0yXrOlN xc+rFW15nfa8AznDOPPxOi40Y4oMEcQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Lee Jones , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel , Liam Girdwood , Mark Brown , Michael Turquette , Stephen Boyd , Matti Vaittinen , Linus Walleij , Bartosz Golaszewski , Alexandre Belloni , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org, Andreas Kemnade Subject: [PATCH v6 14/17] rtc: bd70528: Support BD72720 rtc Message-ID: <8b4667653bbf1a43b26558c4bb30f9f91553383d.1764241265.git.mazziesaccount@gmail.com> Reply-To: Matti Vaittinen References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YHHhklG1ZR/Iw4o1" Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT --YHHhklG1ZR/Iw4o1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Matti Vaittinen The BD72720 has similar RTC block as a few other ROHM PMICs. Add support for BD72720 RTC. Signed-off-by: Matti Vaittinen Acked-by: Alexandre Belloni --- Revision history: RFCv1 =3D>: - No changes --- drivers/rtc/Kconfig | 3 ++- drivers/rtc/rtc-bd70528.c | 21 ++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 2933c41c77c8..418f6c28847a 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -561,7 +561,8 @@ config RTC_DRV_BD70528 depends on MFD_ROHM_BD71828 help If you say Y here you will get support for the RTC - block on ROHM BD71815 and BD71828 Power Management IC. + block on ROHM BD71815, BD71828 and BD72720 Power + Management ICs. =20 This driver can also be built as a module. If so, the module will be called rtc-bd70528. diff --git a/drivers/rtc/rtc-bd70528.c b/drivers/rtc/rtc-bd70528.c index 954ac4ef53e8..4c8599761b2e 100644 --- a/drivers/rtc/rtc-bd70528.c +++ b/drivers/rtc/rtc-bd70528.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -262,13 +263,13 @@ static int bd70528_probe(struct platform_device *pdev) =20 /* * See also BD718XX_ALM_EN_OFFSET: - * This works for BD71828 and BD71815 as they have same offset - * between ALM0 start and ALM0_MASK. If new ICs are to be - * added this requires proper check as ALM0_MASK is not located - * at the end of ALM0 block - but after all ALM blocks so if - * amount of ALMs differ the offset to enable/disable is likely - * to be incorrect and enable/disable must be given as own - * reg address here. + * This works for BD71828, BD71815, and BD72720 as they all + * have same offset between the ALM0 start and the ALM0_MASK. + * If new ICs are to be added this requires proper check as + * the ALM0_MASK is not located at the end of ALM0 block - + * but after all ALM blocks. If amount of ALMs differ, the + * offset to enable/disable is likely to be incorrect and + * enable/disable must be given as own reg address here. */ bd_rtc->bd718xx_alm_block_start =3D BD71815_REG_RTC_ALM_START; hour_reg =3D BD71815_REG_HOUR; @@ -278,6 +279,11 @@ static int bd70528_probe(struct platform_device *pdev) bd_rtc->bd718xx_alm_block_start =3D BD71828_REG_RTC_ALM_START; hour_reg =3D BD71828_REG_RTC_HOUR; break; + case ROHM_CHIP_TYPE_BD72720: + bd_rtc->reg_time_start =3D BD72720_REG_RTC_START; + bd_rtc->bd718xx_alm_block_start =3D BD72720_REG_RTC_ALM_START; + hour_reg =3D BD72720_REG_RTC_HOUR; + break; default: dev_err(&pdev->dev, "Unknown chip\n"); return -ENOENT; @@ -337,6 +343,7 @@ static int bd70528_probe(struct platform_device *pdev) static const struct platform_device_id bd718x7_rtc_id[] =3D { { "bd71828-rtc", ROHM_CHIP_TYPE_BD71828 }, { "bd71815-rtc", ROHM_CHIP_TYPE_BD71815 }, + { "bd72720-rtc", ROHM_CHIP_TYPE_BD72720 }, { }, }; MODULE_DEVICE_TABLE(platform, bd718x7_rtc_id); --=20 2.52.0 --YHHhklG1ZR/Iw4o1 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmkoM+4ACgkQeFA3/03a ocVfPAf+PgiuFctKNodm6LJKfVvf+dl5UI4tjP98U5tIquKkz8FBUVFsKvbderGx on+lPYkXct909/oWA4neV0NFXan1RqC4KoH+Mi2b5viwdhE4lMEfmnuDaYO62Wn8 OG1aGnH5129eNFN3wQ185zVnH/DmuHNnY2YWRSR/ji5mNbU6SE0bP7KThIz1dw1/ Yoakv/sgVftnWmywgPgor+Y2IcFeqGMD4nlfR2zQipVAUKBylEja8bAubYHAH7UB r/ttNYRbM12nLhtIWwRe8BQrwUvmFst4ICgVErGP10mhr7BUb75NeE1gzPhzyORi POJX9xXY5EQfz94mU5jqnev2NRnv3g== =tQeG -----END PGP SIGNATURE----- --YHHhklG1ZR/Iw4o1--