Commit 0df24138 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power supply and reset updates from Sebastian Reichel:

 - Add new Qualcomm PMI8998/PM660 SMB2 charger

 - bq256xx: support systems without thermistors

 - cros_pchg: fix peripheral device status after system resume

 - axp20x_usb_power: add support for AXP192

 - qcom-pon: add support for pm8941

 - at91-reset: prepare to expose reset reason to sysfs

 - switch all I2C drivers back to use .probe instead of .probe_new

 - convert some more DT bindings to YAML

 - misc cleanups

* tag 'for-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (28 commits)
  MAINTAINERS: add documentation file for Microchip SAMA5D2 shutdown controller
  dt-bindings: power: reset: atmel,sama5d2-shdwc: convert to yaml
  dt-bindings: power: reset: atmel,at91sam9260-shdwc: convert to yaml
  power: reset: at91-reset: change the power on reason prototype
  power: reset: qcom-pon: add support for pm8941-pon
  dt-bindings: power: reset: qcom-pon: define pm8941-pon
  power: supply: add Qualcomm PMI8998 SMB2 Charger driver
  dt-bindings: power: supply: qcom,pmi8998-charger: add bindings for smb2 driver
  power: supply: rt9467: Make charger-enable control as logic level
  power: supply: Switch i2c drivers back to use .probe()
  power: reset: add HAS_IOPORT dependencies
  dt-bindings: power: supply: axp20x: Add AXP192 compatible
  power: supply: axp20x_usb_power: Add support for AXP192
  power: supply: axp20x_usb_power: Remove variant IDs from VBUS polling check
  power: supply: axp20x_usb_power: Use regmap field for VBUS disabling
  power: supply: axp20x_usb_power: Use regmap fields for USB BC feature
  power: supply: axp20x_usb_power: Use regmap fields for VBUS monitor feature
  power: supply: axp20x_usb_power: Simplify USB current limit handling
  power: supply: hwmon: constify pointers to hwmon_channel_info
  power: supply: twl4030_madc_battery: Refactor twl4030_madc_bat_ext_changed()
  ...
parents 02676ecc ef8d95b4
Loading
Loading
Loading
Loading
+0 −94
Original line number Diff line number Diff line
@@ -52,100 +52,6 @@ Example:
		reg = <0xe3804000 0x1000>;
};

SHDWC Shutdown Controller

required properties:
- compatible: Should be "atmel,<chip>-shdwc".
  <chip> can be "at91sam9260", "at91sam9rl" or "at91sam9x5".
- reg: Should contain registers location and length
- clocks: phandle to input clock.

optional properties:
- atmel,wakeup-mode: String, operation mode of the wakeup mode.
  Supported values are: "none", "high", "low", "any".
- atmel,wakeup-counter: Counter on Wake-up 0 (between 0x0 and 0xf).

optional at91sam9260 properties:
- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.

optional at91sam9rl properties:
- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.
- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.

optional at91sam9x5 properties:
- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.

Example:

	shdwc@fffffd10 {
		compatible = "atmel,at91sam9260-shdwc";
		reg = <0xfffffd10 0x10>;
		clocks = <&clk32k>;
	};

SHDWC SAMA5D2-Compatible Shutdown Controller

1) shdwc node

required properties:
- compatible: should be "atmel,sama5d2-shdwc", "microchip,sam9x60-shdwc" or
  "microchip,sama7g5-shdwc"
- reg: should contain registers location and length
- clocks: phandle to input clock.
- #address-cells: should be one. The cell is the wake-up input index.
- #size-cells: should be zero.

optional properties:

- debounce-delay-us: minimum wake-up inputs debouncer period in
  microseconds. It's usually a board-related property.
- atmel,wakeup-rtc-timer: boolean to enable Real-Time Clock wake-up.

optional microchip,sam9x60-shdwc or microchip,sama7g5-shdwc properties:
- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.

The node contains child nodes for each wake-up input that the platform uses.

2) input nodes

Wake-up input nodes are usually described in the "board" part of the Device
Tree. Note also that input 0 is linked to the wake-up pin and is frequently
used.

Required properties:
- reg: should contain the wake-up input index [0 - 15].

Optional properties:
- atmel,wakeup-active-high: boolean, the corresponding wake-up input described
  by the child, forces the wake-up of the core power supply on a high level.
  The default is to be active low.

Example:

On the SoC side:
	shdwc@f8048010 {
		compatible = "atmel,sama5d2-shdwc";
		reg = <0xf8048010 0x10>;
		clocks = <&clk32k>;
		#address-cells = <1>;
		#size-cells = <0>;
		atmel,wakeup-rtc-timer;
	};

On the board side:
	shdwc@f8048010 {
		debounce-delay-us = <976>;

		input@0 {
			reg = <0>;
		};

		input@1 {
			reg = <1>;
			atmel,wakeup-active-high;
		};
	};

Special Function Registers (SFR)

Special Function Registers (SFR) manage specific aspects of the integrated
+1 −0
Original line number Diff line number Diff line
@@ -134,6 +134,7 @@ patternProperties:
    oneOf:
      - $ref: /schemas/power/supply/qcom,pm8941-charger.yaml#
      - $ref: /schemas/power/supply/qcom,pm8941-coincell.yaml#
      - $ref: /schemas/power/supply/qcom,pmi8998-charger.yaml#

  "gpio@[0-9a-f]+$":
    type: object
+82 −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/power/reset/atmel,at91sam9260-shdwc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip AT91 SHDWC Shutdown Controller

maintainers:
  - Claudiu Beznea <claudiu.beznea@microchip.com>

description: |
  Microchip AT91 SHDWC shutdown controller controls the power supplies VDDIO
  and VDDCORE and the wake-up detection on debounced input lines.

properties:
  compatible:
    enum:
      - atmel,at91sam9260-shdwc
      - atmel,at91sam9rl-shdwc
      - atmel,at91sam9x5-shdwc

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  atmel,wakeup-mode:
    description: operation mode of the wakeup mode
    $ref: /schemas/types.yaml#/definitions/string
    enum: [ none, high, low, any ]

  atmel,wakeup-counter:
    description: counter on wake-up 0
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 0
    maximum: 15

  atmel,wakeup-rtt-timer:
    description: enable real-time timer wake-up
    type: boolean

  atmel,wakeup-rtc-timer:
    description: enable real-time clock wake-up
    type: boolean

required:
  - compatible
  - reg
  - clocks

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: atmel,at91sam9x5-shdwc
    then:
      properties:
        atmel,wakeup-rtt-timer: false

  - if:
      properties:
        compatible:
          contains:
            const: atmel,at91sam9260-shdwc
    then:
      properties:
        atmel,wakeup-rtc-timer: false

additionalProperties: false

examples:
  - |
    shdwc: poweroff@fffffd10 {
        compatible = "atmel,at91sam9260-shdwc";
        reg = <0xfffffd10 0x10>;
        clocks = <&clk32k>;
    };

...
+114 −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/power/reset/atmel,sama5d2-shdwc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip AT91 SAMA5D2 SHDWC Shutdown Controller

maintainers:
  - Claudiu Beznea <claudiu.beznea@microchip.com>

description: |
  Microchip AT91 SHDWC shutdown controller controls the power supplies VDDIO
  and VDDCORE and the wake-up detection on debounced input lines.

properties:
  compatible:
    oneOf:
      - items:
          - const: microchip,sama7g5-shdwc
          - const: syscon
      - enum:
          - atmel,sama5d2-shdwc
          - microchip,sam9x60-shdwc

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

  debounce-delay-us:
    description:
      Minimum wake-up inputs debouncer period in microseconds. It is usually a
      board-related property.

  atmel,wakeup-rtc-timer:
    description: enable real-time clock wake-up
    type: boolean

  atmel,wakeup-rtt-timer:
    description: enable real-time timer wake-up
    type: boolean

patternProperties:
  "^input@[0-15]$":
    description:
      Wake-up input nodes. These are usually described in the "board" part of
      the Device Tree. Note also that input 0 is linked to the wake-up pin and
      is frequently used.
    type: object
    properties:
      reg:
        description: contains the wake-up input index
        minimum: 0
        maximum: 15

      atmel,wakeup-active-high:
        description:
          The corresponding wake-up input described by the child forces the
          wake-up of the core power supply on a high level. The default is to
          be active low.
        type: boolean

    required:
      - reg

    additionalProperties: false

required:
  - compatible
  - reg
  - clocks

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: atmel,sama5d2-shdwc
    then:
      properties:
        atmel,wakeup-rtt-timer: false

additionalProperties: false

examples:
  - |
    shdwc: poweroff@f8048010 {
        compatible = "atmel,sama5d2-shdwc";
        reg = <0xf8048010 0x10>;
        clocks = <&clk32k>;
        #address-cells = <1>;
        #size-cells = <0>;
        atmel,wakeup-rtc-timer;
        debounce-delay-us = <976>;

        input@0 {
            reg = <0>;
        };

        input@1 {
            reg = <1>;
            atmel,wakeup-active-high;
        };
    };

...
+0 −26
Original line number Diff line number Diff line
NVMEM reboot mode driver

This driver gets reboot mode magic value from reboot-mode driver
and stores it in a NVMEM cell named "reboot-mode". Then the bootloader
can read it and take different action according to the magic
value stored.

Required properties:
- compatible: should be "nvmem-reboot-mode".
- nvmem-cells: A phandle to the reboot mode provided by a nvmem device.
- nvmem-cell-names: Should be "reboot-mode".

The rest of the properties should follow the generic reboot-mode description
found in reboot-mode.txt

Example:
	reboot-mode {
		compatible = "nvmem-reboot-mode";
		nvmem-cells = <&reboot_mode>;
		nvmem-cell-names = "reboot-mode";

		mode-normal     = <0xAAAA5501>;
		mode-bootloader = <0xBBBB5500>;
		mode-recovery   = <0xCCCC5502>;
		mode-test       = <0xDDDD5503>;
	};
Loading