Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7816ad0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power supply and reset updates from Sebastian Reichel:
 - introduce reboot mode driver
 - add DT support to max8903
 - add power supply support for axp221
 - misc fixes

* tag 'for-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
  power: reset: add reboot mode driver
  dt-bindings: power: reset: add document for reboot-mode driver
  power_supply: fix return value of get_property
  power: qcom_smbb: Make an extcon for usb cable detection
  max8903: adds support for initiation via device tree
  max8903: adds documentation for device tree bindings.
  max8903: remove unnecessary 'out of memory' error message.
  max8903: removes non zero validity checks on gpios.
  max8903: adds requesting of gpios.
  max8903: cleans up confusing relationship between dc_valid, dok and dcm.
  max8903: store pointer to pdata instead of copying it.
  power_supply: bq27xxx_battery: Group register mappings into one table
  docs: Move brcm,bcm21664-resetmgr.txt
  power/reset: make syscon_poweroff() static
  power: axp20x_usb: Add support for usb power-supply on axp22x pmics
  power_supply: bq27xxx_battery: Index register numbers by enum
  power_supply: bq27xxx_battery: Fix copy/paste error in header comment
  MAINTAINERS: Add file patterns for power supply device tree bindings
  power: reset: keystone: Enable COMPILE_TEST
parents 6097d55e 4fcd504e
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
Maxim Semiconductor MAX8903 Battery Charger bindings

Required properties:
- compatible: "maxim,max8903" for MAX8903 Battery Charger
- dok-gpios: Valid DC power has been detected (active low, input), optional if uok-gpios is provided
- uok-gpios: Valid USB power has been detected (active low, input), optional if dok-gpios is provided

Optional properties:
- cen-gpios: Charge enable pin (active low, output)
- chg-gpios: Charger status pin (active low, input)
- flt-gpios: Fault pin (active low, output)
- dcm-gpios: Current limit mode setting (DC=1 or USB=0, output)
- usus-gpios: USB suspend pin (active high, output)


Example:

	max8903-charger {
		compatible = "maxim,max8903";
		dok-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
		flt-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
		chg-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
		cen-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
		status = "okay";
	};
+25 −0
Original line number Diff line number Diff line
Generic reboot mode core map driver

This driver get reboot mode arguments and call the write
interface to store the magic value in special register
or ram. Then the bootloader can read it and take different
action according to the argument stored.

All mode properties are vendor specific, it is a indication to tell
the bootloader what to do when the system reboots, and should be named
as mode-xxx = <magic> (xxx is mode name, magic should be a none-zero value).

For example modes common on Android platform:
- mode-normal: Normal reboot mode, system reboot with command "reboot".
- mode-recovery: Android Recovery mode, it is a mode to format the device or update a new image.
- mode-bootloader: Android fastboot mode, it's a mode to re-flash partitions on the Android based device.
- mode-loader: A bootloader mode, it's a mode used to download image on Rockchip platform,
	       usually used in development.

Example:
	reboot-mode {
		mode-normal = <BOOT_NORMAL>;
		mode-recovery = <BOOT_RECOVERY>;
		mode-bootloader = <BOOT_FASTBOOT>;
		mode-loader = <BOOT_BL_DOWNLOAD>;
	}
+35 −0
Original line number Diff line number Diff line
SYSCON reboot mode driver

This driver gets reboot mode magic value form reboot-mode driver
and stores it in a SYSCON mapped register. Then the bootloader
can read it and take different action according to the magic
value stored.

This DT node should be represented as a sub-node of a "syscon", "simple-mfd"
node.

Required properties:
- compatible: should be "syscon-reboot-mode"
- offset: offset in the register map for the storage register (in bytes)

Optional property:
- mask: bits mask of the bits in the register to store the reboot mode magic value,
  default set to 0xffffffff if missing.

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

Example:
	pmu: pmu@20004000 {
		compatible = "rockchip,rk3066-pmu", "syscon", "simple-mfd";
		reg = <0x20004000 0x100>;

		reboot-mode {
			compatible = "syscon-reboot-mode";
			offset = <0x40>;
			mode-normal = <BOOT_NORMAL>;
			mode-recovery = <BOOT_RECOVERY>;
			mode-bootloader = <BOOT_FASTBOOT>;
			mode-loader = <BOOT_BL_DOWNLOAD>;
		};
	};
+2 −1
Original line number Diff line number Diff line
AXP20x USB power supply

Required Properties:
-compatible: "x-powers,axp202-usb-power-supply"
-compatible: One of: "x-powers,axp202-usb-power-supply"
                     "x-powers,axp221-usb-power-supply"

This node is a subnode of the axp20x PMIC.

Loading