diff options
author | 2025-05-27 16:14:56 -0700 | |
---|---|---|
committer | 2025-05-27 16:14:56 -0700 | |
commit | c7c18635363f06c1943514c2f4c8170b325302e8 (patch) | |
tree | 078a1a2f24e36cc2e891be6405e3144472908a7f /Documentation | |
parent | Merge tag 'spi-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi (diff) | |
parent | power: supply: rt9471: Simplify definition of some struct linear_range (diff) | |
download | wireguard-linux-c7c18635363f06c1943514c2f4c8170b325302e8.tar.xz wireguard-linux-c7c18635363f06c1943514c2f4c8170b325302e8.zip |
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
...
Diffstat (limited to 'Documentation')
13 files changed, 311 insertions, 48 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power index 2a5c1a09a28f..560124cc3177 100644 --- a/Documentation/ABI/testing/sysfs-class-power +++ b/Documentation/ABI/testing/sysfs-class-power @@ -822,3 +822,46 @@ Description: Each entry is a link to the device which registered the extension. Access: Read + +What: /sys/class/power_supply/max8971-charger/fast_charge_timer +Date: May 2025 +KernelVersion: 6.15.0 +Contact: Svyatoslav Ryhel <clamor95@gmail.com> +Description: + This entry shows and sets the maximum time the max8971 + charger operates in fast-charge mode. When the timer expires + the device will terminate fast-charge mode (charging current + will drop to 0 A) and will trigger interrupt. + + Valid values: + + - 4 - 10 (hours), step by 1 + - 0: disabled. + +What: /sys/class/power_supply/max8971-charger/top_off_threshold_current +Date: May 2025 +KernelVersion: 6.15.0 +Contact: Svyatoslav Ryhel <clamor95@gmail.com> +Description: + This entry shows and sets the charging current threshold for + entering top-off charging mode. When charging current in fast + charge mode drops below this value, the charger will trigger + interrupt and start top-off charging mode. + + Valid values: + + - 50000 - 200000 (microamps), step by 50000 (rounded down) + +What: /sys/class/power_supply/max8971-charger/top_off_timer +Date: May 2025 +KernelVersion: 6.15.0 +Contact: Svyatoslav Ryhel <clamor95@gmail.com> +Description: + This entry shows and sets the maximum time the max8971 + charger operates in top-off charge mode. When the timer expires + the device will terminate top-off charge mode (charging current + will drop to 0 A) and will trigger interrupt. + + Valid values: + + - 0 - 70 (minutes), step by 10 (rounded down) diff --git a/Documentation/ABI/testing/sysfs-class-power-gaokun b/Documentation/ABI/testing/sysfs-class-power-gaokun new file mode 100644 index 000000000000..0633aed7b355 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-power-gaokun @@ -0,0 +1,27 @@ +What: /sys/class/power_supply/gaokun-ec-battery/smart_charge_delay +Date: March 2025 +KernelVersion: 6.15 +Contact: Pengyu Luo <mitltlatltl@gmail.com> +Description: + This entry allows configuration of smart charging delay. + + Smart charging behavior: when the power adapter is connected + for delay hours, battery charging will follow the rules of + charge_control_start_threshold and charge_control_end_threshold. + For more information about charge control, please refer to + sysfs-class-power. + + Access: Read, Write + + Valid values: In hours (non-negative) + +What: /sys/class/power_supply/gaokun-ec-battery/battery_adaptive_charge +Date: March 2025 +KernelVersion: 6.15 +Contact: Pengyu Luo <mitltlatltl@gmail.com> +Description: + This entry allows enabling battery adaptive charging. + + Access: Read, Write + + Valid values: 0 (disabled) or 1 (enabled) diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml b/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml index 19d3093e6cd2..ccd555870094 100644 --- a/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml +++ b/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml @@ -21,7 +21,9 @@ description: |+ properties: compatible: - const: syscon-reboot + enum: + - syscon-reboot + - google,gs101-reboot mask: $ref: /schemas/types.yaml#/definitions/uint32 @@ -49,12 +51,6 @@ properties: priority: default: 192 -oneOf: - - required: - - offset - - required: - - reg - required: - compatible @@ -63,12 +59,29 @@ additionalProperties: false allOf: - $ref: restart-handler.yaml# - if: - not: - required: - - mask + properties: + compatible: + contains: + const: google,gs101-reboot then: - required: - - value + properties: + mask: false + offset: false + reg: false + value: false + + else: + if: + not: + required: + - mask + then: + required: + - value + + oneOf: + - required: [offset] + - required: [reg] examples: - | @@ -78,3 +91,8 @@ examples: offset = <0x0>; mask = <0x1>; }; + + - | + reboot { + compatible = "google,gs101-reboot"; + }; diff --git a/Documentation/devicetree/bindings/power/reset/toradex,smarc-ec.yaml b/Documentation/devicetree/bindings/power/reset/toradex,smarc-ec.yaml new file mode 100644 index 000000000000..ffcd5f2c2bf6 --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/toradex,smarc-ec.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/reset/toradex,smarc-ec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Toradex Embedded Controller + +maintainers: + - Emanuele Ghidoli <emanuele.ghidoli@toradex.com> + - Francesco Dolcini <francesco.dolcini@toradex.com> + +description: | + The Toradex Embedded Controller (EC) is used on Toradex SMARC modules, + primarily to manage power and reset functionalities. + + The EC provides the following functions: + - Reads the SMARC POWER_BTN# and RESET_IN# signals and controls the PMIC accordingly. + - Controls the SoC boot mode signals based on the SMARC BOOT_SEL# and FORCE_RECOV# inputs. + - Manages the CARRIER_STDBY# signal in response to relevant SoC signals. + + The EC runs a small firmware, factory programmed into its internal flash, and communicates over I2C. + It allows software to control power-off and reset functionalities of the module. + +properties: + compatible: + items: + - enum: + - toradex,smarc-imx95-ec + - toradex,smarc-imx8mp-ec + - const: toradex,smarc-ec + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + reset-controller@28 { + compatible = "toradex,smarc-imx95-ec", "toradex,smarc-ec"; + reg = <0x28>; + }; + }; diff --git a/Documentation/devicetree/bindings/power/supply/bq24190.yaml b/Documentation/devicetree/bindings/power/supply/bq24190.yaml index 07adf88997b4..307c99c07721 100644 --- a/Documentation/devicetree/bindings/power/supply/bq24190.yaml +++ b/Documentation/devicetree/bindings/power/supply/bq24190.yaml @@ -19,6 +19,7 @@ properties: - ti,bq24190 - ti,bq24192 - ti,bq24192i + - ti,bq24193 - ti,bq24196 - ti,bq24296 - ti,bq24297 diff --git a/Documentation/devicetree/bindings/power/supply/bq25980.yaml b/Documentation/devicetree/bindings/power/supply/bq25980.yaml index b70ce8d7f86c..256adbef55eb 100644 --- a/Documentation/devicetree/bindings/power/supply/bq25980.yaml +++ b/Documentation/devicetree/bindings/power/supply/bq25980.yaml @@ -87,28 +87,28 @@ unevaluatedProperties: false examples: - | bat: battery { - compatible = "simple-battery"; - constant-charge-current-max-microamp = <4000000>; - constant-charge-voltage-max-microvolt = <8400000>; - precharge-current-microamp = <160000>; - charge-term-current-microamp = <160000>; + compatible = "simple-battery"; + constant-charge-current-max-microamp = <4000000>; + constant-charge-voltage-max-microvolt = <8400000>; + precharge-current-microamp = <160000>; + charge-term-current-microamp = <160000>; }; #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/irq.h> i2c { - #address-cells = <1>; - #size-cells = <0>; - - bq25980: charger@65 { - compatible = "ti,bq25980"; - reg = <0x65>; - interrupt-parent = <&gpio1>; - interrupts = <16 IRQ_TYPE_EDGE_FALLING>; - ti,watchdog-timeout-ms = <0>; - ti,sc-ocp-limit-microamp = <2000000>; - ti,sc-ovp-limit-microvolt = <17800000>; - monitored-battery = <&bat>; - }; + #address-cells = <1>; + #size-cells = <0>; + + bq25980: charger@65 { + compatible = "ti,bq25980"; + reg = <0x65>; + interrupt-parent = <&gpio1>; + interrupts = <16 IRQ_TYPE_EDGE_FALLING>; + ti,watchdog-timeout-ms = <0>; + ti,sc-ocp-limit-microamp = <2000000>; + ti,sc-ovp-limit-microvolt = <17800000>; + monitored-battery = <&bat>; + }; }; ... diff --git a/Documentation/devicetree/bindings/power/supply/ingenic,battery.yaml b/Documentation/devicetree/bindings/power/supply/ingenic,battery.yaml index 741022b4449d..cb04fb25d8ac 100644 --- a/Documentation/devicetree/bindings/power/supply/ingenic,battery.yaml +++ b/Documentation/devicetree/bindings/power/supply/ingenic,battery.yaml @@ -48,14 +48,14 @@ examples: #include <dt-bindings/iio/adc/ingenic,adc.h> simple_battery: battery { - compatible = "simple-battery"; - voltage-min-design-microvolt = <3600000>; - voltage-max-design-microvolt = <4200000>; + compatible = "simple-battery"; + voltage-min-design-microvolt = <3600000>; + voltage-max-design-microvolt = <4200000>; }; ingenic-battery { - compatible = "ingenic,jz4740-battery"; - io-channels = <&adc INGENIC_ADC_BATTERY>; - io-channel-names = "battery"; - monitored-battery = <&simple_battery>; + compatible = "ingenic,jz4740-battery"; + io-channels = <&adc INGENIC_ADC_BATTERY>; + io-channel-names = "battery"; + monitored-battery = <&simple_battery>; }; diff --git a/Documentation/devicetree/bindings/power/supply/ltc4162-l.yaml b/Documentation/devicetree/bindings/power/supply/ltc4162-l.yaml index 06595a953659..bc7ed7b22085 100644 --- a/Documentation/devicetree/bindings/power/supply/ltc4162-l.yaml +++ b/Documentation/devicetree/bindings/power/supply/ltc4162-l.yaml @@ -61,13 +61,13 @@ additionalProperties: false examples: - | i2c { - #address-cells = <1>; - #size-cells = <0>; - charger: battery-charger@68 { - compatible = "lltc,ltc4162-l"; - reg = <0x68>; - lltc,rsnsb-micro-ohms = <10000>; - lltc,rsnsi-micro-ohms = <16000>; - lltc,cell-count = <2>; - }; + #address-cells = <1>; + #size-cells = <0>; + charger: battery-charger@68 { + compatible = "lltc,ltc4162-l"; + reg = <0x68>; + lltc,rsnsb-micro-ohms = <10000>; + lltc,rsnsi-micro-ohms = <16000>; + lltc,cell-count = <2>; + }; }; diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max77705.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max77705.yaml index bce7fabbd9d3..e3b84068993b 100644 --- a/Documentation/devicetree/bindings/power/supply/maxim,max77705.yaml +++ b/Documentation/devicetree/bindings/power/supply/maxim,max77705.yaml @@ -37,8 +37,8 @@ examples: #include <dt-bindings/interrupt-controller/irq.h> i2c { - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <1>; + #size-cells = <0>; charger@69 { compatible = "maxim,max77705-charger"; diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml new file mode 100644 index 000000000000..2244cc3d45a6 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/maxim,max8971.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX8971 IC charger + +maintainers: + - Svyatoslav Ryhel <clamor95@gmail.com> + +description: + The MAX8971 is a compact, high-frequency, high-efficiency switch-mode charger + for a one-cell lithium-ion (Li+) battery. + +allOf: + - $ref: power-supply.yaml# + +properties: + compatible: + const: maxim,max8971 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + monitored-battery: true + + port: + description: + An optional port node to link the extcon device to detect type of plug. + $ref: /schemas/graph.yaml#/properties/port + +required: + - compatible + - reg + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/interrupt-controller/irq.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + charger@35 { + compatible = "maxim,max8971"; + reg = <0x35>; + + interrupt-parent = <&gpio>; + interrupts = <74 IRQ_TYPE_LEVEL_LOW>; + + monitored-battery = <&battery>; + + port { + charger_input: endpoint { + remote-endpoint = <&extcon_output>; + }; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/power/supply/pegatron,chagall-ec.yaml b/Documentation/devicetree/bindings/power/supply/pegatron,chagall-ec.yaml new file mode 100644 index 000000000000..defb0861e268 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/pegatron,chagall-ec.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/pegatron,chagall-ec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Pegatron Chagall EC + +maintainers: + - Svyatoslav Ryhel <clamor95@gmail.com> + +description: + Pegatron Chagall EC is based on an 8-bit programmable microcontroller from + Infineon/Cypress Semiconductor, it communicates over I2C and is used in the + Pegatron Chagall tablet for fuel gauge and battery control functions. + +$ref: /schemas/power/supply/power-supply.yaml + +properties: + compatible: + const: pegatron,chagall-ec + + reg: + maxItems: 1 + + monitored-battery: true + power-supplies: true + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + embedded-controller@10 { + compatible = "pegatron,chagall-ec"; + reg = <0x10>; + + monitored-battery = <&battery>; + power-supplies = <&mains>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/reset/atmel,at91sam9260-reset.yaml b/Documentation/devicetree/bindings/reset/atmel,at91sam9260-reset.yaml index c3b33bbc7319..84c4801df8d9 100644 --- a/Documentation/devicetree/bindings/reset/atmel,at91sam9260-reset.yaml +++ b/Documentation/devicetree/bindings/reset/atmel,at91sam9260-reset.yaml @@ -24,6 +24,9 @@ properties: - microchip,sam9x60-rstc - microchip,sama7g5-rstc - items: + - const: microchip,sama7d65-rstc + - const: microchip,sama7g5-rstc + - items: - const: atmel,sama5d3-rstc - const: atmel,at91sam9g45-rstc - items: diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 86f6a19b28ae..75ffaebc749d 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1158,6 +1158,8 @@ patternProperties: description: Parallax Inc. "^pda,.*": description: Precision Design Associates, Inc. + "^pegatron,.*": + description: Pegatron Corporation "^pericom,.*": description: Pericom Technology Inc. "^pervasive,.*": |