Commit 3a9b0a46 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MFD updates from Lee Jones:
 "Removed Drivers:
   - Remove support for TI TPS80031/TPS80032 PMICs

  New Device Support:
   - Add support for Magnetic Reader to TI AM335x
   - Add support for DA9063_EA to Dialog DA9063
   - Add support for SC2730 PMIC to Spreadtrum SC27xx
   - Add support for MacBookPro16,2 ICL-N UART Intel LPSS PCI
   - Add support for lots of new PMICS in QCom SPMI PMIC
   - Add support for ADC to Diolan DLN2

  New Functionality:
   - Add support for Power Off to Rockchip RK817

  Fix-ups:
   - Simplify Regmap passing to child devices in hi6421-spmi-pmic
   - SPDX licensing updates in ti_am335x_tscadc
   - Improve error handling in ti_am335x_tscadc
   - Expedite clock search in ti_am335x_tscadc
   - Generic simplifications in ti_am335x_tscadc
   - Use generic macros/defines in ti_am335x_tscadc
   - Remove unused code in ti_am335x_tscadc, cros_ec_dev
   - Convert to GPIOD in wcd934x
   - Add namespacing in ti_am335x_tscadc
   - Restrict compilation to relevant arches in intel_pmt
   - Provide better description/documentation in exynos_lpass
   - Add SPI device ID table in altera-a10sr, motorola-cpcap,
     sprd-sc27xx-spi
   - Change IRQ handling in qcom-pm8xxx
   - Split out I2C and SPI code in arizona
   - Explicitly include used headers in altera-a10sr
   - Convert sysfs show() function to in sysfs_emit
   - Standardise *_exit() and *_remove() return values in mc13xxx,
     stmpe, tps65912
   - Trivial (style/spelling/whitespace) fixups in ti_am335x_tscadc,
     qcom-spmi-pmic, max77686-private
   - Device Tree fix-ups in ti,am3359-tscadc, samsung,s2mps11,
     samsung,s2mpa01, samsung,s5m8767, brcm,misc, brcm,cru, syscon,
     qcom,tcsr, xylon,logicvc, max77686, x-powers,ac100,
     x-powers,axp152, x-powers,axp209-gpio, syscon, qcom,spmi-pmic

  Bug Fixes:
   - Balance refcounting (get/put) in ti_am335x_tscadc, mfd-core
   - Fix IRQ trigger type in sec-irq, max77693, max14577
   - Repair off-by-one in altera-sysmgr
   - Add explicit 'select MFD_CORE' to MFD_SIMPLE_MFD_I2C"

* tag 'mfd-next-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (95 commits)
  mfd: simple-mfd-i2c: Select MFD_CORE to fix build error
  mfd: tps80031: Remove driver
  mfd: max77686: Correct tab-based alignment of register addresses
  mfd: wcd934x: Replace legacy gpio interface for gpiod
  dt-bindings: mfd: qcom: pm8xxx: Add pm8018 compatible
  mfd: dln2: Add cell for initializing DLN2 ADC
  mfd: qcom-spmi-pmic: Add missing PMICs supported by socinfo
  mfd: qcom-spmi-pmic: Document ten more PMICs in the binding
  mfd: qcom-spmi-pmic: Sort compatibles in the driver
  mfd: qcom-spmi-pmic: Sort the compatibles in the binding
  mfd: janz-cmoio: Replace snprintf in show functions with sysfs_emit
  mfd: altera-a10sr: Include linux/module.h
  mfd: tps65912: Make tps65912_device_exit() return void
  mfd: stmpe: Make stmpe_remove() return void
  mfd: mc13xxx: Make mc13xxx_common_exit() return void
  dt-bindings: mfd: syscon: Add samsung,exynosautov9-sysreg compatible
  mfd: altera-sysmgr: Fix a mistake caused by resource_size conversion
  dt-bindings: gpio: Convert X-Powers AXP209 GPIO binding to a schema
  dt-bindings: mfd: syscon: Add rk3368 QoS register compatible
  mfd: arizona: Split of_match table into I2C and SPI versions
  ...
parents d20f7a09 5dc6dafe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ Example:
		max77686: max77686@9 {
			compatible = "maxim,max77686";
			interrupt-parent = <&wakeup_eint>;
			interrupts = <26 0>;
			interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
			reg = <0x09>;
			#clock-cells = <1>;

@@ -74,7 +74,7 @@ Example:
		max77802: max77802@9 {
			compatible = "maxim,max77802";
			interrupt-parent = <&wakeup_eint>;
			interrupts = <26 0>;
			interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
			reg = <0x09>;
			#clock-cells = <1>;

+0 −75
Original line number Diff line number Diff line
AXP209 GPIO & pinctrl controller

This driver follows the usual GPIO bindings found in
Documentation/devicetree/bindings/gpio/gpio.txt

This driver follows the usual pinctrl bindings found in
Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt

This driver employs the per-pin muxing pattern.

Required properties:
- compatible: Should be one of:
	- "x-powers,axp209-gpio"
	- "x-powers,axp813-gpio"
- #gpio-cells: Should be two. The first cell is the pin number and the
  second is the GPIO flags.
- gpio-controller: Marks the device node as a GPIO controller.

This node must be a subnode of the axp20x PMIC, documented in
Documentation/devicetree/bindings/mfd/axp20x.txt

Example:

axp209: pmic@34 {
	compatible = "x-powers,axp209";
	reg = <0x34>;
	interrupt-parent = <&nmi_intc>;
	interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
	interrupt-controller;
	#interrupt-cells = <1>;

	axp_gpio: gpio {
		compatible = "x-powers,axp209-gpio";
		gpio-controller;
		#gpio-cells = <2>;
	};
};

The GPIOs can be muxed to other functions and therefore, must be a subnode of
axp_gpio.

Example:

&axp_gpio {
	gpio0_adc: gpio0-adc {
		pins = "GPIO0";
		function = "adc";
	};
};

&example_node {
	pinctrl-names = "default";
	pinctrl-0 = <&gpio0_adc>;
};

GPIOs and their functions
-------------------------

Each GPIO is independent from the other (i.e. GPIO0 in gpio_in function does
not force GPIO1 and GPIO2 to be in gpio_in function as well).

axp209
------
GPIO	|	Functions
------------------------
GPIO0	|	gpio_in, gpio_out, ldo, adc
GPIO1	|	gpio_in, gpio_out, ldo, adc
GPIO2	|	gpio_in, gpio_out

axp813
------
GPIO	|	Functions
------------------------
GPIO0	|	gpio_in, gpio_out, ldo, adc
GPIO1	|	gpio_in, gpio_out, ldo
+55 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: "http://devicetree.org/schemas/gpio/x-powers,axp209-gpio.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: X-Powers AXP209 GPIO Device Tree Bindings

maintainers:
  - Chen-Yu Tsai <wens@csie.org>

properties:
  "#gpio-cells":
    const: 2
    description: >
      The first cell is the pin number and the second is the GPIO flags.

  compatible:
    oneOf:
      - enum:
          - x-powers,axp209-gpio
          - x-powers,axp813-gpio
      - items:
          - const: x-powers,axp803-gpio
          - const: x-powers,axp813-gpio

  gpio-controller: true

patternProperties:
  "^.*-pins?$":
    $ref: /schemas/pinctrl/pinmux-node.yaml#

    properties:
      pins:
        items:
          enum:
            - GPIO0
            - GPIO1
            - GPIO2

      function:
        enum:
          - adc
          - ldo
          - gpio_in
          - gpio_out

required:
  - compatible
  - "#gpio-cells"
  - gpio-controller

additionalProperties: false

...
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ examples:
        #size-cells = <0>;

        axp221: pmic@68 {
            compatible = "x-powers,axp221";
            /* compatible = "x-powers,axp221"; */
            reg = <0x68>;
        };
    };
+70 −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/iio/adc/ti,am3359-adc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: TI AM3359 ADC

maintainers:
  - Miquel Raynal <miquel.raynal@bootlin.com>

properties:
  compatible:
    enum:
      - ti,am3359-adc
      - ti,am4372-adc

  '#io-channel-cells':
    const: 1

  ti,adc-channels:
    description: List of analog inputs available for ADC. AIN0 = 0, AIN1 = 1 and
      so on until AIN7 = 7.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 8

  ti,chan-step-opendelay:
    description: List of open delays for each channel of ADC in the order of
      ti,adc-channels. The value corresponds to the number of ADC clock cycles
      to wait after applying the step configuration registers and before sending
      the start of ADC conversion. Maximum value is 0x3FFFF.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 8

  ti,chan-step-sampledelay:
    description: List of sample delays for each channel of ADC in the order of
      ti,adc-channels. The value corresponds to the number of ADC clock cycles
      to sample (to hold start of conversion high). Maximum value is 0xFF.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 8

  ti,chan-step-avg:
    description: Number of averages to be performed for each channel of ADC. If
      average is 16 (this is also the maximum) then input is sampled 16 times
      and averaged to get more accurate value. This increases the time taken by
      ADC to generate a sample. Maximum value is 16.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 8

required:
  - compatible
  - '#io-channel-cells'
  - ti,adc-channels

additionalProperties: false

examples:
  - |
    adc {
        compatible = "ti,am3359-adc";
        #io-channel-cells = <1>;
        ti,adc-channels = <4 5 6 7>;
        ti,chan-step-opendelay = <0x098 0x3ffff 0x098 0x0>;
        ti,chan-step-sampledelay = <0xff 0x0 0xf 0x0>;
        ti,chan-step-avg = <16 2 4 8>;
    };
Loading