Commit ad665780 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regulator updates from Mark Brown:
 "This is a very quiet release for regulator, almost all the changes are
  new drivers but we do also have some improvements for the Rust
  bindings.

   - Additional APIs added to the Rust bindings

   - Support for Maxim MAX77838, NXP PF0900 and PF5300, Richtek RT5133
     and SpacemiT P1"

* tag 'regulator-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (28 commits)
  regulator: dt-bindings: qcom,sdm845-refgen-regulator: document more platforms
  regulator: Fix MAX77838 selection
  regulator: spacemit: support SpacemiT P1 regulators
  regulator: max77838: add max77838 regulator driver
  dt-bindings: regulator: document max77838 pmic
  rust: regulator: add devm_enable and devm_enable_optional
  rust: regulator: remove Regulator<Dynamic>
  regulator: dt-bindings: rpi-panel: Split 7" Raspberry Pi 720x1280 v2 binding
  regulator: pf530x: Add a driver for the NXP PF5300 Regulator
  regulator: dt-bindings: nxp,pf530x: Add NXP PF5300/PF5301/PF5302 PMICs
  regulator: scmi: Use int type to store negative error codes
  regulator: core: Remove redundant ternary operators
  rust: regulator: use `to_result` for error handling
  regulator: consumer.rst: document bulk operations
  regulator: rt5133: Fix IS_ERR() vs NULL bug in rt5133_validate_vendor_info()
  regulator: bd718x7: Use kcalloc() instead of kzalloc()
  regulator: rt5133: Fix spelling mistake "regualtor" -> "regulator"
  regulator: remove unneeded 'fast_io' parameter in regmap_config
  regulator: rt5133: Add RT5133 PMIC regulator Support
  regulator: dt-bindings: Add Richtek RT5133 Support
  ...
parents c252b8cf e6094388
Loading
Loading
Loading
Loading
+0 −82
Original line number Diff line number Diff line
Device-Tree bindings for Active-semi ACT8945A MFD driver

Required properties:
 - compatible: "active-semi,act8945a".
 - reg: the I2C slave address for the ACT8945A chip

The chip exposes two subdevices:
 - a regulators: see ../regulator/act8945a-regulator.txt
 - a charger: see ../power/act8945a-charger.txt

Example:
	pmic@5b {
		compatible = "active-semi,act8945a";
		reg = <0x5b>;

		active-semi,vsel-high;

		regulators {
			vdd_1v35_reg: REG_DCDC1 {
				regulator-name = "VDD_1V35";
				regulator-min-microvolt = <1350000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
			};

			vdd_1v2_reg: REG_DCDC2 {
				regulator-name = "VDD_1V2";
				regulator-min-microvolt = <1100000>;
				regulator-max-microvolt = <1300000>;
				regulator-always-on;
			};

			vdd_3v3_reg: REG_DCDC3 {
				regulator-name = "VDD_3V3";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vdd_fuse_reg: REG_LDO1 {
				regulator-name = "VDD_FUSE";
				regulator-min-microvolt = <2500000>;
				regulator-max-microvolt = <2500000>;
				regulator-always-on;
			};

			vdd_3v3_lp_reg: REG_LDO2 {
				regulator-name = "VDD_3V3_LP";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vdd_led_reg: REG_LDO3 {
				regulator-name = "VDD_LED";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vdd_sdhc_1v8_reg: REG_LDO4 {
				regulator-name = "VDD_SDHC_1V8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-always-on;
			};
		};

		charger {
			compatible = "active-semi,act8945a-charger";
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
			interrupt-parent = <&pioA>;
			interrupts = <45 IRQ_TYPE_LEVEL_LOW>;

			active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
			active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
			active-semi,input-voltage-threshold-microvolt = <6600>;
			active-semi,precondition-timeout = <40>;
			active-semi,total-timeout = <3>;
		};
	};
+0 −76
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/active-semi,act8945a-charger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Active-semi ACT8945A Charger Function

maintainers:
  - Sebastian Reichel <sre@kernel.org>

allOf:
  - $ref: power-supply.yaml#

properties:
  compatible:
    const: active-semi,act8945a-charger

  interrupts:
    maxItems: 1

  active-semi,chglev-gpios:
    maxItems: 1
    description: charge current level GPIO

  active-semi,lbo-gpios:
    maxItems: 1
    description: low battery voltage detect GPIO

  active-semi,input-voltage-threshold-microvolt:
    description: |
      Specifies the charger's input over-voltage threshold value.
      Despite the name, specified values are in millivolt (mV).
      Defaults to 6.6 V
    enum: [ 6600, 7000, 7500, 8000 ]

  active-semi,precondition-timeout:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Specifies the charger's PRECONDITION safety timer setting value in minutes.
      If 0, it means to disable this timer.
      Defaults to 40 minutes.
    enum: [ 0, 40, 60, 80 ]

  active-semi,total-timeout:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Specifies the charger's total safety timer setting value in hours;
      If 0, it means to disable this timer;
      Defaults to 3 hours.
    enum: [ 0, 3, 4, 5 ]

required:
  - compatible
  - interrupts
  - active-semi,chglev-gpios
  - active-semi,lbo-gpios

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    pmic {
      charger {
        compatible = "active-semi,act8945a-charger";
        interrupt-parent = <&pioA>;
        interrupts = <45 IRQ_TYPE_LEVEL_LOW>;
        active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
        active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
        active-semi,input-voltage-threshold-microvolt = <6600>;
        active-semi,precondition-timeout = <40>;
        active-semi,total-timeout = <3>;
      };
    };
+19 −6
Original line number Diff line number Diff line
@@ -91,28 +91,41 @@ properties:
        maxItems: 1

      active-semi,chglev-gpios:
        description: CGHLEV GPIO
        description: charge current level GPIO
        maxItems: 1

      active-semi,lbo-gpios:
        description: LBO GPIO
        description: low battery voltage detect GPIO
        maxItems: 1

      active-semi,input-voltage-threshold-microvolt:
        description: Input voltage threshold
        maxItems: 1
        description:
          Specifies the charger's input over-voltage threshold value. Despite
          the name, specified values are in millivolt (mV).
        enum: [ 6600, 7000, 7500, 8000 ]
        default: 6600

      active-semi,precondition-timeout:
        description: Precondition timeout
        description:
          Specifies the charger's PRECONDITION safety timer setting value in
          minutes. If 0, it means to disable this timer.
        enum: [ 0, 40, 60, 80 ]
        default: 40
        $ref: /schemas/types.yaml#/definitions/uint32

      active-semi,total-timeout:
        description: Total timeout
        description:
          Specifies the charger's total safety timer setting value in hours; If
          0, it means to disable this timer;
        enum: [ 0, 3, 4, 5 ]
        default: 3
        $ref: /schemas/types.yaml#/definitions/uint32

    required:
      - compatible
      - interrupts
      - active-semi,chglev-gpios
      - active-semi,lbo-gpios

additionalProperties: false

+68 −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/maxim,max77838.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim Integrated MAX77838 PMIC

maintainers:
  - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>

properties:
  $nodename:
    pattern: "pmic@[0-9a-f]{1,2}"
  compatible:
    enum:
      - maxim,max77838

  reg:
    maxItems: 1

  regulators:
    type: object
    $ref: regulator.yaml#
    description: |
      list of regulators provided by this controller, must be named
      after their hardware counterparts ldo[1-4] and buck

    properties:
      buck:
        type: object
        $ref: regulator.yaml#
        unevaluatedProperties: false

    patternProperties:
      "^ldo([1-4])$":
        type: object
        $ref: regulator.yaml#
        unevaluatedProperties: false

    additionalProperties: false

required:
  - compatible
  - reg
  - regulators

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        pmic@60 {
            compatible = "maxim,max77838";
            reg = <0x60>;

            regulators {
                ldo2 {
                    regulator-min-microvolt = <1800000>;
                    regulator-max-microvolt = <1800000>;
                };
            };
       };
     };
...
+163 −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/nxp,pf0900.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP PF0900 Power Management Integrated Circuit regulators

maintainers:
  - Joy Zou <joy.zou@nxp.com>

description:
  The PF0900 is a power management integrated circuit (PMIC) optimized
  for high performance i.MX9x based applications. It features five high
  efficiency buck converters, three linear and one vaon regulators. It
  provides low quiescent current in Standby and low power off Modes.

properties:
  compatible:
    enum:
      - nxp,pf0900

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  regulators:
    type: object
    additionalProperties: false

    properties:
      vaon:
        type: object
        $ref: regulator.yaml#
        unevaluatedProperties: false

    patternProperties:
      "^ldo[1-3]$":
        type: object
        $ref: regulator.yaml#
        unevaluatedProperties: false

      "^sw[1-5]$":
        type: object
        $ref: regulator.yaml#
        unevaluatedProperties: false

  nxp,i2c-crc-enable:
    type: boolean
    description:
      The CRC enabled during register read/write. Controlled by customer
      unviewable fuse bits OTP_I2C_CRC_EN. Check chip part number.

required:
  - compatible
  - reg
  - interrupts
  - regulators

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        pmic@8 {
            compatible = "nxp,pf0900";
            reg = <0x08>;
            interrupt-parent = <&pcal6524>;
            interrupts = <89 IRQ_TYPE_LEVEL_LOW>;
            nxp,i2c-crc-enable;

            regulators {
                vaon {
                    regulator-name = "VAON";
                    regulator-min-microvolt = <1800000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-boot-on;
                    regulator-always-on;
                };

                sw1 {
                    regulator-name = "SW1";
                    regulator-min-microvolt = <500000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-boot-on;
                    regulator-always-on;
                    regulator-ramp-delay = <1950>;
                    regulator-state-mem {
                        regulator-on-in-suspend;
                        regulator-suspend-max-microvolt = <650000>;
                        regulator-suspend-min-microvolt = <650000>;
                    };
                };

                sw2 {
                    regulator-name = "SW2";
                    regulator-min-microvolt = <300000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-boot-on;
                    regulator-always-on;
                    regulator-ramp-delay = <1950>;
                };

                sw3 {
                    regulator-name = "SW3";
                    regulator-min-microvolt = <300000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-boot-on;
                    regulator-always-on;
                    regulator-ramp-delay = <1950>;
                };

                sw4 {
                    regulator-name = "SW4";
                    regulator-min-microvolt = <300000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-boot-on;
                    regulator-always-on;
                    regulator-ramp-delay = <1950>;
                };

                sw5 {
                    regulator-name = "SW5";
                    regulator-min-microvolt = <300000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-boot-on;
                    regulator-always-on;
                    regulator-ramp-delay = <1950>;
                };

                ldo1 {
                    regulator-name = "LDO1";
                    regulator-min-microvolt = <750000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-boot-on;
                    regulator-always-on;
                };

                ldo2 {
                    regulator-name = "LDO2";
                    regulator-min-microvolt = <650000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-boot-on;
                    regulator-always-on;
                };

                ldo3 {
                    regulator-name = "LDO3";
                    regulator-min-microvolt = <650000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-boot-on;
                    regulator-always-on;
                };
            };
        };
     };
Loading