From nobody Tue Dec 2 02:30:30 2025 Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 77C9530C636 for ; Thu, 20 Nov 2025 08:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763627058; cv=none; b=A2Lmd8BaMHFGnF2lM0Oily03Gd8POyIrnuKkvfDhLFmFPZc2rNb0nNLJ/H/KrSNOQZSnrib9mg53L10ZRX5Ke/fAzzSDjkSgB4rk5asdO474NVYhLSemVyhO22s8CvAlW1woSA2yf2aYi8wAvcn3nBu6FB/zJLju3aByHfj14Ys= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763627058; c=relaxed/simple; bh=TtvbEBM5SeTIhU/oBgjyS55e+VSzQCcTaiDltE2CMsc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Tp5ht4cvdHaX747VfmvIoNXYNdBm37t7+4LuQ73ifOpRSdfWThKXyPmAdhPCGDzLnnlQpgV0fA8t2ZA6q+27UAM6VNxeSLX19ocWMKcOdpJHkRA6gZXJhISbzc1k4kpX8yGVo8TqwAuyjcIZVVzFPchL4bWMlqAy0Fw6oXCAPzI= 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=D+0missA; arc=none smtp.client-ip=95.215.58.177 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="D+0missA" Date: Thu, 20 Nov 2025 10:23:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1763627044; 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=R2GoME2YglBUKXsec+LPualjD6Xoa60ec1LAa7795v8=; b=D+0missAfoHmoYvU/hHG2IsCVsp+0ws3W+8bE+tkvMZr++ROHGKNssoIzNOhWfjq1s19lg fBqCC4QQ/jShdizS43Ksu2RrQ8p40q9cSsfQv9/QnPtH58mlrgw7AQZx+DgsdGqEV4toq3 gU7GeOvDb1nmRd4Bo+nKT0wjKjvoEyI= 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 v5 13/16] rtc: bd70528: Support BD72720 rtc Message-ID: <5efa8978c534da82982edcdee54567162ef631d9.1763625920.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="6kQ9SY8qQduBgrB4" Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT --6kQ9SY8qQduBgrB4 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.51.1 --6kQ9SY8qQduBgrB4 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmke0BwACgkQeFA3/03a ocWIKgf+NPYF2kWQK0yQyhEEUen19ywlUV8oE9lTJmq/pT32tERDwWiYGUtu5L8s Gs9NHbQ0CzrHcGLGlS3CUWFDPYj07l0jXvbdRj+wPbz8eI5U7rnk5ibb7hrmkzyu lui8IEJkthkcqCnI0MU8IbPnMfkg0+8zAiWz6PsFRtruQ5RpFGpIxiDKFW6qofYc snL1VuhbwGb3dl4nIXAF2XhfO9iLIq41nKEyU+2Ik9nS+RZ0B/HDyMpkL1V8s3gR 8/3lFCXw6HJMIlCdUvkl0V9wvCO5kcFW4rCUorano+oz4iUGBUVFNfmPeFblxuj/ DExkWBmhaeGPfZhMkWKOKKWJMWA5Sw== =dOV5 -----END PGP SIGNATURE----- --6kQ9SY8qQduBgrB4--