Commit 8403ce70 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MFD updates from Lee Jones:
 "New Device Support:
   - Add support for Watchdog to ChromeOS Embedded Controller
   - Add support for GPIOs to ChromeOS Embedded Controller
   - Add supprt for Sound to MediaTek MT6357 CODEC

  New Functionality:
   - Add power-off functionality to Texas Instruments TWL series CODECs

  Fix-ups:
   - Device Tree binding adaptions/conversions/creation
   - Use/convert to new/better APIs/helpers/MACROs instead of
     hand-rolling implementations
   - Trivial; spelling, whitespace, clean-ups, etc
   - Remove superfluous code and simplify overall
   - Fix include lists; alphabetise, remove unused, explicitly add used
   - Use dev_err_probe() to clean-up error paths
   - Convert used cache type over to the Maple Tree in many instances
   - Constify a bunch of static structs
   - Refrain from over-riding resources provided via the firmware

  Bug Fixes:
   - Fix a clock related firmware bug on Dell XPS 9530 et al.
   - Repair incorrect IRQ designations
   - Increase buffer sizes to omit various snprintf compiler errors
   - Ensure errors are handled properly
   - Balance references and prevent resource leaks
   - Rectify Power Key interrupt processing
   - Fix Kconfig related build errors
   - Correct a bunch of register start-up default values"

* tag 'mfd-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (65 commits)
  mfd: cs42l43: Fix wrong GPIO_FN_SEL and SPI_CLK_CONFIG1 defaults
  mfd: cs42l43: Fix wrong register defaults
  mfd: mt6397-core: Register mt6357 sound codec
  dt-bindings: mfd: syscon: Add ti,am62-usb-phy-ctrl compatible
  dt-bindings: mfd: dlg,da9063: Make #interrupt-cells required
  dt-bindings: mfd: Convert atmel-flexcom to json-schema
  mfd: kempld-core: Don't replace resources provided by ACPI
  mfd: cros_ec_dev: Add GPIO device if feature present on EC
  dt-bindings: mfd: cros-ec: Add properties for GPIO controller
  mfd: twl: Select MFD_CORE
  mfd: core: Constify the struct device_type usage
  mfd: rk8xx-core: Fix interrupt processing order for power key button
  mfd: twl4030-power: Accept standard property for power controller
  mfd: twl-core: Add power off implementation for twl603x
  dt-bindings: mfd: ti,twl: Document system-power-controller
  mfd: altera-sysmgr: Call of_node_put() only when of_parse_phandle() takes a ref
  mfd: syscon: Remove extern from function prototypes
  mfd: syscon: Call of_node_put() only when of_parse_phandle() takes a ref
  mfd: mc13xxx: Use bitfield helpers
  mfd: rc5t583: Convert to use maple tree register cache
  ...
parents a3df5d54 78334c34
Loading
Loading
Loading
Loading
+0 −47
Original line number Diff line number Diff line
* Dialog DA9061/62/63 OnKey Module

This module is part of the DA9061/DA9062/DA9063. For more details about entire
DA9062 and DA9061 chips see Documentation/devicetree/bindings/mfd/da9062.txt
For DA9063 see Documentation/devicetree/bindings/mfd/dlg,da9063.yaml

This module provides the KEY_POWER event.

Required properties:

- compatible: should be one of the following valid compatible string lines:
	"dlg,da9061-onkey", "dlg,da9062-onkey"
	"dlg,da9062-onkey"
	"dlg,da9063-onkey"

Optional properties:

- dlg,disable-key-power : Disable power-down using a long key-press. If this
    entry exists the OnKey driver will remove support for the KEY_POWER key
    press when triggered using a long press of the OnKey.

Example: DA9063

	pmic0: da9063@58 {
		onkey {
			compatible = "dlg,da9063-onkey";
			dlg,disable-key-power;
		};
	};

Example: DA9062

	pmic0: da9062@58 {
		onkey {
			compatible = "dlg,da9062-onkey";
			dlg,disable-key-power;
		};
	};

Example: DA9061 using a fall-back compatible for the DA9062 onkey driver

	pmic0: da9061@58 {
		onkey {
			compatible = "dlg,da9061-onkey", "dlg,da9062-onkey";
			dlg,disable-key-power;
		};
	};
+38 −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/input/dlg,da9062-onkey.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Dialog DA9061/62/63 OnKey Module

maintainers:
  - Biju Das <biju.das.jz@bp.renesas.com>

description: |
  This module is part of the DA9061/DA9062/DA9063. For more details about entire
  DA906{1,2,3} chips see Documentation/devicetree/bindings/mfd/dlg,da9063.yaml

  This module provides the KEY_POWER event.

properties:
  compatible:
    oneOf:
      - enum:
          - dlg,da9062-onkey
          - dlg,da9063-onkey
      - items:
          - const: dlg,da9061-onkey
          - const: dlg,da9062-onkey

  dlg,disable-key-power:
    type: boolean
    description:
      Disable power-down using a long key-press. If this entry exists
      the OnKey driver will remove support for the KEY_POWER key press
      when triggered using a long press of the OnKey.

required:
  - compatible

additionalProperties: false
+99 −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/mfd/atmel,hlcdc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atmel's HLCD Controller

maintainers:
  - Nicolas Ferre <nicolas.ferre@microchip.com>
  - Alexandre Belloni <alexandre.belloni@bootlin.com>
  - Claudiu Beznea <claudiu.beznea@tuxon.dev>

description:
  The Atmel HLCDC (HLCD Controller) IP available on Atmel SoCs exposes two
  subdevices, a PWM chip and a Display Controller.

properties:
  compatible:
    enum:
      - atmel,at91sam9n12-hlcdc
      - atmel,at91sam9x5-hlcdc
      - atmel,sama5d2-hlcdc
      - atmel,sama5d3-hlcdc
      - atmel,sama5d4-hlcdc
      - microchip,sam9x60-hlcdc
      - microchip,sam9x75-xlcdc

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    minItems: 3

  clock-names:
    items:
      - const: periph_clk
      - const: sys_clk
      - const: slow_clk
      - const: lvds_pll_clk
    minItems: 3

  display-controller:
    $ref: /schemas/display/atmel/atmel,hlcdc-display-controller.yaml

  pwm:
    $ref: /schemas/pwm/atmel,hlcdc-pwm.yaml

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/at91.h>
    #include <dt-bindings/dma/at91.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    lcd_controller: lcd-controller@f0030000 {
      compatible = "atmel,sama5d3-hlcdc";
      reg = <0xf0030000 0x2000>;
      clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>;
      clock-names = "periph_clk", "sys_clk", "slow_clk";
      interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;

      display-controller {
        compatible = "atmel,hlcdc-display-controller";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
        #address-cells = <1>;
        #size-cells = <0>;

        port@0 {
          #address-cells = <1>;
          #size-cells = <0>;
          reg = <0>;

          hlcdc_panel_output: endpoint@0 {
            reg = <0>;
            remote-endpoint = <&panel_input>;
          };
        };
      };

      pwm {
        compatible = "atmel,hlcdc-pwm";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_lcd_pwm>;
        #pwm-cells = <3>;
      };
    };
+99 −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/atmel,sama5d2-flexcom.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip Flexcom (Flexible Serial Communication Unit)

maintainers:
  - Kavyasree Kotagiri <kavyasree.kotagiri@microchip.com>

description:
  The Microchip Flexcom is just a wrapper which embeds a SPI controller,
  an I2C controller and an USART. Only one function can be used at a
  time and is chosen at boot time according to the device tree.

properties:
  compatible:
    oneOf:
      - const: atmel,sama5d2-flexcom
      - items:
          - const: microchip,sam9x7-flexcom
          - const: atmel,sama5d2-flexcom
      - items:
          - const: microchip,sama7g5-flexcom
          - const: atmel,sama5d2-flexcom


  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  "#address-cells":
    const: 1

  "#size-cells":
    const: 1

  ranges:
    description:
      One range for the full I/O register region. (including USART,
      TWI and SPI registers).
    items:
      maxItems: 3

  atmel,flexcom-mode:
    description: |
      Specifies the flexcom mode as follows:
      1: USART
      2: SPI
      3: I2C.
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [1, 2, 3]

patternProperties:
  "^serial@[0-9a-f]+$":
    type: object
    description:
      Child node describing USART. See atmel-usart.txt for details
      of USART bindings.

  "^spi@[0-9a-f]+$":
    type: object
    description:
      Child node describing SPI. See ../spi/spi_atmel.txt for details
      of SPI bindings.

  "^i2c@[0-9a-f]+$":
    $ref: /schemas/i2c/atmel,at91sam-i2c.yaml
    description:
      Child node describing I2C.

required:
  - compatible
  - reg
  - clocks
  - "#address-cells"
  - "#size-cells"
  - ranges
  - atmel,flexcom-mode

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    flx0: flexcom@f8034000 {
        compatible = "atmel,sama5d2-flexcom";
        reg = <0xf8034000 0x200>;
        clocks = <&flx0_clk>;
        #address-cells = <1>;
        #size-cells = <1>;
        ranges = <0x0 0xf8034000 0x800>;
        atmel,flexcom-mode = <2>;
    };
...
+0 −64
Original line number Diff line number Diff line
* Device tree bindings for Atmel Flexcom (Flexible Serial Communication Unit)

The Atmel Flexcom is just a wrapper which embeds a SPI controller, an I2C
controller and an USART. Only one function can be used at a time and is chosen
at boot time according to the device tree.

Required properties:
- compatible:		Should be "atmel,sama5d2-flexcom"
			or "microchip,sam9x7-flexcom", "atmel,sama5d2-flexcom"
- reg:			Should be the offset/length value for Flexcom dedicated
			I/O registers (without USART, TWI or SPI registers).
- clocks:		Should be the Flexcom peripheral clock from PMC.
- #address-cells:	Should be <1>
- #size-cells:		Should be <1>
- ranges:		Should be one range for the full I/O register region
			(including USART, TWI and SPI registers).
- atmel,flexcom-mode:	Should be one of the following values:
			- <1> for USART
			- <2> for SPI
			- <3> for I2C

Required child:
A single available child device of type matching the "atmel,flexcom-mode"
property.

The phandle provided by the clocks property of the child is the same as one for
the Flexcom parent.

For other properties, please refer to the documentations of the respective
device:
- ../serial/atmel-usart.txt
- ../spi/spi_atmel.txt
- ../i2c/i2c-at91.txt

Example:

flexcom@f8034000 {
	compatible = "atmel,sama5d2-flexcom";
	reg = <0xf8034000 0x200>;
	clocks = <&flx0_clk>;
	#address-cells = <1>;
	#size-cells = <1>;
	ranges = <0x0 0xf8034000 0x800>;
	atmel,flexcom-mode = <2>;

	spi@400 {
		compatible = "atmel,at91rm9200-spi";
		reg = <0x400 0x200>;
		interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_flx0_default>;
		#address-cells = <1>;
		#size-cells = <0>;
		clocks = <&flx0_clk>;
		clock-names = "spi_clk";
		atmel,fifo-size = <32>;

		flash@0 {
			compatible = "atmel,at25f512b";
			reg = <0>;
			spi-max-frequency = <20000000>;
		};
	};
};
Loading