Commit 39f01344 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power supply and reset updates from Sebastian Reichel:
 "Nothing special for the power-supply subystem this time.

   - power-supply core: remove faulty cooling logic

   - convert all sysfs show() handlers from *printf() use sysfs_emit()

   - bq25890: add dual-charger support required by Lenovo Yoga Tab 3 Pro

   - bq27xxx: fix reporting critical level

   - syscon-reboot: add priority property support

   - new rt9467 charger driver

   - new rt9471 charger driver

   - new Odroid Go Ultra poweroff driver

   - misc minor fixes and cleanups"

* tag 'for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (32 commits)
  power: reset: odroid-go-ultra: fix I2C dependency
  power: supply: leds: explicitly include linux/leds.h
  dt-bindings: power: supply: pm8941-coincell: Don't require charging properties
  dt-bindings: power: supply: pm8941-coincell: Add PM8998 compatible
  power: reset: add Odroid Go Ultra poweroff driver
  power: supply: rt9467: Fix spelling mistake "attache" -> "attach"
  power: supply: rt9471: fix using wrong ce_gpio in rt9471_probe()
  power: supply: max77650: Make max77650_charger_disable() return void
  Documentation: power: rt9467: Document exported sysfs entries
  power: supply: rt9467: Add Richtek RT9467 charger driver
  dt-bindings: power: supply: Add Richtek RT9467 battery charger
  Documentation: power: rt9471: Document exported sysfs entries
  power: supply: rt9471: Add Richtek RT9471 charger driver
  dt-bindings: power: supply: Add Richtek RT9471 battery charger
  power: supply: max1721x: Use strscpy() is more robust and safer
  power: supply: test-power: use strscpy() instead of strncpy()
  power: supply: bq27xxx: fix reporting critical level
  power: supply: bq256xx: Init ichg/vbat value with chip default value
  power: supply: collie_battery: Convert to GPIO descriptors (part 2)
  power: supply: remove faulty cooling logic
  ...
parents 90ddb3f0 c142872e
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
What:		/sys/class/power_supply/rt9467-*/sysoff_enable
Date:		Feb 2023
KernelVersion:	6.3
Contact:	ChiaEn Wu <chiaen_wu@richtek.com>
Description:
		This entry allows enabling the sysoff mode of rt9467 charger
		devices.
		If enabled and the input is removed, the internal battery FET
		is turned off to reduce the leakage from the BAT pin. See
		device datasheet for details. It's commonly used when the
		product enter shipping stage. After entering shipping mode,
		only 'VBUS' or 'Power key" pressed can make it leave this mode.
		'Disable' also can help to leave it, but it's more like to
		abort the action before the device really enter shipping mode.

		Access: Read, Write
		Valid values:
		- 1: enabled
		- 0: disabled
+32 −0
Original line number Diff line number Diff line
What:		/sys/class/power_supply/rt9471-*/sysoff_enable
Date:		Feb 2023
KernelVersion:	6.3
Contact:	ChiYuan Huang <cy_huang@richtek.com>
Description:
		This entry allows enabling the sysoff mode of rt9471 charger devices.
		If enabled and the input is removed, the internal battery FET is turned
		off to reduce the leakage from the BAT pin. See device datasheet for details.
		It's commonly used when the product enter shipping stage. After entering
		shipping mode, only 'VBUS' or 'Power key" pressed can make it leave this
		mode. 'Disable' also can help to leave it, but it's more like to abort
		the action before the device really enter shipping mode.

		Access: Read, Write
		Valid values:
		- 1: enabled
		- 0: disabled

What:		/sys/class/power_supply/rt9471-*/port_detect_enable
Date:		Feb 2023
KernelVersion:	6.3
Contact:	ChiYuan Huang <cy_huang@richtek.com>
Description:
		This entry allows enabling the USB BC12 port detect function of rt9471 charger
		devices. If enabled and VBUS is inserted, device will start to do the BC12
		port detect and report the usb port type when port detect is done. See
		datasheet for details. Normally controlled when TypeC/USBPD port integrated.

		Access: Read, Write
		Valid values:
		- 1: enabled
		- 0: disabled
+4 −0
Original line number Diff line number Diff line
@@ -42,6 +42,9 @@ properties:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: The reset value written to the reboot register (32 bit access).

  priority:
    default: 192

required:
  - compatible
  - offset
@@ -49,6 +52,7 @@ required:
additionalProperties: false

allOf:
  - $ref: restart-handler.yaml#
  - if:
      not:
        required:
+15 −5
Original line number Diff line number Diff line
@@ -16,18 +16,30 @@ maintainers:

properties:
  compatible:
    const: qcom,pm8941-coincell
    oneOf:
      - items:
          - enum:
              - qcom,pm8998-coincell
          - const: qcom,pm8941-coincell

      - const: qcom,pm8941-coincell

  reg:
    maxItems: 1

  qcom,rset-ohms:
    description: resistance (in ohms) for current-limiting resistor
    description: |
      Resistance (in ohms) for current-limiting resistor. If unspecified,
      inherit the previous configuration (e.g. from bootloader or hardware
      default value).
    enum: [ 800, 1200, 1700, 2100 ]

  qcom,vset-millivolts:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: voltage (in millivolts) to apply for charging
    description: |
      Voltage (in millivolts) to apply for charging. If unspecified, inherit
      the previous configuration (e.g. from bootloader or hardware default
      value).
    enum: [ 2500, 3000, 3100, 3200 ]

  qcom,charger-disable:
@@ -37,8 +49,6 @@ properties:
required:
  - compatible
  - reg
  - qcom,rset-ohms
  - qcom,vset-millivolts

additionalProperties: false

+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/supply/richtek,rt9467-charger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RT9467 Switching Battery Charger with Power Path Management

maintainers:
  - ChiYuan Huang <cy_huang@richtek.com>
  - ChiaEn Wu <chiaen_wu@richtek.com>

description: |
  RT9467 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for
  portable applications. It integrates a synchronous PWM controller, power
  MOSFETs, input current sensing and regulation, high-accuracy voltage
  regulation, and charge termination. The charge current is regulated through
  integrated sensing resistors.

  The RT9467 also features USB On-The-Go (OTG) support. It also integrates
  D+/D- pin for USB host/charging port detection.

  Datasheet is available at
  https://www.richtek.com/assets/product_file/RT9467/DS9467-01.pdf

properties:
  compatible:
    const: richtek,rt9467-charger

  reg:
    maxItems: 1

  wakeup-source: true

  interrupts:
    maxItems: 1

  charge-enable-gpios:
    description: GPIO is used to turn on and off charging.
    maxItems: 1

  usb-otg-vbus-regulator:
    type: object
    description: OTG boost regulator.
    unevaluatedProperties: false
    $ref: /schemas/regulator/regulator.yaml#

    properties:
      enable-gpios: true

required:
  - compatible
  - reg
  - wakeup-source
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/gpio/gpio.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      charger@5b {
        compatible = "richtek,rt9467-charger";
        reg = <0x5b>;
        wakeup-source;
        interrupts-extended = <&gpio_intc 32 IRQ_TYPE_LEVEL_LOW>;
        charge-enable-gpios = <&gpio26 1 GPIO_ACTIVE_LOW>;

        rt9467_otg_vbus: usb-otg-vbus-regulator {
          regulator-name = "rt9467-usb-otg-vbus";
          regulator-min-microvolt = <4425000>;
          regulator-max-microvolt = <5825000>;
          regulator-min-microamp = <500000>;
          regulator-max-microamp = <3000000>;
        };
      };
    };
Loading