Commit 8645f09b authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'mfd-next-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull mfd updates from Lee Jones:
 "New Drivers:
   - Add support for IQS620A/621/622/624/625 Azoteq IQS62X Sensors

  New Device Support:
   - Add support for ADC, IRQ, Regulator, RTC and WDT to Ricoh RN5T618 PMIC
   - Add support for Comet Lake to Intel LPSS

  New Functionality:
   - Add support for Charger Detection to Spreadtrum SC27xx PMICs
   - Add support for Interrupt Polarity to Dialog Semi DA9062/61 PMIC
   - Add ACPI enumeration support to Diolan DLN2 USB Adaptor

  Fix-ups:
   - Device Tree; iqs62x, rn5t618, cros_ec_dev, stm32-lptimer, rohm,bd71837, rohm,bd71847
   - I2C registration; rn5t618
   - Kconfig; MFD_CPCAP, AB8500_CORE, MFD_WM8994, MFD_WM97xx, MFD_STPMIC1
   - Use flexible-array members; omap-usb-tll, qcom-pm8xxx
   - Remove unnecessary casts; omap-usb-host, omap-usb-tll
   - Power (suspend/resume/poweroff) enhancements; rk808
   - Improve error/sanity checking; dln2
   - Use snprintf(); aat2870-core

  Bug Fixes:
   - Fix PCI IDs in intel-lpss-pci"

* tag 'mfd-next-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (33 commits)
  mfd: intel-lpss: Fix Intel Elkhart Lake LPSS I2C input clock
  mfd: aat2870: Use scnprintf() for avoiding potential buffer overflow
  mfd: dln2: Allow to be enumerated via ACPI
  mfd: da9062: Add support for interrupt polarity defined in device tree
  dt-bindings: bd718x7: Yamlify and add BD71850
  mfd: dln2: Fix sanity checking for endpoints
  mfd: intel-lpss: Add Intel Comet Lake PCH-V PCI IDs
  mfd: sc27xx: Add USB charger type detection support
  dt-bindings: mfd: Document STM32 low power timer bindings
  mfd: rk808: Convert RK805 to shutdown/suspend hooks
  mfd: rk808: Reduce shutdown duplication
  mfd: rk808: Stop using syscore ops
  mfd: rk808: Ensure suspend/resume hooks always work
  mfd: rk808: Always use poweroff when requested
  mfd: omap: Remove useless cast for driver.name
  mfd: Kconfig: Fix some misspelling of the word functionality
  mfd: pm8xxx: Replace zero-length array with flexible-array member
  mfd: omap-usb-tll: Replace zero-length array with flexible-array member
  mfd: cpcap: Fix compile if MFD_CORE is not selected
  mfd: cros_ec: Check DT node for usbpd-notify add
  ...
