[PATCH v3 0/6] rtc: max77686: convert to i2c_new_ancillary_device

Svyatoslav Ryhel
2026-03-06T13:34:15Z

Convert RTC I2C device creation from devm_i2c_new_dummy_device() to
i2c_new_ancillary_device() to enable the use of a device tree-specified
RTC address instead of a hardcoded value. If the device tree does not
provide an address, use hardcoded values as a fallback.

This addresses an issue with the MAX77663 PMIC, which can have the RTC at
different I2C positions (either 0x48, like the MAX77714, or 0x68, like
the MAX77620). The MAX77620 value is used as the default. The I2C position
of the MAX77663 is factory-set and cannot be detected from the chip
itself.

I have tested this patch on LG Optimus Vu P895 with max77663 PMIC and
non-default RTC position. RTC is registered correctly.

---
Changes in v3
- max77620 files converted to DT schema.

Changes in v2
- dropped patch that changes max77686 and adjusted max77620 where max77663
is described.
---

Svyatoslav Ryhel (6):
regulator: dt-binding: regulator-max77620: convert to DT schema
dt-binding: pinctrl: pinctrl-max77620: convert to DT schema
dt-bindings: gpio: trivial-gpio: remove max77620 compatible
dt-bindings: mfd: max77620: convert to DT schema
dt-bindings: mfd: max77620: document optional RTC address for MAX77663
rtc: max77686: convert to i2c_new_ancillary_device

.../bindings/gpio/trivial-gpio.yaml | 2 -
.../devicetree/bindings/mfd/max77620.txt | 162 -------
.../bindings/mfd/maxim,max77620.yaml | 442 ++++++++++++++++++
.../pinctrl/maxim,max77620-pinctrl.yaml | 97 ++++
.../bindings/pinctrl/pinctrl-max77620.txt | 127 -----
.../regulator/maxim,max77620-regulator.yaml | 99 ++++
.../bindings/regulator/regulator-max77620.txt | 222 ---------
.../bindings/thermal/max77620_thermal.txt | 70 ---
drivers/rtc/rtc-max77686.c | 14 +-
9 files changed, 650 insertions(+), 585 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/mfd/max77620.txt
create mode 100644 Documentation/devicetree/bindings/mfd/maxim,max77620.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml
delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt
create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77620-regulator.yaml
delete mode 100644 Documentation/devicetree/bindings/regulator/regulator-max77620.txt
delete mode 100644 Documentation/devicetree/bindings/thermal/max77620_thermal.txt

--
2.51.0