Skip to content

Commit c7c1863

Browse files
committed
Merge tag 'for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply and reset updates from Sebastian Reichel: "Power-supply core: - support charge_types in extensions Power-supply drivers: - new driver for Pegatron Chagall battery - new driver for Maxim MAX8971 charger - new driver for Huawei Matebook E Go - bq27xxx: retry failed I2C transmissions - bq24190: add BQ24193 support - misc small cleanups and fixes Reset drivers: - new driver for Toradex SMARC Embedded Controller - reboot-mode: add support for modes containing / in DT - atmel,at91sam9260-reset: support sama7d65 - syscon-reboot: add Google GS101 support - misc small cleanups and fixes" * tag 'for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (28 commits) power: supply: rt9471: Simplify definition of some struct linear_range power: supply: max77976: add EXTCON dependency power: supply: Add support for Maxim MAX8971 charger dt-bindings: power: supply: Document Maxim MAX8971 charger power: supply: max17040: adjust thermal channel scaling power: reset: syscon-reboot: add gs101-specific reset dt-bindings: reset: syscon-reboot: add google,gs101-reboot power: supply: add Huawei Matebook E Go psy driver power: supply: Add driver for Pegatron Chagall battery dt-bindings: power: supply: Document Pegatron Chagall fuel gauge dt-bindings: vendor-prefixes: add prefix for Pegatron Corporation power: supply: cros_charge-control: Avoid -Wflex-array-member-not-at-end warning power: reset: add Toradex Embedded Controller dt-bindings: power: reset: add toradex,smarc-ec power: supply: support charge_types in extensions power: supply: max77705: Fix workqueue error handling in probe power: supply: wm831x: Constify struct chg_map and some arrays power: bq24190: Add BQ24193 support dt-bindings: power: supply: bq24190: Add BQ24193 compatible power: supply: sysfs: Remove duplicate NUL termination ...
2 parents 5722a6c + b1d8766 commit c7c1863

39 files changed

+2420
-127
lines changed

Documentation/ABI/testing/sysfs-class-power

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,3 +822,46 @@ Description:
822822
Each entry is a link to the device which registered the extension.
823823

824824
Access: Read
825+
826+
What: /sys/class/power_supply/max8971-charger/fast_charge_timer
827+
Date: May 2025
828+
KernelVersion: 6.15.0
829+
Contact: Svyatoslav Ryhel <clamor95@gmail.com>
830+
Description:
831+
This entry shows and sets the maximum time the max8971
832+
charger operates in fast-charge mode. When the timer expires
833+
the device will terminate fast-charge mode (charging current
834+
will drop to 0 A) and will trigger interrupt.
835+
836+
Valid values:
837+
838+
- 4 - 10 (hours), step by 1
839+
- 0: disabled.
840+
841+
What: /sys/class/power_supply/max8971-charger/top_off_threshold_current
842+
Date: May 2025
843+
KernelVersion: 6.15.0
844+
Contact: Svyatoslav Ryhel <clamor95@gmail.com>
845+
Description:
846+
This entry shows and sets the charging current threshold for
847+
entering top-off charging mode. When charging current in fast
848+
charge mode drops below this value, the charger will trigger
849+
interrupt and start top-off charging mode.
850+
851+
Valid values:
852+
853+
- 50000 - 200000 (microamps), step by 50000 (rounded down)
854+
855+
What: /sys/class/power_supply/max8971-charger/top_off_timer
856+
Date: May 2025
857+
KernelVersion: 6.15.0
858+
Contact: Svyatoslav Ryhel <clamor95@gmail.com>
859+
Description:
860+
This entry shows and sets the maximum time the max8971
861+
charger operates in top-off charge mode. When the timer expires
862+
the device will terminate top-off charge mode (charging current
863+
will drop to 0 A) and will trigger interrupt.
864+
865+
Valid values:
866+
867+
- 0 - 70 (minutes), step by 10 (rounded down)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
What: /sys/class/power_supply/gaokun-ec-battery/smart_charge_delay
2+
Date: March 2025
3+
KernelVersion: 6.15
4+
Contact: Pengyu Luo <mitltlatltl@gmail.com>
5+
Description:
6+
This entry allows configuration of smart charging delay.
7+
8+
Smart charging behavior: when the power adapter is connected
9+
for delay hours, battery charging will follow the rules of
10+
charge_control_start_threshold and charge_control_end_threshold.
11+
For more information about charge control, please refer to
12+
sysfs-class-power.
13+
14+
Access: Read, Write
15+
16+
Valid values: In hours (non-negative)
17+
18+
What: /sys/class/power_supply/gaokun-ec-battery/battery_adaptive_charge
19+
Date: March 2025
20+
KernelVersion: 6.15
21+
Contact: Pengyu Luo <mitltlatltl@gmail.com>
22+
Description:
23+
This entry allows enabling battery adaptive charging.
24+
25+
Access: Read, Write
26+
27+
Valid values: 0 (disabled) or 1 (enabled)

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

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ description: |+
2121
2222
properties:
2323
compatible:
24-
const: syscon-reboot
24+
enum:
25+
- syscon-reboot
26+
- google,gs101-reboot
2527

2628
mask:
2729
$ref: /schemas/types.yaml#/definitions/uint32
@@ -49,12 +51,6 @@ properties:
4951
priority:
5052
default: 192
5153

52-
oneOf:
53-
- required:
54-
- offset
55-
- required:
56-
- reg
57-
5854
required:
5955
- compatible
6056

@@ -63,12 +59,29 @@ additionalProperties: false
6359
allOf:
6460
- $ref: restart-handler.yaml#
6561
- if:
66-
not:
67-
required:
68-
- mask
62+
properties:
63+
compatible:
64+
contains:
65+
const: google,gs101-reboot
6966
then:
70-
required:
71-
- value
67+
properties:
68+
mask: false
69+
offset: false
70+
reg: false
71+
value: false
72+
73+
else:
74+
if:
75+
not:
76+
required:
77+
- mask
78+
then:
79+
required:
80+
- value
81+
82+
oneOf:
83+
- required: [offset]
84+
- required: [reg]
7285

7386
examples:
7487
- |
@@ -78,3 +91,8 @@ examples:
7891
offset = <0x0>;
7992
mask = <0x1>;
8093
};
94+
95+
- |
96+
reboot {
97+
compatible = "google,gs101-reboot";
98+
};
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/power/reset/toradex,smarc-ec.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Toradex Embedded Controller
8+
9+
maintainers:
10+
- Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
11+
- Francesco Dolcini <francesco.dolcini@toradex.com>
12+
13+
description: |
14+
The Toradex Embedded Controller (EC) is used on Toradex SMARC modules,
15+
primarily to manage power and reset functionalities.
16+
17+
The EC provides the following functions:
18+
- Reads the SMARC POWER_BTN# and RESET_IN# signals and controls the PMIC accordingly.
19+
- Controls the SoC boot mode signals based on the SMARC BOOT_SEL# and FORCE_RECOV# inputs.
20+
- Manages the CARRIER_STDBY# signal in response to relevant SoC signals.
21+
22+
The EC runs a small firmware, factory programmed into its internal flash, and communicates over I2C.
23+
It allows software to control power-off and reset functionalities of the module.
24+
25+
properties:
26+
compatible:
27+
items:
28+
- enum:
29+
- toradex,smarc-imx95-ec
30+
- toradex,smarc-imx8mp-ec
31+
- const: toradex,smarc-ec
32+
33+
reg:
34+
maxItems: 1
35+
36+
required:
37+
- compatible
38+
- reg
39+
40+
additionalProperties: false
41+
42+
examples:
43+
- |
44+
i2c {
45+
#address-cells = <1>;
46+
#size-cells = <0>;
47+
48+
reset-controller@28 {
49+
compatible = "toradex,smarc-imx95-ec", "toradex,smarc-ec";
50+
reg = <0x28>;
51+
};
52+
};

Documentation/devicetree/bindings/power/supply/bq24190.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ properties:
1919
- ti,bq24190
2020
- ti,bq24192
2121
- ti,bq24192i
22+
- ti,bq24193
2223
- ti,bq24196
2324
- ti,bq24296
2425
- ti,bq24297

Documentation/devicetree/bindings/power/supply/bq25980.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,28 +87,28 @@ unevaluatedProperties: false
8787
examples:
8888
- |
8989
bat: battery {
90-
compatible = "simple-battery";
91-
constant-charge-current-max-microamp = <4000000>;
92-
constant-charge-voltage-max-microvolt = <8400000>;
93-
precharge-current-microamp = <160000>;
94-
charge-term-current-microamp = <160000>;
90+
compatible = "simple-battery";
91+
constant-charge-current-max-microamp = <4000000>;
92+
constant-charge-voltage-max-microvolt = <8400000>;
93+
precharge-current-microamp = <160000>;
94+
charge-term-current-microamp = <160000>;
9595
};
9696
#include <dt-bindings/gpio/gpio.h>
9797
#include <dt-bindings/interrupt-controller/irq.h>
9898
i2c {
99-
#address-cells = <1>;
100-
#size-cells = <0>;
101-
102-
bq25980: charger@65 {
103-
compatible = "ti,bq25980";
104-
reg = <0x65>;
105-
interrupt-parent = <&gpio1>;
106-
interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
107-
ti,watchdog-timeout-ms = <0>;
108-
ti,sc-ocp-limit-microamp = <2000000>;
109-
ti,sc-ovp-limit-microvolt = <17800000>;
110-
monitored-battery = <&bat>;
111-
};
99+
#address-cells = <1>;
100+
#size-cells = <0>;
101+
102+
bq25980: charger@65 {
103+
compatible = "ti,bq25980";
104+
reg = <0x65>;
105+
interrupt-parent = <&gpio1>;
106+
interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
107+
ti,watchdog-timeout-ms = <0>;
108+
ti,sc-ocp-limit-microamp = <2000000>;
109+
ti,sc-ovp-limit-microvolt = <17800000>;
110+
monitored-battery = <&bat>;
111+
};
112112
};
113113
114114
...

Documentation/devicetree/bindings/power/supply/ingenic,battery.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ examples:
4848
#include <dt-bindings/iio/adc/ingenic,adc.h>
4949
5050
simple_battery: battery {
51-
compatible = "simple-battery";
52-
voltage-min-design-microvolt = <3600000>;
53-
voltage-max-design-microvolt = <4200000>;
51+
compatible = "simple-battery";
52+
voltage-min-design-microvolt = <3600000>;
53+
voltage-max-design-microvolt = <4200000>;
5454
};
5555
5656
ingenic-battery {
57-
compatible = "ingenic,jz4740-battery";
58-
io-channels = <&adc INGENIC_ADC_BATTERY>;
59-
io-channel-names = "battery";
60-
monitored-battery = <&simple_battery>;
57+
compatible = "ingenic,jz4740-battery";
58+
io-channels = <&adc INGENIC_ADC_BATTERY>;
59+
io-channel-names = "battery";
60+
monitored-battery = <&simple_battery>;
6161
};

Documentation/devicetree/bindings/power/supply/ltc4162-l.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ additionalProperties: false
6161
examples:
6262
- |
6363
i2c {
64-
#address-cells = <1>;
65-
#size-cells = <0>;
66-
charger: battery-charger@68 {
67-
compatible = "lltc,ltc4162-l";
68-
reg = <0x68>;
69-
lltc,rsnsb-micro-ohms = <10000>;
70-
lltc,rsnsi-micro-ohms = <16000>;
71-
lltc,cell-count = <2>;
72-
};
64+
#address-cells = <1>;
65+
#size-cells = <0>;
66+
charger: battery-charger@68 {
67+
compatible = "lltc,ltc4162-l";
68+
reg = <0x68>;
69+
lltc,rsnsb-micro-ohms = <10000>;
70+
lltc,rsnsi-micro-ohms = <16000>;
71+
lltc,cell-count = <2>;
72+
};
7373
};

Documentation/devicetree/bindings/power/supply/maxim,max77705.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ examples:
3737
#include <dt-bindings/interrupt-controller/irq.h>
3838
3939
i2c {
40-
#address-cells = <1>;
41-
#size-cells = <0>;
40+
#address-cells = <1>;
41+
#size-cells = <0>;
4242
4343
charger@69 {
4444
compatible = "maxim,max77705-charger";
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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/maxim,max8971.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Maxim MAX8971 IC charger
8+
9+
maintainers:
10+
- Svyatoslav Ryhel <clamor95@gmail.com>
11+
12+
description:
13+
The MAX8971 is a compact, high-frequency, high-efficiency switch-mode charger
14+
for a one-cell lithium-ion (Li+) battery.
15+
16+
allOf:
17+
- $ref: power-supply.yaml#
18+
19+
properties:
20+
compatible:
21+
const: maxim,max8971
22+
23+
reg:
24+
maxItems: 1
25+
26+
interrupts:
27+
maxItems: 1
28+
29+
monitored-battery: true
30+
31+
port:
32+
description:
33+
An optional port node to link the extcon device to detect type of plug.
34+
$ref: /schemas/graph.yaml#/properties/port
35+
36+
required:
37+
- compatible
38+
- reg
39+
- interrupts
40+
41+
unevaluatedProperties: false
42+
43+
examples:
44+
- |
45+
#include <dt-bindings/gpio/gpio.h>
46+
#include <dt-bindings/interrupt-controller/irq.h>
47+
48+
i2c {
49+
#address-cells = <1>;
50+
#size-cells = <0>;
51+
52+
charger@35 {
53+
compatible = "maxim,max8971";
54+
reg = <0x35>;
55+
56+
interrupt-parent = <&gpio>;
57+
interrupts = <74 IRQ_TYPE_LEVEL_LOW>;
58+
59+
monitored-battery = <&battery>;
60+
61+
port {
62+
charger_input: endpoint {
63+
remote-endpoint = <&extcon_output>;
64+
};
65+
};
66+
};
67+
};
68+
...

0 commit comments

Comments
 (0)