Commit 9721f0e8 authored by Lee Jones's avatar Lee Jones
Browse files

Merge tag 'tags/s2m_s5m_dtschema' into tb-mfd-from-regulator-5.16



regulator/clock: Convert the s2m and s5m DT bindings to schema

Tagged to allow further bindings to rely on these.

Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parents 6880fa6c fab58deb
Loading
Loading
Loading
Loading
+0 −49
Original line number Diff line number Diff line
Binding for Samsung S2M and S5M family clock generator block
============================================================

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

The S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz
outputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs.

To register these as clocks with common clock framework instantiate under
main device node a sub-node named "clocks".

It uses the common clock binding documented in:
 - Documentation/devicetree/bindings/clock/clock-bindings.txt


Required properties of the "clocks" sub-node:
 - #clock-cells: should be 1.
 - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
               "samsung,s2mps14-clk", "samsung,s5m8767-clk"
   The S2MPS15 uses the same compatible as S2MPS13, as both provides similar
   clocks.


Each clock is assigned an identifier and client nodes use this identifier
to specify the clock which they consume.
    Clock               ID           Devices
    ----------------------------------------------------------
    32KhzAP		0            S2MPS11/13/14/15, S5M8767
    32KhzCP		1            S2MPS11/13/15, S5M8767
    32KhzBT		2            S2MPS11/13/14/15, S5M8767

Include dt-bindings/clock/samsung,s2mps11.h file to use preprocessor defines
in device tree sources.


Example:

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

		s2m_osc: clocks {
			compatible = "samsung,s2mps11-clk";
			#clock-cells = <1>;
			clock-output-names = "xx", "yy", "zz";
		};
	};
+45 −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/clock/samsung,s2mps11.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung S2M and S5M family clock generator block

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 S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz
  outputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs.

  All available clocks are defined as preprocessor macros in
  dt-bindings/clock/samsung,s2mps11.h header.

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

properties:
  compatible:
    enum:
      - samsung,s2mps11-clk
      - samsung,s2mps13-clk # S2MPS13 and S2MPS15
      - samsung,s2mps14-clk
      - samsung,s5m8767-clk

  "#clock-cells":
    const: 1

  clock-output-names:
    minItems: 3
    maxItems: 3
    description: Names for AP, CP and BT clocks.

required:
  - compatible
  - "#clock-cells"

additionalProperties: false
+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
+0 −102
Original line number Diff line number Diff line
Binding for Samsung S2M family 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 S2MPS11/13/14/15 and S2MPU02 devices 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 different devices:
	- LDOn
		  - valid values for n are:
			- S2MPS11: 1 to 38
			- S2MPS13: 1 to 40
			- S2MPS14: 1 to 25
			- S2MPS15: 1 to 27
			- S2MPU02: 1 to 28
		  - Example: LDO1, LDO2, LDO28
	- BUCKn
		  - valid values for n are:
			- S2MPS11: 1 to 10
			- S2MPS13: 1 to 10
			- S2MPS14: 1 to 5
			- S2MPS15: 1 to 10
			- S2MPU02: 1 to 7
		  - 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 the nodes under "regulators" sub-node:
 - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500,
   25000 (default) or 50000.

   Additionally S2MPS11 supports disabling ramp delay for BUCK{2,3,4,6}
   by setting it to <0>.

   Note: On S2MPS11 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{3,4},
    - buck{7,8,10}.

 - samsung,ext-control-gpios: On S2MPS14 the LDO10, LDO11 and LDO12 can be
   configured to external control over GPIO. To turn this feature on this
   property must be added to the regulator sub-node:
    - samsung,ext-control-gpios: GPIO specifier for one GPIO
                                 controlling this regulator (enable/disable)
  Example:
	LDO12 {
		regulator-name = "V_EMMC_2.8V";
		regulator-min-microvolt = <2800000>;
		regulator-max-microvolt = <2800000>;
		samsung,ext-control-gpios = <&gpk0 2 0>;
	};


Example:

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

		regulators {
			ldo1_reg: LDO1 {
				regulator-name = "VDD_ABB_3.3V";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
			};

			ldo2_reg: LDO2 {
				regulator-name = "VDD_ALIVE_1.1V";
				regulator-min-microvolt = <1100000>;
				regulator-max-microvolt = <1100000>;
				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>;
			};
		};
	};
Loading