Commit 9b18d07b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regulator updates from Mark Brown:
 "This is mostly a drivers update including a couple of new drivers but
  we do have some fixes and improvements to the core as well.

   - Make sure we don't log spuriously about uncontrollable regulators.

   - Don't use delays when we should use sleeps for regulators with
     larger ramp times.

   - Support for MediaTek MT6358 and MT6366, Richtek RT5759 and Silicon
     Mitus SM5703"

* tag 'regulator-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (36 commits)
  regulator: scmi: Fix refcount leak in scmi_regulator_probe
  regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt
  regulator: qcom_smd: Fix up PM8950 regulator configuration
  regulator: core: Fix enable_count imbalance with EXCLUSIVE_GET
  regulator: core: Add error flags to sysfs attributes
  regulator: dt-bindings: qcom,rpmh: document vdd-l7-bob-supply on PMR735A
  regulator: dt-bindings: qcom,rpmh: document supplies per variant
  regulator: dt-bindings: qcom,rpmh: update maintainers
  regulator: mt6315: Enforce regulator-compatible, not name
  regulator: pca9450: Enable DVS control via PMIC_STBY_REQ
  regulator: pca9450: Make warm reset on WDOG_B assertion
  regulator: Add property for WDOG_B warm reset
  regulator: pca9450: Make I2C Level Translator configurable
  regulator: Add property for I2C level shifter
  regulator: sm5703: Correct reference to the common regulator schema
  regulator: sm5703-regulator: Add regulators support for SM5703 MFD
  dt-bindings: regulator: Add bindings for Silicon Mitus SM5703 regulators
  regulator: richtek,rt4801: parse GPIOs per regulator
  regulator: dt-bindings: richtek,rt4801: use existing ena_gpiod feature
  regulator: core: Sleep (not delay) in set_voltage()
  ...
parents 5d23bb5f a5b8e4a5
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).
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ properties:
        $ref: "regulator.yaml#"

        properties:
          regulator-name:
          regulator-compatible:
            pattern: "^vbuck[1-4]$"

    additionalProperties: false
+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>
Loading