[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250926-silliness-unopposed-d48b3dea455e@spud>
Date: Fri, 26 Sep 2025 18:08:16 +0100
From: Conor Dooley <conor@...nel.org>
To: Joan-Na-adi <joan.na.devcode@...il.com>
Cc: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, Joan Na <joan.na@...log.com>
Subject: Re: [PATCH 3/3] dt-bindings: regulator: Add MAX77675 regulator
binding
On Fri, Sep 26, 2025 at 02:37:57PM +0900, Joan-Na-adi wrote:
> From: Joan Na <joan.na@...log.com>
>
> 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.
>
> Signed-off-by: Joan Na <joan.na@...log.com>
> ---
> .../bindings/regulator/maxim,max77675.yaml | 202 ++++++++++++++++++
> 1 file changed, 202 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77675.yaml
>
> diff --git a/Documentation/devicetree/bindings/regulator/maxim,max77675.yaml b/Documentation/devicetree/bindings/regulator/maxim,max77675.yaml
> new file mode 100644
> index 000000000000..f93dfdc499bc
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/maxim,max77675.yaml
> @@ -0,0 +1,202 @@
> +# 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 <joan.na@...log.com>
> +
> +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,dvs-slew-rate:
> + description: |
> + DVS slew rate setting.
> + 0 (MAX77675_DVS_SLEW_5MV) - 5 mV/μs
> + 1 (MAX77675_DVS_SLEW_10MV) - 10 mV/μs
Please use proper units for this property.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> +
> + maxim,latency-mode:
> + description: |
> + Latency mode for voltage transition:
> + 0 (MAX77675_LAT_MODE_HIGH_LATENCY) - Low quiescent current, high latency (~100μs)
> + 1 (MAX77675_LAT_MODE_LOW_LATENCY) - High quiescent current, low latency (~10μs)
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
Seems like this should be a string enum, of "low" and "high".
> + maxim,drv-sbb-strength:
Drive strengths usually in amps, how come this is not? If amps is not
meaningful here, please use strings not register values.
> + description: |
> + SIMO Buck-Boost Drive Strength Trim.
> + 0 (MAX77675_DRV_SBB_FASTEST) - Fastest transition (~0.6 ns)
> + 1 (MAX77675_DRV_SBB_FAST) - Faster transition (~1.2 ns)
> + 2 (MAX77675_DRV_SBB_MEDIUM) - Moderate transition (~1.8 ns)
> + 3 (MAX77675_DRV_SBB_SLOWEST) - Slowest transition (~8 ns)
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1, 2, 3]
> +
> + maxim,manual-reset-time:
> + description: |
> + Manual reset time in seconds:
> + 0 (MAX77675_MRT_4S): 4 seconds
> + 1 (MAX77675_MRT_8S): 8 seconds
> + 2 (MAX77675_MRT_12S): 12 seconds
> + 3 (MAX77675_MRT_16S): 16 seconds
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1, 2, 3]
For time measured in seconds, the standard unit suffix is "-sec". Please
use that rather than register values.
> +
> + maxim,en-pullup-disable:
> + description: |
> + Disable internal pull-up for EN pin.
> + 0 (MAX77675_PU_EN): Internal pull-up enabled (default).
> + 1 (MAX77675_PU_DIS): Internal pull-up disabled.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
binary properties like this should be booleans. You decide based on the
property being present rather than the value.
> +
> + maxim,bias-low-power-request:
> + description: |
> + Controls the bias low-power mode setting.
> + 0 (MAX77675_BIAS_NORMAL): Normal bias operation
> + 1 (MAX77675_BIAS_LPM_REQ): Request low-power bias mode
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> +
> + maxim,simo-int-ldo-always-on:
> + description: |
> + SIMO internal channel disable configuration.
> + 0 (MAX77675_SIMO_INT_NORMAL): SIMO channel enabled
> + 1 (MAX77675_SIMO_INT_LDO): SIMO channel disabled
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
Same for these two.
> + maxim,en-mode:
> + description: |
> + Enable mode configuration.
> + 0 (MAX77675_EN_PUSH_BUTTON): Push button
> + 1 (MAX77675_EN_SLIDE_SWITCH): Slide switch
> + 2 (MAX77675_EN_LOGIC): Logic mode
> + 3 (MAX77675_EN_RESERVED): Reserved
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1, 2, 3]
This should probably be a string. Not sure what the point of allowing
the reserved value is though.
> +
> + maxim,en-debounce-time:
> + description: |
> + Debounce timer enable.
> + 0 (MAX77675_DBEN_100US): 100us
> + 1 (MAX77675_DBEN_30MS): 30ms
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
Please put this property into a unit of time. "-us" is probably the
correct suffix to go for.
> +
> + regulators:
> + type: object
> + description: Regulator child nodes
> + patternProperties:
> + "^sbb[0-3]$":
> + type: object
> + $ref: regulator.yaml#
> + properties:
> + maxim,fps-slot:
> + description: |
> + FPS slot selection.
> + 0 (MAX77675_FPS_SLOT_0): FPS Slot 0
> + 1 (MAX77675_FPS_SLOT_1): FPS Slot 1
> + 2 (MAX77675_FPS_SLOT_2): FPS Slot 2
> + 3 (MAX77675_FPS_SLOT_3): FPS Slot 3
> + 4 (MAX77675_FPS_NONE): No FPS Slot (disabled)
> + 5 (MAX77675_FPS_DEF): Use the defaul
What does this even mean? Where does the default come from?
Also, is this property basically just a reinvention of reg?
There's no explanation so it is hard to tell.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1, 2, 3, 4, 5]
> +
> + maxim,slew-rate-use-dvs:
> + description: |
> + 0 (MAX77675_SR_2MV_PER_US): Fixed slew rate of 2mV/μs.
> + 1 (MAX77675_SR_USE_DVS): Uses maxim,dvs-slew-rate for dynamic voltage scaling.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
Seems like this should be a boolean property, "maxim,fixed-slew-rate"
where being present sets it to 2mV/us and absent uses the inherited
dynamic rate.
> + additionalProperties: false
> +
> +required:
> + - compatible
> + - reg
> + - regulators
Most of your properties are missing default values since they're not
required.
> +
> +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,dvs-slew-rate = <MAX77675_DVS_SLEW_5MV>;
> + maxim,latency-mode = <MAX77675_LAT_MODE_HIGH_LATENCY>;
> + maxim,drv-sbb-strength = <MAX77675_DRV_SBB_FASTEST>;
> + maxim,manual-reset-time = <MAX77675_MRT_4S>;
> + maxim,en-pullup-disable = <MAX77675_PU_EN>;
> + maxim,bias-low-power-request = <MAX77675_BIAS_NORMAL>;
> + maxim,simo-int-ldo-always-on = <MAX77675_SIMO_INT_NORMAL>;
> + maxim,en-mode = <MAX77675_EN_PUSH_BUTTON>;
> + maxim,en-debounce-time = <MAX77675_DBEN_100US>;
> +
> + regulators {
> + sbb0: sbb0 {
> + regulator-name = "sbb0";
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <5500000>;
> + maxim,fps-slot = <MAX77675_FPS_DEF>;
> + maxim,slew-rate-use-dvs = <MAX77675_SR_2MV_PER_US>;
> + };
> +
> + sbb1: sbb1 {
> + regulator-name = "sbb1";
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <5500000>;
> + regulator-allow-set-voltage;
> + maxim,fps-slot = <MAX77675_FPS_DEF>;
> + maxim,slew-rate-use-dvs = <MAX77675_SR_2MV_PER_US>;
> + };
> +
> + sbb2: sbb2 {
> + regulator-name = "sbb2";
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <5500000>;
> + regulator-allow-set-voltage;
> + maxim,fps-slot = <MAX77675_FPS_DEF>;
> + maxim,slew-rate-use-dvs = <MAX77675_SR_2MV_PER_US>;
> + };
> +
> + sbb3: sbb3 {
> + regulator-name = "sbb3";
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <5500000>;
> + regulator-allow-set-voltage;
> + maxim,fps-slot = <MAX77675_FPS_DEF>;
> + maxim,slew-rate-use-dvs = <MAX77675_SR_2MV_PER_US>;
> + };
> + };
> + };
> + };
> +
> --
> 2.34.1
>
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists