Add support for Intel CRPS PSU
Subsystems (5)
Ninad Palsule
maintainercover Add support for Intel CRPS PSU
Hello,
Please review the version 1 of patchset.
This patchset is already applied upstream:
https://lore.kernel.org/linux-kernel/[email protected]
Ninad Palsule (4):
hwmon: (pmbus/core) Add PMBUS_REVISION in debugfs
hwmon: (pmbus/crps) Add Intel CRPS185 power supply
dt-bindings: hwmon: intel,crps185: Add to trivial
ARM: dts: aspeed: system1: Use crps PSU driver
.../devicetree/bindings/trivial-devices.yaml | 2 + Documentation/hwmon/crps.rst | 97 +++++++++++++++++++ Documentation/hwmon/index.rst | 1 + MAINTAINERS | 7 ++ .../dts/aspeed/aspeed-bmc-ibm-system1.dts | 8 +- drivers/hwmon/pmbus/Kconfig | 9 ++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/crps.c | 74 ++++++++++++++ drivers/hwmon/pmbus/pmbus_core.c | 13 ++- 9 files changed, 206 insertions(+), 6 deletions(-) create mode 100644 Documentation/hwmon/crps.rst create mode 100644 drivers/hwmon/pmbus/crps.c
Signature · 1 line
2.43.0
Ninad Palsule
maintainerPATCH 1/4 hwmon: (pmbus/core) Add PMBUS_REVISION in debugfs
Add debugfs file for the PMBUS_REVISION command. This command provides information about PMBus protocol revision number.
--- drivers/hwmon/pmbus/pmbus_core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/hwmon/pmbus/pmbus_core.c +11 -2
@@ -3397,11 +3397,11 @@ static int pmbus_init_debugfs(struct i2c_client *client,/* * Allocate the max possible entries we need. -* 6 entries device-specific +* 7 entries device-specific * 10 entries page-specific */ entries =devm_kcalloc (data->dev, -6 + data->info->pages *10 ,sizeof (*entries), +7 + data->info->pages *10 ,sizeof (*entries),GFP_KERNEL );if (!entries)return -ENOMEM ;
@@ -3414,6 +3414,15 @@ static int pmbus_init_debugfs(struct i2c_client *client,* assume that values of the following registers are the same for all * pages and report values only for page 0. */ +if (pmbus_check_byte_register (client,0 ,PMBUS_REVISION )) { + entries[idx].client = client; + entries[idx].page =0 ; + entries[idx].reg =PMBUS_REVISION ; +debugfs_create_file ("revision" ,0444 , data->debugfs, + &entries[idx++], + &pmbus_debugfs_ops); + } +if (pmbus_check_block_register (client,0 ,PMBUS_MFR_ID )) { entries[idx].client = client; entries[idx].page =0 ;
Signature · 1 line
2.43.0
Ninad Palsule
maintainerPATCH 2/4 hwmon: (pmbus/crps) Add Intel CRPS185 power supply
In reply to Ninad PalsuleAdd the driver to monitor Intel common redundant power supply (crps185) with hwmon over pmbus.
--- Documentation/hwmon/crps.rst | 97 +++++++++++++++++++++++++++++++++++ Documentation/hwmon/index.rst | 1 + MAINTAINERS | 7 +++ drivers/hwmon/pmbus/Kconfig | 9 ++++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/crps.c | 74 ++++++++++++++++++++++++++ 6 files changed, 189 insertions(+) create mode 100644 Documentation/hwmon/crps.rst create mode 100644 drivers/hwmon/pmbus/crps.c
Documentation/hwmon/crps.rst new file +97 -0
@@ -0,0 +1,97 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +Kernel driver crps +================== + +Supported chips: + + * Intel CRPS185 + + Prefix: 'crps185' + + Addresses scanned: - + + Datasheet: Only available under NDA. + +Authors: + Ninad Palsule <[email protected]> + + +Description +----------- + +This driver implements support for Intel Common Redundant Power supply with +PMBus support. + +The driver is a client driver to the core PMBus driver. +Please see Documentation/hwmon/pmbus.rst for details on PMBus client drivers. + + +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. + + +Sysfs entries +------------- + +======================= ====================================================== +curr1_label "iin" +curr1_input Measured input current +curr1_max Maximum input current +curr1_max_alarm Input maximum current high alarm +curr1_crit Critial high input current +curr1_crit_alarm Input critical current high alarm +curr1_rated_max Maximum rated input current + +curr2_label "iout1" +curr2_input Measured output current +curr2_max Maximum output current +curr2_max_alarm Output maximum current high alarm +curr2_crit Critial high output current +curr2_crit_alarm Output critical current high alarm +curr2_rated_max Maximum rated output current + +in1_label "vin" +in1_input Measured input voltage +in1_crit Critical input over voltage +in1_crit_alarm Critical input over voltage alarm +in1_max Maximum input over voltage +in1_max_alarm Maximum input over voltage alarm +in1_rated_min Minimum rated input voltage +in1_rated_max Maximum rated input voltage + +in2_label "vout1" +in2_input Measured input voltage +in2_crit Critical input over voltage +in2_crit_alarm Critical input over voltage alarm +in2_lcrit Critical input under voltage fault +in2_lcrit_alarm Critical input under voltage fault alarm +in2_max Maximum input over voltage +in2_max_alarm Maximum input over voltage alarm +in2_min Minimum input under voltage warning +in2_min_alarm Minimum input under voltage warning alarm +in2_rated_min Minimum rated input voltage +in2_rated_max Maximum rated input voltage + +power1_label "pin" +power1_input Measured input power +power1_alarm Input power high alarm +power1_max Maximum input power +power1_rated_max Maximum rated input power + +temp[1-2]_input Measured temperature +temp[1-2]_crit Critical temperature +temp[1-2]_crit_alarm Critical temperature alarm +temp[1-2]_max Maximum temperature +temp[1-2]_max_alarm Maximum temperature alarm +temp[1-2]_rated_max Maximum rated temperature + +fan1_alarm Fan 1 warning. +fan1_fault Fan 1 fault. +fan1_input Fan 1 speed in RPM. +fan1_target Fan 1 target. +======================= ======================================================
Documentation/hwmon/index.rst +1 -0
@@ -55,6 +55,7 @@ Hardware Monitoring Kernel Drivers coretemp corsair-cpro corsair-psu + crps da9052 da9055 dell-smm-hwmon
MAINTAINERS +7 -0
@@ -5479,6 +5479,13 @@ L: [email protected] S: Maintained F: drivers/hid/hid-creative-sb0540.c +INTEL CRPS COMMON REDUNDANT PSU DRIVER +M: Ninad Palsule <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/hwmon/crps.rst +F: drivers/hwmon/pmbus/crps.c + CRYPTO API M: Herbert Xu <[email protected]> M: "David S. Miller" <[email protected]>
drivers/hwmon/pmbus/Kconfig +9 -0
@@ -75,6 +75,15 @@ config SENSORS_BPA_RS600 This driver can also be built as a module. If so, the module will be called bpa-rs600. +config SENSORS_CRPS + tristate "Intel Common Redundant Power Supply" + help + If you say yes here you get hardware monitoring support for the Intel + Common Redundant Power Supply. + + This driver can also be built as a module. If so, the module will + be called crps. + config SENSORS_DELTA_AHE50DC_FAN tristate "Delta AHE-50DC fan control module" help
drivers/hwmon/pmbus/Makefile +1 -0
@@ -55,3 +55,4 @@ obj-$(CONFIG_SENSORS_XDPE122) += xdpe12284.o obj-$(CONFIG_SENSORS_XDPE152) += xdpe152c4.o obj-$(CONFIG_SENSORS_ZL6100) += zl6100.o obj-$(CONFIG_SENSORS_PIM4328) += pim4328.o +obj-$(CONFIG_SENSORS_CRPS) += crps.o
drivers/hwmon/pmbus/crps.c new file +74 -0
74 lines not on this page · raw message
Signature · 1 line
2.43.0
Ninad Palsule
maintainerPATCH 3/4 dt-bindings: hwmon: intel,crps185: Add to trivial
In reply to Ninad PalsuleAdd INTEL Common Redundant Power Supply Versions crps185 bindings as trivial. The hardware does not have any resources like clocks which are required to be included in the device tree.
--- Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/trivial-devices.yaml +2 -0
@@ -185,6 +185,8 @@ properties: - injoinic,ip5209 # Inspur Power System power supply unit version 1 - inspur,ipsps1 + # Intel common redudant power supply crps185 + - intel,crps185 # Intersil ISL29028 Ambient Light and Proximity Sensor - isil,isl29028 # Intersil ISL29030 Ambient Light and Proximity Sensor
Signature · 1 line
2.43.0
Ninad Palsule
maintainerPATCH 4/4 ARM: dts: aspeed: system1: Use crps PSU driver
In reply to Ninad PalsuleThe system1 uses Intel common redundant (crps185) power supplies so move to correct new crps driver.
--- arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts +4 -4
@@ -681,22 +681,22 @@ &i2c2 { status = "okay"; power-supply@58 { - compatible = "ibm,cffps"; + compatible = "intel,crps185"; reg = <0x58>; }; power-supply@59 { - compatible = "ibm,cffps"; + compatible = "intel,crps185"; reg = <0x59>; }; power-supply@5a { - compatible = "ibm,cffps"; + compatible = "intel,crps185"; reg = <0x5a>; }; power-supply@5b { - compatible = "ibm,cffps"; + compatible = "intel,crps185"; reg = <0x5b>; }; };
Signature · 1 line
2.43.0
Andrew Jeffery
maintainerHi Ninad,
Quoted 23 lines · Ninad Palsule
Hello,
Please review the version 1 of patchset.
This patchset is already applied upstream:
https://lore.kernel.org/linux-kernel/[email protected]Ninad Palsule (4):
hwmon: (pmbus/core) AddPMBUS_REVISIONin debugfs
hwmon: (pmbus/crps) Add Intel CRPS185 power supply
dt-bindings: hwmon: intel,crps185: Add to trivial
ARM: dts: aspeed: system1: Use crps PSU driver.../devicetree/bindings/trivial-devices.yaml | 2 + Documentation/hwmon/crps.rst | 97
+++++++++++++++++++
Documentation/hwmon/index.rst | 1 + MAINTAINERS | 7 ++ .../dts/aspeed/aspeed-bmc-ibm-system1.dts | 8 +- drivers/hwmon/pmbus/Kconfig | 9 ++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/crps.c | 74 ++++++++++++++ drivers/hwmon/pmbus/pmbus_core.c | 13 ++-
Quoted 4 lines
9 files changed, 206 insertions(+), 6 deletions(-)create mode 100644
Documentation/hwmon/crps.rst
create mode 100644drivers/hwmon/pmbus/crps.c
I've cherry-picked the changes out of hwmon/hwmon-next where appropriate, and backported the devicetree change from my BMC tree.
Thanks,
Andrew
Ninad Palsule
maintainerHi Andrew,
Quoted 30 lines · Andrew Jeffery
Hi Ninad,
Quoted 24 lines · Ninad Palsule
Hello,
Please review the version 1 of patchset.
This patchset is already applied upstream:
https://lore.kernel.org/linux-kernel/[email protected]Ninad Palsule (4):
hwmon: (pmbus/core) AddPMBUS_REVISIONin debugfs
hwmon: (pmbus/crps) Add Intel CRPS185 power supply
dt-bindings: hwmon: intel,crps185: Add to trivial
ARM: dts: aspeed: system1: Use crps PSU driver.../devicetree/bindings/trivial-devices.yaml | 2 + Documentation/hwmon/crps.rst | 97 +++++++++++++++++++ Documentation/hwmon/index.rst | 1 + MAINTAINERS | 7 ++ .../dts/aspeed/aspeed-bmc-ibm-system1.dts | 8 +- drivers/hwmon/pmbus/Kconfig | 9 ++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/crps.c | 74 ++++++++++++++ drivers/hwmon/pmbus/pmbus_core.c | 13 ++- 9 files changed, 206 insertions(+), 6 deletions(-)Quoted 3 lines
create mode 100644
Documentation/hwmon/crps.rst
create mode 100644drivers/hwmon/pmbus/crps.c
Quoted 2 lines
I've cherry-picked the changes out of hwmon/hwmon-next where appropriate, and backported the devicetree change from my BMC tree.
Thanks for the review and applying the changes.
Regards,
Ninad
Quoted 4 lines
Thanks,
Andrew