parents b574beb6 d2923aa4
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/iqs62x-keys.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Azoteq IQS620A/621/622/624/625 Keys and Switches
maintainers:
- Jeff LaBundy <jeff@labundy.com>
description: |
The Azoteq IQS620A, IQS621, IQS622, IQS624 and IQS625 multi-function sensors
feature a variety of self-capacitive, mutual-inductive and Hall-effect sens-
ing capabilities that can facilitate a variety of contactless key and switch
applications.
These functions are collectively represented by a "keys" child node from the
parent MFD driver. See Documentation/devicetree/bindings/mfd/iqs62x.yaml for
further details and examples. Sensor hardware configuration (self-capacitive
vs. mutual-inductive, etc.) is selected based on the device's firmware.
properties:
compatible:
enum:
- azoteq,iqs620a-keys
- azoteq,iqs621-keys
- azoteq,iqs622-keys
- azoteq,iqs624-keys
- azoteq,iqs625-keys
linux,keycodes:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32-array
- minItems: 1
maxItems: 16
description: |
Specifies the numeric keycodes associated with each available touch or
proximity event according to the following table. An 'x' indicates the
event is supported for a given device. Specify 0 for unused events.
-------------------------------------------------------------------------
| # | Event | IQS620A | IQS621 | IQS622 | IQS624 | IQS625 |
-------------------------------------------------------------------------
| 0 | CH0 Touch | x | x | x | x | x |
| | Antenna 1 Touch* | x | | | | |
-------------------------------------------------------------------------
| 1 | CH0 Proximity | x | x | x | x | x |
| | Antenna 1 Prox.* | x | | | | |
-------------------------------------------------------------------------
| 2 | CH1 Touch | x | x | x | x | x |
| | Ant. 1 Deep Touch* | x | | | | |
-------------------------------------------------------------------------
| 3 | CH1 Proximity | x | x | x | x | x |
-------------------------------------------------------------------------
| 4 | CH2 Touch | x | | | | |
-------------------------------------------------------------------------
| 5 | CH2 Proximity | x | | | | |
| | Antenna 2 Prox.* | x | | | | |
-------------------------------------------------------------------------
| 6 | Metal (+) Touch** | x | x | | | |
| | Ant. 2 Deep Touch* | x | | | | |
-------------------------------------------------------------------------
| 7 | Metal (+) Prox.** | x | x | | | |
| | Antenna 2 Touch* | x | | | | |
-------------------------------------------------------------------------
| 8 | Metal (-) Touch** | x | x | | | |
-------------------------------------------------------------------------
| 9 | Metal (-) Prox.** | x | x | | | |
-------------------------------------------------------------------------
| 10 | SAR Active*** | x | | x | | |
-------------------------------------------------------------------------
| 11 | SAR Quick Rel.*** | x | | x | | |
-------------------------------------------------------------------------
| 12 | SAR Movement*** | x | | x | | |
-------------------------------------------------------------------------
| 13 | SAR Filter Halt*** | x | | x | | |
-------------------------------------------------------------------------
| 14 | Wheel Up | | | | x | |
-------------------------------------------------------------------------
| 15 | Wheel Down | | | | x | |
-------------------------------------------------------------------------
* Two-channel SAR. Replaces CH0-2 plus metal touch and proximity events
if enabled via firmware.
** "+" and "-" refer to the polarity of a channel's delta (LTA - counts),
where "LTA" is defined as the channel's long-term average.
*** One-channel SAR. Replaces CH0-2 touch and proximity events if enabled
via firmware.
patternProperties:
"^hall-switch-(north|south)$":
type: object
description:
Represents north/south-field Hall-effect sensor touch or proximity
events. Note that north/south-field orientation is reversed on the
IQS620AXzCSR device due to its flip-chip package.
properties:
linux,code:
$ref: /schemas/types.yaml#/definitions/uint32
description: Numeric switch code associated with the event.
azoteq,use-prox:
$ref: /schemas/types.yaml#/definitions/flag
description:
If present, specifies that Hall-effect sensor reporting should
use the device's wide-range proximity threshold instead of its
close-range touch threshold (default).
required:
- linux,code
additionalProperties: false
if:
properties:
compatible:
contains:
enum:
- azoteq,iqs624-keys
- azoteq,iqs625-keys
then:
patternProperties:
"^hall-switch-(north|south)$": false
required:
- compatible
- linux,keycodes
additionalProperties: false
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/iqs62x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Azoteq IQS620A/621/622/624/625 Multi-Function Sensors
maintainers:
- Jeff LaBundy <jeff@labundy.com>
description: |
The Azoteq IQS620A, IQS621, IQS622, IQS624 and IQS625 multi-function sensors
integrate multiple sensing technologies in a single package.
Link to datasheets: https://www.azoteq.com/
properties:
compatible:
enum:
- azoteq,iqs620a
- azoteq,iqs621
- azoteq,iqs622
- azoteq,iqs624
- azoteq,iqs625
reg:
maxItems: 1
interrupts:
maxItems: 1
firmware-name:
$ref: /schemas/types.yaml#/definitions/string
description:
Specifies the name of the calibration and configuration file selected by
the driver. If this property is omitted, the name is chosen based on the
device name with ".bin" as the extension (e.g. iqs620a.bin for IQS620A).
keys:
$ref: ../input/iqs62x-keys.yaml
pwm:
$ref: ../pwm/iqs620a-pwm.yaml
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
/*
* Dual capacitive buttons with proximity-activated function, unipolar lid
* switch and panel-mounted LED.
*/
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
iqs620a@44 {
compatible = "azoteq,iqs620a";
reg = <0x44>;
interrupt-parent = <&gpio>;
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
keys {
compatible = "azoteq,iqs620a-keys";
linux,keycodes = <KEY_SELECT>,
<KEY_MENU>,
<KEY_OK>,
<KEY_MENU>;
hall-switch-south {
linux,code = <SW_LID>;
azoteq,use-prox;
};
};
iqs620a_pwm: pwm {
compatible = "azoteq,iqs620a-pwm";
#pwm-cells = <2>;
};
};
};
pwmleds {
compatible = "pwm-leds";
panel {
pwms = <&iqs620a_pwm 0 1000000>;
max-brightness = <255>;
};
};
- |
/* Single inductive button with bipolar dock/tablet-mode switch. */
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
iqs620a@44 {
compatible = "azoteq,iqs620a";
reg = <0x44>;
interrupt-parent = <&gpio>;
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
firmware-name = "iqs620a_coil.bin";
keys {
compatible = "azoteq,iqs620a-keys";
linux,keycodes = <0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<KEY_MUTE>;
hall-switch-north {
linux,code = <SW_DOCK>;
};
hall-switch-south {
linux,code = <SW_TABLET_MODE>;
};
};
};
};
- |
/* Dual capacitive buttons with volume knob. */
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
iqs624@44 {
compatible = "azoteq,iqs624";
reg = <0x44>;
interrupt-parent = <&gpio>;
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
keys {
compatible = "azoteq,iqs624-keys";
linux,keycodes = <BTN_0>,
<0>,
<BTN_1>,
<0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<KEY_VOLUMEUP>,
<KEY_VOLUMEDOWN>;
};
};
};
...
......@@ -15,6 +15,8 @@ Required properties:
- reg: the I2C slave address of the device
Optional properties:
- interrupts: interrupt mapping for IRQ
See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
- system-power-controller:
See Documentation/devicetree/bindings/power/power-controller.txt
......@@ -32,6 +34,8 @@ Example:
pmic@32 {
compatible = "ricoh,rn5t618";
reg = <0x32>;
interrupt-parent = <&gpio5>;
interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
system-power-controller;
regulators {
......
* ROHM BD71837 and BD71847 Power Management Integrated Circuit bindings
BD71837MWV and BD71847MWV are programmable Power Management ICs for powering
single-core, dual-core, and quad-core SoCs such as NXP-i.MX 8M. They are
optimized for low BOM cost and compact solution footprint. BD71837MWV
integrates 8 Buck regulators and 7 LDOs. BD71847MWV contains 6 Buck regulators
and 6 LDOs.
Datasheet for BD71837 is available at:
https://www.rohm.com/datasheet/BD71837MWV/bd71837mwv-e
Datasheet for BD71847 is available at:
https://www.rohm.com/datasheet/BD71847AMWV/bd71847amwv-e
Required properties:
- compatible : Should be "rohm,bd71837" for bd71837
"rohm,bd71847" for bd71847.
- reg : I2C slave address.
- interrupt-parent : Phandle to the parent interrupt controller.
- interrupts : The interrupt line the device is connected to.
- clocks : The parent clock connected to PMIC. If this is missing
32768 KHz clock is assumed.
- #clock-cells : Should be 0.
- regulators: : List of child nodes that specify the regulators.
Please see ../regulator/rohm,bd71837-regulator.txt
Optional properties:
- clock-output-names : Should contain name for output clock.
- rohm,reset-snvs-powered : Transfer BD718x7 to SNVS state at reset.
The BD718x7 supports two different HW states as reset target states. States
are called as SNVS and READY. At READY state all the PMIC power outputs go
down and OTP is reload. At the SNVS state all other logic and external
devices apart from the SNVS power domain are shut off. Please refer to NXP
i.MX8 documentation for further information regarding SNVS state. When a
reset is done via SNVS state the PMIC OTP data is not reload. This causes
power outputs that have been under SW control to stay down when reset has
switched power state to SNVS. If reset is done via READY state the power
outputs will be returned to HW control by OTP loading. Thus the reset
target state is set to READY by default. If SNVS state is used the boot
crucial regulators must have the regulator-always-on and regulator-boot-on
properties set in regulator node.
- rohm,short-press-ms : Short press duration in milliseconds
- rohm,long-press-ms : Long press duration in milliseconds
Configure the "short press" and "long press" timers for the power button.
Values are rounded to what hardware supports (500ms multiple for short and
1000ms multiple for long). If these properties are not present the existing
configuration (from bootloader or OTP) is not touched.
Example:
/* external oscillator node */
osc: oscillator {
compatible = "fixed-clock";
#clock-cells = <1>;
clock-frequency = <32768>;
clock-output-names = "osc";
};
pmic: pmic@4b {
compatible = "rohm,bd71837";
reg = <0x4b>;
interrupt-parent = <&gpio1>;
interrupts = <29 GPIO_ACTIVE_LOW>;
interrupt-names = "irq";
#clock-cells = <0>;
clocks = <&osc 0>;
clock-output-names = "bd71837-32k-out";
rohm,reset-snvs-powered;
regulators {
buck1: BUCK1 {
regulator-name = "buck1";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
regulator-boot-on;
regulator-always-on;
regulator-ramp-delay = <1250>;
};
// [...]
};
};
/* Clock consumer node */
rtc@0 {
compatible = "company,my-rtc";
clock-names = "my-clock";
clocks = <&pmic>;
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/rohm,bd71837-pmic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ROHM BD71837 Power Management Integrated Circuit bindings
maintainers:
- Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
description: |
BD71837MWV is programmable Power Management ICs for powering single-core,
dual-core, and quad-core SoCs such as NXP-i.MX 8M. It is optimized for low
BOM cost and compact solution footprint. BD71837MWV integrates 8 Buck
regulators and 7 LDOs.
Datasheet for BD71837 is available at
https://www.rohm.com/products/power-management/power-management-ic-for-system/industrial-consumer-applications/nxp-imx/bd71837amwv-product
properties:
compatible:
const: rohm,bd71837
reg:
description:
I2C slave address.
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
"#clock-cells":
const: 0
# The BD718x7 supports two different HW states as reset target states. States
# are called as SNVS and READY. At READY state all the PMIC power outputs go
# down and OTP is reload. At the SNVS state all other logic and external
# devices apart from the SNVS power domain are shut off. Please refer to NXP
# i.MX8 documentation for further information regarding SNVS state. When a
# reset is done via SNVS state the PMIC OTP data is not reload. This causes
# power outputs that have been under SW control to stay down when reset has
# switched power state to SNVS. If reset is done via READY state the power
# outputs will be returned to HW control by OTP loading. Thus the reset
# target state is set to READY by default. If SNVS state is used the boot
# crucial regulators must have the regulator-always-on and regulator-boot-on
# properties set in regulator node.
rohm,reset-snvs-powered:
description: |
Transfer PMIC to SNVS state at reset
type: boolean
# Configure the "short press" and "long press" timers for the power button.
# Values are rounded to what hardware supports
# Short-press:
# Shortest being 10ms, next 500ms and then multiple of 500ms up to 7,5s
# Long-press:
# Shortest being 10ms, next 1000ms and then multiple of 1000ms up to 15s
# If these properties are not present the existing configuration (from
# bootloader or OTP) is not touched.
rohm,short-press-ms:
description:
Short press duration in milliseconds
enum:
- 10
- 500
- 1000
- 1500
- 2000
- 2500
- 3000
- 3500
- 4000
- 4500
- 5000
- 5500
- 6000
- 6500
- 7000
rohm,long-press-ms:
description:
Long press duration in milliseconds
enum:
- 10
- 1000
- 2000
- 3000
- 4000
- 5000
- 6000
- 7000
- 8000
- 9000
- 10000
- 11000
- 12000
- 13000
- 14000
regulators:
$ref: ../regulator/rohm,bd71837-regulator.yaml
description:
List of child nodes that specify the regulators.
required:
- compatible
- reg
- interrupts
- clocks
- "#clock-cells"
- regulators
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>
i2c {
pmic: pmic@4b {
compatible = "rohm,bd71837";
reg = <0x4b>;
interrupt-parent = <&gpio1>;
interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
#clock-cells = <0>;
clocks = <&osc 0>;
rohm,reset-snvs-powered;
rohm,short-press-ms = <10>;
rohm,long-press-ms = <2000>;
regulators {
buck1: BUCK1 {
regulator-name = "buck1";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
regulator-boot-on;
regulator-always-on;
regulator-ramp-delay = <1250>;
rohm,dvs-run-voltage = <900000>;
rohm,dvs-idle-voltage = <850000>;
rohm,dvs-suspend-voltage = <800000>;
};
buck2: BUCK2 {
regulator-name = "buck2";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
regulator-boot-on;
regulator-always-on;
regulator-ramp-delay = <1250>;
rohm,dvs-run-voltage = <1000000>;
rohm,dvs-idle-voltage = <900000>;
};
buck3: BUCK3 {
regulator-name = "buck3";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
regulator-boot-on;
rohm,dvs-run-voltage = <1000000>;
};
buck4: BUCK4 {
regulator-name = "buck4";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
regulator-boot-on;
rohm,dvs-run-voltage = <1000000>;
};
buck5: BUCK5 {
regulator-name = "buck5";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1350000>;
regulator-boot-on;
};
buck6: BUCK6 {
regulator-name = "buck6";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
};
buck7: BUCK7 {
regulator-name = "buck7";
regulator-min-microvolt = <1605000>;
regulator-max-microvolt = <1995000>;
regulator-boot-on;
};
buck8: BUCK8 {
regulator-name = "buck8";
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1400000>;
};
ldo1: LDO1 {
regulator-name = "ldo1";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
};
ldo2: LDO2 {
regulator-name = "ldo2";
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;