mbox series

[v4,0/7] hwmon: pmbus: add tps25990 efuse support

Message ID 20241105-tps25990-v4-0-0e312ac70b62@baylibre.com (mailing list archive)
Headers show
Series hwmon: pmbus: add tps25990 efuse support | expand

Message

Jerome Brunet Nov. 5, 2024, 5:58 p.m. UTC
This patchset adds initial support for the Texas Instruments TPS25990
eFuse. The TPS25990 is an integrated, high-current circuit protection and
power management device. TPS25895 may be stacked on the TPS25990 for
higher currents.

This patchset provides basic telemetry support for the device.
On boot, the device is write protected. Limits can be changed in sysfs
if the write protection is removed using the introduced pmbus parameter.

Limits will be restored to the default value device on startup, unless
saved to NVM. Writing the NVM is not supported by the driver at the moment.

As part of this series, PMBus regulator support is improved to better
support write-protected devices.

Patch 3 depends on the regulator patchset available here [1].
This is a compilation dependency.

[1]: https://lore.kernel.org/r/20241008-regulator-ignored-data-v2-0-d1251e0ee507@baylibre.com

Changes in v4:
- Fix write protect value masking when initializing pmbus chips
- Add 2 more write protect forced mode (VOUT and OP)
- Move module parameter documentation to Documentation/hwmon/pmbus-core.rst
- Add pmbus flag documentation.
- Fix 0-day bitfield report.
- Link to v3: https://lore.kernel.org/r/20241024-tps25990-v3-0-b6a6e9d4b506@baylibre.com

Changes in v3:
- Ease application and Group with hwmon write protect patches from:
  https://lore.kernel.org/r/20240920-pmbus-wp-v1-0-d679ef31c483@baylibre.com
- Link to v2: https://lore.kernel.org/r/20240920-tps25990-v2-0-f3e39bce5173@baylibre.com

Changes in v2:
- Drop PGOOD command support
- Use micro-ohms for rimon property and better handle range.
- Adjust read/write callbacks to let PMBus core do the job by default
- Drop history reset specific properties and remap to the generic ones
- Drop debugfs write_protect property and remap to the generic register
- Link to v1: https://lore.kernel.org/r/20240909-tps25990-v1-0-39b37e43e795@baylibre.com

---
Jerome Brunet (7):
      hwmon: (pmbus) add documentation for existing flags
      hwmon: (pmbus/core) allow drivers to override WRITE_PROTECT
      hwmon: (pmbus/core) improve handling of write protected regulators
      hwmon: (pmbus/core) add wp module param
      hwmon: (pmbus/core) clear faults after setting smbalert mask
      dt-bindings: hwmon: pmbus: add ti tps25990 support
      hwmon: (pmbus/tps25990): add initial support

 .../bindings/hwmon/pmbus/ti,tps25990.yaml          |  83 ++++
 Documentation/hwmon/index.rst                      |   1 +
 Documentation/hwmon/pmbus-core.rst                 |  50 +++
 Documentation/hwmon/tps25990.rst                   | 148 +++++++
 MAINTAINERS                                        |   8 +
 drivers/hwmon/pmbus/Kconfig                        |  17 +
 drivers/hwmon/pmbus/Makefile                       |   1 +
 drivers/hwmon/pmbus/pmbus.h                        |   4 +
 drivers/hwmon/pmbus/pmbus_core.c                   |  95 ++++-
 drivers/hwmon/pmbus/tps25990.c                     | 428 +++++++++++++++++++++
 include/linux/pmbus.h                              |  14 +
 11 files changed, 840 insertions(+), 9 deletions(-)
---
base-commit: 516ddbfef736c843866a0b2db559ce89b40ce378
change-id: 20240909-tps25990-34c0cff2be06
prerequisite-change-id: 20240920-regulator-ignored-data-78e7a855643e:v2
prerequisite-patch-id: 468882ab023813ffe8a7eeb210d05b5177a1954a
prerequisite-patch-id: 2d88eb941437003c6ba1cebb09a352a65b94f358
prerequisite-patch-id: e64c06b721cda2e3c41a670251335d8a2a66a236

Best regards,

Comments

Guenter Roeck Nov. 6, 2024, 4:12 p.m. UTC | #1
On 11/5/24 09:58, Jerome Brunet wrote:
> This patchset adds initial support for the Texas Instruments TPS25990
> eFuse. The TPS25990 is an integrated, high-current circuit protection and
> power management device. TPS25895 may be stacked on the TPS25990 for
> higher currents.
> 
> This patchset provides basic telemetry support for the device.
> On boot, the device is write protected. Limits can be changed in sysfs
> if the write protection is removed using the introduced pmbus parameter.
> 
> Limits will be restored to the default value device on startup, unless
> saved to NVM. Writing the NVM is not supported by the driver at the moment.
> 
> As part of this series, PMBus regulator support is improved to better
> support write-protected devices.
> 
> Patch 3 depends on the regulator patchset available here [1].
> This is a compilation dependency.
> 

Unfortunately this means that I can not apply this and the following patch
until after the next commit window, which is unfortunate since patch 4
does not logically depend on patch 3. That also means that I can not apply
the last patch of the series since it depends on the ability to disable
write protect. Those patches will have to wait until after the next commit
window.

Guenter
Jerome Brunet Nov. 8, 2024, 8:52 a.m. UTC | #2
On Wed 06 Nov 2024 at 08:12, Guenter Roeck <linux@roeck-us.net> wrote:

> On 11/5/24 09:58, Jerome Brunet wrote:
>> This patchset adds initial support for the Texas Instruments TPS25990
>> eFuse. The TPS25990 is an integrated, high-current circuit protection and
>> power management device. TPS25895 may be stacked on the TPS25990 for
>> higher currents.
>> This patchset provides basic telemetry support for the device.
>> On boot, the device is write protected. Limits can be changed in sysfs
>> if the write protection is removed using the introduced pmbus parameter.
>> Limits will be restored to the default value device on startup, unless
>> saved to NVM. Writing the NVM is not supported by the driver at the moment.
>> As part of this series, PMBus regulator support is improved to better
>> support write-protected devices.
>> Patch 3 depends on the regulator patchset available here [1].
>> This is a compilation dependency.
>> 
>
> Unfortunately this means that I can not apply this and the following patch
> until after the next commit window, which is unfortunate since patch 4
> does not logically depend on patch 3. That also means that I can not apply
> the last patch of the series since it depends on the ability to disable
> write protect. Those patches will have to wait until after the next commit
> window.

These 2 patches where always gonna be touching the same part of the
code. Indeed 4 could have come before, I did not really think about it
TBH.

No problem waiting for -rc1. I'll rebase the remaining changes when it's
out and add the necessary change on patch 7.

Thanks for your support

>
> Guenter