* [PATCH v1 1/1] usb: typec: tipd: Restore generic TPS6598x contract interrupts
@ 2026-04-02 0:09 Vincent Cloutier
2026-04-02 14:06 ` Heikki Krogerus
2026-04-03 10:24 ` Sebastian Krzyszkowiak
0 siblings, 2 replies; 4+ messages in thread
From: Vincent Cloutier @ 2026-04-02 0:09 UTC (permalink / raw)
To: heikki.krogerus, gregkh
Cc: linux-usb, linux-kernel, sven, Vincent Cloutier, stable
From: Vincent Cloutier <vincent@cloutier.co>
The generic TPS6598x interrupt handler still relies on
PP_SWITCH_CHANGED, NEW_CONTRACT_AS_CONSUMER, HARD_RESET, and
STATUS_UPDATE, but the irq_mask1 refactor only kept
POWER_STATUS_UPDATE, DATA_STATUS_UPDATE, and PLUG_EVENT in
tps6598x_data.
On the librem5 that leaves PD partners stuck at the 500 mA fallback
because the active contract is never refreshed after attach.
Restore the missing interrupt bits so the existing handler paths are
reachable again. This fixes USB-C charging negotiation on the librem5:
after a replug the TPS6598x source power supply reports 3 A instead of
500 mA and the BQ25890 input limit follows suit.
Fixes: b3dddff502c5 ("usb: typec: tipd: Move initial irq mask to tipd_data")
Cc: stable@vger.kernel.org
Signed-off-by: Vincent Cloutier <vincent@cloutier.co>
---
drivers/usb/typec/tipd/core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 84ee5687bb27..83f2fec6e34e 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -2395,7 +2395,11 @@ static const struct tipd_data tps6598x_data = {
.irq_handler = tps6598x_interrupt,
.irq_mask1 = TPS_REG_INT_POWER_STATUS_UPDATE |
TPS_REG_INT_DATA_STATUS_UPDATE |
- TPS_REG_INT_PLUG_EVENT,
+ TPS_REG_INT_PLUG_EVENT |
+ TPS_REG_INT_PP_SWITCH_CHANGED |
+ TPS_REG_INT_NEW_CONTRACT_AS_CONSUMER |
+ TPS_REG_INT_HARD_RESET |
+ TPS_REG_INT_STATUS_UPDATE,
.tps_struct_size = sizeof(struct tps6598x),
.register_port = tps6598x_register_port,
.unregister_port = tps6598x_unregister_port,
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] usb: typec: tipd: Restore generic TPS6598x contract interrupts
2026-04-02 0:09 [PATCH v1 1/1] usb: typec: tipd: Restore generic TPS6598x contract interrupts Vincent Cloutier
@ 2026-04-02 14:06 ` Heikki Krogerus
2026-04-03 10:24 ` Sebastian Krzyszkowiak
1 sibling, 0 replies; 4+ messages in thread
From: Heikki Krogerus @ 2026-04-02 14:06 UTC (permalink / raw)
To: Vincent Cloutier
Cc: gregkh, linux-usb, linux-kernel, sven, Vincent Cloutier, stable
Wed, Apr 01, 2026 at 08:09:50PM -0400, Vincent Cloutier kirjoitti:
> From: Vincent Cloutier <vincent@cloutier.co>
>
> The generic TPS6598x interrupt handler still relies on
> PP_SWITCH_CHANGED, NEW_CONTRACT_AS_CONSUMER, HARD_RESET, and
> STATUS_UPDATE, but the irq_mask1 refactor only kept
> POWER_STATUS_UPDATE, DATA_STATUS_UPDATE, and PLUG_EVENT in
> tps6598x_data.
>
> On the librem5 that leaves PD partners stuck at the 500 mA fallback
> because the active contract is never refreshed after attach.
>
> Restore the missing interrupt bits so the existing handler paths are
> reachable again. This fixes USB-C charging negotiation on the librem5:
> after a replug the TPS6598x source power supply reports 3 A instead of
> 500 mA and the BQ25890 input limit follows suit.
>
> Fixes: b3dddff502c5 ("usb: typec: tipd: Move initial irq mask to tipd_data")
> Cc: stable@vger.kernel.org
> Signed-off-by: Vincent Cloutier <vincent@cloutier.co>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/tipd/core.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 84ee5687bb27..83f2fec6e34e 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -2395,7 +2395,11 @@ static const struct tipd_data tps6598x_data = {
> .irq_handler = tps6598x_interrupt,
> .irq_mask1 = TPS_REG_INT_POWER_STATUS_UPDATE |
> TPS_REG_INT_DATA_STATUS_UPDATE |
> - TPS_REG_INT_PLUG_EVENT,
> + TPS_REG_INT_PLUG_EVENT |
> + TPS_REG_INT_PP_SWITCH_CHANGED |
> + TPS_REG_INT_NEW_CONTRACT_AS_CONSUMER |
> + TPS_REG_INT_HARD_RESET |
> + TPS_REG_INT_STATUS_UPDATE,
> .tps_struct_size = sizeof(struct tps6598x),
> .register_port = tps6598x_register_port,
> .unregister_port = tps6598x_unregister_port,
--
heikki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] usb: typec: tipd: Restore generic TPS6598x contract interrupts
2026-04-02 0:09 [PATCH v1 1/1] usb: typec: tipd: Restore generic TPS6598x contract interrupts Vincent Cloutier
2026-04-02 14:06 ` Heikki Krogerus
@ 2026-04-03 10:24 ` Sebastian Krzyszkowiak
2026-04-03 14:09 ` Vincent Cloutier
1 sibling, 1 reply; 4+ messages in thread
From: Sebastian Krzyszkowiak @ 2026-04-03 10:24 UTC (permalink / raw)
To: Vincent Cloutier
Cc: heikki.krogerus, gregkh, linux-usb, linux-kernel, sven,
Vincent Cloutier, stable
On czwartek, 2 kwietnia 2026 02:09:50 czas środkowoeuropejski letni Vincent
Cloutier wrote:
> From: Vincent Cloutier <vincent@cloutier.co>
>
> The generic TPS6598x interrupt handler still relies on
> PP_SWITCH_CHANGED, NEW_CONTRACT_AS_CONSUMER, HARD_RESET, and
> STATUS_UPDATE, but the irq_mask1 refactor only kept
> POWER_STATUS_UPDATE, DATA_STATUS_UPDATE, and PLUG_EVENT in
> tps6598x_data.
>
> On the librem5 that leaves PD partners stuck at the 500 mA fallback
> because the active contract is never refreshed after attach.
>
> Restore the missing interrupt bits so the existing handler paths are
> reachable again. This fixes USB-C charging negotiation on the librem5:
> after a replug the TPS6598x source power supply reports 3 A instead of
> 500 mA and the BQ25890 input limit follows suit.
>
> Fixes: b3dddff502c5 ("usb: typec: tipd: Move initial irq mask to tipd_data")
> Cc: stable@vger.kernel.org
> Signed-off-by: Vincent Cloutier <vincent@cloutier.co>
> ---
> drivers/usb/typec/tipd/core.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 84ee5687bb27..83f2fec6e34e 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -2395,7 +2395,11 @@ static const struct tipd_data tps6598x_data = {
> .irq_handler = tps6598x_interrupt,
> .irq_mask1 = TPS_REG_INT_POWER_STATUS_UPDATE |
> TPS_REG_INT_DATA_STATUS_UPDATE |
> - TPS_REG_INT_PLUG_EVENT,
> + TPS_REG_INT_PLUG_EVENT |
> + TPS_REG_INT_PP_SWITCH_CHANGED |
> + TPS_REG_INT_NEW_CONTRACT_AS_CONSUMER |
> + TPS_REG_INT_HARD_RESET |
> + TPS_REG_INT_STATUS_UPDATE,
> .tps_struct_size = sizeof(struct tps6598x),
> .register_port = tps6598x_register_port,
> .unregister_port = tps6598x_unregister_port,
This driver has never handled these interrupts (as seen in the commit you
referenced), so these should be added in patches that make it handle them.
You likely got confused by the patches that still stay in the downstream
Librem 5 tree. We should get them cleaned up and mainlined, but until that
happens this patch doesn't make much sense here I'm afraid.
S.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] usb: typec: tipd: Restore generic TPS6598x contract interrupts
2026-04-03 10:24 ` Sebastian Krzyszkowiak
@ 2026-04-03 14:09 ` Vincent Cloutier
0 siblings, 0 replies; 4+ messages in thread
From: Vincent Cloutier @ 2026-04-03 14:09 UTC (permalink / raw)
To: Sebastian Krzyszkowiak
Cc: heikki.krogerus, gregkh, linux-usb, linux-kernel, sven,
Vincent Cloutier, stable
> Le 3 avr. 2026 à 06:25, Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> a écrit :
>
> On czwartek, 2 kwietnia 2026 02:09:50 czas środkowoeuropejski letni Vincent
> Cloutier wrote:
>> From: Vincent Cloutier <vincent@cloutier.co>
>>
>> The generic TPS6598x interrupt handler still relies on
>> PP_SWITCH_CHANGED, NEW_CONTRACT_AS_CONSUMER, HARD_RESET, and
>> STATUS_UPDATE, but the irq_mask1 refactor only kept
>> POWER_STATUS_UPDATE, DATA_STATUS_UPDATE, and PLUG_EVENT in
>> tps6598x_data.
>>
>> On the librem5 that leaves PD partners stuck at the 500 mA fallback
>> because the active contract is never refreshed after attach.
>>
>> Restore the missing interrupt bits so the existing handler paths are
>> reachable again. This fixes USB-C charging negotiation on the librem5:
>> after a replug the TPS6598x source power supply reports 3 A instead of
>> 500 mA and the BQ25890 input limit follows suit.
>>
>> Fixes: b3dddff502c5 ("usb: typec: tipd: Move initial irq mask to tipd_data")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Vincent Cloutier <vincent@cloutier.co>
>> ---
>> drivers/usb/typec/tipd/core.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
>> index 84ee5687bb27..83f2fec6e34e 100644
>> --- a/drivers/usb/typec/tipd/core.c
>> +++ b/drivers/usb/typec/tipd/core.c
>> @@ -2395,7 +2395,11 @@ static const struct tipd_data tps6598x_data = {
>> .irq_handler = tps6598x_interrupt,
>> .irq_mask1 = TPS_REG_INT_POWER_STATUS_UPDATE |
>> TPS_REG_INT_DATA_STATUS_UPDATE |
>> - TPS_REG_INT_PLUG_EVENT,
>> + TPS_REG_INT_PLUG_EVENT |
>> + TPS_REG_INT_PP_SWITCH_CHANGED |
>> + TPS_REG_INT_NEW_CONTRACT_AS_CONSUMER |
>> + TPS_REG_INT_HARD_RESET |
>> + TPS_REG_INT_STATUS_UPDATE,
>> .tps_struct_size = sizeof(struct tps6598x),
>> .register_port = tps6598x_register_port,
>> .unregister_port = tps6598x_unregister_port,
>
> This driver has never handled these interrupts (as seen in the commit you
> referenced), so these should be added in patches that make it handle them.
>
> You likely got confused by the patches that still stay in the downstream
> Librem 5 tree. We should get them cleaned up and mainlined, but until that
> happens this patch doesn't make much sense here I'm afraid.
I’m afraid that’s exactly what happened… I have learned a lesson here.
>
> S.
>
>
Sorry about this noise and thank you all for your time!
Vincent
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-03 14:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02 0:09 [PATCH v1 1/1] usb: typec: tipd: Restore generic TPS6598x contract interrupts Vincent Cloutier
2026-04-02 14:06 ` Heikki Krogerus
2026-04-03 10:24 ` Sebastian Krzyszkowiak
2026-04-03 14:09 ` Vincent Cloutier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox