Skip to content

Commit 39f0134

Browse files
committed
Merge tag 'for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
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 ...
2 parents 90ddb3f + c142872 commit 39f0134

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2909
-233
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
What: /sys/class/power_supply/rt9467-*/sysoff_enable
2+
Date: Feb 2023
3+
KernelVersion: 6.3
4+
Contact: ChiaEn Wu <[email protected]>
5+
Description:
6+
This entry allows enabling the sysoff mode of rt9467 charger
7+
devices.
8+
If enabled and the input is removed, the internal battery FET
9+
is turned off to reduce the leakage from the BAT pin. See
10+
device datasheet for details. It's commonly used when the
11+
product enter shipping stage. After entering shipping mode,
12+
only 'VBUS' or 'Power key" pressed can make it leave this mode.
13+
'Disable' also can help to leave it, but it's more like to
14+
abort the action before the device really enter shipping mode.
15+
16+
Access: Read, Write
17+
Valid values:
18+
- 1: enabled
19+
- 0: disabled
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
What: /sys/class/power_supply/rt9471-*/sysoff_enable
2+
Date: Feb 2023
3+
KernelVersion: 6.3
4+
Contact: ChiYuan Huang <[email protected]>
5+
Description:
6+
This entry allows enabling the sysoff mode of rt9471 charger devices.
7+
If enabled and the input is removed, the internal battery FET is turned
8+
off to reduce the leakage from the BAT pin. See device datasheet for details.
9+
It's commonly used when the product enter shipping stage. After entering
10+
shipping mode, only 'VBUS' or 'Power key" pressed can make it leave this
11+
mode. 'Disable' also can help to leave it, but it's more like to abort
12+
the action before the device really enter shipping mode.
13+
14+
Access: Read, Write
15+
Valid values:
16+
- 1: enabled
17+
- 0: disabled
18+
19+
What: /sys/class/power_supply/rt9471-*/port_detect_enable
20+
Date: Feb 2023
21+
KernelVersion: 6.3
22+
Contact: ChiYuan Huang <[email protected]>
23+
Description:
24+
This entry allows enabling the USB BC12 port detect function of rt9471 charger
25+
devices. If enabled and VBUS is inserted, device will start to do the BC12
26+
port detect and report the usb port type when port detect is done. See
27+
datasheet for details. Normally controlled when TypeC/USBPD port integrated.
28+
29+
Access: Read, Write
30+
Valid values:
31+
- 1: enabled
32+
- 0: disabled

Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,17 @@ properties:
4242
$ref: /schemas/types.yaml#/definitions/uint32
4343
description: The reset value written to the reboot register (32 bit access).
4444

45+
priority:
46+
default: 192
47+
4548
required:
4649
- compatible
4750
- offset
4851

4952
additionalProperties: false
5053

5154
allOf:
55+
- $ref: restart-handler.yaml#
5256
- if:
5357
not:
5458
required:

Documentation/devicetree/bindings/power/supply/qcom,pm8941-coincell.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,30 @@ maintainers:
1616

1717
properties:
1818
compatible:
19-
const: qcom,pm8941-coincell
19+
oneOf:
20+
- items:
21+
- enum:
22+
- qcom,pm8998-coincell
23+
- const: qcom,pm8941-coincell
24+
25+
- const: qcom,pm8941-coincell
2026

2127
reg:
2228
maxItems: 1
2329

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

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

3345
qcom,charger-disable:
@@ -37,8 +49,6 @@ properties:
3749
required:
3850
- compatible
3951
- reg
40-
- qcom,rset-ohms
41-
- qcom,vset-millivolts
4252

4353
additionalProperties: false
4454

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/power/supply/richtek,rt9467-charger.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Richtek RT9467 Switching Battery Charger with Power Path Management
8+
9+
maintainers:
10+
- ChiYuan Huang <[email protected]>
11+
- ChiaEn Wu <[email protected]>
12+
13+
description: |
14+
RT9467 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for
15+
portable applications. It integrates a synchronous PWM controller, power
16+
MOSFETs, input current sensing and regulation, high-accuracy voltage
17+
regulation, and charge termination. The charge current is regulated through
18+
integrated sensing resistors.
19+
20+
The RT9467 also features USB On-The-Go (OTG) support. It also integrates
21+
D+/D- pin for USB host/charging port detection.
22+
23+
Datasheet is available at
24+
https://www.richtek.com/assets/product_file/RT9467/DS9467-01.pdf
25+
26+
properties:
27+
compatible:
28+
const: richtek,rt9467-charger
29+
30+
reg:
31+
maxItems: 1
32+
33+
wakeup-source: true
34+
35+
interrupts:
36+
maxItems: 1
37+
38+
charge-enable-gpios:
39+
description: GPIO is used to turn on and off charging.
40+
maxItems: 1
41+
42+
usb-otg-vbus-regulator:
43+
type: object
44+
description: OTG boost regulator.
45+
unevaluatedProperties: false
46+
$ref: /schemas/regulator/regulator.yaml#
47+
48+
properties:
49+
enable-gpios: true
50+
51+
required:
52+
- compatible
53+
- reg
54+
- wakeup-source
55+
- interrupts
56+
57+
additionalProperties: false
58+
59+
examples:
60+
- |
61+
#include <dt-bindings/interrupt-controller/irq.h>
62+
#include <dt-bindings/gpio/gpio.h>
63+
i2c {
64+
#address-cells = <1>;
65+
#size-cells = <0>;
66+
67+
charger@5b {
68+
compatible = "richtek,rt9467-charger";
69+
reg = <0x5b>;
70+
wakeup-source;
71+
interrupts-extended = <&gpio_intc 32 IRQ_TYPE_LEVEL_LOW>;
72+
charge-enable-gpios = <&gpio26 1 GPIO_ACTIVE_LOW>;
73+
74+
rt9467_otg_vbus: usb-otg-vbus-regulator {
75+
regulator-name = "rt9467-usb-otg-vbus";
76+
regulator-min-microvolt = <4425000>;
77+
regulator-max-microvolt = <5825000>;
78+
regulator-min-microamp = <500000>;
79+
regulator-max-microamp = <3000000>;
80+
};
81+
};
82+
};
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/power/supply/richtek,rt9471.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Richtek RT9471 3A Single Cell Switching Battery charger
8+
9+
maintainers:
10+
- Alina Yu <[email protected]>
11+
- ChiYuan Huang <[email protected]>
12+
13+
description: |
14+
RT9471 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for
15+
portable applications. It supports USB BC1.2 port detection, current and
16+
voltage regulations in both charging and boost mode.
17+
18+
Datasheet is available at
19+
https://www.richtek.com/assets/product_file/RT9471=RT9471D/DS9471D-02.pdf
20+
21+
properties:
22+
compatible:
23+
const: richtek,rt9471
24+
25+
reg:
26+
maxItems: 1
27+
28+
charge-enable-gpios:
29+
description: GPIO used to turn on and off charging.
30+
maxItems: 1
31+
32+
wakeup-source: true
33+
34+
interrupts:
35+
maxItems: 1
36+
37+
usb-otg-vbus-regulator:
38+
type: object
39+
$ref: /schemas/regulator/regulator.yaml#
40+
unevaluatedProperties: false
41+
42+
required:
43+
- compatible
44+
- reg
45+
- wakeup-source
46+
- interrupts
47+
48+
additionalProperties: false
49+
50+
examples:
51+
- |
52+
#include <dt-bindings/interrupt-controller/irq.h>
53+
#include <dt-bindings/gpio/gpio.h>
54+
i2c {
55+
#address-cells = <1>;
56+
#size-cells = <0>;
57+
58+
charger@53 {
59+
compatible = "richtek,rt9471";
60+
reg = <0x53>;
61+
charge-enable-gpios = <&gpio26 1 GPIO_ACTIVE_LOW>;
62+
wakeup-source;
63+
interrupts-extended = <&gpio_intc 32 IRQ_TYPE_EDGE_FALLING>;
64+
65+
usb-otg-vbus-regulator {
66+
regulator-name = "usb-otg-vbus";
67+
regulator-min-microvolt = <4850000>;
68+
regulator-max-microvolt = <5300000>;
69+
regulator-min-microamp = <500000>;
70+
regulator-max-microamp = <1200000>;
71+
};
72+
};
73+
};

drivers/platform/x86/x86-android-tablets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ struct x86_dev_info {
187187
/* Generic / shared charger / battery settings */
188188
static const char * const tusb1211_chg_det_psy[] = { "tusb1211-charger-detect" };
189189
static const char * const bq24190_psy[] = { "bq24190-charger" };
190-
static const char * const bq25890_psy[] = { "bq25890-charger" };
190+
static const char * const bq25890_psy[] = { "bq25890-charger-0" };
191191

192192
static const struct property_entry fg_bq24190_supply_props[] = {
193193
PROPERTY_ENTRY_STRING_ARRAY("supplied-from", bq24190_psy),

drivers/power/reset/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ config POWER_RESET_OCELOT_RESET
141141
help
142142
This driver supports restart for Microsemi Ocelot SoC and similar.
143143

144+
config POWER_RESET_ODROID_GO_ULTRA_POWEROFF
145+
bool "Odroid Go Ultra power-off driver"
146+
depends on ARCH_MESON || COMPILE_TEST
147+
depends on I2C=y && OF
148+
help
149+
This driver supports Power off for Odroid Go Ultra device.
150+
144151
config POWER_RESET_OXNAS
145152
bool "OXNAS SoC restart driver"
146153
depends on ARCH_OXNAS

drivers/power/reset/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ obj-$(CONFIG_POWER_RESET_MT6323) += mt6323-poweroff.o
1717
obj-$(CONFIG_POWER_RESET_OXNAS) += oxnas-restart.o
1818
obj-$(CONFIG_POWER_RESET_QCOM_PON) += qcom-pon.o
1919
obj-$(CONFIG_POWER_RESET_OCELOT_RESET) += ocelot-reset.o
20+
obj-$(CONFIG_POWER_RESET_ODROID_GO_ULTRA_POWEROFF) += odroid-go-ultra-poweroff.o
2021
obj-$(CONFIG_POWER_RESET_PIIX4_POWEROFF) += piix4-poweroff.o
2122
obj-$(CONFIG_POWER_RESET_LTC2952) += ltc2952-poweroff.o
2223
obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o

0 commit comments

Comments
 (0)