Commit 65234f96 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regulator updates from Mark Brown:
 "Other than new device support and some minor fixes this has been a
  really quiet release, the only notable things are the new drivers.

  There's a couple of MFDs among the new devices so the generic parts
  are pulled in:

   - Support for Analog Devices MAX77831/57/59, Awinc AW37503, Qualcom
     PMX75 and RFGEN, RealTek RT5733, RichTek RTQ2208 and Texas
     Instruments TPS65086"

* tag 'regulator-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (68 commits)
  regulator: userspace-consumer: Drop event support for this cycle
  regulator: aw37503: Switch back to use struct i2c_driver's .probe()
  dt-bindings: regulator: qcom,rpmh-regulator: allow i, j, l, m & n as RPMh resource name suffix
  regulator: dt-bindings: Add Awinic AW37503
  regulator: aw37503: add regulator driver for Awinic AW37503
  regulator: tps65086: Select dedicated regulator config for chip variant
  mfd: tps65086: Read DEVICE ID register 1 from device
  regulator: raa215300: Update help description
  regulator: raa215300: Add missing blank space
  regulator: raa215300: Change rate from 32000->32768
  regulator: db8500-prcmu: Remove unused declaration power_state_active_is_enabled()
  regulator: raa215300: Add const definition
  regulator: raa215300: Fix resource leak in case of error
  regulator: rtq2208: Switch back to use struct i2c_driver's .probe()
  regulator: lp872x: Fix Wvoid-pointer-to-enum-cast warning
  regulator: max77857: Fix Wvoid-pointer-to-enum-cast warning
  regulator: ltc3589: Fix Wvoid-pointer-to-enum-cast warning
  regulator: qcom_rpm-regulator: Use devm_kmemdup to replace devm_kmalloc + memcpy
  regulator: tps6286x-regulator: Remove redundant of_match_ptr() macros
  regulator: pfuze100-regulator: Remove redundant of_match_ptr() macro
  ...
parents 0fc81f37 b96c2247
Loading
Loading
Loading
Loading
+18 −56
Original line number Diff line number Diff line
@@ -28,75 +28,37 @@ properties:
      the VSEL pin is assumed to be low.
    type: boolean

  regulators:
    type: object
    additionalProperties: false
  inl1-supply:
    description: Handle to the INL1 input supply (REG5-7)

    properties:
      REG1:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false
  inl2-supply:
    description: Handle to the INL2 input supply (REG8-9)

        properties:
          vp1-supply:
            description: Handle to the VP1 input supply
  inl3-supply:
    description: Handle to the INL3 input supply (REG10-12)

      REG2:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false
  vp1-supply:
    description: Handle to the VP1 input supply (REG1)

        properties:
  vp2-supply:
            description: Handle to the VP2 input supply
    description: Handle to the VP2 input supply (REG2)

      REG3:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
  vp3-supply:
            description: Handle to the VP3 input supply

      REG4:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false
    description: Handle to the VP3 input supply (REG3)

        properties:
  vp4-supply:
            description: Handle to the VP4 input supply

    patternProperties:
      "^REG[5-7]$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          inl1-supply:
            description: Handle to the INL1 input supply
    description: Handle to the VP4 input supply (REG4)

      "^REG[8-9]$":
  regulators:
    type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          inl2-supply:
            description: Handle to the INL2 input supply
    additionalProperties: false

      "^REG1[0-2]$":
    patternProperties:
      "^REG([1-9]|1[0-2])$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          inl3-supply:
            description: Handle to the INL3 input supply

additionalProperties: false

required:
+86 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2022 Analog Devices Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/adi,max77857.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices MAX77857 Buck-Boost Converter

maintainers:
  - Ibrahim Tilki <Ibrahim.Tilki@analog.com>
  - Okan Sahin <Okan.Sahin@analog.com>

description: Analog Devices MAX77857 Buck-Boost Converter

properties:
  compatible:
    enum:
      - adi,max77831
      - adi,max77857
      - adi,max77859
      - adi,max77859a

  reg:
    description: I2C address of the device
    items:
      - enum: [0x66, 0x67, 0x6E, 0x6F]

  interrupts:
    maxItems: 1

  adi,switch-frequency-hz:
    description: Switching frequency of the Buck-Boost converter in Hz.
    items:
      - enum: [1200000, 1500000, 1800000, 2100000]

  adi,rtop-ohms:
    description: Top feedback resistor value in ohms for external feedback.
    minimum: 150000
    maximum: 330000

  adi,rbot-ohms:
    description: Bottom feedback resistor value in ohms for external feedback.

dependencies:
  adi,rtop-ohms: [ 'adi,rbot-ohms' ]
  adi,rbot-ohms: [ 'adi,rtop-ohms' ]

required:
  - compatible
  - reg

allOf:
  - $ref: regulator.yaml#
  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,max77831

    then:
      properties:
        adi,switch-frequency-hz:
          items:
            enum: [1200000, 1500000, 1800000]

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        regulator@66 {
            reg = <0x66>;
            compatible = "adi,max77857";
            interrupt-parent = <&gpio>;
            interrupts = <26 IRQ_TYPE_EDGE_FALLING>;

            adi,rtop-ohms = <312000>;
            adi,rbot-ohms = <12000>;
        };
    };
+78 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/awinic,aw37503.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Awinic AW37503 Voltage Regulator

maintainers:
  - Alec Li <like@awinic.com>

description:
  The AW37503 are dual voltage regulator, designed to support positive/negative
  supply for driving TFT-LCD panels. It support software-configurable output
  switching and monitoring. The output voltages can be programmed via an I2C
  compatible interface.

properties:
  compatible:
    const: awinic,aw37503

  reg:
    maxItems: 1

patternProperties:
  "^out[pn]$":
    type: object
    $ref: regulator.yaml#
    unevaluatedProperties: false
    description:
      Properties for single regulator.

    properties:
      enable-gpios:
        maxItems: 1
        description:
          GPIO specifier to enable the GPIO control (on/off) for regulator.

    required:
      - regulator-name

required:
  - compatible
  - reg
  - outp
  - outn

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

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

        regulator@3e {
            compatible = "awinic,aw37503";
            reg = <0x3e>;

            outp {
                regulator-name = "outp";
                regulator-boot-on;
                regulator-always-on;
                enable-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
            };

            outn {
                regulator-name = "outn";
                regulator-boot-on;
                regulator-always-on;
                enable-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
            };
        };
    };
...
+17 −5
Original line number Diff line number Diff line
@@ -95,11 +95,6 @@ properties:
          Properties for a single BUCK regulator

        properties:
          regulator-name:
            pattern: "^BUCK([1-2])$"
            description: |
              BUCK2 present in DA9122, DA9220, DA9131, DA9132 only

          regulator-initial-mode:
            enum: [ 0, 1, 2, 3 ]
            description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
@@ -122,6 +117,23 @@ required:
  - reg
  - regulators

allOf:
  - if:
      properties:
        compatible:
          not:
            contains:
              enum:
                - dlg,da9122
                - dlg,da9131
                - dlg,da9132
                - dlg,da9220
    then:
      properties:
        regulators:
          properties:
            buck2: false

additionalProperties: false

examples:
+132 −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/dlg,slg51000.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Dialog Semiconductor SLG51000 Voltage Regulator

maintainers:
  - Eric Jeong <eric.jeong.opensource@diasemi.com>
  - Support Opensource <support.opensource@diasemi.com>

properties:
  compatible:
    const: dlg,slg51000

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  dlg,cs-gpios:
    maxItems: 1
    description:
      GPIO for chip select

  vin3-supply:
    description:
      Input supply for ldo3, required if regulator is enabled

  vin4-supply:
    description:
      Input supply for ldo4, required if regulator is enabled

  vin5-supply:
    description:
      Input supply for ldo5, required if regulator is enabled

  vin6-supply:
    description:
      Input supply for ldo6, required if regulator is enabled

  vin7-supply:
    description:
      Input supply for ldo7, required if regulator is enabled

  regulators:
    type: object
    additionalProperties: false

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

        properties:
          enable-gpios:
            maxItems: 1

        required:
          - regulator-name

required:
  - compatible
  - reg
  - regulators

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/regulator/dlg,da9121-regulator.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        pmic@75 {
            compatible = "dlg,slg51000";
            reg = <0x75>;
            dlg,cs-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
            vin5-supply = <&vreg_s1f_1p2>;
            vin6-supply = <&vreg_s1f_1p2>;

            regulators {
                ldo1 {
                    regulator-name = "slg51000_b_ldo1";
                    regulator-min-microvolt = <2400000>;
                    regulator-max-microvolt = <3300000>;
                };

                ldo2 {
                    regulator-name = "slg51000_b_ldo2";
                    regulator-min-microvolt = <2400000>;
                    regulator-max-microvolt = <3300000>;
                };

                ldo3 {
                    regulator-name = "slg51000_b_ldo3";
                    regulator-min-microvolt = <1200000>;
                    regulator-max-microvolt = <3750000>;
                };

                ldo4 {
                    regulator-name = "slg51000_b_ldo4";
                    regulator-min-microvolt = <1200000>;
                    regulator-max-microvolt = <3750000>;
                };

                ldo5 {
                    regulator-name = "slg51000_b_ldo5";
                    regulator-min-microvolt = <500000>;
                    regulator-max-microvolt = <1200000>;
                };

                ldo6 {
                    regulator-name = "slg51000_b_ldo6";
                    regulator-min-microvolt = <500000>;
                    regulator-max-microvolt = <1200000>;
                };

                ldo7 {
                    regulator-name = "slg51000_b_ldo7";
                    regulator-min-microvolt = <1200000>;
                    regulator-max-microvolt = <3750000>;
                };
            };
        };
    };
Loading