* [PATCH 0/3] mfd: tps65219: Let a board run past the warm threshold
@ 2026-11-14 3:24 Chrispine Tinega
2026-11-14 3:24 ` [PATCH 1/3] mfd: tps65219: Correct the MASK_EFFECT field of MASK_CONFIG Chrispine Tinega
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chrispine Tinega @ 2026-11-14 3:24 UTC (permalink / raw)
To: Lee Jones
Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
Roger Quadros, Tony Lindgren, Jerome Neanne, linux-kernel,
devicetree, linux-omap, mfd
The TPS65219 has four die temperature sensors, each with a warm and a
hot threshold. With a sensor's warm warning unmasked, the PMIC sequences
all its outputs down at the warm threshold, 110 to 130 C. With all four
masked, it only reports the warning and powers off at the hot threshold,
130 to 150 C. The masks come from NVM, so a board that wants the second
behaviour has to set them on every boot.
The BLIIoT ARMxy BL350, an AM6254 industrial controller rated to 85 C
ambient, ships a vendor kernel that does this from a devicetree flag.
This series adds a binding for it and the driver code, and corrects the
MASK_EFFECT macro on the way: it named bits 2:1 of MASK_CONFIG, which
are warm masks, instead of bits 6:5. Nothing used it yet.
The property is limited to the TPS65219. I have not checked the
MASK_CONFIG layout of the TPS65214 and TPS65215.
This series is build-tested for arm64 with W=1, and dt_binding_check
passes. It has not run on a board in this form. On a BL350, the
vendor's equivalent code sets the same four bits, and the PMIC reads
MASK_CONFIG = 0xef.
Chrispine Tinega (3):
mfd: tps65219: Correct the MASK_EFFECT field of MASK_CONFIG
regulator: dt-bindings: ti,tps65219: Add ti,no-warm-shutdown
mfd: tps65219: Keep running past the warm threshold when asked
.../bindings/regulator/ti,tps65219.yaml | 11 +++++++++++
drivers/mfd/tps65219.c | 15 +++++++++++++++
include/linux/mfd/tps65219.h | 8 ++++++--
3 files changed, 32 insertions(+), 2 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] mfd: tps65219: Correct the MASK_EFFECT field of MASK_CONFIG
2026-11-14 3:24 [PATCH 0/3] mfd: tps65219: Let a board run past the warm threshold Chrispine Tinega
@ 2026-11-14 3:24 ` Chrispine Tinega
2026-11-14 3:29 ` sashiko-bot
2026-11-14 3:24 ` [PATCH 2/3] regulator: dt-bindings: ti,tps65219: Add ti,no-warm-shutdown Chrispine Tinega
2026-11-14 3:24 ` [PATCH 3/3] mfd: tps65219: Keep running past the warm threshold when asked Chrispine Tinega
2 siblings, 1 reply; 5+ messages in thread
From: Chrispine Tinega @ 2026-11-14 3:24 UTC (permalink / raw)
To: Lee Jones
Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
Roger Quadros, Tony Lindgren, Jerome Neanne, linux-kernel,
devicetree, linux-omap, mfd
MASK_EFFECT is bits 6:5 of MASK_CONFIG (0x25), per table 7-46 of the
TPS65219 datasheet (SLVSGA0D). Bits 2:1 are the warm masks of sensors 1
and 2. Nothing uses the macro yet, so nothing has written the wrong bits.
Signed-off-by: Chrispine Tinega <dev@chrispinetinega.com>
---
include/linux/mfd/tps65219.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/mfd/tps65219.h b/include/linux/mfd/tps65219.h
index 3abf93719..5a6be84e2 100644
--- a/include/linux/mfd/tps65219.h
+++ b/include/linux/mfd/tps65219.h
@@ -198,7 +198,7 @@ enum pmic_id {
/* MASK Config */
// SENSOR_N_WARM_MASK already defined in Thermal
#define TPS65219_REG_MASK_INT_FOR_RV_MASK BIT(4)
-#define TPS65219_REG_MASK_EFFECT_MASK GENMASK(2, 1)
+#define TPS65219_REG_MASK_EFFECT_MASK GENMASK(6, 5)
#define TPS65219_REG_MASK_INT_FOR_PB_MASK BIT(7)
/* UnderVoltage - Short to GND - OverCurrent*/
/* LDO3-4: only for TPS65219*/
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] regulator: dt-bindings: ti,tps65219: Add ti,no-warm-shutdown
2026-11-14 3:24 [PATCH 0/3] mfd: tps65219: Let a board run past the warm threshold Chrispine Tinega
2026-11-14 3:24 ` [PATCH 1/3] mfd: tps65219: Correct the MASK_EFFECT field of MASK_CONFIG Chrispine Tinega
@ 2026-11-14 3:24 ` Chrispine Tinega
2026-11-14 3:24 ` [PATCH 3/3] mfd: tps65219: Keep running past the warm threshold when asked Chrispine Tinega
2 siblings, 0 replies; 5+ messages in thread
From: Chrispine Tinega @ 2026-11-14 3:24 UTC (permalink / raw)
To: Lee Jones
Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
Roger Quadros, Tony Lindgren, Jerome Neanne, linux-kernel,
devicetree, linux-omap, mfd
The TPS65219 has four die temperature sensors, each with a warm and a
hot threshold. A sensor whose warm warning is not masked makes the PMIC
sequence all its outputs down at the warm threshold, 110 to 130 C.
Masked, the warning is only reported, and the PMIC powers off at the hot
threshold, 130 to 150 C. Whether a board can run past the warm threshold
depends on its thermal design, so the board's devicetree has to say so.
Add ti,no-warm-shutdown for that. It is allowed on the TPS65219 only:
the masks are not described here for the TPS65214 and TPS65215.
Signed-off-by: Chrispine Tinega <dev@chrispinetinega.com>
---
.../devicetree/bindings/regulator/ti,tps65219.yaml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Documentation/devicetree/bindings/regulator/ti,tps65219.yaml b/Documentation/devicetree/bindings/regulator/ti,tps65219.yaml
index 7c64e588a..75f7ce45d 100644
--- a/Documentation/devicetree/bindings/regulator/ti,tps65219.yaml
+++ b/Documentation/devicetree/bindings/regulator/ti,tps65219.yaml
@@ -62,6 +62,16 @@ properties:
where the board has a button wired to the pin and triggers
an interrupt on pressing it.
+ ti,no-warm-shutdown:
+ type: boolean
+ description: |
+ Keep the PMIC running when one of its die temperature sensors passes
+ its warm threshold. By default, a sensor whose warm warning is not
+ masked makes the PMIC sequence all its outputs down at that
+ threshold. With this property the warning is only reported, and the
+ PMIC powers off at its hot threshold instead, so the board can run
+ warmer and the operating system decides how to react to the warning.
+
regulators:
type: object
description: |
@@ -111,6 +121,7 @@ allOf:
- ti,tps65215
then:
properties:
+ ti,no-warm-shutdown: false
regulators:
patternProperties:
"^ldo[3-4]$": false
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] mfd: tps65219: Keep running past the warm threshold when asked
2026-11-14 3:24 [PATCH 0/3] mfd: tps65219: Let a board run past the warm threshold Chrispine Tinega
2026-11-14 3:24 ` [PATCH 1/3] mfd: tps65219: Correct the MASK_EFFECT field of MASK_CONFIG Chrispine Tinega
2026-11-14 3:24 ` [PATCH 2/3] regulator: dt-bindings: ti,tps65219: Add ti,no-warm-shutdown Chrispine Tinega
@ 2026-11-14 3:24 ` Chrispine Tinega
2 siblings, 0 replies; 5+ messages in thread
From: Chrispine Tinega @ 2026-11-14 3:24 UTC (permalink / raw)
To: Lee Jones
Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
Roger Quadros, Tony Lindgren, Jerome Neanne, linux-kernel,
devicetree, linux-omap, mfd
When the devicetree sets ti,no-warm-shutdown on a TPS65219, set the
four SENSOR_x_WARM_MASK bits in MASK_CONFIG at probe. The PMIC then
reports a warm die instead of powering the board down, and powers off
only at its hot threshold.
The masks are loaded from the PMIC's NVM at every power-up, so they are
set on every probe.
Signed-off-by: Chrispine Tinega <dev@chrispinetinega.com>
---
drivers/mfd/tps65219.c | 15 +++++++++++++++
include/linux/mfd/tps65219.h | 6 +++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
index e52fbf148..d8e352f35 100644
--- a/drivers/mfd/tps65219.c
+++ b/drivers/mfd/tps65219.c
@@ -507,6 +507,21 @@ static int tps65219_probe(struct i2c_client *client)
}
}
+ /*
+ * The warm masks are loaded from NVM at every power-up, so they are set
+ * again on every probe. With a sensor unmasked, the PMIC powers down at
+ * the warm threshold; with all masked, only at the hot threshold.
+ */
+ if (chip_id == TPS65219 &&
+ of_property_read_bool(tps->dev->of_node, "ti,no-warm-shutdown")) {
+ ret = regmap_set_bits(tps->regmap, TPS65219_REG_MASK_CONFIG,
+ TPS65219_REG_MASK_SENSOR_WARM_MASK);
+ if (ret) {
+ dev_err(tps->dev, "Failed to mask warm shutdown: %d\n", ret);
+ return ret;
+ }
+ }
+
ret = devm_regmap_add_irq_chip(tps->dev, tps->regmap, client->irq,
IRQF_ONESHOT, 0, pmic->irq_chip,
&tps->irq_data);
diff --git a/include/linux/mfd/tps65219.h b/include/linux/mfd/tps65219.h
index 5a6be84e2..688173044 100644
--- a/include/linux/mfd/tps65219.h
+++ b/include/linux/mfd/tps65219.h
@@ -196,7 +196,11 @@ enum pmic_id {
#define TPS65219_REG_MASK_UV_BUCK3_UV_MASK BIT(6)
#define TPS65219_REG_MASK_UV_RETRY_MASK BIT(7)
/* MASK Config */
-// SENSOR_N_WARM_MASK already defined in Thermal
+#define TPS65219_REG_MASK_SENSOR_3_WARM_MASK BIT(0)
+#define TPS65219_REG_MASK_SENSOR_2_WARM_MASK BIT(1)
+#define TPS65219_REG_MASK_SENSOR_1_WARM_MASK BIT(2)
+#define TPS65219_REG_MASK_SENSOR_0_WARM_MASK BIT(3)
+#define TPS65219_REG_MASK_SENSOR_WARM_MASK GENMASK(3, 0)
#define TPS65219_REG_MASK_INT_FOR_RV_MASK BIT(4)
#define TPS65219_REG_MASK_EFFECT_MASK GENMASK(6, 5)
#define TPS65219_REG_MASK_INT_FOR_PB_MASK BIT(7)
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] mfd: tps65219: Correct the MASK_EFFECT field of MASK_CONFIG
2026-11-14 3:24 ` [PATCH 1/3] mfd: tps65219: Correct the MASK_EFFECT field of MASK_CONFIG Chrispine Tinega
@ 2026-11-14 3:29 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-14 3:29 UTC (permalink / raw)
To: Chrispine Tinega; +Cc: devicetree, mfd, robh, conor+dt, lee
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mfd: tps65219: missing Fixes trailer for
TPS65219_REG_MASK_EFFECT_MASK fix
--
commit bc69d7bd96f2d6a411ff79d868b4352a275dddc8
Author: Chrispine Tinega <dev@chrispinetinega.com>
> mfd: tps65219: Correct the MASK_EFFECT field of MASK_CONFIG
>
> MASK_EFFECT is bits 6:5 of MASK_CONFIG (0x25), per table 7-46 of the
> TPS65219 datasheet (SLVSGA0D). Bits 2:1 are the warm masks of sensors 1
> and 2. Nothing uses the macro yet, so nothing has written the wrong bits.
>
> Signed-off-by: Chrispine Tinega <dev@chrispinetinega.com>
[Severity: Low]
This fixes the TPS65219_REG_MASK_EFFECT_MASK definition. Should this
include:
Fixes: 74c17a0a49a6 ("mfd: tps65219: Add driver for TI TPS65219 PMIC")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261114032457.3434248-1-dev@chrispinetinega.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-14 3:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-14 3:24 [PATCH 0/3] mfd: tps65219: Let a board run past the warm threshold Chrispine Tinega
2026-11-14 3:24 ` [PATCH 1/3] mfd: tps65219: Correct the MASK_EFFECT field of MASK_CONFIG Chrispine Tinega
2026-11-14 3:29 ` sashiko-bot
2026-11-14 3:24 ` [PATCH 2/3] regulator: dt-bindings: ti,tps65219: Add ti,no-warm-shutdown Chrispine Tinega
2026-11-14 3:24 ` [PATCH 3/3] mfd: tps65219: Keep running past the warm threshold when asked Chrispine Tinega
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.