Commit 25c456da authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MFD updates from Lee Jones:
 "Core:
   - Add a resource-managed version of alloc_workqueue()
     (`devm_alloc_workqueue()`)
   - Preserve the Open Firmware (OF) node when an ACPI handle
     is present

  Apple SMC:
   - Wire up the Apple SMC power driver by adding a new MFD cell

  Atmel HLCDC:
   - Fetch the LVDS PLL clock as a fallback if the generic sys_clk
     is unavailable

  Broadcom BCM2835 PM:
   - Add support for the BCM2712 power management device
   - Introduce a hardware type identifier to distinguish SoC variants

  Congatec CGBC, KEMPLD, RSMU, Si476x:
   - Fix various kernel-doc warnings and correct struct member names

  DLN2:
   - Drop redundant USB device references and switch to managed
     resource allocations
   - Update bare 'unsigned' types to 'unsigned int'

  ENE KB3930:
   - Use the of_device_is_system_power_controller() wrapper

  EZX PCAP:
   - Avoid rescheduling after destroying the workqueue by switching
     to a device-managed workqueue
   - Drop redundant memory allocation error messages
   - Return directly instead of using empty goto statements

  Freescale i.MX25 TSADC:
   - Convert devicetree bindings from TXT to YAML format

  Freescale MC13xxx:
   - Fix a memory leak in subdevice platform data allocation by
     using devm_kmemdup()

  Intel LPC ICH:
   - Expose a software node for the GPIO controller cell to fix
     GPIO lookups

  Intel LPSS:
   - Add PCI IDs for the Intel Nova Lake-H platform

  Maxim MAX77620:
   - Convert devicetree bindings from TXT to YAML format
   - Document an optional I2C address for the MAX77663 RTC device

  Maxim MAX77705:
   - Make the max77705_pm_ops variable static to resolve a
     sparse warning

  MediaTek MT6397:
   - Correct the hardware CIDs for the MT6328, MT6331, and MT6332
     PMICs to allow proper driver binding

  ROHM BD71828:
   - Enable system wakeup via the power button

  ROHM BD72720:
   - Add a new compatible string for the ROHM BD73900 PMIC

  SpacemiT P1:
   - Drop the deprecated "vin-supply" property from the devicetree
     bindings
   - Add individual regulator supply properties to match actual
     hardware topology

  STMicroelectronics STPMIC1:
   - Attempt system shutdown a second time to handle transient I2C
     communication failures

  Viperboard:
   - Drop redundant USB device references"

* tag 'mfd-next-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (28 commits)
  mfd: core: Preserve OF node when ACPI handle is present
  mfd: ene-kb3930: Use of_device_is_system_power_controller() wrapper
  mfd: intel-lpss: Add Intel Nova Lake-H PCI IDs
  dt-bindings: mfd: max77620: Document optional RTC address for MAX77663
  dt-bindings: mfd: max77620: Convert to DT schema
  mfd: ezx-pcap: Avoid rescheduling after destroying workqueue
  mfd: ezx-pcap: Return directly instead of empty gotos
  mfd: ezx-pcap: Drop memory allocation error message
  mfd: bcm2835-pm: Add BCM2712 PM device support
  mfd: bcm2835-pm: Introduce SoC-specific type identifier
  dt-bindings: mfd: bd72720: Add ROHM BD73900
  mfd: si476x: Fix kernel-doc warnings
  mfd: rsmu: Remove a empty kernel-doc line
  mfd: kempld: Fix kernel-doc struct member names
  mfd: congatec: Fix kernel-doc struct member names
  dt-bindings: mfd: Convert fsl-imx25-tsadc.txt to yaml format
  mfd: viperboard: Drop redundant device reference
  mfd: dln2: Switch to managed resources and fix bare unsigned types
  mfd: macsmc: Wire up Apple SMC power driver
  mfd: mt6397: Properly fix CID of MT6328, MT6331 and MT6332
  ...
parents 4b0b9460 caa5a5d4
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ properties:
          - gateworks,pld-gpio
          - ibm,ppc4xx-gpio
          - loongson,ls1x-gpio
          - maxim,max77620
          - nintendo,hollywood-gpio
          - nxp,pca9570
          - nxp,pca9571
@@ -86,7 +85,6 @@ allOf:
        compatible:
          contains:
            enum:
              - maxim,max77620
              - rockchip,rk3328-grf-gpio
              - ti,lp3943-gpio
              - ti,palmas-gpio
+97 −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/fsl,imx25-tsadc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Freescale MX25 ADC/TSC MultiFunction Device (MFD)

maintainers:
  - Frank Li <Frank.Li@nxp.com>

description:
  This device combines two general purpose conversion queues one used for general
  ADC and the other used for touchscreens.

properties:
  compatible:
    const: fsl,imx25-tsadc

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: ipg

  interrupt-controller: true

  '#interrupt-cells':
    const: 1

  '#address-cells':
    const: 1

  '#size-cells':
    const: 1

  ranges: true

patternProperties:
  '^touchscreen@[0-9a-f]+$':
    type: object
    $ref: /schemas/input/touchscreen/fsl,imx25-tcq.yaml
    unevaluatedProperties: false

  '^adc@[0-9a-f]+$':
    type: object
    $ref: /schemas/iio/adc/fsl,imx25-gcq.yaml
    unevaluatedProperties: false

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names
  - '#interrupt-cells'
  - '#address-cells'
  - '#size-cells'

additionalProperties: false

examples:
  - |
    tscadc@50030000 {
        compatible = "fsl,imx25-tsadc";
        reg = <0x50030000 0xc>;
        interrupts = <46>;
        clocks = <&clks 119>;
        clock-names = "ipg";
        interrupt-controller;
        #interrupt-cells = <1>;
        #address-cells = <1>;
        #size-cells = <1>;
        ranges;

        touchscreen@50030400 {
            compatible = "fsl,imx25-tcq";
            reg = <0x50030400 0x60>;
            interrupts = <0>;
            fsl,wires = <4>;
        };

        adc@50030800 {
            compatible = "fsl,imx25-gcq";
            reg = <0x50030800 0x60>;
            interrupts = <1>;
            #address-cells = <1>;
            #size-cells = <0>;
        };
    };
+0 −47
Original line number Diff line number Diff line
Freescale MX25 ADC/TSC MultiFunction Device (MFD)

This device combines two general purpose conversion queues one used for general
ADC and the other used for touchscreens.

Required properties:
 - compatible:			Should be "fsl,imx25-tsadc".
 - reg:				Start address and size of the memory area of
 					the device
 - interrupts:			Interrupt for this device
					(See: ../interrupt-controller/interrupts.txt)
 - clocks:			An 'ipg' clock (See: ../clock/clock-bindings.txt)
 - interrupt-controller:	This device is an interrupt controller. It
   					controls the interrupts of both
					conversion queues.
 - #interrupt-cells:		Should be '<1>'.
 - #address-cells:		Should be '<1>'.
 - #size-cells:			Should be '<1>'.

This device includes two conversion queues which can be added as subnodes.
The first queue is for the touchscreen, the second for general purpose ADC.

Example:
	tscadc: tscadc@50030000 {
		compatible = "fsl,imx25-tsadc";
		reg = <0x50030000 0xc>;
		interrupts = <46>;
		clocks = <&clks 119>;
		clock-names = "ipg";
		interrupt-controller;
		#interrupt-cells = <1>;
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		tsc: tcq@50030400 {
			compatible = "fsl,imx25-tcq";
			reg = <0x50030400 0x60>;
			...
		};

		adc: gcq@50030800 {
			compatible = "fsl,imx25-gcq";
			reg = <0x50030800 0x60>;
			...
		};
	};
+0 −162
Original line number Diff line number Diff line
MAX77620 Power management IC from Maxim Semiconductor.

Required properties:
-------------------
- compatible: Must be one of
		"maxim,max77620"
		"maxim,max20024"
		"maxim,max77663"
- reg: I2C device address.

Optional properties:
-------------------
- interrupts:		The interrupt on the parent the controller is
			connected to.
- interrupt-controller: Marks the device node as an interrupt controller.
- #interrupt-cells:	is <2> and their usage is compliant to the 2 cells
			variant of <../interrupt-controller/interrupts.txt>
			IRQ numbers for different interrupt source of MAX77620
			are defined at dt-bindings/mfd/max77620.h.

- system-power-controller: Indicates that this PMIC is controlling the
			   system power, see [1] for more details.

[1] Documentation/devicetree/bindings/power/power-controller.txt

Optional subnodes and their properties:
=======================================

Flexible power sequence configurations:
--------------------------------------
The Flexible Power Sequencer (FPS) allows each regulator to power up under
hardware or software control. Additionally, each regulator can power on
independently or among a group of other regulators with an adjustable power-up
and power-down delays (sequencing). GPIO1, GPIO2, and GPIO3 can be programmed
to be part of a sequence allowing external regulators to be sequenced along
with internal regulators. 32KHz clock can be programmed to be part of a
sequence.

The flexible sequencing structure consists of two hardware enable inputs
(EN0, EN1), and 3 master sequencing timers called FPS0, FPS1 and FPS2.
Each master sequencing timer is programmable through its configuration
register to have a hardware enable source (EN1 or EN2) or a software enable
source (SW). When enabled/disabled, the master sequencing timer generates
eight sequencing events on different time periods called slots. The time
period between each event is programmable within the configuration register.
Each regulator, GPIO1, GPIO2, GPIO3, and 32KHz clock has a flexible power
sequence slave register which allows its enable source to be specified as
a flexible power sequencer timer or a software bit. When a FPS source of
regulators, GPIOs and clocks specifies the enable source to be a flexible
power sequencer, the power up and power down delays can be specified in
the regulators, GPIOs and clocks flexible power sequencer configuration
registers.

When FPS event cleared (set to LOW), regulators, GPIOs and 32KHz
clock are set into following state at the sequencing event that
corresponds to its flexible sequencer configuration register.
	Sleep state: 			In this state, regulators, GPIOs
					and 32KHz clock get disabled at
					the sequencing event.
	Global Low Power Mode (GLPM):	In this state, regulators are set in
					low power mode at the sequencing event.

The configuration parameters of FPS is provided through sub-node "fps"
and their child for FPS specific. The child node name for FPS are "fps0",
"fps1", and "fps2" for FPS0, FPS1 and FPS2 respectively.

The FPS configurations like FPS source, power up and power down slots for
regulators, GPIOs and 32kHz clocks are provided in their respective
configuration nodes which is explained in respective sub-system DT
binding document.

There is need for different FPS configuration parameters based on system
state like when system state changed from active to suspend or active to
power off (shutdown).

Optional properties:
-------------------
-maxim,fps-event-source:		u32, FPS event source like external
					hardware input to PMIC i.e. EN0, EN1 or
					software (SW).
					The macros are defined on
						dt-bindings/mfd/max77620.h
					for different control source.
					- MAX77620_FPS_EVENT_SRC_EN0
						for hardware input pin EN0.
					- MAX77620_FPS_EVENT_SRC_EN1
						for hardware input pin EN1.
					- MAX77620_FPS_EVENT_SRC_SW
						for software control.

-maxim,shutdown-fps-time-period-us:	u32, FPS time period in microseconds
					when system enters in to shutdown
					state.

-maxim,suspend-fps-time-period-us:	u32, FPS time period in microseconds
					when system enters in to suspend state.

-maxim,device-state-on-disabled-event:	u32, describe the PMIC state when FPS
					event cleared (set to LOW) whether it
					should go to sleep state or low-power
					state. Following are valid values:
					- MAX77620_FPS_INACTIVE_STATE_SLEEP
						to set the PMIC state to sleep.
					- MAX77620_FPS_INACTIVE_STATE_LOW_POWER
						to set the PMIC state to low
						power.
					Absence of this property or other value
					will not change device state when FPS
					event get cleared.

Here supported time periods by device in microseconds are as follows:
MAX77620 supports 40, 80, 160, 320, 640, 1280, 2560 and 5120 microseconds.
MAX20024 supports 20, 40, 80, 160, 320, 640, 1280 and 2540 microseconds.
MAX77663 supports 20, 40, 80, 160, 320, 640, 1280 and 2540 microseconds.

-maxim,power-ok-control: configure map power ok bit
			1: Enables POK(Power OK) to control nRST_IO and GPIO1
			POK function.
			0: Disables POK control.
			if property missing, do not configure MPOK bit.
			If POK mapping is enabled for GPIO1/nRST_IO then,
			GPIO1/nRST_IO pins are HIGH only if all rails
			that have POK control enabled are HIGH.
			If any of the rails goes down(which are enabled for POK
			control) then, GPIO1/nRST_IO goes LOW.
			this property is valid for max20024 only.

For DT binding details of different sub modules like GPIO, pincontrol,
regulator, power, please refer respective device-tree binding document
under their respective sub-system directories.

Example:
--------
#include <dt-bindings/mfd/max77620.h>

max77620@3c {
	compatible = "maxim,max77620";
	reg = <0x3c>;

	interrupt-parent = <&intc>;
	interrupts = <0 86 IRQ_TYPE_NONE>;

	interrupt-controller;
	#interrupt-cells = <2>;

	fps {
		fps0 {
			maxim,shutdown-fps-time-period-us = <1280>;
			maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN1>;
		};

		fps1 {
			maxim,shutdown-fps-time-period-us = <1280>;
			maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN0>;
		};

		fps2 {
			maxim,shutdown-fps-time-period-us = <1280>;
			maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_SW>;
		};
	};
};
+444 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading