From patchwork Tue Jul 2 11:52:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Vdovydchenko X-Patchwork-Id: 13719534 Received: from sonic312-45.consmr.mail.ir2.yahoo.com (sonic312-45.consmr.mail.ir2.yahoo.com [77.238.178.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A531C16D4CB for ; Tue, 2 Jul 2024 12:15:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=77.238.178.132 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719922518; cv=none; b=BqXhRUDsTQagYB6y7FFzb8oxG4lLHykzK7gu3M6fcN9Ci9r3yjdKTMvFZ4itBZZO1HbOtbZ6Vm7IZLAuEgkzbzi0ZTOHxQR1k1GwAV50tRhqE+eTZZ/TI3nSiNrZPURDcaQVmgtehqG5CeID3YAW8RjzpQHgvJnNzEA+CmIipas= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719922518; c=relaxed/simple; bh=5A/LPrJoCxitojeJt7eBlNk3snz2b7ebrhihpRcHwVk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A6r+BbgFaNWQMAWFMlntPnmn9P7kHLNg+IH0PotLgTcnYz+H9ebNmcLH4fqmBeIkOYr2YGScVeAuyEj6f9Ut82IhVJyid0clm0hpMu8WDzVfOHMDg0Rtgf4RpScWGZdvh0OyexysZAGTuktMeJLXz+UU/uEjzCb5BsWGX3y1R6Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b=Qni9g4qd; arc=none smtp.client-ip=77.238.178.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b="Qni9g4qd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1719922515; bh=SI7tOorPKK3iwm2YfS1Q/1Qsuj151Q4jTdztaPUQtFQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=Qni9g4qdWuTSqhUz4/n20GTBJCasv0VnBWIB1JUCWqLPO+drC+pN44XjGjdY+mfuL9ItFzqTKm05jYK0qUEiCCw2w52sYwIPVXpKtj09aCy5UEFbYB5pojR3m7EIgs21gUy6pvvFKIvAq909eqPPX0rfMSa0OpWmi7qY+H6kHUcjDKIP6DZde8u8Olcc4khDQCe54yBV7T0o2OGNNL0WUd0QREllQr1enwWzoSgSgOZPjwwAuaEbWtzgZ+2L530FSdKkC9PeEi1KOlsKdjhh4WKKwgW+Jvpdl20q3vhh4fz/mD37mC0pwybb7j8piBm9tTpyc/cGuzM3/jmva08C4A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1719922515; bh=3sFRa3aP0YIu1IgcWmkiUUZ7+DKfLULltJvSnSftmgz=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=kbYPu6PKHxSBfKUWXpG3peQY4qbTaPEgQpbyEHVuBYjogboYfR9b+9ng2SJ47Y+8oGy440eOSxI+sOnwjsbT2mjnGnTOBr9hHJXRQNXMcdKUQ/q3n55mgcQ0nlRhPePzoW6rnRGGyRA6G/Y0OvuzwveJQQj6uVXpG22y6bxArnHevJmpg0uUvIJQJRzN550LWBxii4Jtcr6nrFfjyfx/FP7ZRVoSvXFh7TckDX1vHBTO/poVGXA75gMmgM/ixh/8LY8C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.4FC3WsmrG5Q8XL_jX Ey4kHZ0sJbiWRtS4JFzVgEEd8.0Vfcudj3kANixtHpOO4bVWh16aAaC1goGPmxBP7cW9mZmUrFmD .gQlY8Sq5UgUER2jkAzE0DAGUL.aQTlnl1eMYijON7ZMYP7FJuZym.w5dmkU3sAcTJdW3LUC8PZl Ko2vzwYHrndjNvkhdi9y5GVs.1fCkPAEEEggy40pUfpY1rDzooZF_qjI1xw-- X-Sonic-MF: X-Sonic-ID: 5be21093-340e-4cd2-8dfd-5895edaad512 Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ir2.yahoo.com with HTTP; Tue, 2 Jul 2024 12:15:15 +0000 Received: by hermes--production-ir2-85cf877599-mvt7h (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 0dd9cec1d13f3a8113ebc66190b2d374; Tue, 02 Jul 2024 11:52:58 +0000 (UTC) From: Alex Vdovydchenko To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sean Anderson , Guenter Roeck , Jean Delvare , Jonathan Corbet , Delphine CC Chiu Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, Alex Vdovydchenko Subject: [PATCH v4 1/2] dt-bindings: hwmon: Add MPS mp5920 Date: Tue, 2 Jul 2024 14:52:50 +0300 Message-ID: <20240702115252.981416-2-xzeol@yahoo.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702115252.981416-1-xzeol@yahoo.com> References: <20240702115252.981416-1-xzeol@yahoo.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add support for MPS mp5920 controller Signed-off-by: Alex Vdovydchenko --- Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index ff70f0926..cb2fc26d9 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -296,6 +296,8 @@ properties: - mps,mp2975 # Monolithic Power Systems Inc. multi-phase controller mp2993 - mps,mp2993 + # Monolithic Power Systems Inc. multi-phase hot-swap controller mp5920 + - mps,mp5920 # Monolithic Power Systems Inc. multi-phase hot-swap controller mp5990 - mps,mp5990 # Monolithic Power Systems Inc. digital step-down converter mp9941 From patchwork Tue Jul 2 11:52:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Vdovydchenko X-Patchwork-Id: 13719535 Received: from sonic312-45.consmr.mail.ir2.yahoo.com (sonic312-45.consmr.mail.ir2.yahoo.com [77.238.178.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75A1E16EB6A for ; Tue, 2 Jul 2024 12:15:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=77.238.178.132 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719922522; cv=none; b=BF/eSTPD1S6VUzYmYh9mn/X8Wqk3CiWnVSoWgFdlHXlAplolbJvMSoNtJ66MOsRTKdx5P0WBGjmMKkPhJC9zhQewLpfrqyfRyLRroeu/9CQac0OoFfuLIhYZbUkrYKgBYwLA+qrNEf9wpE/8pQFVwfPNSuu4cp77nAYfcZlRlN8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719922522; c=relaxed/simple; bh=Ls+kWqkmPYC9fXCx3BsyLBj5i5X5oE0yDiJ+q6P3lTQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=emsCeExLlgEwIpiuu2aCxE4gFfcyS9tcVsM1pPnSwbfIDuYqi2P9jTeL9jIa5bVRzZkso8FQ9CJRMtzvCaVrCxiMrL2lIE4Ho7fSj0NkGlLhw14gU2oq6xgymK1TvxnLupCMn8KWeXLxw0SV654bUfQbk0IB6VLiiP1nDfHAF8k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b=GI3v1kPT; arc=none smtp.client-ip=77.238.178.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b="GI3v1kPT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1719922518; bh=piFo6kVJpzA1iUlh3d7Pz7pUkjn8r3+RtA1bJk6PcTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=GI3v1kPTtV6wOCZbbZ9xuhrMbKCBF/aBF0+OfEd9DGpjkaaUENzKR2hm03uXzDtWtnBf2FbE6CuoEueT3+O5AB5rWiaPYysQ/Z6UxAydQVdDbGYX4S3wXIyhW2SXI61/UYa2nk+qXAyYN8j3imzUEX8iNWj1bTrx9oJ+N4vFL9SHBmJjeym+Z4seSFekwmy8mOAAwCpCoeadOop4UEUxIfydG3YQyLGuS7Eu6qZvCBFF4/Pepx27Yjh6QYJftNDptZR/CE9ITtRGE4pEwp1i0Edo25YwwOnqT3hs608aPge5UXIXFyB+VXg1h6eNZAAmmzDaMRIONjSzA+5xI5N2gQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1719922518; bh=Vh+z5FEZxBIkBHs5Wgru+BnB6SoVwWPXfddGeZi53bN=; h=X-Sonic-MF:From:To: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2IYMFFWcbVyfy8de9r05DLUMeqVVsUW qRo6SuX.dH6CNVb2me8YppO3vd0HbJfz85qb3pX9rzxF1uq5hbinZhWhKgyW8gcONgNKbvjgFtvF DyiLIkh4oC2IzzTKXNLqPAiohYmwkkzpWczz47d5foxLGKy36vDo.QTAnvC8qKFg8jdGgWDvnolu rbC.LXIbje6hWMtvXuw2Bi1WMHFqmHOMI1n8734QO9Rj7Kga3mrDt_CZXYOsBTzG_WoWZU894XDm n02HiWJ1M9Rgm6qs83o4HzejsFWhrzYZngHPtaFY4I90uzF_B_.8nssJa8waGzeDY9yRE7bxSGfP atsY7sbyRbq18TLFswNbpC79v03YumL0mZPpagcJaSChlxu_hGyNdc5Hm1mVEED4OOjY7NXuJldO VqYXyki1MvZYzuKy8Nrsen32gHdB8kxSnr_O2ikH4Urp_4qWnG2LKABHBYJk- X-Sonic-MF: X-Sonic-ID: 910b7ae8-af15-475f-b388-310fe9ce7846 Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ir2.yahoo.com with HTTP; Tue, 2 Jul 2024 12:15:18 +0000 Received: by hermes--production-ir2-85cf877599-mvt7h (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 0dd9cec1d13f3a8113ebc66190b2d374; Tue, 02 Jul 2024 11:53:01 +0000 (UTC) From: Alex Vdovydchenko To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sean Anderson , Guenter Roeck , Jean Delvare , Jonathan Corbet , Delphine CC Chiu Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, Alex Vdovydchenko Subject: [PATCH v4 2/2] hwmon: add MP5920 driver Date: Tue, 2 Jul 2024 14:52:51 +0300 Message-ID: <20240702115252.981416-3-xzeol@yahoo.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702115252.981416-1-xzeol@yahoo.com> References: <20240702115252.981416-1-xzeol@yahoo.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add support for MPS Hot-Swap controller mp5920. This driver exposes telemetry and limit value readings and writings. Signed-off-by: Alex Vdovydchenko Reviewed-by: Thomas Weißschuh --- Documentation/hwmon/index.rst | 1 + Documentation/hwmon/mp5920.rst | 91 +++++++++++++++++++++++++++++++++ drivers/hwmon/pmbus/Kconfig | 9 ++++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/mp5920.c | 93 ++++++++++++++++++++++++++++++++++ 5 files changed, 195 insertions(+) create mode 100644 Documentation/hwmon/mp5920.rst create mode 100644 drivers/hwmon/pmbus/mp5920.c diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst index e92a3d5c7..9eba7e402 100644 --- a/Documentation/hwmon/index.rst +++ b/Documentation/hwmon/index.rst @@ -168,6 +168,7 @@ Hardware Monitoring Kernel Drivers mp2975 mp2993 mp5023 + mp5920 mp5990 mp9941 mpq8785 --- /dev/null +++ b/Documentation/hwmon/mp5920.rst @@ -0,0 +1,91 @@ +.. SPDX-License-Identifier: GPL-2.0 + +Kernel driver mp5920 +==================== + +Supported chips: + + * MPS MP5920 + + Prefix: 'mp5920' + + * Datasheet + + Publicly available at the MPS website : https://www.monolithicpower.com/en/mp5920.html + +Authors: + + Tony Ao + Alex Vdovydchenko + +Description +----------- + +This driver implements support for Monolithic Power Systems, Inc. (MPS) +MP5920 Hot-Swap Controller. + +Device compliant with: + +- PMBus rev 1.3 interface. + +Device supports direct and linear format for reading input voltage, +output voltage, output current, input power and temperature. + +The driver exports the following attributes via the 'sysfs' files +for input voltage: + +**in1_input** + +**in1_label** + +**in1_rated_max** + +**in1_rated_min** + +**in1_crit** + +**in1_alarm** + +The driver provides the following attributes for output voltage: + +**in2_input** + +**in2_label** + +**in2_rated_max** + +**in2_rated_min** + +**in2_alarm** + +The driver provides the following attributes for output current: + +**curr1_input** + +**curr1_label** + +**curr1_crit** + +**curr1_alarm** + +**curr1_rated_max** + +The driver provides the following attributes for input power: + +**power1_input** + +**power1_label** + +**power1_max** + +**power1_rated_max** + +The driver provides the following attributes for temperature: + +**temp1_input** + +**temp1_max** + +**temp1_crit** + +**temp1_alarm** --- a/drivers/hwmon/pmbus/Kconfig +++ b/drivers/hwmon/pmbus/Kconfig @@ -371,6 +371,15 @@ config SENSORS_MP5023 This driver can also be built as a module. If so, the module will be called mp5023. +config SENSORS_MP5920 + tristate "MPS MP5920" + help + If you say yes here you get hardware monitoring support for Monolithic + MP5920. + + This driver can also be built as a module. If so, the module will + be called mp5920. + config SENSORS_MP5990 tristate "MPS MP5990" help --- a/drivers/hwmon/pmbus/Makefile +++ b/drivers/hwmon/pmbus/Makefile @@ -39,6 +39,7 @@ obj-$(CONFIG_SENSORS_MP2888) += mp2888.o obj-$(CONFIG_SENSORS_MP2975) += mp2975.o obj-$(CONFIG_SENSORS_MP2993) += mp2993.o obj-$(CONFIG_SENSORS_MP5023) += mp5023.o +obj-$(CONFIG_SENSORS_MP5920) += mp5920.o obj-$(CONFIG_SENSORS_MP5990) += mp5990.o obj-$(CONFIG_SENSORS_MP9941) += mp9941.o obj-$(CONFIG_SENSORS_MPQ7932) += mpq7932.o --- /dev/null +++ b/drivers/hwmon/pmbus/mp5920.c @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +#include +#include +#include +#include "pmbus.h" + +static struct pmbus_driver_info mp5920_info = { + .pages = 1, + .format[PSC_VOLTAGE_IN] = direct, + .format[PSC_VOLTAGE_OUT] = direct, + .format[PSC_CURRENT_OUT] = direct, + .format[PSC_POWER] = direct, + .format[PSC_TEMPERATURE] = direct, + .m[PSC_VOLTAGE_IN] = 2266, + .b[PSC_VOLTAGE_IN] = 0, + .R[PSC_VOLTAGE_IN] = -1, + .m[PSC_VOLTAGE_OUT] = 2266, + .b[PSC_VOLTAGE_OUT] = 0, + .R[PSC_VOLTAGE_OUT] = -1, + .m[PSC_CURRENT_OUT] = 546, + .b[PSC_CURRENT_OUT] = 0, + .R[PSC_CURRENT_OUT] = -2, + .m[PSC_POWER] = 5840, + .b[PSC_POWER] = 0, + .R[PSC_POWER] = -3, + .m[PSC_TEMPERATURE] = 1067, + .b[PSC_TEMPERATURE] = 20500, + .R[PSC_TEMPERATURE] = -2, + .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT | + PMBUS_HAVE_IOUT | PMBUS_HAVE_POUT | + PMBUS_HAVE_TEMP, +}; + +static int mp5920_probe(struct i2c_client *client) +{ + struct device *dev = &client->dev; + int ret; + u8 buf[I2C_SMBUS_BLOCK_MAX]; + + if (!i2c_check_functionality(client->adapter, + I2C_FUNC_SMBUS_READ_WORD_DATA)) + return -ENODEV; + + ret = i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL, buf); + if (ret < 0) + return dev_err_probe(dev, ret, "Failed to read PMBUS_MFR_MODEL\n"); + + if (ret != 6 || strncmp(buf, "MP5920", 6)) { + return dev_err_probe(dev, -ENODEV, "Model '%.*s' not supported\n", + sizeof(buf), buf); + } + + return pmbus_do_probe(client, &mp5920_info); +} + +static const struct of_device_id mp5920_of_match[] = { + { .compatible = "mps,mp5920" }, + { } +}; + +MODULE_DEVICE_TABLE(of, mp5920_of_match); + +static const struct i2c_device_id mp5920_id[] = { + { "mp5920" }, + { } +}; + +MODULE_DEVICE_TABLE(i2c, mp5920_id); + +static struct i2c_driver mp5920_driver = { + .driver = { + .name = "mp5920", + .of_match_table = mp5920_of_match, + }, + .probe = mp5920_probe, + .id_table = mp5920_id, +}; + +module_i2c_driver(mp5920_driver); + +MODULE_AUTHOR("Tony Ao "); +MODULE_AUTHOR("Alex Vdovydchenko "); +MODULE_DESCRIPTION("PMBus driver for MP5920 HSC"); +MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(PMBUS);