MAX77675 regulator driver: Add support for MAX77675 device
Subsystems (2)
v3 cover MAX77675 regulator driver: Add support for MAX77675 device
From: Joan Na <[email protected]>
MAX77675 regulator driver and device tree bindings
Joan Na (3):
dt-bindings: regulator: Add MAX77675 binding header
regulator: max77675: Add MAX77675 regulator driver
dt-bindings: regulator: Add MAX77675 regulator binding
.../bindings/regulator/maxim,max77675.yaml | 205 +++++ drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/max77675-regulator.c | 868 ++++++++++++++++++ drivers/regulator/max77675-regulator.h | 220 +++++ .../regulator/maxim,max77675-regulator.h | 52 ++ 6 files changed, 1355 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77675.yaml create mode 100644 drivers/regulator/max77675-regulator.c create mode 100644 drivers/regulator/max77675-regulator.h create mode 100644 include/dt-bindings/regulator/maxim,max77675-regulator.h
base-commit: bf40f4b87761e2ec16efc8e49b9ca0d81f4115d8 --
2.34.1
PATCH v3 1/3 dt-bindings: regulator: Add MAX77675 binding header
From: Joan Na <[email protected]>
Add binding header for the MAX77675 PMIC regulator. This header defines voltage ID and regulator index macros used both in device tree sources and in the driver implementation.
Fixes:
- Removed unused macros
- Renamed macros for clarity
--- .../regulator/maxim,max77675-regulator.h | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 include/dt-bindings/regulator/maxim,max77675-regulator.h
include/dt-bindings/regulator/maxim,max77675-regulator.h new file +52 -0
@@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD 2-Clause */ +/* +* This header provides macros for MAXIM MAX77675 device bindings. +* +* Copyright (c) 2025, Analog Device inc. +* Author: Joan Na <[email protected]> +*/ + +#ifndef _DT_BINDINGS_REGULATOR_MAX77675_ +#define _DT_BINDINGS_REGULATOR_MAX77675_ + +/* FPS source */ +#define MAX77675_FPS_SLOT_0 0x0 +#define MAX77675_FPS_SLOT_1 0x1 +#define MAX77675_FPS_SLOT_2 0x2 +#define MAX77675_FPS_SLOT_3 0x3 +#define MAX77675_FPS_DEF 0x4 + +/* nEN Manual Reset Time Configuration (MRT) */ +#define MAX77675_MRT_4S 0x0 +#define MAX77675_MRT_8S 0x1 +#define MAX77675_MRT_12S 0x2 +#define MAX77675_MRT_16S 0x3 + +/* nEN Mode Configuration */ +#define MAX77675_EN_PUSH_BUTTON 0x0 +#define MAX77675_EN_SLIDE_SWITCH 0x1 +#define MAX77675_EN_LOGIC 0x2 + +/* Debounce Timer Enable (DBEN_nEN) */ +#define MAX77675_DBEN_100US 0x0 +#define MAX77675_DBEN_30000US 0x1 + +/* Rising slew rate control for SBB0 when ramping up */ +#define MAX77675_SR_2MV_PER_US 0x0 // 2 mV/us +#define MAX77675_SR_USE_DVS 0x1 // Use DVS slew rate setting (maxim,dvs-slew-rate) + +/* Dynamic Voltage Scaling (DVS) Slew Rate */ +#define MAX77675_DVS_SLEW_5MV_PER_US 0x0 // 5 mV/us +#define MAX77675_DVS_SLEW_10MV_PER_US 0x1 // 10 mV/us + +/* Latency Mode */ +#define MAX77675_HIGH_LATENCY_MODE 0x0 // High latency, low quiescent current (~100us) +#define MAX77675_LOW_LATENCY_MODE 0x1 // Low latency, high quiescent current (~10us) + +/* SIMO Buck-Boost Drive Strength (All Channels) */ +#define MAX77675_DRV_SBB_STRENGTH_MAX 0x0 // Maximum drive strength (~0.6 ns transition time) +#define MAX77675_DRV_SBB_STRENGTH_HIGH 0x1 // High drive strength (~1.2 ns transition time) +#define MAX77675_DRV_SBB_STRENGTH_LOW 0x2 // Low drive strength (~1.8 ns transition time) +#define MAX77675_DRV_SBB_STRENGTH_MIN 0x3 // Minimum drive strength (~8 ns transition time) + +#endif
--
2.34.1
Re: [PATCH v3 1/3] dt-bindings: regulator: Add MAX77675 binding header
Quoted 9 lines · Joan-Na-adi
From: Joan Na <[email protected]>
Add binding header for the MAX77675 PMIC regulator. This header defines voltage ID and regulator index macros used both in device tree sources and in the driver implementation.
Fixes:
- Removed unused macros
- Renamed macros for clarity
This makes no sense. Fixes what? There are no macros before.
Please read submitting patches how to write proper changelogs.
Quoted 26 lines
Signed-off-by Joan Na <[email protected]>--- .../regulator/maxim,max77675-regulator.h | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 include/dt-bindings/regulator/maxim,max77675-regulator.hinclude/dt-bindings/regulator/maxim,max77675-regulator.h new file +13
-0@@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD 2-Clause */ +/* +* This header provides macros for MAXIM MAX77675 device bindings. +* +* Copyright (c) 2025, Analog Device inc. +* Author: Joan Na <[email protected]> +*/ + +#ifndef _DT_BINDINGS_REGULATOR_MAX77675_ +#define _DT_BINDINGS_REGULATOR_MAX77675_ + +/* FPS source */ +#define MAX77675_FPS_SLOT_0 0x0
include/dt-bindings/regulator/maxim,max77675-regulator.h line 23
Quoted 10 lines
include/dt-bindings/regulator/maxim,max77675-regulator.h new file +10
-0+#define MAX77675_FPS_SLOT_1 0x1 +#define MAX77675_FPS_SLOT_2 0x2 +#define MAX77675_FPS_SLOT_3 0x3 +#define MAX77675_FPS_DEF 0x4 + +/* nEN Manual Reset Time Configuration (MRT) */ +#define MAX77675_MRT_4S 0x0 +#define MAX77675_MRT_8S 0x1 +#define MAX77675_MRT_12S 0x2 +#define MAX77675_MRT_16S 0x3
None of these are bindings.
include/dt-bindings/regulator/maxim,max77675-regulator.h line 28
Quoted 5 lines
include/dt-bindings/regulator/maxim,max77675-regulator.h new file +5
-0+ +/* nEN Mode Configuration */ +#define MAX77675_EN_PUSH_BUTTON 0x0 +#define MAX77675_EN_SLIDE_SWITCH 0x1 +#define MAX77675_EN_LOGIC 0x2
Neither these.
Quoted 13 lines
include/dt-bindings/regulator/maxim,max77675-regulator.h new file +13
-0+ +/* Debounce Timer Enable (DBEN_nEN) */ +#define MAX77675_DBEN_100US 0x0 +#define MAX77675_DBEN_30000US 0x1 + +/* Rising slew rate control for SBB0 when ramping up */ +#define MAX77675_SR_2MV_PER_US 0x0 // 2 mV/us +#define MAX77675_SR_USE_DVS 0x1 // Use DVS slew rate setting (maxim,dvs-slew-rate) + +/* Dynamic Voltage Scaling (DVS) Slew Rate */ +#define MAX77675_DVS_SLEW_5MV_PER_US 0x0 // 5 mV/us +#define MAX77675_DVS_SLEW_10MV_PER_US 0x1 // 10 mV/us +
include/dt-bindings/regulator/maxim,max77675-regulator.h line 51
Quoted 10 lines
include/dt-bindings/regulator/maxim,max77675-regulator.h new file +10
-0+/* Latency Mode */ +#define MAX77675_HIGH_LATENCY_MODE 0x0 // High latency, low quiescent current (~100us) +#define MAX77675_LOW_LATENCY_MODE 0x1 // Low latency, high quiescent current (~10us) + +/* SIMO Buck-Boost Drive Strength (All Channels) */ +#define MAX77675_DRV_SBB_STRENGTH_MAX 0x0 // Maximum drive strength (~0.6 ns transition time) +#define MAX77675_DRV_SBB_STRENGTH_HIGH 0x1 // High drive strength (~1.2 ns transition time) +#define MAX77675_DRV_SBB_STRENGTH_LOW 0x2 // Low drive strength (~1.8 ns transition time) +#define MAX77675_DRV_SBB_STRENGTH_MIN 0x3 // Minimum drive strength (~8 ns transition time) +
Drop entire header. Not a binding. Otherwise explain me which ABI are you binding?
Best regards,
Krzysztof
Re: [PATCH v3 1/3] dt-bindings: regulator: Add MAX77675 binding header
In reply to Joan-Na-adiinclude/dt-bindings/regulator/maxim,max77675-regulator.h line 1
Quoted 7 lines · Joan-Na-adi
include/dt-bindings/regulator/maxim,max77675-regulator.h new file +1
-0@@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD 2-Clause */
Wrong text, it looks, please run checkpatch.
Best regards,
Krzysztof
PATCH v3 2/3 regulator: max77675: Add MAX77675 regulator driver
In reply to Joan-Na-adiFrom: Joan Na <[email protected]>
This patch adds support for the Maxim Integrated MAX77675 PMIC regulator.
The MAX77675 is a compact, highly efficient SIMO (Single Inductor Multiple Output) power management IC that provides four programmable buck-boost switching regulators with only one inductor. It supports up to 700mA total output current and operates from a single-cell Li-ion battery.
An integrated power-up sequencer and I2C interface allow flexible startup configuration and runtime control.
Fixes:
- Removed unused variable 'value'
- Removed duplicate .list_voltage initializer
- Wrapped of_match_table with of_match_ptr() to fix build failure when CONFIG_OF is not set
- Updated driver code to match new DT binding schema
- Changed regmap_config from REGCACHE_NONE to REGCACHE_MAPLE for improved performance
- Added volatile_reg() to mark status registers as non-cacheable
--- drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/max77675-regulator.c | 868 +++++++++++++++++++++++++ drivers/regulator/max77675-regulator.h | 220 +++++++ 4 files changed, 1098 insertions(+) create mode 100644 drivers/regulator/max77675-regulator.c create mode 100644 drivers/regulator/max77675-regulator.h
drivers/regulator/Kconfig +9 -0
@@ -641,6 +641,15 @@ config REGULATOR_MAX77650 Semiconductor. This device has a SIMO with three independent power rails and an LDO. +config REGULATOR_MAX77675 + tristate "Maxim MAX77675 regulator driver" + depends on I2C + select REGMAP_I2C + help + This driver controls the Maxim MAX77675 power regulator via I2C. + It supports four programmable buck-boost outputs. + Say Y here to enable the regulator driver + config REGULATOR_MAX77857 tristate "ADI MAX77857/MAX77831 regulator support" depends on I2C
drivers/regulator/Makefile +1 -0
@@ -77,6 +77,7 @@ obj-$(CONFIG_REGULATOR_MAX77503) += max77503-regulator.o obj-$(CONFIG_REGULATOR_MAX77541) += max77541-regulator.o obj-$(CONFIG_REGULATOR_MAX77620) += max77620-regulator.o obj-$(CONFIG_REGULATOR_MAX77650) += max77650-regulator.o +obj-$(CONFIG_REGULATOR_MAX77675) += max77675-regulator.o obj-$(CONFIG_REGULATOR_MAX8649) += max8649.o obj-$(CONFIG_REGULATOR_MAX8660) += max8660.o obj-$(CONFIG_REGULATOR_MAX8893) += max8893.o
drivers/regulator/max77675-regulator.c new file +868 -0
868 lines not on this page · raw message
drivers/regulator/max77675-regulator.h new file +220 -0
220 lines not on this page · raw message
--
2.34.1
Re: [PATCH v3 2/3] regulator: max77675: Add MAX77675 regulator driver
Quoted 3 lines · Joan-Na-adi
From: Joan Na <[email protected]>
This patch adds support for the Maxim Integrated MAX77675 PMIC regulator.
Please do not use "This commit/patch/change", but imperative mood. See longer explanation here:
https://elixir.bootlin.com/linux/v6.16/source/Documentation/process/submitting-patches.rst#L94
...
drivers/regulator/max77675-regulator.c line 801
Quoted 5 lines
drivers/regulator/max77675-regulator.c new file +5
-0+ config.dev = &client->dev; + config.regmap = maxreg->regmap; + config.driver_data = maxreg; + + regulators_np =of_get_child_by_name (client->dev.of_node,"regulators" );
Where do you drop this reference?
Quoted 9 lines
drivers/regulator/max77675-regulator.c new file +9
-0+if (!regulators_np) { +dev_err (maxreg->dev,"No 'regulators' subnode found in DT\n" ); +return -EINVAL ; + } + +for (i =0 ; i <MAX77675_ID_NUM_MAX ; i++) { +const struct regulator_desc *desc = &max77675_regulators[i]; +struct regulator_dev *rdev; +struct device_node *child_np;
drivers/regulator/max77675-regulator.c line 820
Quoted 10 lines
drivers/regulator/max77675-regulator.c new file +10
-0+ + child_np =of_get_child_by_name (regulators_np, desc->name); +if (!child_np) { +dev_warn (maxreg->dev,"No DT node for regulator %s\n" , desc->name); +continue ; + } + + config.of_node = child_np; + + rdev =devm_regulator_register (&client->dev, desc, &config);
Can't you drop child_np reference here?
drivers/regulator/max77675-regulator.c line 827
Quoted 7 lines
drivers/regulator/max77675-regulator.c new file +7
-0+if (IS_ERR (rdev)) { + ret =PTR_ERR (rdev); +dev_err (maxreg->dev, +"Failed to register regulator %d (%s): %d\n" , + i, desc->name, ret); +of_node_put (child_np); +return ret;
return dev_err_probe
drivers/regulator/max77675-regulator.c line 839
Quoted 12 lines
drivers/regulator/max77675-regulator.c new file +12
-0+ } +of_node_put (child_np); + } + +i2c_set_clientdata (client, maxreg); + +return 0 ; +} + +static void max77675_regulator_remove (struct i2c_client *client) +{ +/* Nothing to clean up currently */
So drop it, do not add dead code.
drivers/regulator/max77675-regulator.c line 844
Quoted 5 lines
drivers/regulator/max77675-regulator.c new file +5
-0+} + +static const struct i2c_device_id max77675_i2c_id[] = { + {"max77675" ,0 }, + { }
Best regards,
Krzysztof
PATCH v3 3/3 dt-bindings: regulator: Add MAX77675 regulator binding
In reply to Joan-Na-adiFrom: Joan Na <[email protected]>
Add device tree binding YAML schema for the Maxim MAX77675 PMIC regulator. This defines the node properties and supported regulator names for use in device tree sources.
Fixed:
- Missing explanation of maxim,fps-slot default value
- Updated DT binding enums to use string values (e.g., "low", "high") instead of integers
- Converted several binary properties to boolean type
- Renamed time-based properties to use standard unit suffixes (e.g., "-sec", "-us")
- Added default values for properties
--- .../bindings/regulator/maxim,max77675.yaml | 205 ++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77675.yaml
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +205 -0
@@ -0,0 +1,205 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/maxim,max77675.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX77675 PMIC Regulator + +maintainers: + - Joan Na <[email protected]> + +description: | + The MAX77675 is a PMIC providing multiple switching buck regulators + (SBB0–SBB3), accessible via I2C. Each SBB can be configured individually + in the Device Tree. Additional PMIC settings can be configured through + device-specific properties. + Users should use the macros from dt-bindings/regulator/maxim,max77675-regulator.h + +allOf: + - $ref: regulator.yaml# + +properties: + compatible: + const: maxim,max77675 + + reg: + maxItems: 1 + + maxim,en-mode: + description: | + Enable mode configuration. + "push-button" - Push button + "slide-switch" - Slide switch + "logic" - Logic mode + $ref: /schemas/types.yaml#/definitions/string + enum: ["push-button", "slide-switch", "logic"] + default: "slide-switch" + + maxim,latency-mode: + description: | + Latency mode for voltage transition: + "high" - High latency (100μs) + "low" - Low latency (10μs) + $ref: /schemas/types.yaml#/definitions/string + enum: ["high", "low"] + default: "high" + + maxim,drv-sbb-strength: + description: | + SIMO Buck-Boost Drive Strength Trim. + Controls the drive strength of the SIMO regulator's power MOSFETs. + This setting affects the switching speed, which impacts power efficiency and EMI. + "max" – Maximum drive strength (~0.6 ns transition time) + "high" – High drive strength (~1.2 ns transition time) + "low" – Low drive strength (~1.8 ns transition time) + "min" – Minimum drive strength (~8 ns transition time) + $ref: /schemas/types.yaml#/definitions/string + enum: ["max", "high", "low", "min"] + default: "max" + + maxim,dvs-slew-rate-mv-per-us: + description: | + Dynamic rising slew rate for output voltage transitions, in mV/μs. + This setting is only used when 'maxim,fixed-slew-rate' is not present. + enum: [5, 10] + default: 5 + + maxim,en-debounce-time-us: + description: | + Debounce time for the enable pin, in microseconds + enum: [100, 30000] + default: 100 + + maxim,manual-reset-time-sec: + description: | + Manual reset time in seconds: + enum: [4, 8, 12, 16] + default: 4 + + maxim,en-pullup-disable: + type: boolean + description: | + Disable internal pull-up for EN pin. + When set, the internal pull-up is disabled. + Defaults to enabled if this property is not specified. + default: false + + maxim,bias-low-power-request: + type: boolean + description: | + Request low-power bias mode. + When set, the device enters low-power bias mode. + Defaults to normal bias mode if this property is not specified. + default: false + + maxim,simo-int-ldo-always-on: + type: boolean + description: | + Set internal LDO to always supply 1.8V + When set, the internal LDO always supplies 1.8V. + By default, the SIMO internal channel supplies 1.8V during low-power mode + default: false + + regulators: + type: object + description: Regulator child nodes + patternProperties: + "^sbb[0-3]$": + type: object + $ref: regulator.yaml# + properties: + maxim,fps-slot: + description: | + FPS (Flexible Power Sequencer) slot selection. + The Flexible Power Sequencer allows resources to power up under hardware or software control. + Additionally, each resource can power up independently or among a group of other regulators + with adjustable power-up and power-down slots. + This device's regulators provide an additional property to configure the FPS parameters, + allowing each regulator to be assigned to an FPS slot for proper power management control. + "slot0" - Assign to FPS Slot 0 + "slot1" - Assign to FPS Slot 1 + "slot2" - Assign to FPS Slot 2 + "slot3" - Assign to FPS Slot 3 + "default" - Use the default FPS slot value stored in OTP and read from the register + $ref: /schemas/types.yaml#/definitions/string + enum: ["slot0", "slot1", "slot2", "slot3", "default"] + default: default + + maxim,fixed-slew-rate: + type: boolean + description: | + Use fixed slew rate of 2 mV/μs for output voltage transitions. + When this property is present, the device uses a constant 2 mV/μs slew rate + and ignores any dynamic slew rate configuration. + When absent, the device uses the dynamic slew rate specified + by 'maxim,dvs-slew-rate-mv-per-us' + default: true + + additionalProperties: false + +required: + - compatible + - reg + - regulators + +additionalProperties: false + +examples: + - | + #include <dt-bindings/regulator/maxim,max77675-regulator.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + max77675: pmic@44 { + compatible = "maxim,max77675"; + reg = <0x44>; + + maxim,en-mode = "slide-switch"; + maxim,latency-mode = "high"; + maxim,drv-sbb-strength = "max"; + maxim,dvs-slew-rate-mv-per-us = <5>; + maxim,manual-reset-time-sec = <4>; + maxim,en-debounce-time-us = <100>; + + regulators { + sbb0: sbb0 { + regulator-name = "sbb0"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <5500000>; + maxim,fps-slot = "default"; + maxim,slew-rate-use-dvs; + }; + + sbb1: sbb1 { + regulator-name = "sbb1"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <5500000>; + regulator-allow-set-voltage; + maxim,fps-slot = "default"; + maxim,slew-rate-use-dvs; + }; + + sbb2: sbb2 { + regulator-name = "sbb2"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <5500000>; + regulator-allow-set-voltage; + maxim,fps-slot = "default"; + maxim,slew-rate-use-dvs; + }; + + sbb3: sbb3 { + regulator-name = "sbb3"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <5500000>; + regulator-allow-set-voltage; + maxim,fps-slot = "default"; + maxim,slew-rate-use-dvs; + }; + }; + }; + }; +
--
2.34.1
Re: [PATCH v3 3/3] dt-bindings: regulator: Add MAX77675 regulator binding
Quoted 5 lines · Joan-Na-adi
From: Joan Na <[email protected]>
Add device tree binding YAML schema for the Maxim MAX77675 PMIC regulator. This defines the node properties and supported regulator names for use in device tree sources.
A nit, subject: drop second/last, redundant "binding". The "dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.17-rc3/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
Quoted 7 lines
Fixed:
- Missing explanation ofmaxim,fps-slotdefault value
- Updated DT binding enums to use string values (e.g., "low", "high") instead of integers
- Converted several binary properties to boolean type
- Renamed time-based properties to use standard unit suffixes (e.g., "-sec", "-us")
- Added default values for properties
Probably you wanted a changelog? Changelog goes to --- with details against EACH version. Please start using b4 if canonical patch format is tricky. b4 would help.
Quoted 27 lines
Signed-off-by Joan Na <[email protected]>--- .../bindings/regulator/maxim,max77675.yaml | 205 ++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77675.yamlDocumentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +14
-0@@ -0,0 +1,205 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/maxim,max77675.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX77675 PMIC Regulator + +maintainers: + - Joan Na <[email protected]> + +description: | + The MAX77675 is a PMIC providing multiple switching buck regulators + (SBB0–SBB3), accessible via I2C. Each SBB can be configured individually
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 24
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +10
-0+ in the Device Tree. Additional PMIC settings can be configured through + device-specific properties. + Users should use the macros from dt-bindings/regulator/maxim,max77675-regulator.h + +allOf: + - $ref: regulator.yaml# + +properties: + compatible: + const: maxim,max77675
Please organize the patch documenting compatible (DT bindings) before their user.
See also:
https://elixir.bootlin.com/linux/v6.14-rc6/source/Documentation/devicetree/bindings/submitting-patches.rst#L46
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 34
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +10
-0+ + reg: + maxItems: 1 + + maxim,en-mode: + description: | + Enable mode configuration. + "push-button" - Push button + "slide-switch" - Slide switch + "logic" - Logic mode
You just repeat the name in the description. Say something useful.
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 43
Quoted 9 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +9
-0+ $ref: /schemas/types.yaml#/definitions/string + enum: ["push-button", "slide-switch", "logic"] + default: "slide-switch" + + maxim,latency-mode: + description: | + Latency mode for voltage transition: + "high" - High latency (100μs) + "low" - Low latency (10μs)
So use values 100 or 10, and proper type (-us)
Quoted 8 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +8
-0+ $ref: /schemas/types.yaml#/definitions/string + enum: ["high", "low"] + default: "high" + + maxim,drv-sbb-strength: + description: | + SIMO Buck-Boost Drive Strength Trim. + Controls the drive strength of the SIMO regulator's power MOSFETs.
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 61
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +10
-0+ This setting affects the switching speed, which impacts power efficiency and EMI. + "max" – Maximum drive strength (~0.6 ns transition time) + "high" – High drive strength (~1.2 ns transition time) + "low" – Low drive strength (~1.8 ns transition time) + "min" – Minimum drive strength (~8 ns transition time) + $ref: /schemas/types.yaml#/definitions/string + enum: ["max", "high", "low", "min"] + default: "max" + + maxim,dvs-slew-rate-mv-per-us:
... like here.
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 63
Quoted 2 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +2
-0+ description: | + Dynamic rising slew rate for output voltage transitions, in mV/μs.
Except you said mv/us, not us. Confusing.
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 75
Quoted 12 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +12
-0+ This setting is only used when 'maxim,fixed-slew-rate' is not present. + enum: [5, 10] + default: 5 + + maxim,en-debounce-time-us: + description: | + Debounce time for the enable pin, in microseconds + enum: [100, 30000] + default: 100 + + maxim,manual-reset-time-sec: + description: |
Do not need '|' unless you need to preserve formatting.
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 85
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +10
-0+ Manual reset time in seconds: + enum: [4, 8, 12, 16] + default: 4 + + maxim,en-pullup-disable: + type: boolean + description: | + Disable internal pull-up for EN pin. + When set, the internal pull-up is disabled. + Defaults to enabled if this property is not specified.
This and maybe few more properties look like pinctrl bindings. Maybe properties from pincfg are applicable?
Quoted 17 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +17
-0+ default: false + + maxim,bias-low-power-request: + type: boolean + description: | + Request low-power bias mode. + When set, the device enters low-power bias mode. + Defaults to normal bias mode if this property is not specified. + default: false + + maxim,simo-int-ldo-always-on: + type: boolean + description: | + Set internal LDO to always supply 1.8V + When set, the internal LDO always supplies 1.8V. + By default, the SIMO internal channel supplies 1.8V during low-power mode + default: false
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 112
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +10
-0+ + regulators: + type: object + description: Regulator child nodes + patternProperties: + "^sbb[0-3]$": + type: object + $ref: regulator.yaml# + properties: + maxim,fps-slot:
That's not property of regulators. Totally messed indentation.
Quoted 50 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +50
-0+ description: | + FPS (Flexible Power Sequencer) slot selection. + The Flexible Power Sequencer allows resources to power up under hardware or software control. + Additionally, each resource can power up independently or among a group of other regulators + with adjustable power-up and power-down slots. + This device's regulators provide an additional property to configure the FPS parameters, + allowing each regulator to be assigned to an FPS slot for proper power management control. + "slot0" - Assign to FPS Slot 0 + "slot1" - Assign to FPS Slot 1 + "slot2" - Assign to FPS Slot 2 + "slot3" - Assign to FPS Slot 3 + "default" - Use the default FPS slot value stored in OTP and read from the register + $ref: /schemas/types.yaml#/definitions/string + enum: ["slot0", "slot1", "slot2", "slot3", "default"] + default: default + + maxim,fixed-slew-rate: + type: boolean + description: | + Use fixed slew rate of 2 mV/μs for output voltage transitions. + When this property is present, the device uses a constant 2 mV/μs slew rate + and ignores any dynamic slew rate configuration. + When absent, the device uses the dynamic slew rate specified + by 'maxim,dvs-slew-rate-mv-per-us' + default: true + + additionalProperties: false + +required: + - compatible + - reg + - regulators + +additionalProperties: false + +examples: + - | + #include <dt-bindings/regulator/maxim,max77675-regulator.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + max77675: pmic@44 { + compatible = "maxim,max77675"; + reg = <0x44>; + + maxim,en-mode = "slide-switch"; + maxim,latency-mode = "high"; + maxim,drv-sbb-strength = "max";
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 172
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +10
-0+ maxim,dvs-slew-rate-mv-per-us = <5>; + maxim,manual-reset-time-sec = <4>; + maxim,en-debounce-time-us = <100>; + + regulators { + sbb0: sbb0 { + regulator-name = "sbb0"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <5500000>; + maxim,fps-slot = "default";
I don't think this was tested.
Best regards,
Krzysztof
Mark Brown
maintainerRe: [PATCH v3 3/3] dt-bindings: regulator: Add MAX77675 regulator binding
Quoted 10 lines · Krzysztof Kozlowski
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 34
Quoted 6 lines · Joan-Na-adi
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +6
-0+ maxim,en-mode: + description: | + Enable mode configuration. + "push-button" - Push button + "slide-switch" - Slide switch + "logic" - Logic modeYou just repeat the name in the description. Say something useful.
Do you have concrete suggestions there? I can see dropping the descriptions entirely but otherwise I'm not sure there's much to usefully add.
Quoted 7 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 43
Quoted 5 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +5
-0+ maxim,latency-mode: + description: | + Latency mode for voltage transition: + "high" - High latency (100μs) + "low" - Low latency (10μs)So use values 100 or 10, and proper type (-us)
Without knowing the device specifics at all I rather suspect those numbers are more ballparks than specifics.
Quoted 8 lines
Quoted 1 line
+ maxim,dvs-slew-rate-mv-per-us:
... like here.
Review
Quoted 2 lines
(quoted diff) +2
-0+ description: | + Dynamic rising slew rate for output voltage transitions, in mV/μs.Except you said mv/us, not us. Confusing.
That's what I'd expect for a slew rate? It's the speed with which the device ramps between voltages during voltage transitions, mV/us is a perfectly normal unit for that.
Re: [PATCH v3 3/3] dt-bindings: regulator: Add MAX77675 regulator binding
Quoted 10 lines · Mark Brown
Quoted 8 lines · Krzysztof Kozlowski
Quoted 6 lines · Joan-Na-adi
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +6
-0+ maxim,en-mode: + description: | + Enable mode configuration. + "push-button" - Push button + "slide-switch" - Slide switch + "logic" - Logic mode
Quoted 5 lines
Quoted 1 line
You just repeat the name in the description. Say something useful.
Do you have concrete suggestions there? I can see dropping the descriptions entirely but otherwise I'm not sure there's much to usefully add.
Then just drop descriptions. I could imagine datasheet has something more, but if not, then really no point to copy paste.
Quoted 11 lines
Quoted 8 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 43
Quoted 6 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +5
-0+ maxim,latency-mode: + description: | + Latency mode for voltage transition: + "high" - High latency (100μs) + "low" - Low latency (10μs)So use values 100 or 10, and proper type (-us)
Without knowing the device specifics at all I rather suspect those numbers are more ballparks than specifics.
That would be fine then. It should be reflected in commit msg, though.
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
+ maxim,dvs-slew-rate-mv-per-us:
... like here.
Quoted 8 lines
Quoted 4 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ description: | + Dynamic rising slew rate for output voltage transitions, in mV/μs.Except you said mv/us, not us. Confusing.
That's what I'd expect for a slew rate? It's the speed with which the device ramps between voltages during voltage transitions, mV/us is a perfectly normal unit for that.
Yeah, but the property unit suffix "-us" says that unit is us, so not mv/us. I think we did not have that case so far, unless I missed such, so either we ignore description mismatch from property-units or we change it to something, like "-mvperus".
https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml
The actual type - uint32 - is suitable, so maybe mismatch in description for that unit type does not really matter. I'll defer this to @Rob.
Best regards,
Krzysztof
Mark Brown
maintainerRe: [PATCH v3 3/3] dt-bindings: regulator: Add MAX77675 regulator binding
Quoted 11 lines · Krzysztof Kozlowski
Quoted 9 lines · Mark Brown
Quoted 8 lines · Krzysztof Kozlowski
Quoted 6 lines · Joan-Na-adi
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +6
-0+ maxim,en-mode: + description: | + Enable mode configuration. + "push-button" - Push button + "slide-switch" - Slide switch + "logic" - Logic mode
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
You just repeat the name in the description. Say something useful.
Do you have concrete suggestions there? I can see dropping the descriptions entirely but otherwise I'm not sure there's much to usefully add.
Then just drop descriptions. I could imagine datasheet has something more, but if not, then really no point to copy paste.
I suspect someone said descriptions were needed... TBH I think just the enumerated names are clear enough.
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
+ maxim,dvs-slew-rate-mv-per-us:
Except you said mv/us, not us. Confusing.
That's what I'd expect for a slew rate? It's the speed with which the device ramps between voltages during voltage transitions, mV/us is a perfectly normal unit for that.
Quoted 5 lines
Yeah, but the property unit suffix "-us" says that unit is us, so not mv/us. I think we did not have that case so far, unless I missed such, so either we ignore description mismatch from property-units or we change it to something, like "-mvperus".
https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml
Right, and the above does say "mv-per-us" which is how I'd have expected those units to be formatted rather than "mvperus".
Re: [PATCH v3 3/3] dt-bindings: regulator: Add MAX77675 regulator binding
In reply to Krzysztof KozlowskiQuoted 6 lines · Krzysztof Kozlowski
Quoted 5 lines · Joan-Na-adi
From: Joan Na <[email protected]>
Add device tree binding YAML schema for the Maxim MAX77675 PMIC regulator. This defines the node properties and supported regulator names for use in device tree sources.
Hello Krzysztof,
Thank you again for your helpful feedback.
Quoted 6 lines
A nit, subject: drop second/last, redundant "binding". The "dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.17-rc3/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
I plan to update the patch subject to avoid redundancy. The new title is:
dt-bindings: regulator: Add support for MAX77675 PMIC
Quoted 9 lines
Quoted 7 lines
Fixed:
- Missing explanation ofmaxim,fps-slotdefault value
- Updated DT binding enums to use string values (e.g., "low", "high") instead of integers
- Converted several binary properties to boolean type
- Renamed time-based properties to use standard unit suffixes (e.g., "-sec", "-us")
- Added default values for properties
Quoted 4 lines
Probably you wanted a changelog? Changelog goes to --- with details against EACH version. Please start using b4 if canonical patch format is tricky. b4 would help.
I have applied this from PATCH V4.
Quoted 34 lines
Quoted 34 lines
Signed-off-by Joan Na <[email protected]>--- .../bindings/regulator/maxim,max77675.yaml | 205 ++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77675.yamlDocumentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +21
-0@@ -0,0 +1,205 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/maxim,max77675.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX77675 PMIC Regulator + +maintainers: + - Joan Na <[email protected]> + +description: | + The MAX77675 is a PMIC providing multiple switching buck regulators + (SBB0–SBB3), accessible via I2C. Each SBB can be configured individually + in the Device Tree. Additional PMIC settings can be configured through + device-specific properties. + Users should use the macros from dt-bindings/regulator/maxim,max77675-regulator.h + +allOf: + - $ref: regulator.yaml# +
Quoted 9 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 24
Quoted 3 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +3
-0+properties: + compatible: + const: maxim,max77675Please organize the patch documenting compatible (DT bindings) before their user.
See also:
https://elixir.bootlin.com/linux/v6.14-rc6/source/Documentation/devicetree/bindings/submitting-patches.rst#L46
I have changed the commit order starting from PATCH V5.
Quoted 4 lines
Quoted 4 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +4
-0+ + reg: + maxItems: 1 +
Quoted 9 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 34
Quoted 6 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +6
-0+ maxim,en-mode: + description: | + Enable mode configuration. + "push-button" - Push button + "slide-switch" - Slide switch + "logic" - Logic modeYou just repeat the name in the description. Say something useful.
Updated the DT property description as follows:
description: |
Enable mode configuration.
The debounce time set by 'adi,debounce-time-us' applies to both push-button and slide-switch modes. "push-button" - A long press triggers power-on or power-down "slide-switch" - Low level powers on, high level powers down
"logic" - Low level powers on, high level powers down (no debounce time)
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 43
Quoted 9 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +9
-0+ $ref: /schemas/types.yaml#/definitions/string + enum: ["push-button", "slide-switch", "logic"] + default: "slide-switch" + + maxim,latency-mode: + description: | + Latency mode for voltage transition: + "high" - High latency (100μs) + "low" - Low latency (10μs)
Quoted 3 lines
So use values 100 or 10, and proper type (-us)
I have applied this from PATCH V5.
Quoted 21 lines
Quoted 8 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +8
-0+ $ref: /schemas/types.yaml#/definitions/string + enum: ["high", "low"] + default: "high" + + maxim,drv-sbb-strength: + description: | + SIMO Buck-Boost Drive Strength Trim. + Controls the drive strength of the SIMO regulator's power MOSFETs.Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 61
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +10
-0+ This setting affects the switching speed, which impacts power efficiency and EMI. + "max" – Maximum drive strength (~0.6 ns transition time) + "high" – High drive strength (~1.2 ns transition time) + "low" – Low drive strength (~1.8 ns transition time) + "min" – Minimum drive strength (~8 ns transition time) + $ref: /schemas/types.yaml#/definitions/string + enum: ["max", "high", "low", "min"] + default: "max" + + maxim,dvs-slew-rate-mv-per-us:... like here.
Quoted 5 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 63
Quoted 2 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +2
-0+ description: | + Dynamic rising slew rate for output voltage transitions, in mV/μs.Except you said mv/us, not us. Confusing.
Would it be acceptable to keep the current name "mv-per-us"?
Quoted 6 lines
Quoted 6 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +6
-0+ This setting is only used when 'maxim,fixed-slew-rate' is not present. + enum: [5, 10] + default: 5 + + maxim,en-debounce-time-us: + description: |
Quoted 9 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 75
Quoted 6 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +6
-0+ Debounce time for the enable pin, in microseconds + enum: [100, 30000] + default: 100 + + maxim,manual-reset-time-sec: + description: |Do not need '|' unless you need to preserve formatting.
I have applied this from PATCH V5.
Quoted 11 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 85
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +10
-0+ Manual reset time in seconds: + enum: [4, 8, 12, 16] + default: 4 + + maxim,en-pullup-disable: + type: boolean + description: | + Disable internal pull-up for EN pin. + When set, the internal pull-up is disabled. + Defaults to enabled if this property is not specified.
Quoted 3 lines
This and maybe few more properties look like pinctrl bindings. Maybe properties from pincfg are applicable?
The maxim,en-pullup-disable property disables the internal pull-up of the EN pin. While it looks similar to a pinctrl configuration,
it is actually handled by a device-specific control in the max77675 register, not through the SoC’s pinctrl subsystem.
So, would it be acceptable to keep the current naming and implementation?
Quoted 21 lines
Quoted 21 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +21
-0+ default: false + + maxim,bias-low-power-request: + type: boolean + description: | + Request low-power bias mode. + When set, the device enters low-power bias mode. + Defaults to normal bias mode if this property is not specified. + default: false + + maxim,simo-int-ldo-always-on: + type: boolean + description: | + Set internal LDO to always supply 1.8V + When set, the internal LDO always supplies 1.8V. + By default, the SIMO internal channel supplies 1.8V during low-power mode + default: false + + regulators: + type: object + description: Regulator child nodes
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 112
Quoted 6 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +6
-0+ patternProperties: + "^sbb[0-3]$": + type: object + $ref: regulator.yaml# + properties: + maxim,fps-slot:That's not property of regulators. Totally messed indentation.
The maxim,fps-slot property is specific to the MAX77675 regulators
and is used to configure FPS slots individually for each regulator (e.g., sbb0–sbb3). As this represents a device-specific extension rather than a generic regulator property, it is defined under each regulator node.
Quoted 64 lines
Quoted 50 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +50
-0+ description: | + FPS (Flexible Power Sequencer) slot selection. + The Flexible Power Sequencer allows resources to power up under hardware or software control. + Additionally, each resource can power up independently or among a group of other regulators + with adjustable power-up and power-down slots. + This device's regulators provide an additional property to configure the FPS parameters, + allowing each regulator to be assigned to an FPS slot for proper power management control. + "slot0" - Assign to FPS Slot 0 + "slot1" - Assign to FPS Slot 1 + "slot2" - Assign to FPS Slot 2 + "slot3" - Assign to FPS Slot 3 + "default" - Use the default FPS slot value stored in OTP and read from the register + $ref: /schemas/types.yaml#/definitions/string + enum: ["slot0", "slot1", "slot2", "slot3", "default"] + default: default + + maxim,fixed-slew-rate: + type: boolean + description: | + Use fixed slew rate of 2 mV/μs for output voltage transitions. + When this property is present, the device uses a constant 2 mV/μs slew rate + and ignores any dynamic slew rate configuration. + When absent, the device uses the dynamic slew rate specified + by 'maxim,dvs-slew-rate-mv-per-us' + default: true + + additionalProperties: false + +required: + - compatible + - reg + - regulators + +additionalProperties: false + +examples: + - | + #include <dt-bindings/regulator/maxim,max77675-regulator.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + max77675: pmic@44 { + compatible = "maxim,max77675"; + reg = <0x44>; + + maxim,en-mode = "slide-switch"; + maxim,latency-mode = "high"; + maxim,drv-sbb-strength = "max";Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 172
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +10
-0+ maxim,dvs-slew-rate-mv-per-us = <5>; + maxim,manual-reset-time-sec = <4>; + maxim,en-debounce-time-us = <100>; + + regulators { + sbb0: sbb0 { + regulator-name = "sbb0"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <5500000>; + maxim,fps-slot = "default";I don't think this was tested.
Quoted 2 lines
Best regards,
Krzysztof
Testing on the actual EVKit has been conducted since PATCH V4
Signature · 2 lines
Best regards, Joan Na
Re: [PATCH v3 3/3] dt-bindings: regulator: Add MAX77675 regulator binding
Quoted 30 lines · Joan Na
Quoted 19 lines
Quoted 19 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +19
-0+ maxim,bias-low-power-request: + type: boolean + description: | + Request low-power bias mode. + When set, the device enters low-power bias mode. + Defaults to normal bias mode if this property is not specified. + default: false + + maxim,simo-int-ldo-always-on: + type: boolean + description: | + Set internal LDO to always supply 1.8V + When set, the internal LDO always supplies 1.8V. + By default, the SIMO internal channel supplies 1.8V during low-power mode + default: false + + regulators: + type: object + description: Regulator child nodesQuoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 112
Quoted 6 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +6
-0+ patternProperties: + "^sbb[0-3]$": + type: object + $ref: regulator.yaml# + properties: + maxim,fps-slot:That's not property of regulators. Totally messed indentation.
Quoted 4 lines
The maxim,fps-slot property is specific to the MAX77675 regulators
and is used to configure FPS slots individually for each regulator (e.g., sbb0–sbb3). As this represents a device-specific extension rather than a generic regulator property, it is defined under each regulator node.
But you did not define it under each regulator node. That would be fine. You defined it under regulators. So again that is not a property of regulators. That's a property of each regulator.
If you bothered to test it, you would see warnings.
Quoted 65 lines
Quoted 65 lines
Quoted 51 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +50
-0+ description: | + FPS (Flexible Power Sequencer) slot selection. + The Flexible Power Sequencer allows resources to power up under hardware or software control. + Additionally, each resource can power up independently or among a group of other regulators + with adjustable power-up and power-down slots. + This device's regulators provide an additional property to configure the FPS parameters, + allowing each regulator to be assigned to an FPS slot for proper power management control. + "slot0" - Assign to FPS Slot 0 + "slot1" - Assign to FPS Slot 1 + "slot2" - Assign to FPS Slot 2 + "slot3" - Assign to FPS Slot 3 + "default" - Use the default FPS slot value stored in OTP and read from the register + $ref: /schemas/types.yaml#/definitions/string + enum: ["slot0", "slot1", "slot2", "slot3", "default"] + default: default + + maxim,fixed-slew-rate: + type: boolean + description: | + Use fixed slew rate of 2 mV/μs for output voltage transitions. + When this property is present, the device uses a constant 2 mV/μs slew rate + and ignores any dynamic slew rate configuration. + When absent, the device uses the dynamic slew rate specified + by 'maxim,dvs-slew-rate-mv-per-us' + default: true + + additionalProperties: false + +required: + - compatible + - reg + - regulators + +additionalProperties: false + +examples: + - | + #include <dt-bindings/regulator/maxim,max77675-regulator.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + max77675: pmic@44 { + compatible = "maxim,max77675"; + reg = <0x44>; + + maxim,en-mode = "slide-switch"; + maxim,latency-mode = "high"; + maxim,drv-sbb-strength = "max";Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 172
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +10
-0+ maxim,dvs-slew-rate-mv-per-us = <5>; + maxim,manual-reset-time-sec = <4>; + maxim,en-debounce-time-us = <100>; + + regulators { + sbb0: sbb0 { + regulator-name = "sbb0"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <5500000>; + maxim,fps-slot = "default";I don't think this was tested.
Quoted 4 lines
Quoted 2 lines
Best regards,
KrzysztofTesting on the actual EVKit has been conducted since PATCH V4
I have proofs this was not tested - see email from Rob.
But if you claim it was tested, then please explain me how can you possible test a binding on EVKit (it is impossible) and how could your testing miss such obvious errors?
Quoted 1 line
Best regards,
Krzysztof
Re: [PATCH v3 3/3] dt-bindings: regulator: Add MAX77675 regulator binding
Quoted 36 lines · Krzysztof Kozlowski
Quoted 30 lines · Joan Na
Quoted 19 lines
Quoted 19 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +19
-0+ maxim,bias-low-power-request: + type: boolean + description: | + Request low-power bias mode. + When set, the device enters low-power bias mode. + Defaults to normal bias mode if this property is not specified. + default: false + + maxim,simo-int-ldo-always-on: + type: boolean + description: | + Set internal LDO to always supply 1.8V + When set, the internal LDO always supplies 1.8V. + By default, the SIMO internal channel supplies 1.8V during low-power mode + default: false + + regulators: + type: object + description: Regulator child nodesQuoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 112
Quoted 6 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +6
-0+ patternProperties: + "^sbb[0-3]$": + type: object + $ref: regulator.yaml# + properties: + maxim,fps-slot:That's not property of regulators. Totally messed indentation.
Quoted 4 lines
The maxim,fps-slot property is specific to the MAX77675 regulators
and is used to configure FPS slots individually for each regulator (e.g., sbb0–sbb3). As this represents a device-specific extension rather than a generic regulator property, it is defined under each regulator node.
Quoted 6 lines
But you did not define it under each regulator node. That would be fine. You defined it under regulators. So again that is not a property of regulators. That's a property of each regulator.
If you bothered to test it, you would see warnings.
I am sorry if it seemed like I was suggesting no testing was done. I have now updated it under the regulator node as shown below.
regulators:
type: object
description: Regulator child nodes
patternProperties:
"^sbb[0-3]$":
type: object
$ref: regulator.yaml#
properties:
adi,fps-slot:
description: |
FPS (Flexible Power Sequencer) slot selection.
The Flexible Power Sequencer allows resources to power up under hardware or software control. Additionally, each resource can
power up independently or among a group of other regulators with adjustable power-up and power-down slots.
"slot0" - Assign to FPS Slot 0
"slot1" - Assign to FPS Slot 1
"slot2" - Assign to FPS Slot 2
"slot3" - Assign to FPS Slot 3
"default" - Use the default FPS slot value stored in OTP and read from the register
$ref: /schemas/types.yaml#/definitions/string
enum: [slot0, slot1, slot2, slot3, default]
default: default
adi,fixed-slew-rate:
type: boolean
description:
When this property is present, the device uses a constant 2 mV/μs slew rate and ignores any dynamic slew rate configuration. When absent, the device uses the dynamic slew rate specified by 'adi,dvs-slew-rate-mv-per-us'
default: true
Quoted 80 lines
Quoted 65 lines
Quoted 65 lines
Quoted 51 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +50
-0+ description: | + FPS (Flexible Power Sequencer) slot selection. + The Flexible Power Sequencer allows resources to power up under hardware or software control. + Additionally, each resource can power up independently or among a group of other regulators + with adjustable power-up and power-down slots. + This device's regulators provide an additional property to configure the FPS parameters, + allowing each regulator to be assigned to an FPS slot for proper power management control. + "slot0" - Assign to FPS Slot 0 + "slot1" - Assign to FPS Slot 1 + "slot2" - Assign to FPS Slot 2 + "slot3" - Assign to FPS Slot 3 + "default" - Use the default FPS slot value stored in OTP and read from the register + $ref: /schemas/types.yaml#/definitions/string + enum: ["slot0", "slot1", "slot2", "slot3", "default"] + default: default + + maxim,fixed-slew-rate: + type: boolean + description: | + Use fixed slew rate of 2 mV/μs for output voltage transitions. + When this property is present, the device uses a constant 2 mV/μs slew rate + and ignores any dynamic slew rate configuration. + When absent, the device uses the dynamic slew rate specified + by 'maxim,dvs-slew-rate-mv-per-us' + default: true + + additionalProperties: false + +required: + - compatible + - reg + - regulators + +additionalProperties: false + +examples: + - | + #include <dt-bindings/regulator/maxim,max77675-regulator.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + max77675: pmic@44 { + compatible = "maxim,max77675"; + reg = <0x44>; + + maxim,en-mode = "slide-switch"; + maxim,latency-mode = "high"; + maxim,drv-sbb-strength = "max";Documentation/devicetree/bindings/regulator/maxim,max77675.yaml line 172
Quoted 10 lines
Documentation/devicetree/bindings/regulator/maxim,max77675.yaml new file +10
-0+ maxim,dvs-slew-rate-mv-per-us = <5>; + maxim,manual-reset-time-sec = <4>; + maxim,en-debounce-time-us = <100>; + + regulators { + sbb0: sbb0 { + regulator-name = "sbb0"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <5500000>; + maxim,fps-slot = "default";I don't think this was tested.
Quoted 4 lines
Quoted 2 lines
Best regards,
KrzysztofTesting on the actual EVKit has been conducted since PATCH V4
I have proofs this was not tested - see email from Rob.
But if you claim it was tested, then please explain me how can you possible test a binding on EVKit (it is impossible) and how could your testing miss such obvious errors?
Quoted 1 line
Quoted 2 lines
Best regards,
Krzysztof
I will do my best to prepare everything properly for the next version.
In the meantime, I’d like to share the following test results that demonstrate the current behavior. Please let me know if you need any additional information or clarification.
[ 3.527749] max77675 1-0044: max77675_parse_config : MAX77675 PMIC configuration: [ 3.527753] max77675 1-0044: en_mode = 0 [ 3.527758] max77675 1-0044: voltage_change_latency = 1 [ 3.527762] max77675 1-0044: drv_sbb_strength = 3 [ 3.527766] max77675 1-0044: dvs_slew_rate = 1 [ 3.527769] max77675 1-0044: debounce_time = 1 us [ 3.527773] max77675 1-0044: manual_reset_time = 1 sec [ 3.527776] max77675 1-0044: en_pullup_disable = true [ 3.527779] max77675 1-0044: bias_low_power_req = true [ 3.527782] max77675 1-0044: simo_ldo_always = true [ 3.531250] max77675 1-0044: max77675_of_parse_cb() called for regulator: sbb0 (id=0) [ 3.531265] max77675 1-0044: DT node: /soc/i2c@7e804000/pmic@44/regulators/sbb0 [ 3.531281] max77675 1-0044: Init data: (none) [ 3.531286] max77675 1-0044: Parsed 'adi,fps-slot' = 'slot0' (slot=0) [ 3.531291] max77675 1-0044: 'adi,fixed-slew-rate' = 1 [ 3.531294] max77675 1-0044: Applying parsed config for regulator id=0 (fps_slot=0, fixed_slew_rate=1) [ 3.532553] sbb0: 500 <--> 4700 mV at 1800 mV, disabled [ 3.545628] max77675 1-0044: max77675_of_parse_cb() called for regulator: sbb1 (id=1) [ 3.545647] max77675 1-0044: DT node: /soc/i2c@7e804000/pmic@44/regulators/sbb1 [ 3.545661] max77675 1-0044: Init data: (none) [ 3.545666] max77675 1-0044: Parsed 'adi,fps-slot' = 'slot1' (slot=1) [ 3.545670] max77675 1-0044: 'adi,fixed-slew-rate' = 0 [ 3.545674] max77675 1-0044: Applying parsed config for regulator id=1 (fps_slot=1, fixed_slew_rate=0) [ 3.546991] sbb1: 600 <--> 4800 mV at 1100 mV, disabled [ 3.547235] max77675 1-0044: max77675_of_parse_cb() called for regulator: sbb2 (id=2) [ 3.547245] max77675 1-0044: DT node: /soc/i2c@7e804000/pmic@44/regulators/sbb2 [ 3.547258] max77675 1-0044: Init data: (none) [ 3.547263] max77675 1-0044: Parsed 'adi,fps-slot' = 'slot2' (slot=2) [ 3.547267] max77675 1-0044: 'adi,fixed-slew-rate' = 1 [ 3.547271] max77675 1-0044: Applying parsed config for regulator id=2 (fps_slot=2, fixed_slew_rate=1) [ 3.553864] sbb2: 700 <--> 4900 mV at 700 mV, disabled [ 3.562943] max77675 1-0044: max77675_of_parse_cb() called for regulator: sbb3 (id=3) [ 3.562965] max77675 1-0044: DT node: /soc/i2c@7e804000/pmic@44/regulators/sbb3 [ 3.562979] max77675 1-0044: Init data: (none) [ 3.562984] max77675 1-0044: Parsed 'adi,fps-slot' = 'slot3' (slot=3) [ 3.562988] max77675 1-0044: 'adi,fixed-slew-rate' = 0 [ 3.562991] max77675 1-0044: Applying parsed config for regulator id=3 (fps_slot=3, fixed_slew_rate=0) [ 3.565702] sbb3: 800 <--> 5000 mV at 3300 mV, disabled
Thank you again for taking the time to review this.
Signature · 2 lines
Best regards, Joan Na
Rob Herring (Arm)
maintainerRe: [PATCH v3 3/3] dt-bindings: regulator: Add MAX77675 regulator binding
In reply to Joan-Na-adiQuoted 13 lines · Joan-Na-adi
From: Joan Na <[email protected]>
Add device tree binding YAML schema for the Maxim MAX77675 PMIC regulator. This defines the node properties and supported regulator names for use in device tree sources.
Fixed:
- Missing explanation ofmaxim,fps-slotdefault value
- Updated DT binding enums to use string values (e.g., "low", "high") instead of integers
- Converted several binary properties to boolean type
- Renamed time-based properties to use standard unit suffixes (e.g., "-sec", "-us")
- Added default values for properties
Quoted 6 lines
Signed-off-by Joan Na <[email protected]>--- .../bindings/regulator/maxim,max77675.yaml | 205 ++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77675.yaml
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:36:12: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:36:27: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:36:43: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:37:14: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:45:12: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:45:20: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:46:14: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:58:12: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:58:19: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:58:27: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:58:34: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:59:14: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:126:16: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:126:25: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:126:34: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:126:43: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/regulator/maxim,max77675.yaml:126:52: [error] string value is redundantly quoted with any quotes (quoted-strings)
dtschema/dtc warnings/errors:
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.