[PATCH v3 0/5] Add Renesas PMIC RAA215300 and built-in RTC support
From: Biju Das
Date: Sat May 13 2023 - 12:52:42 EST
This patch series aims to add support for Renesas PMIC RAA215300 and
built-in RTC found on this PMIC device.
The details of PMIC can be found here.
Renesas PMIC RAA215300 exposes two separate i2c devices, one for the main
device and another for rtc device.
Enhance i2c_new_ancillary_device() to instantiate a real device.
(eg: Instantiate rtc device from PMIC driver)
The built-in RTC found on PMIC RAA215300 is the same as ISL1208.
However, the external oscillator bit is inverted on PMIC version
0x11. The PMIC driver detects PMIC version and instantiate appropriate
* Enhanced i2c_new_ancillary_device() to instantiate a real ancillary_device().
* RTC device is instantiated by PMIC driver and dropped isl1208_probe_helper().
* Added "TYPE_RAA215300_RTC_A0" to handle inverted oscillator bit case.
* Added more detailed description for renesas,rtc-enabled property.
* Added support for handling "renesas,rtc-enabled" property.
* Based on PMIC version, it instantiates rtc device by calling i2c_new_
* Updated the logs.
* Dropped the cross-links from bindings and used a single compatible
with separate i2c addresses for pmic main and rtc device.
* Dropped patch#4 and split patch#3 from this series and send as
separate patch to ML .
* Added RTC platform driver and mfd cell entry to the PMIC driver.RTC
platform driver creates rtc device by using i2c_new_ancillary_device()
and register the rtc device by calling the helper function provided
by rtc-isl2108 driver.
* Updated reg property in bindings.
* Added optional reg-names, interrupts and renesas,rtc-enabled
* Fixed the node name in the binding example
* Dropped the cross link property renesas,raa215300-rtc.
* Updated the binding example
* Dropped MODULE_SOFTDEP from the driver as it is added in RTC platform
* Dropped compatible "renesas,raa215300-isl1208" and "renesas,raa215300-pmic" property.
* Updated the comment polarity->bit for External Oscillator.
* Added raa215300_rtc_probe_helper() for registering raa215300_rtc device and
added the helper function isl1208_probe_helper() to share the code.
* Updated pmic device node on the SoM dtsi based on the bindings.
[ 15.447305] rtc-isl1208 3-006f: registered as rtc0
[ 15.479493] rtc-isl1208 3-006f: setting system clock to 2023-04-27T19:31:02 UTC (1682623862)
root@smarc-rzv2l:~# hwclock -r
root@smarc-rzv2l:~# hwclock -r
Biju Das (5):
i2c: Enhance i2c_new_ancillary_device API
rtc: isl1208: Add support for the built-in RTC on the PMIC RAA215300
dt-bindings: mfd: Add Renesas RAA215300 PMIC bindings
mfd: Add Renesas PMIC RAA215300 driver
arm64: dts: renesas: rzg2l-smarc-som: Enable PMIC and built-in RTC
.../bindings/mfd/renesas,raa215300.yaml | 70 ++++++++++++
.../boot/dts/renesas/rzg2l-smarc-som.dtsi | 10 ++
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 +-
drivers/i2c/i2c-core-base.c | 38 +++++--
drivers/media/i2c/adv748x/adv748x-core.c | 2 +-
drivers/media/i2c/adv7604.c | 3 +-
drivers/mfd/Kconfig | 7 ++
drivers/mfd/Makefile | 2 +
drivers/mfd/raa215300.c | 102 ++++++++++++++++++
drivers/rtc/rtc-isl1208.c | 21 ++++
include/linux/i2c.h | 3 +-
11 files changed, 251 insertions(+), 13 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mfd/renesas,raa215300.yaml
create mode 100644 drivers/mfd/raa215300.c