Unverified Commit a52afb0f authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown
Browse files

regulator: dt-bindings: samsung,s2mpa01: convert to dtschema



Convert the regulators of Samsung S2MPA01 PMIC to DT schema format.

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Message-Id: <20211008113931.134847-2-krzysztof.kozlowski@canonical.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent ea98b9eb
Loading
Loading
Loading
Loading
+0 −79
Original line number Diff line number Diff line
Binding for Samsung S2MPA01 regulator block
===========================================

This is a part of device tree bindings for S2M family multi-function devices.
More information can be found in bindings/mfd/sec-core.txt file.

The S2MPA01 device provide buck and LDO regulators.

To register these with regulator framework instantiate under main device node
a sub-node named "regulators" with more sub-nodes for each regulator using the
common regulator binding documented in:
 - Documentation/devicetree/bindings/regulator/regulator.txt


Names of regulators supported by S2MPA01 device:
	- LDOn
		  - valid values for n are 1 to 26
		  - Example: LDO1, LD02, LDO26
	- BUCKn
		  - valid values for n are 1 to 10.
		  - Example: BUCK1, BUCK2, BUCK9
Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
as per the datasheet of device.


Optional properties of buck regulator nodes under "regulators" sub-node:
 - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500
   (default), 25000, or 50000. May be 0 for disabling the ramp delay on
   BUCK{1,2,3,4}.

   In the absence of the regulator-ramp-delay property, the default ramp
   delay will be used.

   Note: Some bucks share the ramp rate setting i.e. same ramp value
   will be set for a particular group of bucks so provide the same
   regulator-ramp-delay value for them.
   Groups sharing ramp rate:
    - buck{1,6},
    - buck{2,4},
    - buck{8,9,10}.

Example:

	s2mpa01_pmic@66 {
		compatible = "samsung,s2mpa01-pmic";
		reg = <0x66>;

		regulators {
			ldo1_reg: LDO1 {
				regulator-name = "VDD_ALIVE";
				regulator-min-microvolt = <1000000>;
				regulator-max-microvolt = <1000000>;
			};

			ldo2_reg: LDO2 {
				regulator-name = "VDDQ_MMC2";
				regulator-min-microvolt = <2800000>;
				regulator-max-microvolt = <2800000>;
				regulator-always-on;
			};

			buck1_reg: BUCK1 {
				regulator-name = "vdd_mif";
				regulator-min-microvolt = <950000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
				regulator-boot-on;
			};

			buck2_reg: BUCK2 {
				regulator-name = "vdd_arm";
				regulator-min-microvolt = <950000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
				regulator-boot-on;
				regulator-ramp-delay = <50000>;
			};
		};
	};
+62 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/samsung,s2mpa01.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung S2MPA01 Power Management IC regulators

maintainers:
  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

description: |
  This is a part of device tree bindings for S2M and S5M family of Power
  Management IC (PMIC).

  The S2MPA01 provides buck and LDO regulators.

  See also Documentation/devicetree/bindings/mfd/samsung,s2mpa01.yaml for
  additional information and example.

patternProperties:
  # 26 LDOs
  "^LDO([1-9]|1[0-9]|2[0-6])$":
    type: object
    $ref: regulator.yaml#
    unevaluatedProperties: false
    description:
      Properties for single LDO regulator.

    required:
      - regulator-name

  # 10 bucks
  "^BUCK([1-9]|10)$":
    type: object
    $ref: regulator.yaml#
    unevaluatedProperties: false
    description:
      Properties for single BUCK regulator.

    properties:
      regulator-ramp-delay:
        enum: [0, 6250, 12500, 25000, 50000]
        default: 12500
        description: |
          May be 0 for disabling the ramp delay on BUCK{1,2,3,4}.

          In the absence of the regulator-ramp-delay property, the default ramp
          delay will be used.

          Note: Some bucks share the ramp rate setting i.e. same ramp value
          will be set for a particular group of bucks so provide the same
          regulator-ramp-delay value for them.
          Groups sharing ramp rate:
            * buck{1,6},
            * buck{2,4},
            * buck{8,9,10}.

    required:
      - regulator-name

additionalProperties: false