Skip to contentSkip to conversation

dt-bindings: hwmon: pmbus: adp1050: add bindings

PATCH Applied Radu Sabau 3 participants 5 messages Mar 21, 2024 – Mar 23, 2024

Subsystems (5)
lore
Share & tools
lore

Radu Sabau

author maintainer
#0 lore raw

PATCH v4 1/2 dt-bindings: hwmon: pmbus: adp1050: add bindings

Add dt-bindings for adp1050 digital controller for isolated power supply with pmbus interface voltage, current and temperature monitor.

---
v4:
*Fix typo in schema link causing warnings at build.
v3:
*Remove extra line before '$id'.
*Remove 'address-cells' and 'size-cells' from adp1050 node. *Rename adp1050 node to generic name.
*Fix typo from 'adress-cells' to 'address-cells' causing errors in the
dt-bindings build.
v2:
*Fix identation for example.
*Remove 'adi,vin-scale-monitor' and 'iin-scale-monitor' since they are not used
anymore.
*Fix typo for 'compatbile' to 'compatible'.
*Add blank line under datasheet link.

---
 .../bindings/hwmon/pmbus/adi,adp1050.yaml     | 49 +++++++++++++++++++
 MAINTAINERS                                   |  7 +++
 2 files changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml
Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml new file +49 -0
new file mode 100644
index 000000000000..10c2204bc3df
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/pmbus/adi,adp1050.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices ADP1050 digital controller with PMBus interface
+
+maintainers:
+  - Radu Sabau <[email protected]>
+
+description: |
+   The ADP1050 is used to monitor system voltages, currents and temperatures.
+   Through the PMBus interface, the ADP1050 targets isolated power supplies
+   and has four individual monitors for input/output voltage, input current
+   and temperature.
+   Datasheet:
+     https://www.analog.com/en/products/adp1050.html
+
+properties:
+  compatible:
+    const: adi,adp1050
+
+  reg:
+    maxItems: 1
+
+  vcc-supply: true
+
+required:
+  - compatible
+  - reg
+  - vcc-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        clock-frequency = <100000>;
+
+        hwmon@70 {
+            compatible = "adi,adp1050";
+            reg = <0x70>;
+            vcc-supply = <&vcc>;
+        };
+    };
+...
MAINTAINERS +7 -0
index 43b39956694a..b45753e94756 100644
@@ -479,6 +479,13 @@ L:	[email protected]
 S:	Orphan
 F:	drivers/net/wireless/admtek/adm8211.*
 
+ADP1050 HARDWARE MONITOR DRIVER
+M:	Radu Sabau <[email protected]>
+L:	[email protected]
+S:	Supported
+W:	https://ez.analog.com/linux-software-drivers
+F:	Dcumentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml
+
 ADP1653 FLASH CONTROLLER DRIVER
 M:	Sakari Ailus <[email protected]>
 L:	[email protected]
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH v4 2/2 hwmon: pmbus: adp1050: Add driver support

Add support for ADP1050 Digital Controller for Isolated Power Supplies with PMBus interface Voltage, Current and Temperature Monitor.

The ADP1050 implements several features to enable a robust system of parallel and redundant operation for customers who require high availability. The device can measure voltage, current and temperature that can be used in different techniques to identify and safely shut down an erroneous power supply in parallel operation mode.

