Unverified Commit a5b8e4a5 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branch 'regulator/for-5.19' into regulator-next

parents b11b3d21 68d6c847
Loading
Loading
Loading
Loading
+81 −0
Original line number Diff line number Diff line
@@ -370,3 +370,84 @@ Description:

		'unknown' means software cannot determine the state, or
		the reported state is invalid.

What:		/sys/class/regulator/.../under_voltage
Date:		April 2022
KernelVersion:	5.18
Contact:	Zev Weiss <zev@bewilderbeest.net>
Description:
		Some regulator directories will contain a field called
		under_voltage.  This indicates if the device reports an
		under-voltage fault (1) or not (0).

What:		/sys/class/regulator/.../over_current
Date:		April 2022
KernelVersion:	5.18
Contact:	Zev Weiss <zev@bewilderbeest.net>
Description:
		Some regulator directories will contain a field called
		over_current.  This indicates if the device reports an
		over-current fault (1) or not (0).

What:		/sys/class/regulator/.../regulation_out
Date:		April 2022
KernelVersion:	5.18
Contact:	Zev Weiss <zev@bewilderbeest.net>
Description:
		Some regulator directories will contain a field called
		regulation_out.  This indicates if the device reports an
		out-of-regulation fault (1) or not (0).

What:		/sys/class/regulator/.../fail
Date:		April 2022
KernelVersion:	5.18
Contact:	Zev Weiss <zev@bewilderbeest.net>
Description:
		Some regulator directories will contain a field called
		fail.  This indicates if the device reports an output failure
		(1) or not (0).

What:		/sys/class/regulator/.../over_temp
Date:		April 2022
KernelVersion:	5.18
Contact:	Zev Weiss <zev@bewilderbeest.net>
Description:
		Some regulator directories will contain a field called
		over_temp.  This indicates if the device reports an
		over-temperature fault (1) or not (0).

What:		/sys/class/regulator/.../under_voltage_warn
Date:		April 2022
KernelVersion:	5.18
Contact:	Zev Weiss <zev@bewilderbeest.net>
Description:
		Some regulator directories will contain a field called
		under_voltage_warn.  This indicates if the device reports an
		under-voltage warning (1) or not (0).

What:		/sys/class/regulator/.../over_current_warn
Date:		April 2022
KernelVersion:	5.18
Contact:	Zev Weiss <zev@bewilderbeest.net>
Description:
		Some regulator directories will contain a field called
		over_current_warn.  This indicates if the device reports an
		over-current warning (1) or not (0).

What:		/sys/class/regulator/.../over_voltage_warn
Date:		April 2022
KernelVersion:	5.18
Contact:	Zev Weiss <zev@bewilderbeest.net>
Description:
		Some regulator directories will contain a field called
		over_voltage_warn.  This indicates if the device reports an
		over-voltage warning (1) or not (0).

What:		/sys/class/regulator/.../over_temp_warn
Date:		April 2022
KernelVersion:	5.18
Contact:	Zev Weiss <zev@bewilderbeest.net>
Description:
		Some regulator directories will contain a field called
		over_temp_warn.  This indicates if the device reports an
		over-temperature warning (1) or not (0).
+17 −5
Original line number Diff line number Diff line
@@ -8,14 +8,14 @@ Documentation/devicetree/bindings/regulator/regulator.txt.

The valid names for regulators are::
BUCK:
  buck_vdram1, buck_vcore, buck_vpa, buck_vproc11, buck_vproc12, buck_vgpu,
  buck_vs2, buck_vmodem, buck_vs1
  buck_vdram1, buck_vcore, buck_vcore_sshub, buck_vpa, buck_vproc11,
  buck_vproc12, buck_vgpu, buck_vs2, buck_vmodem, buck_vs1
LDO:
  ldo_vdram2, ldo_vsim1, ldo_vibr, ldo_vrf12, ldo_vio18, ldo_vusb, ldo_vcamio,
  ldo_vcamd, ldo_vcn18, ldo_vfe28, ldo_vsram_proc11, ldo_vcn28, ldo_vsram_others,
  ldo_vsram_gpu, ldo_vxo22, ldo_vefuse, ldo_vaux18, ldo_vmch, ldo_vbif28,
  ldo_vsram_proc12, ldo_vcama1, ldo_vemc, ldo_vio28, ldo_va12, ldo_vrf18,
  ldo_vcn33_bt, ldo_vcn33_wifi, ldo_vcama2, ldo_vmc, ldo_vldo28, ldo_vaud28,
  ldo_vsram_others_sshub, ldo_vsram_gpu, ldo_vxo22, ldo_vefuse, ldo_vaux18,
  ldo_vmch, ldo_vbif28, ldo_vsram_proc12, ldo_vcama1, ldo_vemc, ldo_vio28, ldo_va12,
  ldo_vrf18, ldo_vcn33_bt, ldo_vcn33_wifi, ldo_vcama2, ldo_vmc, ldo_vldo28, ldo_vaud28,
  ldo_vsim2

Example:
@@ -354,5 +354,17 @@ Example:
				regulator-max-microvolt = <3100000>;
				regulator-enable-ramp-delay = <540>;
			};

			mt6358_vcore_sshub_reg: buck_vcore_sshub {
				regulator-name = "vcore_sshub";
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <1293750>;
			};

			mt6358_vsram_others_sshub_reg: ldo_vsram_others_sshub {
				regulator-name = "vsram_others_sshub";
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <1293750>;
			};
		};
	};
+11 −0
Original line number Diff line number Diff line
@@ -92,6 +92,17 @@ properties:
      LDO5CTRL_L or LDO5CTRL_H register. Use this if the SD_VSEL signal is
      connected to a host GPIO.

  nxp,i2c-lt-enable:
    type: boolean
    description:
      Indicates that the I2C Level Translator is used.

  nxp,wdog_b-warm-reset:
    type: boolean
    description:
      When WDOG_B signal is asserted a warm reset will be done instead of cold
      reset.

required:
  - compatible
  - reg
+246 −16
Original line number Diff line number Diff line
@@ -7,7 +7,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Technologies, Inc. RPMh Regulators

maintainers:
  - David Collins <collinsd@codeaurora.org>
  - Bjorn Andersson <bjorn.andersson@linaro.org>
  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

description: |
    rpmh-regulator devices support PMIC regulator management via the Voltage
@@ -78,7 +79,7 @@ properties:
        RPMh resource name suffix used for the regulators found
        on this PMIC.
    $ref: /schemas/types.yaml#/definitions/string
    enum: [a, b, c, d, e, f]
    enum: [a, b, c, d, e, f, h, k]

  qcom,always-wait-for-ack:
    description: |
@@ -94,35 +95,264 @@ properties:
  vdd-rgb-supply:
    description: Input supply phandle of rgb.

  vin-lvs-1-2-supply:
    description: Input supply phandle of one or more regulators.

  vdd-bob-supply:
    description: BOB regulator parent supply phandle.

  bob:
    type: object
    $ref: "regulator.yaml#"
    description: BOB regulator node.

patternProperties:
  "^vdd-s([0-9]+)-supply$":
    description: Input supply phandle(s) of one or more regulators.

  "^vdd-(l[0-9]+[-]){1,5}supply$":
    description: Input supply phandle(s) of one or more regulators.

  "^(smps|ldo|lvs)[0-9]+$":
    type: object
    $ref: "regulator.yaml#"
    description: smps/ldo regulator nodes(s).

additionalProperties: false

required:
  - compatible
  - qcom,pmic-id

allOf:
  - if:
      properties:
        compatible:
          enum:
            - qcom,pm6150-rpmh-regulators
    then:
      properties:
        vdd-l2-l3-supply: true
        vdd-l4-l7-l8-supply: true
        vdd-l5-l16-l17-l18-l19-supply: true
        vdd-l10-l14-l15-supply: true
        vdd-l11-l12-l13-supply: true
      patternProperties:
        "^vdd-l[169]-supply$": true
        "^vdd-s[1-5]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm6150l-rpmh-regulators
    then:
      properties:
        vdd-bob-supply:
          description: BOB regulator parent supply phandle.
        vdd-l1-l8-supply: true
        vdd-l2-l3-supply: true
        vdd-l4-l5-l6-supply: true
        vdd-l7-l11-supply: true
        vdd-l9-l10-supply: true
      patternProperties:
        "^vdd-s[1-8]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm7325-rpmh-regulators
    then:
      properties:
        vdd-l1-l4-l12-l15-supply: true
        vdd-l2-l7-supply: true
        vdd-l6-l9-l10-supply: true
        vdd-l11-l17-l18-l19-supply: true
        vdd-l13-supply: true
        vdd-l14-l16-supply: true
      patternProperties:
        "^vdd-l[358]-supply$": true
        "^vdd-s[1-8]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8005-rpmh-regulators
    then:
      patternProperties:
        "^vdd-s[1-4]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8009-rpmh-regulators
            - qcom,pm8009-1-rpmh-regulators
    then:
      properties:
        vdd-l5-l6-supply: true
      patternProperties:
        "^vdd-l[1-47]-supply$": true
        "^vdd-s[1-2]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8150-rpmh-regulators
            - qcom,pmm8155au-rpmh-regulators
    then:
      properties:
        vdd-l1-l8-l11-supply: true
        vdd-l2-l10-supply: true
        vdd-l3-l4-l5-l18-supply: true
        vdd-l6-l9-supply: true
        vdd-l7-l12-l14-l15-supply: true
        vdd-l13-l16-l17-supply: true
      patternProperties:
        "^vdd-s([1-9]|10)-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8150l-rpmh-regulators
    then:
      properties:
        vdd-bob-supply:
          description: BOB regulator parent supply phandle.
        vdd-l1-l8-supply: true
        vdd-l2-l3-supply: true
        vdd-l4-l5-l6-supply: true
        vdd-l7-l11-supply: true
        vdd-l9-l10-supply: true
      patternProperties:
        "^vdd-s[1-8]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8350-rpmh-regulators
    then:
      properties:
        vdd-l1-l4-supply: true
        vdd-l2-l7-supply: true
        vdd-l3-l5-supply: true
        vdd-l6-l9-l10-supply: true
        vdd-l8-supply: true
      patternProperties:
        "^vdd-s([1-9]|1[0-2])-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8350c-rpmh-regulators
    then:
      properties:
        vdd-bob-supply:
          description: BOB regulator parent supply phandle.
        vdd-l1-l12-supply: true
        vdd-l2-l8-supply: true
        vdd-l3-l4-l5-l7-l13-supply: true
        vdd-l6-l9-l11-supply: true
        vdd-l10-supply: true
      patternProperties:
        "^vdd-s([1-9]|10)-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8450-rpmh-regulators
    then:
      patternProperties:
        "^vdd-l[1-4]-supply$": true
        "^vdd-s[1-6]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pm8998-rpmh-regulators
    then:
      properties:
        vdd-l1-l27-supply: true
        vdd-l2-l8-l17-supply: true
        vdd-l3-l11-supply: true
        vdd-l4-l5-supply: true
        vdd-l6-supply: true
        vdd-l7-l12-l14-l15-supply: true
        vdd-l9-supply: true
        vdd-l10-l23-l25-supply: true
        vdd-l13-l19-l21-supply: true
        vdd-l16-l28-supply: true
        vdd-l18-l22-supply: true
        vdd-l20-l24-supply: true
        vdd-l26-supply: true
        vin-lvs-1-2-supply: true
      patternProperties:
        "^vdd-s([1-9]|1[0-3])-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pmg1110-rpmh-regulators
    then:
      properties:
        vdd-s1-supply: true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pmi8998-rpmh-regulators
    then:
      properties:
        vdd-bob-supply:
          description: BOB regulator parent supply phandle.

  - if:
      properties:
        compatible:
          enum:
            - qcom,pmr735a-rpmh-regulators
    then:
      properties:
        vdd-l1-l2-supply: true
        vdd-l3-supply: true
        vdd-l4-supply: true
        vdd-l5-l6-supply: true
        vdd-l7-bob-supply: true
      patternProperties:
        "^vdd-s[1-3]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pmx55-rpmh-regulators
    then:
      properties:
        vdd-l1-l2-supply: true
        vdd-l3-l9-supply: true
        vdd-l4-l12-supply: true
        vdd-l5-l6-supply: true
        vdd-l7-l8-supply: true
        vdd-l10-l11-l13-supply: true
      patternProperties:
        "^vdd-l1[4-6]-supply$": true
        "^vdd-s[1-7]-supply$": true

  - if:
      properties:
        compatible:
          enum:
            - qcom,pmx65-rpmh-regulators
    then:
      properties:
        vdd-l2-l18-supply: true
        vdd-l5-l6-l16-supply: true
        vdd-l8-l9-supply: true
        vdd-l11-l13-supply: true
      patternProperties:
        "^vdd-l[1347]-supply$": true
        "^vdd-l1[0245789]-supply$": true
        "^vdd-l2[01]-supply$": true
        "^vdd-s[1-8]-supply$": true

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+15 −6
Original line number Diff line number Diff line
@@ -17,9 +17,6 @@ description: |
  Datasheet is available at
  https://www.richtek.com/assets/product_file/RT4801H/DS4801H-00.pdf

#The valid names for RT4801 regulator nodes are:
#DSVP, DSVN

properties:
  compatible:
    enum:
@@ -33,10 +30,13 @@ properties:
      The first one is ENP to enable DSVP, and second one is ENM to enable DSVN.
      Number of GPIO in the array list could be 1 or 2.
      If only one gpio is specified, only one gpio used to control ENP/ENM.
      Else both are spefied, DSVP/DSVN could be controlled individually.
      Othersie, this property not specified. treat both as always-on regulator.
      Else if both are specified, DSVP/DSVN could be controlled individually.
      If this property not specified, treat both as always-on regulators.

      Property is deprecated. Use enable-gpios in each regulator.
    minItems: 1
    maxItems: 2
    deprecated: true

patternProperties:
  "^DSV(P|N)$":
@@ -45,6 +45,14 @@ patternProperties:
    description:
      Properties for single display bias regulator.

    properties:
      enable-gpios:
        description:
          GPIO to use to enable DSVP/DSVN regulator. One GPIO can be configured
          for controlling both regulators.  If this property not specified for
          any regulator, treat both as always-on regulators.
        maxItems: 1

required:
  - compatible
  - reg
@@ -60,19 +68,20 @@ examples:
        rt4801@73 {
            compatible = "richtek,rt4801";
            reg = <0x73>;
            enable-gpios = <&gpio26 2 0>, <&gpio26 3 0>;

            dsvp: DSVP {
                regulator-name = "rt4801,dsvp";
                regulator-min-microvolt = <4000000>;
                regulator-max-microvolt = <6000000>;
                regulator-boot-on;
                enable-gpios = <&gpio26 2 0>;
            };
            dsvn: DSVN {
                regulator-name = "rt4801,dsvn";
                regulator-min-microvolt = <4000000>;
                regulator-max-microvolt = <6000000>;
                regulator-boot-on;
                enable-gpios = <&gpio26 3 0>;
            };

        };
Loading