Commit 2385018a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull mfd updates from Lee Jones:
 "New Device Support:
   - Add support for Qualcomm PM8937 PMIC to QCOM SPMI PMIC

  Fix-ups:
   - Use/convert to new/better APIs/helpers/MACROs instead of
     hand-rolling implementations
   - Device Tree binding adaptions/conversions/creation
   - Improve error handling; return proper error values, simplify,
     avoid duplicates, etc
   - Continue work to remove superfluous platform .remove() call-backs
   - Move some exported symbols into private namespaces
   - Clean-up and staticify PM related operations
   - Trivial; spelling, whitespace, clean-ups, etc
   - Fix include lists; alphabetise, remove unused, explicitly add used

  Bug Fixes:
   - Use PLATFORM_DEVID_AUTO to ensure multiple duplicate devices can
     co-exist
   - Ensure debugfs register view is correctly presented
   - Fix ordering and value issues in current use of
     clk_register_fractional_divider()
   - Repair Kconfig based dependency lists"

* tag 'mfd-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (50 commits)
  mfd: ti_am335x_tscadc: Fix TI SoC dependencies
  dt-bindings: mfd: sprd: Add support for UMS9620
  mfd: ab8500-sysctrl: Drop ancient charger
  mfd: intel-lpss: Fix the fractional clock divider flags
  mfd: tps6594: Add null pointer check to tps6594_device_init()
  dt-bindings: mfd: pm8008: Clean up example node names
  dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Clean up example
  dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Fix regulator binding
  dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Fix up binding reference
  mfd: da9062: Simplify obtaining I2C match data
  mfd: syscon: Fix null pointer dereference in of_syscon_register()
  mfd: intel-lpss: Don't fail probe on success of pci_alloc_irq_vectors()
  mfd: twl6030-irq: Revert to use of_match_device()
  mfd: cs42l43: Correct order of include files to be alphabetical
  mfd: cs42l43: Correct SoundWire port list
  mfd: Fix a few spelling mistakes in PMIC header file comments
  mfd: intel-lpss: Provide Intel LPSS PM ops structure
  mfd: intel-lpss: Move exported symbols to INTEL_LPSS namespace
  mfd: intel-lpss: Adjust header inclusions
  mfd: intel-lpss: Use device_get_match_data()
  ...
parents a2ec2071 284d16c4
Loading
Loading
Loading
Loading
+223 −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/mfd/ams,as3711.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Austria MicroSystems AS3711 Quad Buck High Current PMIC with Charger

maintainers:
  - Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>

description:
  AS3711 is an I2C PMIC from Austria MicroSystems with multiple DC/DC and LDO
  power supplies, a battery charger and an RTC.  So far only bindings for the
  two step-up DC/DC converters are defined.

properties:
  compatible:
    const: ams,as3711

  reg:
    maxItems: 1

  backlight:
    description:
      Step-up converter configuration, to be used as a backlight source
    type: object
    additionalProperties: false
    properties:
      compatible:
        const: ams,as3711-bl

      su1-dev:
        description: Framebuffer phandle for the first step-up converter
        $ref: /schemas/types.yaml#/definitions/phandle

      su1-max-uA:
        description: Maximum current for the first step-up converter
        $ref: /schemas/types.yaml#/definitions/uint32

      su2-dev:
        description: Framebuffer phandle for the second step-up converter
        $ref: /schemas/types.yaml#/definitions/phandle

      su2-max-uA:
        description: Maximum current for the second step-up converter
        $ref: /schemas/types.yaml#/definitions/uint32

      su2-feedback-voltage:
        description: Second step-up converter uses voltage feedback
        type: boolean

      su2-feedback-curr1:
        description:
          Second step-up converter uses CURR1 input for current feedback
        type: boolean

      su2-feedback-curr2:
        description:
          Second step-up converter uses CURR2 input for current feedback
        type: boolean

      su2-feedback-curr3:
        description:
          Second step-up converter uses CURR3 input for current feedback
        type: boolean

      su2-feedback-curr-auto:
        description:
          Second step-up converter uses automatic current feedback selection
        type: boolean

      su2-fbprot-lx-sd4:
        description:
          Second step-up converter uses LX_SD4 for over-voltage protection
        type: boolean

      su2-fbprot-gpio2:
        description:
          Second step-up converter uses GPIO2 for over-voltage protection
        type: boolean

      su2-fbprot-gpio3:
        description:
          Second step-up converter uses GPIO3 for over-voltage protection
        type: boolean

      su2-fbprot-gpio4:
        description:
          Second step-up converter uses GPIO4 for over-voltage protection
        type: boolean

      su2-auto-curr1:
        description:
          Second step-up converter uses CURR1 input for automatic current
          feedback
        type: boolean

      su2-auto-curr2:
        description:
          Second step-up converter uses CURR2 input for automatic current
          feedback
        type: boolean

      su2-auto-curr3:
        description:
          Second step-up converter uses CURR3 input for automatic current
          feedback
        type: boolean

    required:
      - compatible

    dependentRequired:
      # To use the SU1 converter as a backlight source the following two
      # properties must be provided:
      su1-dev: [ su1-max-uA ]
      su1-max-uA: [ su1-dev ]

      # To use the SU2 converter as a backlight source the following two
      # properties must be provided:
      su2-dev: [ su2-max-uA ]
      su2-max-uA: [ su2-dev ]

      su2-feedback-voltage: [ su2-dev ]
      su2-feedback-curr1: [ su2-dev ]
      su2-feedback-curr2: [ su2-dev ]
      su2-feedback-curr3: [ su2-dev ]
      su2-feedback-curr-auto: [ su2-dev ]
      su2-fbprot-lx-sd4: [ su2-dev ]
      su2-fbprot-gpio2: [ su2-dev ]
      su2-fbprot-gpio3: [ su2-dev ]
      su2-fbprot-gpio4: [ su2-dev ]
      su2-auto-curr1: [ su2-feedback-curr-auto ]
      su2-auto-curr2: [ su2-feedback-curr-auto ]
      su2-auto-curr3: [ su2-feedback-curr-auto ]

    dependentSchemas:
      su2-dev:
        allOf:
          - oneOf:
              - required:
                  - su2-feedback-voltage
              - required:
                  - su2-feedback-curr1
              - required:
                  - su2-feedback-curr2
              - required:
                  - su2-feedback-curr3
              - required:
                  - su2-feedback-curr-auto
          - oneOf:
              - required:
                  - su2-fbprot-lx-sd4
              - required:
                  - su2-fbprot-gpio2
              - required:
                  - su2-fbprot-gpio3
              - required:
                  - su2-fbprot-gpio4

      su2-feedback-curr-auto:
        anyOf:
          - required:
              - su2-auto-curr1
          - required:
              - su2-auto-curr2
          - required:
              - su2-auto-curr3

  regulators:
    description: Other DC/DC and LDO supplies
    type: object
    unevaluatedProperties: false
    patternProperties:
      "^(sd[1-4]|ldo[1-8])$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

required:
  - compatible
  - reg

additionalProperties: false

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

        pmic@40 {
            compatible = "ams,as3711";
            reg = <0x40>;

            regulators {
                sd4 {
                    regulator-name = "1.215V";
                    regulator-min-microvolt = <1215000>;
                    regulator-max-microvolt = <1235000>;
                };
                ldo2 {
                    regulator-name = "2.8V CPU";
                    regulator-min-microvolt = <2800000>;
                    regulator-max-microvolt = <2800000>;
                    regulator-always-on;
                    regulator-boot-on;
                };
            };

            backlight {
                compatible = "ams,as3711-bl";
                su2-dev = <&lcdc>;
                su2-max-uA = <36000>;
                su2-feedback-curr-auto;
                su2-fbprot-gpio4;
                su2-auto-curr1;
                su2-auto-curr2;
                su2-auto-curr3;
            };
        };
    };
+0 −73
Original line number Diff line number Diff line
AS3711 is an I2C PMIC from Austria MicroSystems with multiple DCDC and LDO power
supplies, a battery charger and an RTC. So far only bindings for the two stepup
DCDC converters are defined. Other DCDC and LDO supplies are configured, using
standard regulator properties, they must belong to a sub-node, called
"regulators" and be called "sd1" to "sd4" and "ldo1" to "ldo8." Stepup converter
configuration should be placed in a subnode, called "backlight."

Compulsory properties:
- compatible		: must be "ams,as3711"
- reg			: specifies the I2C address

To use the SU1 converter as a backlight source the following two properties must
be provided:
- su1-dev		: framebuffer phandle
- su1-max-uA		: maximum current

To use the SU2 converter as a backlight source the following two properties must
be provided:
- su2-dev		: framebuffer phandle
- su1-max-uA		: maximum current

Additionally one of these properties must be provided to select the type of
feedback used:
- su2-feedback-voltage	: voltage feedback is used
- su2-feedback-curr1	: CURR1 input used for current feedback
- su2-feedback-curr2	: CURR2 input used for current feedback
- su2-feedback-curr3	: CURR3 input used for current feedback
- su2-feedback-curr-auto: automatic current feedback selection

and one of these to select the over-voltage protection pin
- su2-fbprot-lx-sd4	: LX_SD4 is used for over-voltage protection
- su2-fbprot-gpio2	: GPIO2 is used for over-voltage protection
- su2-fbprot-gpio3	: GPIO3 is used for over-voltage protection
- su2-fbprot-gpio4	: GPIO4 is used for over-voltage protection

If "su2-feedback-curr-auto" is selected, one or more of the following properties
have to be specified:
- su2-auto-curr1	: use CURR1 input for current feedback
- su2-auto-curr2	: use CURR2 input for current feedback
- su2-auto-curr3	: use CURR3 input for current feedback

Example:

as3711@40 {
	compatible = "ams,as3711";
	reg = <0x40>;

	regulators {
		sd4 {
			regulator-name = "1.215V";
			regulator-min-microvolt = <1215000>;
			regulator-max-microvolt = <1235000>;
		};
		ldo2 {
			regulator-name = "2.8V CPU";
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
			regulator-always-on;
			regulator-boot-on;
		};
	};

	backlight {
		compatible = "ams,as3711-bl";
		su2-dev = <&lcdc>;
		su2-max-uA = <36000>;
		su2-feedback-curr-auto;
		su2-fbprot-gpio4;
		su2-auto-curr1;
		su2-auto-curr2;
		su2-auto-curr3;
	};
};
+68 −72
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ description: |
  node.

  The SPMI controller part is provided by
  Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
  Documentation/devicetree/bindings/spmi/hisilicon,hisi-spmi-controller.yaml

properties:
  $nodename:
@@ -42,13 +42,6 @@ properties:

    additionalProperties: false

    properties:
      '#address-cells':
        const: 1

      '#size-cells':
        const: 0

    patternProperties:
      '^ldo[0-9]+$':
        type: object
@@ -66,10 +59,15 @@ additionalProperties: false

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

    spmi {
        #address-cells = <2>;
        #size-cells = <0>;

    pmic: pmic@0 {
        pmic@0 {
            compatible = "hisilicon,hi6421v600-spmi";
      reg = <0 0>;
            reg = <0 SPMI_USID>;

            #interrupt-cells = <2>;
            interrupt-controller;
@@ -77,61 +75,59 @@ examples:
            interrupts = <0 0>;

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

        ldo3: ldo3 {
                ldo3 {
                    regulator-name = "ldo3";
                    regulator-min-microvolt = <1500000>;
                    regulator-max-microvolt = <2000000>;
                    regulator-boot-on;
                };

        ldo4: ldo4 {
                ldo4 {
                    regulator-name = "ldo4";
                    regulator-min-microvolt = <1725000>;
                    regulator-max-microvolt = <1900000>;
                    regulator-boot-on;
                };

        ldo9: ldo9 {
                ldo9 {
                    regulator-name = "ldo9";
                    regulator-min-microvolt = <1750000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-boot-on;
                };

        ldo15: ldo15 {
                ldo15 {
                    regulator-name = "ldo15";
                    regulator-min-microvolt = <1800000>;
                    regulator-max-microvolt = <3000000>;
                    regulator-always-on;
                };

        ldo16: ldo16 {
                ldo16 {
                    regulator-name = "ldo16";
                    regulator-min-microvolt = <1800000>;
                    regulator-max-microvolt = <3000000>;
                    regulator-boot-on;
                };

        ldo17: ldo17 {
                ldo17 {
                    regulator-name = "ldo17";
                    regulator-min-microvolt = <2500000>;
                    regulator-max-microvolt = <3300000>;
                };

        ldo33: ldo33 {
                ldo33 {
                    regulator-name = "ldo33";
                    regulator-min-microvolt = <2500000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-boot-on;
                };

        ldo34: ldo34 {
                ldo34 {
                    regulator-name = "ldo34";
                    regulator-min-microvolt = <2600000>;
                    regulator-max-microvolt = <3300000>;
                };
            };
        };
    };
+4 −2
Original line number Diff line number Diff line
@@ -99,10 +99,12 @@ examples:
  - |
    #include <dt-bindings/mfd/qcom-pm8008.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    qupv3_se13_i2c {

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

      pmic@8 {
        compatible = "qcom,pm8008";
        reg = <0x8>;
        #address-cells = <1>;
+7 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ properties:
          - qcom,pm8841
          - qcom,pm8909
          - qcom,pm8916
          - qcom,pm8937
          - qcom,pm8941
          - qcom,pm8950
          - qcom,pm8953
@@ -134,9 +135,15 @@ patternProperties:
    type: object
    $ref: /schemas/sound/qcom,pm8916-wcd-analog-codec.yaml#

  "^battery@[0-9a-f]+$":
    type: object
    oneOf:
      - $ref: /schemas/power/supply/qcom,pm8916-bms-vm.yaml#

  "^charger@[0-9a-f]+$":
    type: object
    oneOf:
      - $ref: /schemas/power/supply/qcom,pm8916-lbc.yaml#
      - $ref: /schemas/power/supply/qcom,pm8941-charger.yaml#
      - $ref: /schemas/power/supply/qcom,pm8941-coincell.yaml#
      - $ref: /schemas/power/supply/qcom,pmi8998-charger.yaml#
Loading