---
v4:
*No change.
v3:
*No change.
v2:
*Remove mandatory chip unlocking from the probe function, as it is
a bit extreme.
*Remove iin_scale and vin_scale set in the probe function since it makes no
sense to force-override it (the user may use the chip's default or even change it himself after the probe).

---
 Documentation/hwmon/adp1050.rst | 65 +++++++++++++++++++++++++++++++++
 Documentation/hwmon/index.rst   |  1 +
 drivers/hwmon/pmbus/Kconfig     | 10 +++++
 drivers/hwmon/pmbus/Makefile    |  1 +
 drivers/hwmon/pmbus/adp1050.c   | 58 +++++++++++++++++++++++++++++
 5 files changed, 135 insertions(+)
 create mode 100644 Documentation/hwmon/adp1050.rst
 create mode 100644 drivers/hwmon/pmbus/adp1050.c
Documentation/hwmon/adp1050.rst new file +65 -0
new file mode 100644
index 000000000000..3281b096a53c
@@ -0,0 +1,65 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Kernel driver adp1050
+=====================
+
+Supported chips:
+
+  * Analog Devices ADP1050
+
+    Prefix: 'adp1050'
+
+    Addresses scanned: I2C 0x70 - 0x77
+
+    Datasheet: https://www.analog.com/media/en/technical-documentation/data-
+sheets/ADP1050.pdf
+
+Authors:
+
+  - Radu Sabau <[email protected]>
+
+
+Description
+-----------
+
+This driver supprts hardware monitoring for Analog Devices ADP1050 Digital
+Controller for Isolated Power Supply with PMBus interface.
+
+The ADP1050 is an advanced digital controller with a PMBus™
+interface targeting high density, high efficiency dc-to-dc power
+conversion used to monitor system temperatures, voltages and currents.
+Through the PMBus interface, the device can monitor input/output voltages,
+input current and temperature.
+
+Usage Notes
+-----------
+
+This driver does not auto-detect devices. You will have to instantiate
+the devices explicitly.
+Please see Documentation/i2c/instantiating-devices.rst for details.
+
+Platform data support
+---------------------
+
+The driver supports standard PMBus driver platform data.
+
+Sysfs Attributes
+----------------
+
+================= ========================================
+in1_label         "vin"
+in1_input         Measured input voltage
+in1_alarm	  Input voltage alarm
+in2_label	  "vout1"
+in2_input	  Measured output voltage
+in2_crit	  Critical maximum output voltage
+in2_crit_alarm    Output voltage high alarm
+in2_lcrit	  Critical minimum output voltage
+in2_lcrit_alarm	  Output voltage critical low alarm
+curr1_label	  "iin"
+curr1_input	  Measured input current.
+curr1_alarm	  Input current alarm
+temp1_input       Measured temperature
+temp1_crit	  Critical high temperature
+temp1_crit_alarm  Chip temperature critical high alarm
+================= ========================================
Documentation/hwmon/index.rst +1 -0
index 1ca7a4fe1f8f..9a4fd576e6f6 100644
@@ -33,6 +33,7 @@ Hardware Monitoring Kernel Drivers
    adm1266
    adm1275
    adm9240
+   adp1050
    ads7828
    adt7410
    adt7411
drivers/hwmon/pmbus/Kconfig +10 -0
index 557ae0c414b0..38e794d83cc3 100644
@@ -57,6 +57,16 @@ config SENSORS_ADM1275
 	  This driver can also be built as a module. If so, the module will
 	  be called adm1275.
 
+config SENSORS_ADP1050
+	tristate "Analog Devices ADP1050 digital controller for Power Supplies"
+	help
+	  If you say yes here you get hardware monitoring support for Analog
+	  Devices ADP1050 digital controller for isolated power supply with
+	  PMBus interface.
+
+	  This driver can also be built as a module. If so, the module will
+	  be called adp1050.
+
 config SENSORS_BEL_PFE
 	tristate "Bel PFE Compatible Power Supplies"
 	help
drivers/hwmon/pmbus/Makefile +1 -0
index f14ecf03ad77..95a8dea5e5ed 100644
@@ -8,6 +8,7 @@ obj-$(CONFIG_SENSORS_PMBUS)	+= pmbus.o
 obj-$(CONFIG_SENSORS_ACBEL_FSG032) += acbel-fsg032.o
 obj-$(CONFIG_SENSORS_ADM1266)	+= adm1266.o
 obj-$(CONFIG_SENSORS_ADM1275)	+= adm1275.o
+obj-$(CONFIG_SENSORS_ADP1050)	+= adp1050.o
 obj-$(CONFIG_SENSORS_BEL_PFE)	+= bel-pfe.o
 obj-$(CONFIG_SENSORS_BPA_RS600)	+= bpa-rs600.o
 obj-$(CONFIG_SENSORS_DELTA_AHE50DC_FAN) += delta-ahe50dc-fan.o
drivers/hwmon/pmbus/adp1050.c new file +58 -0

58 lines not on this page · raw message

Signature · 1 line
2.34.1
maintainer Applied
#2 lore raw

Re: [PATCH v4 2/2] hwmon: pmbus: adp1050: Add driver support

Quoted 11 lines · Radu Sabau

Add support for ADP1050 Digital Controller for Isolated Power Supplies with PMBus interface Voltage, Current and Temperature Monitor.

The ADP1050 implements several features to enable a robust system of parallel and redundant operation for customers who require high availability. The device can measure voltage, current and temperature that can be used in different techniques to identify and safely shut down an erroneous power supply in parallel operation mode.

Applied to hwmon-next.

Please note that the branch will be pushed after the commit window closed.

Thanks,
Guenter

maintainer Reviewed-by on v4 1/2
#3 lore raw
In reply to Radu Sabau
Quoted 19 lines · Radu Sabau

Add dt-bindings for adp1050 digital controller for isolated power supply with pmbus interface voltage, current and temperature monitor.

---
v4:
*Fix typo in schema link causing warnings at build.
v3:
*Remove extra line before '$id'.
*Remove 'address-cells' and 'size-cells' from adp1050 node. *Rename adp1050 node to generic name.
*Fix typo from 'adress-cells' to 'address-cells' causing errors in the
dt-bindings build.
v2:
*Fix identation for example.
*Remove 'adi,vin-scale-monitor' and 'iin-scale-monitor' since they are not used
anymore.
*Fix typo for 'compatbile' to 'compatible'.
*Add blank line under datasheet link.

Quoted 6 lines
---
 .../bindings/hwmon/pmbus/adi,adp1050.yaml     | 49 +++++++++++++++++++
 MAINTAINERS                                   |  7 +++
 2 files changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml