rtc: max77686: convert to i2c_new_ancillary_device
v5 cover rtc: max77686: convert to i2c_new_ancillary_device
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 v5
- fixed pincontrol schema
- dropped applied patches
Changes in v4
- adjusted pinconfig node naming
- changed interrupt in the example
- fixed indentation in the example
- corrected pinconfig node name in the example
- commit "dt-bindings: gpio: trivial-gpio: remove max77620 compatible" squashed with the converting patch for this compatible
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 (2):
regulator: dt-bindings: regulator-max77620: convert to DT schema
dt-bindings: pinctrl: pinctrl-max77620: convert to DT schema
.../pinctrl/maxim,max77620-pinctrl.yaml | 98 ++++++++ .../bindings/pinctrl/pinctrl-max77620.txt | 127 ---------- .../regulator/maxim,max77620-regulator.yaml | 99 ++++++++ .../bindings/regulator/regulator-max77620.txt | 222 ------------------ 4 files changed, 197 insertions(+), 349 deletions(-) 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
Signature · 1 line
2.51.0
PATCH v5 1/2 regulator: dt-bindings: regulator-max77620: convert to DT schema
Convert regulator-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.
--- .../regulator/maxim,max77620-regulator.yaml | 99 ++++++++ .../bindings/regulator/regulator-max77620.txt | 222 ------------------ 2 files changed, 99 insertions(+), 222 deletions(-) create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77620-regulator.yaml delete mode 100644 Documentation/devicetree/bindings/regulator/regulator-max77620.txt
Documentation/devicetree/bindings/regulator/maxim,max77620-regulator.yaml new file +99 -0
@@ -0,0 +1,99 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/maxim,max77620-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Regulator for MAX77620 Power management IC from Maxim Semiconductor. + +maintainers: + - Svyatoslav Ryhel <[email protected]> + +description: + Device has multiple DCDC(sd[0-3]) and LDOs(ldo[0-8]). The input supply + of these regulators are defined under parent device node. Details of + regulator properties are defined as child node under sub-node "regulators" + which is child node of device node. + +patternProperties: + "^in-(sd[0-3]|ldo(0-1|2|3-5|4-6|7-8))-supply$": + $ref: /schemas/types.yaml#/definitions/phandle + description: Input supply for DCDC or LDO + + "^(sd[0-3]|ldo[0-8])$": + type: object + $ref: /schemas/regulator/regulator.yaml# + unevaluatedProperties: false + + properties: + maxim,active-fps-source: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + FPS source for the GPIOs to get enabled/disabled when system is in + active state. Valid values are: + - MAX77620_FPS_SRC_0: FPS source is FPS0. + - MAX77620_FPS_SRC_1: FPS source is FPS1 + - MAX77620_FPS_SRC_2: FPS source is FPS2 + - MAX77620_FPS_SRC_NONE: GPIO is not controlled by FPS events and + it gets enabled/disabled by register access. + Absence of this property will leave the FPS configuration register + for that GPIO to default configuration. + + maxim,active-fps-power-up-slot: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Sequencing event slot number on which the GPIO get enabled when + master FPS input event set to HIGH. This is applicable if FPS source + is selected as FPS0, FPS1 or FPS2. + enum: [0, 1, 2, 3, 4, 5, 6, 7] + + maxim,active-fps-power-down-slot: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Sequencing event slot number on which the GPIO get disabled when + master FPS input event set to LOW. This is applicable if FPS source + is selected as FPS0, FPS1 or FPS2. + enum: [0, 1, 2, 3, 4, 5, 6, 7] + + maxim,suspend-fps-source: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This is same as property "maxim,active-fps-source" but value get + configured when system enters in to suspend state. + + maxim,suspend-fps-power-up-slot: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This is same as property "maxim,active-fps-power-up-slot" but this + value get configured into FPS configuration register when system + enters into suspend. This is applicable if suspend state FPS source + is selected as FPS0, FPS1 or FPS2. + enum: [0, 1, 2, 3, 4, 5, 6, 7] + + maxim,suspend-fps-power-down-slot: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This is same as property "maxim,active-fps-power-down-slot" but this + value get configured into FPS configuration register when system + enters into suspend. This is applicable if suspend state FPS source + is selected as FPS0, FPS1 or FPS2. + enum: [0, 1, 2, 3, 4, 5, 6, 7] + + maxim,ramp-rate-setting: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Ramp rate(uV/us) setting to be configured to the device. The platform + may have different ramp rate than advertised ramp rate if it has design + variation from Maxim's recommended. On this case, platform specific + ramp rate is used for ramp time calculation and this property is used + for device register configurations. The measured ramp rate of platform + is provided by the regulator-ramp-delay. + + Maxim Max77620 supports following ramp delay: + SD: 13.75mV/us, 27.5mV/us, 55mV/us + LDOs: 5mV/us, 100mV/us + enum: [5000, 13750, 27500, 55000, 100000] + +additionalProperties: false + +# see maxim,max77620.yaml for an example
Documentation/devicetree/bindings/regulator/regulator-max77620.txt deleted +0 -222
222 lines not on this page · raw message
Signature · 1 line
2.51.0
PATCH v5 2/2 dt-bindings: pinctrl: pinctrl-max77620: convert to DT schema
In reply to Svyatoslav RyhelConvert pinctrl-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.
--- .../pinctrl/maxim,max77620-pinctrl.yaml | 98 ++++++++++++++ .../bindings/pinctrl/pinctrl-max77620.txt | 127 ------------------ 2 files changed, 98 insertions(+), 127 deletions(-) create mode 100644 Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +98 -0
@@ -0,0 +1,98 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/maxim,max77620-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Pinmux controller function for Maxim MAX77620 Power management IC + +maintainers: + - Svyatoslav Ryhel <[email protected]> + +description: + Device has 8 GPIO pins which can be configured as GPIO as well as the + special IO functions. + +allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml + - $ref: /schemas/pinctrl/pinmux-node.yaml + +patternProperties: + "^(pin|gpio).": + type: object + additionalProperties: false + + properties: + pins: + items: + enum: [ gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7 ] + + function: + items: + enum: [ gpio, lpm-control-in, fps-out, 32k-out1, sd0-dvs-in, sd1-dvs-in, + reference-out ] + + drive-push-pull: true + drive-open-drain: true + bias-pull-up: true + bias-pull-down: true + + maxim,active-fps-source: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + FPS source for the GPIOs to get enabled/disabled when system is in + active state. Valid values are: + - MAX77620_FPS_SRC_0: FPS source is FPS0. + - MAX77620_FPS_SRC_1: FPS source is FPS1 + - MAX77620_FPS_SRC_2: FPS source is FPS2 + - MAX77620_FPS_SRC_NONE: GPIO is not controlled by FPS events and + it gets enabled/disabled by register access. + Absence of this property will leave the FPS configuration register + for that GPIO to default configuration. + + maxim,active-fps-power-up-slot: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Sequencing event slot number on which the GPIO get enabled when + master FPS input event set to HIGH. This is applicable if FPS source + is selected as FPS0, FPS1 or FPS2. + enum: [0, 1, 2, 3, 4, 5, 6, 7] + + maxim,active-fps-power-down-slot: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Sequencing event slot number on which the GPIO get disabled when + master FPS input event set to LOW. This is applicable if FPS source + is selected as FPS0, FPS1 or FPS2. + enum: [0, 1, 2, 3, 4, 5, 6, 7] + + maxim,suspend-fps-source: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This is same as property "maxim,active-fps-source" but value get + configured when system enters in to suspend state. + + maxim,suspend-fps-power-up-slot: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This is same as property "maxim,active-fps-power-up-slot" but this + value get configured into FPS configuration register when system + enters into suspend. This is applicable if suspend state FPS source + is selected as FPS0, FPS1 or FPS2. + enum: [0, 1, 2, 3, 4, 5, 6, 7] + + maxim,suspend-fps-power-down-slot: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This is same as property "maxim,active-fps-power-down-slot" but this + value get configured into FPS configuration register when system + enters into suspend. This is applicable if suspend state FPS source + is selected as FPS0, FPS1 or FPS2. + enum: [0, 1, 2, 3, 4, 5, 6, 7] + + required: + - pins + +additionalProperties: false + +# see maxim,max77620.yaml for an example
Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt deleted +0 -127
127 lines not on this page · raw message
Signature · 1 line
2.51.0
Linus Walleij
maintainerRe: [PATCH v5 2/2] dt-bindings: pinctrl: pinctrl-max77620: convert to DT schema
Quoted 5 lines · Svyatoslav Ryhel
Convert pinctrl-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.
Signed-off-by Svyatoslav Ryhel <[email protected]>
LGTM but waiting for DT maintainers to look at it before merging.
Can I merge this one patch separately to the pinctrl tree?
Yours,
Linus Walleij
Re: [PATCH v5 2/2] dt-bindings: pinctrl: pinctrl-max77620: convert to DT schema
вт, 7 квіт. 2026 р. о 12:59 Linus Walleij <[email protected]> пише:
Quoted 7 lines · Svyatoslav Ryhel
Quoted 5 lines
Convert pinctrl-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.
Quoted 6 lines
Quoted 1 line
Signed-off-by Svyatoslav Ryhel <[email protected]>LGTM but waiting for DT maintainers to look at it before merging.
Can I merge this one patch separately to the pinctrl tree?
Yes, if DT maintainers find this patch acceptable, it should be merged into pinctrl tree since all remaining patches of the original patchset were already picked and applied.
Quoted 2 lines
Yours,
Linus Walleij
Re: [PATCH v5 2/2] dt-bindings: pinctrl: pinctrl-max77620: convert to DT schema
In reply to Svyatoslav RyhelQuoted 5 lines · Svyatoslav Ryhel
Convert pinctrl-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.
Quoted 7 lines
Signed-off-by Svyatoslav Ryhel <[email protected]>--- .../pinctrl/maxim,max77620-pinctrl.yaml | 98 ++++++++++++++ .../bindings/pinctrl/pinctrl-max77620.txt | 127 ------------------ 2 files changed, 98 insertions(+), 127 deletions(-) create mode 100644 Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt
This needs to go into 7.1 as the MFD part was already applied.
Linus Walleij
maintainerRe: [PATCH v5 2/2] dt-bindings: pinctrl: pinctrl-max77620: convert to DT schema
In reply to Svyatoslav RyhelQuoted 5 lines · Svyatoslav Ryhel
Convert pinctrl-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.
Signed-off-by Svyatoslav Ryhel <[email protected]>
Patch applied to the pinctrl tree for v7.1 in accordance with Rob's instructions.
Yours,
Linus Walleij
Mark Brown
maintainerRe: (subset) [PATCH v5 0/2] rtc: max77686: convert to i2c_new_ancillary_device
In reply to Svyatoslav RyhelQuoted 8 lines · Svyatoslav Ryhel
rtc: max77686: convert to
i2c_new_ancillary_deviceConvert RTC I2C device creation from
devm_i2c_new_dummy_device()toi2c_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.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-7.1
Thanks!
[1/2] regulator: dt-bindings: regulator-max77620: convert to DT schema
https://git.kernel.org/broonie/regulator/c/881dd6b2ff82
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark