From nobody Sun Feb 8 00:26:29 2026 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 E0D2418DF62; Mon, 28 Apr 2025 22:15:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745878502; cv=none; b=TVwc3X2Xuwp9GC7IcdI6bXRnu4FHWLK0Km5FRvMwxLMxksN7hovCWCGW7yOHiOi77JJVG6T70cHOKdvsK+DSPTEcKKwthj4qZ9ugXSQ+CMWFK6y8HzLCx9Rd9p9K+k6lYsTrSOdvqin8QFWOuBA4uSE5K0LnQkYMMxJDnD588+o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745878502; c=relaxed/simple; bh=1lDrsqYRmC3Z6v3LandN67Y7bF97CqlXz7uzwRNAVjA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UFYs5PDafe84cm1NDJ19iGzrWrkrQxH7rN4JovwImuTxjWGJ99qpq6SzBWTY4Hl5MIOp5W2vcA2UpnymWsw8nyP2b/WiLwqS4EjGV3cIR+RDoa+e8CJlNgCsA5o4jj10jIHSicdCHi0sNr142Q6W/NEcv1Ko/rMXXk3/ehmRiCs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=R5DGEYH6; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R5DGEYH6" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-43ede096d73so36573685e9.2; Mon, 28 Apr 2025 15:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745878499; x=1746483299; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=51MosBXA6OVB4D1vQIwO+H46ch/ElgK+oqBBoq4riWU=; b=R5DGEYH6dqsk/S4V/ICAznbH6UtoAnztHuTeRviNNi5E1tV9ajLqhGBfpQS4JdLujq JLG8lkG3xVMQ7tCG/3TuaJeEk+7UdpGa21IikxAC7JyLQXQ8f7hLk+7CmQ6GZKoIR9x5 xp1JKXqL4zR7wftjiyoX8pBZSrjBO9Usj9OReyvzi/L3OLy4+Ztu0fYLK0I8bQZBGgoN GgTbvBFj0YHbszwJAsKHEMyKHE7e0SffJz0Fuu0MDc5ED+C+PB5JqCunoXZC88j4gC7q Aj1RyeGCXcEY+MB10usElIHPdBDVngsgAYBnzV2rqMSoQZrZ2OAbGrn7f+b+hhW+QbhJ 0PVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745878499; x=1746483299; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=51MosBXA6OVB4D1vQIwO+H46ch/ElgK+oqBBoq4riWU=; b=YV8QZCTovzFIDX1Uv4uM09eGxrYMlxWsGguvlPAPbjBDh7hyBO32HHfPDAqKiSl8Ra lW+2r/Hp2AUPmQE8RG42DmE9IakKkVK4wZlZL2rrFgc/ZqHJhhTyhR0ayOlnzKe8Mk5N ULArLfylHU6CYrCUKWOGhKFYOOqHgXyRW7x9MBTTOR6g+nUP5xRteXojSB2EUBqDeCTD AdfMMQsWa9YA4dM/lvO9vzpq7Ijlni21+GS6RcWSFG0wn3uA+CQWzLhOot/zDgjEZ68c ROMTqjRz9Jb9xW7ot+Q+B73IENUgUNYzV+yOBGhVzOBb9c5V2TdpEu8rcTpXGnSvY6N0 FOmQ== X-Forwarded-Encrypted: i=1; AJvYcCUg+dZG66nAF5+S6743yKTW0eT5aNPHFDZD3AGP4DrvqazJHZB0f5yC5uB4MnQ7qtnmQ4yr4+UfOc2QjY1V@vger.kernel.org, AJvYcCXJwwB65W7WtN7KE8oJKkSWSCM3YW5h/7z/YWErhWEYTjMmy0KA5wWx3uWKf1l9MIq9mKxOjjqB5H6K@vger.kernel.org, AJvYcCXmjHdrABbsp0OA5NP6bj5jgowBq0BHmVFicFLIF8aBJPL4YCO+uBUbun8G9pXCpxqVhIXM7qtQaSSJ@vger.kernel.org X-Gm-Message-State: AOJu0YxTnx9NhGHKJXtHaPNNTaz1XH2VaULuP630lQ0zsLXHD1WbS8cO whZ14jW2riROODVR7oF4IJO4OcbomYvc+3TNLsXmVtLfQyyFZRixstfFtWks X-Gm-Gg: ASbGncuFJ2GZKgfrluyil9Vk7Rlf0eCie2lEVGb75ktDL3iFwKEWEEn77eq/894WJ29 MgZogRWqIQVOHcLitDbn2zVru77cqfteW8ZhdXEkuspKdllJl1AoVkFs4lwowVIeevREZDmaMbE 5C6Twfcc1hdldFiLIzc1cgr5n5oVqrYpP4AuRxB8jquKzRU1nSHIsSg9uVXlyq2oiWVHp38N7ae EkRhMv+SkdYprzmdLVDI2xPyOipJzX2fCWe3BIGGuo0pUhdQftrO9Tmpg5lePPFFQ+IjfdxnYAv sp5t1OOKHWN9zp/ornfV28fQtoGOoHb4XnFyZYjFeOeU56RC6GrIpD7bBKcQsv+5jA== X-Google-Smtp-Source: AGHT+IGpcLREo3ZYIdFVoC5dc+wPnocuQekSuXMfOtRr933kywRx+20sytAeani2HnLcEplXVGjCsA== X-Received: by 2002:a05:600c:8712:b0:43c:eec7:eabb with SMTP id 5b1f17b1804b1-441ac8577d0mr8041945e9.8.1745878498815; Mon, 28 Apr 2025 15:14:58 -0700 (PDT) Received: from tempest2.110.lan (xt27dd.stansat.pl. [83.243.39.221]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-440a53870f9sm135901085e9.33.2025.04.28.15.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Apr 2025 15:14:58 -0700 (PDT) From: Pawel Dembicki To: linux-hwmon@vger.kernel.org Cc: Pawel Dembicki , Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Peter Zijlstra , Greg KH , Shen Lichuan , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Charles Hsu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 1/5] hwmon: pmbus: mpq8785: Prepare driver for multiple device support Date: Tue, 29 Apr 2025 00:13:31 +0200 Message-ID: <20250428221420.2077697-2-paweldembicki@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250428221420.2077697-1-paweldembicki@gmail.com> References: <20250428221420.2077697-1-paweldembicki@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Refactor the driver to support multiple Monolithic Power Systems devices. Introduce chip ID handling based on device tree matching. No functional changes intended. Signed-off-by: Pawel Dembicki --- drivers/hwmon/pmbus/mpq8785.c | 38 +++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/drivers/hwmon/pmbus/mpq8785.c b/drivers/hwmon/pmbus/mpq8785.c index 331c274ca892..00ec21b081cb 100644 --- a/drivers/hwmon/pmbus/mpq8785.c +++ b/drivers/hwmon/pmbus/mpq8785.c @@ -8,6 +8,8 @@ #include #include "pmbus.h" =20 +enum chips { mpq8785 }; + static int mpq8785_identify(struct i2c_client *client, struct pmbus_driver_info *info) { @@ -53,26 +55,46 @@ static struct pmbus_driver_info mpq8785_info =3D { PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT | PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP, - .identify =3D mpq8785_identify, -}; - -static int mpq8785_probe(struct i2c_client *client) -{ - return pmbus_do_probe(client, &mpq8785_info); }; =20 static const struct i2c_device_id mpq8785_id[] =3D { - { "mpq8785" }, + { "mpq8785", mpq8785 }, { }, }; MODULE_DEVICE_TABLE(i2c, mpq8785_id); =20 static const struct of_device_id __maybe_unused mpq8785_of_match[] =3D { - { .compatible =3D "mps,mpq8785" }, + { .compatible =3D "mps,mpq8785", .data =3D (void *)mpq8785 }, {} }; MODULE_DEVICE_TABLE(of, mpq8785_of_match); =20 +static int mpq8785_probe(struct i2c_client *client) +{ + struct device *dev =3D &client->dev; + struct pmbus_driver_info *info; + enum chips chip_id; + + info =3D devm_kmemdup(dev, &mpq8785_info, sizeof(*info), GFP_KERNEL); + if (!info) + return -ENOMEM; + + if (dev->of_node) + chip_id =3D (uintptr_t)of_device_get_match_data(dev); + else + chip_id =3D i2c_match_id(mpq8785_id, client)->driver_data; + + switch (chip_id) { + case mpq8785: + info->identify =3D mpq8785_identify; + break; + default: + return -ENODEV; + } + + return pmbus_do_probe(client, info); +}; + static struct i2c_driver mpq8785_driver =3D { .driver =3D { .name =3D "mpq8785", --=20 2.43.0 From nobody Sun Feb 8 00:26:29 2026 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 1BADF211A0E; Mon, 28 Apr 2025 22:15:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745878509; cv=none; b=hLK3MbJeciMYosWcMWjV7aJNcH3Gn+/5NhRfGd2a9DxyvLyiKSDEVoc/sZvZJOsSobcxg7sD1Tki9z65XZTedc1dMar7TccxtMI81CyQFQ5/7WIY7MmbKR+4ikufLE9ARuLekIkaei5NuGTA6XR8vzH10CwEokAZkwFCgDQ4T2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745878509; c=relaxed/simple; bh=Fnl8k+xyEzFdYf5yFWIa9NmfoVelQ14unO0N2MqZGMk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UYlsHX07GDKWamoUwJSaDgmkYldFubIBG9gjD+8eJThpyxiXamW6KTKF7EsMROL8hPjxGZnRAcQiylPwCJTU1wiXWiPdNrsx7rVWZql239NrFN7n3Pgo3P8k8MEtuBJGyHLiMPGUOa7CF7c1CCjW9QQKP0iTfRHJq1KwzzLOBhs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=B+OR4KxA; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B+OR4KxA" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-43cfdc2c8c9so27615955e9.2; Mon, 28 Apr 2025 15:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745878505; x=1746483305; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k0h0V/PY2jmAFbZxjwD21XEi98uAqLPs6Qxnq/8Poro=; b=B+OR4KxAksr8uMV7sWSl30wxL4QQERF5CyCPW1wNB+knjAUeX7Enm9SmDUWdW2g+9a o+OfBAFb3f5Nh9+4CsotOuOhIzgRm6h8FFbJG4hgBW5xOWF7UMSsGGxTUHJq3R+ylOpl +KO+ykPL2ud0xGxBD3dOPB/Qn0+R3cWcLmv3TlrrZVNFC1p06ozuEHrD3ZcUIHCOZzLC djXgYhJ4aXAxRGP0Ycrwp3fj70dbJoRAir7Vm8a6uZumb8Ixs2c/zJc3Goo31pPZTNVy oHyKvcpyzoKzkEXij+io11p/MCVD6Opfu3BTvZUZcoEcuISDkaYMNhtM+QF/OsPl0Scs cWpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745878505; x=1746483305; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k0h0V/PY2jmAFbZxjwD21XEi98uAqLPs6Qxnq/8Poro=; b=IC/LjHZ3F2DlbQ9WAmgnCf7/BfLSm5K0jB1+LXeZODlcOCYaacM7l1kw4H0278E92H Oa2wPofzhwT5cTuBRle1MU1se8HjIDEWD2KCEYV9FP1Ciw3M9tsvDcZH/NsOIkGDoNHZ XY1daTtnxRtg3R32MtQH0SaCdAf1NsmKjN4ti1R9Xu2joFbiAi48dtkv4cKPsjEdsspT DYwKahiKwo/XsY9eWuD2quqp+yCnp2MQVTuT2GE+eb+L0aoMV/FqsgMHbYeW0zp8khI2 wNVFPT5h3MWdPi64OXpsJmOtcmHioEiDXIJ+Nbbofli31kcAJy3Jp913vBSJesPyU4Wa yb0Q== X-Forwarded-Encrypted: i=1; AJvYcCUeBA6yFvU0Qveao6cWcOdhdMdkmBnLRZBnSTKPFr/0CoCrDDU1O8te8+4S3T6EwY7A0SZCIqu9sQ8m5C87@vger.kernel.org, AJvYcCUz2kqfBv8HnpPDHBiwKftRK3+aSDd841y9whs86yCuTvtc9P84O3YHOLAT7oosisPertNS7UzfrVpz@vger.kernel.org, AJvYcCXQq1pdXVvPycugSeyS7UifJ5o4nZFcIu0BYyx9EJhmcDB+kYEUBoyOo+pwXXAucx2OFYcO6LTBB7s3@vger.kernel.org X-Gm-Message-State: AOJu0YyoEu+gq6FT45QqLqELdg8kkvS+Ovt50kzKdMSfNONSlmxcdUm2 MYLyOyuX0UCxB4Yz+kwWaiwDiVyR5F74H1hqiY7jiQOu3Rt/B4/1m8StLmw+ X-Gm-Gg: ASbGnct0n0LPLNx7/83MxjboQDrmyLbfi/Psv+pL+ew97vZvtNr0s9LXIXKsIjM02O2 zTkwOx5yYfqWHNwcEPLWmnymBHnHAt28hxvXBFDODv7Tg6P1rBvi+GDLKyN0eCr4tN4RFWBFNF6 5xhP6rO06MayRHrcvc2JkTV2jqoPNYfpZLL3cycR8R0PaZU3f6MxFxShSxpyq0lTGKV1k10hIc8 worgxH8EEg18aNKlFwTcIvK5L10Qw7M9uC3KLwwJP+enljXm8JiMmp3ideLlJLijikCL+Mup9aN Erg1v+/Eok7NsKhJVMirhMMXZePljwflTPdINgXwHvejfawysPqc+jvWJbgZy3FVHg== X-Google-Smtp-Source: AGHT+IHeQHxQhx1+o/gyFU8ozlHeFVob8ZCTDWC7tCyz2WBdmTGTLPuF/rs0+pnairTpV4Szoz7sbQ== X-Received: by 2002:a05:600c:c17:b0:43c:fe15:41d4 with SMTP id 5b1f17b1804b1-441ad3c6509mr2893165e9.18.1745878504973; Mon, 28 Apr 2025 15:15:04 -0700 (PDT) Received: from tempest2.110.lan (xt27dd.stansat.pl. [83.243.39.221]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-440a53870f9sm135901085e9.33.2025.04.28.15.15.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Apr 2025 15:15:04 -0700 (PDT) From: Pawel Dembicki To: linux-hwmon@vger.kernel.org Cc: Pawel Dembicki , Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Greg KH , Shen Lichuan , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Peter Zijlstra , Charles Hsu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 2/5] hwmon: pmbus: mpq8785: Add support for MPM82504 Date: Tue, 29 Apr 2025 00:13:32 +0200 Message-ID: <20250428221420.2077697-3-paweldembicki@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250428221420.2077697-1-paweldembicki@gmail.com> References: <20250428221420.2077697-1-paweldembicki@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add support for the Monolithic Power Systems MPM82504 digital voltage regulator. MPM82504 uses PMBus direct format for voltage output. Tested with device tree based matching. Signed-off-by: Pawel Dembicki --- Documentation/hwmon/mpq8785.rst | 20 +++++++++++++++----- drivers/hwmon/pmbus/mpq8785.c | 12 +++++++++++- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/Documentation/hwmon/mpq8785.rst b/Documentation/hwmon/mpq8785.= rst index bf8176b87086..be228ee58ce2 100644 --- a/Documentation/hwmon/mpq8785.rst +++ b/Documentation/hwmon/mpq8785.rst @@ -6,6 +6,7 @@ Kernel driver mpq8785 Supported chips: =20 * MPS MPQ8785 + * MPS MPM82504 =20 Prefix: 'mpq8785' =20 @@ -20,21 +21,30 @@ buck converter. The MPQ8785 offers a very compact solut= ion that achieves up to wide input supply range. The MPQ8785 operates at high efficiency over a wi= de output current load range. =20 +The MPM82504 is a quad 25A, scalable, fully integrated power module with a= PMBus +interface. The device offers a complete power solution that achieves up to= 25A +per output channel. The MPM82504 has four output channels that can be para= lleled +to provide 50A, 75A, or 100A of output current for flexible configurations. +The device can also operate in parallel with the MPM3695-100 and additional +MPM82504 devices to provide a higher output current. The MPM82504 operates +at high efficiency across a wide load range. + The PMBus interface provides converter configurations and key parameters monitoring. =20 -The MPQ8785 adopts MPS's proprietary multi-phase digital constant-on-time = (MCOT) +The devices adopts MPS's proprietary multi-phase digital constant-on-time = (MCOT) control, which provides fast transient response and eases loop stabilizati= on. -The MCOT scheme also allows multiple MPQ8785 devices to be connected in pa= rallel -with excellent current sharing and phase interleaving for high-current +The MCOT scheme also allows multiple devices or chennels to be connected in +parallel with excellent current sharing and phase interleaving for high-cu= rrent applications. =20 Fully integrated protection features include over-current protection (OCP), over-voltage protection (OVP), under-voltage protection (UVP), and over-temperature protection (OTP). =20 -The MPQ8785 requires a minimal number of readily available, standard exter= nal -components, and is available in a TLGA (5mmx6mm) package. +All supported modules require a minimal number of readily available, stand= ard +external components. The MPQ8785 is available in a TLGA (5mmx6mm) package +and the MPM82504 is available in a BGA (15mmx30mmx5.18mm) package. =20 Device compliant with: =20 diff --git a/drivers/hwmon/pmbus/mpq8785.c b/drivers/hwmon/pmbus/mpq8785.c index 00ec21b081cb..7ee201550554 100644 --- a/drivers/hwmon/pmbus/mpq8785.c +++ b/drivers/hwmon/pmbus/mpq8785.c @@ -8,7 +8,7 @@ #include #include "pmbus.h" =20 -enum chips { mpq8785 }; +enum chips { mpq8785, mpm82504 }; =20 static int mpq8785_identify(struct i2c_client *client, struct pmbus_driver_info *info) @@ -59,12 +59,14 @@ static struct pmbus_driver_info mpq8785_info =3D { =20 static const struct i2c_device_id mpq8785_id[] =3D { { "mpq8785", mpq8785 }, + { "mpm82504", mpm82504 }, { }, }; MODULE_DEVICE_TABLE(i2c, mpq8785_id); =20 static const struct of_device_id __maybe_unused mpq8785_of_match[] =3D { { .compatible =3D "mps,mpq8785", .data =3D (void *)mpq8785 }, + { .compatible =3D "mps,mpm82504", .data =3D (void *)mpm82504 }, {} }; MODULE_DEVICE_TABLE(of, mpq8785_of_match); @@ -87,6 +89,14 @@ static int mpq8785_probe(struct i2c_client *client) switch (chip_id) { case mpq8785: info->identify =3D mpq8785_identify; + + break; + case mpm82504: + info->format[PSC_VOLTAGE_OUT] =3D direct; + info->m[PSC_VOLTAGE_OUT] =3D 8; + info->b[PSC_VOLTAGE_OUT] =3D 0; + info->R[PSC_VOLTAGE_OUT] =3D 2; + break; default: return -ENODEV; --=20 2.43.0 From nobody Sun Feb 8 00:26:29 2026 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 73EDF2135C7; Mon, 28 Apr 2025 22:15:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745878515; cv=none; b=hqrqBDVR8RkBt0nYGdtxF9Fk8X59pF4SesIGUJhWAx0TBn9XX1r10IbarrQ2OhLc+R4v4pGBZ/1pVMDvg4OjnntjcLN52U9JCc3sF8FVDn9goVwbzD2ZoGxqEHaGMgW3Cpcl0t69bV+FtJMs1UkaEa/LE8uT8WXectg1k+NMVKM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745878515; c=relaxed/simple; bh=k/RC/fx6n8Q8+zu7/SzWd6ryzsTJfbFrnEhd/YoOr/A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jUHaXp+7yxsufnaZvOjhlBC32G8fXevIQQIxZZapjwpbfl+2HcS6E23eswa1tL6az/xHrMtQEFaZrj5kD5tyk1qOZFbCrAwJOLfaaVNErgGn3E5FIETCuBRmv3Nu6ySN80V1MEg8GjXhO6OF9NInoHIck9maHlFP+mCOO+4AYOw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JuAZoUUe; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JuAZoUUe" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-43ed8d32a95so47124975e9.3; Mon, 28 Apr 2025 15:15:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745878511; x=1746483311; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=psj4zvO337MlnZiqJVa6K5ww5rTOJT1l7hJQRnCvMqA=; b=JuAZoUUeLSeQVyAzNUlakgGmV2h98n4NjV4tsb1Tk5UK8bR4OPLJlvQxh0TXDICAXl /Z2CIWDLQi05G2Mcu0G5dism/Ad7CG6fVuCldNmSwH4DJA4fd/d36MBr8DSpXMBbSsDm uUtz7W7GM2YQSnTSNul9RygroYKnYJkWKAlGC63acwI0z4onIzaAjlSrbbQNWf/RlyjA ZbV3iKd7f8D9QeBIsElUHMANDbNObsbPu6TvCQh7uB6G4rFih3hkcYor10Jo/RN/v7rT nWn0Aq7Osx15vSrThnm4WBhgTAry4JSvZEKdBl1fpLyAKX/15flUf26ZzbofKHoH+pai EyAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745878511; x=1746483311; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=psj4zvO337MlnZiqJVa6K5ww5rTOJT1l7hJQRnCvMqA=; b=bk4de9pxmkXpq56khTxa+2Ds61ismaqkl4o9IhPQt1LERx3dnDYuqELeEJKFECt6bd 1KQY1A2WgVflUy9bQvTw+N9DG43Ftf0A+zSx9M5h+fu1MI5sgXWgedupG/G+kpygVpFq 2tf62eaLQfIMYxm9AykS2J61iLa3gxKtue0b2uDb9q1jcf1wtQCMk1ruuJeTFpGNHhFO Ev31kIw7s/6c+X1p3cMma0LN5GeoJLF/Q+U+ATC7Er8gplG3cPMIdaX8VDsKgKVGmJtq Q2ktarFZyd1j36tw+AXnQ1u8qUPB4hhl+LYU9BaTXHOPh8qhot/L9mII/gofIOleg0OP VC/Q== X-Forwarded-Encrypted: i=1; AJvYcCU75DNkc6qXqPwjptPSCwDjensL0Lrdpbpy0+pxigz5Hecu6VRXizt/qFtwjEmkb9SLXoerkMyWsxvO@vger.kernel.org, AJvYcCU9ETkspVBpwODwiI+ssT6I69l1UOBua8R8PR3OQXTVn6eud38fAnVUrnvNi/JlxumZJiNJF4pblkrh@vger.kernel.org, AJvYcCUrhn9kWzh6eFYgsCnzkDNg5Ie+HG7EtZ55o4BHV+XUk9rL6k/Q1cAkop6fe4uUa54iWunCX7Rc7xrVWqJs@vger.kernel.org X-Gm-Message-State: AOJu0YyygYvz8w/Sc1PwchTazdcsWTgUcIRhnW6MAxkYyJ/gqA9xI387 aFtwr4N6STrc41yM9ql2UKSXMoi75cnzzKQg7x095+Ij5bX/RDO/WU2rZ/tt X-Gm-Gg: ASbGncuFsgHjZTzIShf8X4rXWXZfRRz6mVotF/L0hDia0Z/oF+2E5xMMk5oZeAEEXwi jVpqROMmUp9T+n69r7OovN78yYNzOOxYFACd98xs25ZVTIC7JkAvxnDyVtJGMHfF4701wOB8lyi rAil2XNfF7p/s19yolSE3A9XdNTJ35SzyClVr3Un/tuonRcxDu+kWTVHQqT54q+R56Y9ZaUzbRf m2+CDaMX7gUrTbZk/S6nEiEMuC+Hd4f3vz+iBSQKMYdpGbWTvvX0C3fkvoVFFI5NFRcpaJsiIaa 8pmUz3+14PxRN3zictUFPqST9Th000dEs9jhI8lCj6OBElWKdjq4+Dc0A4uCEWEbtA== X-Google-Smtp-Source: AGHT+IFLYjghUc2bmuXcDtV1VnIGkrz2YDg0oSiZFJYuIv2kxvSBVb4b333fC0pzHsRWF2z4oHf7TQ== X-Received: by 2002:a05:600c:a016:b0:43c:e8ba:e166 with SMTP id 5b1f17b1804b1-441ac918052mr5465205e9.22.1745878511184; Mon, 28 Apr 2025 15:15:11 -0700 (PDT) Received: from tempest2.110.lan (xt27dd.stansat.pl. [83.243.39.221]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-440a53870f9sm135901085e9.33.2025.04.28.15.15.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Apr 2025 15:15:10 -0700 (PDT) From: Pawel Dembicki To: linux-hwmon@vger.kernel.org Cc: Pawel Dembicki , Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Peter Zijlstra , Greg KH , Shen Lichuan , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Charles Hsu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 3/5] hwmon: pmbus: mpq8785: Add support for MPM3695 Date: Tue, 29 Apr 2025 00:13:33 +0200 Message-ID: <20250428221420.2077697-4-paweldembicki@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250428221420.2077697-1-paweldembicki@gmail.com> References: <20250428221420.2077697-1-paweldembicki@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Add support for the Monolithic Power Systems MPM3695 device. The device is PMBus compliant and shares characteristics with the MPM82504. Tested with device tree based matching. Signed-off-by: Pawel Dembicki --- Documentation/hwmon/mpq8785.rst | 13 +++++++++++-- drivers/hwmon/pmbus/mpq8785.c | 5 ++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Documentation/hwmon/mpq8785.rst b/Documentation/hwmon/mpq8785.= rst index be228ee58ce2..20d43b8bba97 100644 --- a/Documentation/hwmon/mpq8785.rst +++ b/Documentation/hwmon/mpq8785.rst @@ -7,6 +7,7 @@ Supported chips: =20 * MPS MPQ8785 * MPS MPM82504 + * MPS MPM3695-10 =20 Prefix: 'mpq8785' =20 @@ -29,6 +30,13 @@ The device can also operate in parallel with the MPM3695= -100 and additional MPM82504 devices to provide a higher output current. The MPM82504 operates at high efficiency across a wide load range. =20 +The MPM3695-10 is a scalable, ultra-thin, fully integrated power module wi= th +a PMBus interface. It offers a complete power solution that achieves up to +10A of output current with excellent load and line regulation across a wide +input voltage range. The device=E2=80=99s 2mm height enables it to be plac= ed on the +backside of a PCB for space optimization. It operates at high efficiency o= ver +a wide load range, and can be paralleled to deliver higher current. + The PMBus interface provides converter configurations and key parameters monitoring. =20 @@ -43,8 +51,9 @@ over-voltage protection (OVP), under-voltage protection (= UVP), and over-temperature protection (OTP). =20 All supported modules require a minimal number of readily available, stand= ard -external components. The MPQ8785 is available in a TLGA (5mmx6mm) package -and the MPM82504 is available in a BGA (15mmx30mmx5.18mm) package. +external components. The MPQ8785 is available in a TLGA (5mmx6mm) package, +the MPM82504 is available in a BGA (15mmx30mmx5.18mm) package and the MPM3= 695-10 +is available in an LGA-45 (8mmx8mmx2mm) package. =20 Device compliant with: =20 diff --git a/drivers/hwmon/pmbus/mpq8785.c b/drivers/hwmon/pmbus/mpq8785.c index 7ee201550554..e6a643856f08 100644 --- a/drivers/hwmon/pmbus/mpq8785.c +++ b/drivers/hwmon/pmbus/mpq8785.c @@ -8,7 +8,7 @@ #include #include "pmbus.h" =20 -enum chips { mpq8785, mpm82504 }; +enum chips { mpq8785, mpm82504, mpm3695_10 }; =20 static int mpq8785_identify(struct i2c_client *client, struct pmbus_driver_info *info) @@ -60,6 +60,7 @@ static struct pmbus_driver_info mpq8785_info =3D { static const struct i2c_device_id mpq8785_id[] =3D { { "mpq8785", mpq8785 }, { "mpm82504", mpm82504 }, + { "mpm3695-10", mpm3695_10 }, { }, }; MODULE_DEVICE_TABLE(i2c, mpq8785_id); @@ -67,6 +68,7 @@ MODULE_DEVICE_TABLE(i2c, mpq8785_id); static const struct of_device_id __maybe_unused mpq8785_of_match[] =3D { { .compatible =3D "mps,mpq8785", .data =3D (void *)mpq8785 }, { .compatible =3D "mps,mpm82504", .data =3D (void *)mpm82504 }, + { .compatible =3D "mps,mpm3695-10", .data =3D (void *)mpm3695_10 }, {} }; MODULE_DEVICE_TABLE(of, mpq8785_of_match); @@ -92,6 +94,7 @@ static int mpq8785_probe(struct i2c_client *client) =20 break; case mpm82504: + case mpm3695_10: info->format[PSC_VOLTAGE_OUT] =3D direct; info->m[PSC_VOLTAGE_OUT] =3D 8; info->b[PSC_VOLTAGE_OUT] =3D 0; --=20 2.43.0 From nobody Sun Feb 8 00:26:29 2026 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 82BBF211A3F; Mon, 28 Apr 2025 22:15:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745878521; cv=none; b=c2DenH0l+J/8rP9wY50m5NaWdY8o+El2/fh/w1rOrSFhqKKA89iXHmE4vtvhVBiAWzY6akSGs2oG2HxJoXafBkB08FwVobsTAF5SSFyr59+eAjMNxZ725Cb4Usuz6Lsn+drWCcDt85Ap3U2r47nyr+hMtyy+3QMNjWhipdRvL50= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745878521; c=relaxed/simple; bh=iQepXZEPjfzGQ/6jgTqtmE1rTQYbFOMAxN/6PqP1pgA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CtpKXYCnmFhGOfwAoMqymjci55l8pXs8rK1S2iUK9GmFOmEnViUbOyEpZ/dLK6cI5hssJ+UYRnLUj7rNsJhSZNi6fCWDNY08IQ1pxDCRttjqdWeReMkhEOgfviXm6sNWublYZSSx4QU6mEbaXueOAgj0ryOGtgHIMJZwAAE2wks= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Abe/g02h; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Abe/g02h" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-39d83782ef6so4371066f8f.0; Mon, 28 Apr 2025 15:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745878517; x=1746483317; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kBJBrNw+0Dr8OQS2KdR4f/1hCJGJxhX6fU1gS+2VX1k=; b=Abe/g02h657W7I2L8ECkYG4Dq6owLpUKcIMsgkDJFgRppnCdUxqfZAkinc9M5+D+ib ThS93pOWbyT93CRIR/Yta/LqOwMRTrglJrH+MWvYgN/+xQ0Q0ImJesNoges6DnBTLJka o1XZKS5eUWKF3yvUf/J7jEXzWPuXMa7aG5+su1bgzWNKfRagz5fB5Dwa9d/tTzEJc92R CQzu75uLXWlrrAe+z+66f7hgIE77pEogR9OAtHuy3pDtlxM7EQGAejwpYeIJdAN8inF8 E/q4LQPdQxPQI+lP0m+MHBCZRat/9E9jVRnvzEHyPf+DOGXrQ5ZjUbHv/MQisMDyhEoE L9zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745878517; x=1746483317; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kBJBrNw+0Dr8OQS2KdR4f/1hCJGJxhX6fU1gS+2VX1k=; b=H8Us4UlzvMeUoMETvj5GaArpyz7wqQ0nECZxFrCkWsPkBfqtuVCcfgMsENo9qpk7X0 /MAfCzt81TPNGszFONb4g78tyHnHhAMXj+scohjSz1p0lIkCR6wBDSIk6GqHIUjqiGiq huvlzQLuy4raFdefM+bCmWhm9WOvk/dTSowCnE42q3ZMKX6G/yCzoWSLsVwY8jNEcRPW TO1E8erqGWqKJOMl0PJypqf0lCWuNcxS5WmhqYg5qpFjsn3E9/z/SX4JtWNfwWJsHSgq huPYmhBkQ9EQ3OF6gMsYsR6H/rnewg3+UxWTTajK96gQLMEI2Oc7tBohu2FEarrvEdVA Uiqg== X-Forwarded-Encrypted: i=1; AJvYcCUorINEV9PU52GTXZY+x79eM3p1ehpZEZRiJeajq0fl4Bk4rsEATRI/4QoX+Yerq28YB7zqx8pUafJv@vger.kernel.org, AJvYcCVUOZCSzIIbHQtslnBO6ZBiLsXuR3Rspo5Lu4uOTxsRQFRVdRzLrWz0vpNhzUNE12TaXgbiTkpNbs1W@vger.kernel.org, AJvYcCX+NMezMxT/6a6B9WOR0ikwEFqbOkpkWnFz88GJwMuyCDy82d5UiKKZeOUQSGIkSZ/z9d+IKxBY96DLqLVB@vger.kernel.org X-Gm-Message-State: AOJu0YykvJQjhcjvLyhAGy+tMYKA1u4wFCGBCLhloC72s4k6jguKcgyi gGouavWae3OFWvQSrUQp+gbGCAC3vsTITAlgvjV+ctj+FHXLQkjhvI7GxyDn X-Gm-Gg: ASbGncvf9X32lu9QQevxyL1fM5k6DMBf+2FAJzbxEHJMZ73MGoHuqKFTW85P+86G4TC l381GbQYnXfQR76mwDtPk2UOGKEt3o+pkRpWaTWxslUkfv8QZOybKSj18FTssY7qzgSWkBnz8HW AIMj6/HzJtxqtlV5JUXIQRCUtjiDmgd5o711nLVEUEDiJsZjMweDqOHFZ/fDEnXcCgoX+MQK2z6 4/DTe+ohlMhARR3NfyONgbU+EGZScTj+7ax5P2ZNcKwnPeCS5dSNggpTOEQyTuI/M3QDL74wU/Q X04F4GRy6SvywUAMj+l4feY19lnfbo98eNWCzK/tuuemyExFWZleM8ZeHXIhrg0xcg== X-Google-Smtp-Source: AGHT+IFLQQB8PIgB47lEoLRo2ST6auOmw+7NGb1XWBuHEDQQ8C9cuB2i4SpjOv/CK3OrWufps8Tifw== X-Received: by 2002:a05:6000:2584:b0:3a0:3d18:285 with SMTP id ffacd0b85a97d-3a08a558e69mr588817f8f.25.1745878517332; Mon, 28 Apr 2025 15:15:17 -0700 (PDT) Received: from tempest2.110.lan (xt27dd.stansat.pl. [83.243.39.221]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-440a53870f9sm135901085e9.33.2025.04.28.15.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Apr 2025 15:15:16 -0700 (PDT) From: Pawel Dembicki To: linux-hwmon@vger.kernel.org Cc: Pawel Dembicki , Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Shen Lichuan , Greg KH , Peter Zijlstra , Charles Hsu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 4/5] hwmon: pmbus: mpq8785: Implement voltage scale loop configuration Date: Tue, 29 Apr 2025 00:13:34 +0200 Message-ID: <20250428221420.2077697-5-paweldembicki@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250428221420.2077697-1-paweldembicki@gmail.com> References: <20250428221420.2077697-1-paweldembicki@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Implement support for setting the VOUT_SCALE_LOOP PMBus register based on an optional device tree property "voltage-scale-loop". This allows the driver to provide the correct VOUT value depending on the feedback voltage divider configuration for chips where the bootloader does not configure the voltage scale. Signed-off-by: Pawel Dembicki --- drivers/hwmon/pmbus/mpq8785.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/hwmon/pmbus/mpq8785.c b/drivers/hwmon/pmbus/mpq8785.c index e6a643856f08..6e2325d7f37b 100644 --- a/drivers/hwmon/pmbus/mpq8785.c +++ b/drivers/hwmon/pmbus/mpq8785.c @@ -78,6 +78,8 @@ static int mpq8785_probe(struct i2c_client *client) struct device *dev =3D &client->dev; struct pmbus_driver_info *info; enum chips chip_id; + u32 voltage_scale; + int ret; =20 info =3D devm_kmemdup(dev, &mpq8785_info, sizeof(*info), GFP_KERNEL); if (!info) @@ -105,6 +107,14 @@ static int mpq8785_probe(struct i2c_client *client) return -ENODEV; } =20 + if (!of_property_read_u32(dev->of_node, "voltage-scale-loop", + &voltage_scale)) { + ret =3D i2c_smbus_write_word_data(client, PMBUS_VOUT_SCALE_LOOP, + voltage_scale); + if (ret) + return ret; + } + return pmbus_do_probe(client, info); }; =20 --=20 2.43.0 From nobody Sun Feb 8 00:26:29 2026 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 9F466212FB8; Mon, 28 Apr 2025 22:15:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745878527; cv=none; b=g5Z0uBSklOdZkyVSgncSA09LWD4dQ67VHiRR6UrFBwmx16vy+UBxX/SL/ItUojHh0HKw2VEXlcDhLh01Oy2qKa+Vva/k9SwSbbliwnvHI1AiEA3Grdk5LrShAgyS/8jnmHFrVSXi2Fy4m89QzW6fJBQ9z+cUm345lsYhyiIYefU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745878527; c=relaxed/simple; bh=Oz3xbPwShQymWEBn63tRxjn/8y/MWrUejEUzseHML9Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TU07WDE5MRw9teniLKhMsi1l8cucjsUzJpa41JUTtiaOP1rmzLO3/0IsEnF+M85H94sLqalBPfPrYg1zMMyRxP/4AZWIT89fmnr+JdGh+9iwD6V3chkXRK7sMopaWMV/dGwQQ9hmuuc3pnweITxQQzY0mqXjmTulsWX3VJzBnc8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Pr9GMkya; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Pr9GMkya" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-43ed8d32a95so47127905e9.3; Mon, 28 Apr 2025 15:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745878524; x=1746483324; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9yRDcnN/FYkYJB8jlxcbYNz8bIp4lz5+az9F0kg+ds4=; b=Pr9GMkyagLR1dUTGYrtpp3cPBXyK1kbXGNu1E+yjjf6YxzX0hC1yvPSQpkFtYxzSnY bPE8Ga9mEyAguZS9lFfgeI68YlxmuiZijX1jPQLRbi8pJ6JfYoa/lRK1rEzbfUK/aPdR rL1YjXYtahVR5WtqMiuaX7DGApoYmKG5vt7JeHI+2830hwKwbKL+2ycewUEVx3fYFpu4 adn8wyK8D73H+8uTAPIGurppkI6KoJnZ/zknTaNmJ2sjwVbfgL7Yql89R5bxnCj0YdGP AkzlIgGCNatXWsQuOfm2V+kdLVKbyejtYJs9PICmJ6D65QCWQqCJqPSZHKciJBpT2Hxa 1rTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745878524; x=1746483324; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9yRDcnN/FYkYJB8jlxcbYNz8bIp4lz5+az9F0kg+ds4=; b=IANIRvFHw6dBPH/H44zINOpWXDhhjXQpMAXG+BnMNkdfwiDmE06vwHd+8RRmshbSIO VKX10xiMi/yuiA2ZZgIZjsGi/guGgBniOocHNrIc4smGnwD21ILqqGmbhf46HzUF4eVG j6y7HRhJA+T7iUkRoOqD7N0prBsjPD8FKcPXKIocTRFvzDn4l/u/akODancegGeuq6Pr jb+yIb6xVM/29reZGuP3k9vH0jMJyXQbBtQCWPd7JGVgNCp74T/Ky0eAZpVvYElybTmd lXiAi5zaVQo0A1O2xlFc5am4btGQn/dmEDmTh3P+PabRjicvas+EJW/EPrdeqfv+iJpr Edbw== X-Forwarded-Encrypted: i=1; AJvYcCUxIZ3iS1ovOp0RGtUbtmz7ZuBsFrH01Fncn7nZqegzxMdLGzQojEQoiJ6ly8E0Tgv98dtP8rUIy2GDwXR4@vger.kernel.org, AJvYcCVvVq6q0GkQQ8DvJsep7/9AdMfsNHzIWLxQEpOdJAbjXOnie3VZsBM938S1BL5lR/37qax9XO95IiQi@vger.kernel.org, AJvYcCXZfvgXN8E2VBNWHp1veoADEXjsH1/gCmxhFMfCo0yiKZhnkpaSrpkDRFc19gjqLjVJR7h4z+1kbQO7@vger.kernel.org X-Gm-Message-State: AOJu0Yz+bJ8gaEVwB3dYcDT1YmnIpZo//YJr4BHCSxk4+z5zzYhEN+Q5 3sMRf+iz1dMKdtP1Iebm3ddMbdEXTVByYkh7uxgim9mE+02bhiqi0qSGBE72 X-Gm-Gg: ASbGncstMGENTrB9ZgKW/ixPhR5tPoGor+a5r8hIjOXpBvRwYPxqPW8/tYb7Ov2H97S 0ZYD4SJwMuRYSzyTffsoAgN3y5mC3KtvJltEswW2AU6mf64LaBy6GmNyqDuxYwXequGLsjClYaB IstwF9PbzZgsIZbm9w3HAHPP9a/PgQ4W5AmsRZ1EphrSMOenpuw8XoNQBuufsHR0xo2CWD7TMRR RxpY+rYUG8JgViomQ7+9UlsBbZl33r14rrUi605/hWQfvBz0JS+4fbDYuL5ljRWbmhj5n42KY9q HSfJEXNG+3ipYLRY7bPSQ2VzeOXFYrn10WSKbt+yZNSNdbcfasZkyEjxK4OC2wQCWg== X-Google-Smtp-Source: AGHT+IFcfjUAazBvWsvxB4iOm3Qwr7AKfC90MAdlbooYDMW4zhf+gtTiyMNS5aMj8QaOtq4t1JNx2Q== X-Received: by 2002:a05:600c:1e27:b0:43d:2313:7b49 with SMTP id 5b1f17b1804b1-441ac8eb188mr7586015e9.12.1745878523601; Mon, 28 Apr 2025 15:15:23 -0700 (PDT) Received: from tempest2.110.lan (xt27dd.stansat.pl. [83.243.39.221]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-440a53870f9sm135901085e9.33.2025.04.28.15.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Apr 2025 15:15:23 -0700 (PDT) From: Pawel Dembicki To: linux-hwmon@vger.kernel.org Cc: Pawel Dembicki , Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Greg KH , Shen Lichuan , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Peter Zijlstra , Charles Hsu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 5/5] dt-bindings: hwmon: Add bindings for mpq8785 driver Date: Tue, 29 Apr 2025 00:13:35 +0200 Message-ID: <20250428221420.2077697-6-paweldembicki@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250428221420.2077697-1-paweldembicki@gmail.com> References: <20250428221420.2077697-1-paweldembicki@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add device tree bindings for Monolithic Power Systems MPQ8785, MPM82504 and MPM3695 PMBus-compliant voltage regulators. These bindings also documents the optional "voltage-scale-loop" property. Signed-off-by: Pawel Dembicki --- .../bindings/hwmon/pmbus/mps,mpq8785.yaml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq87= 85.yaml diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq8785.yaml= b/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq8785.yaml new file mode 100644 index 000000000000..e2a3958a61fa --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq8785.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/hwmon/pmbus/mps,mpq8785.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +allOf: + - $ref: /schemas/i2c/i2c-device.yaml# + +title: Monolithic Power Systems Multiphase Voltage Regulators with PMBus + +maintainers: + - Charles Hsu + +description: | + Monolithic Power Systems digital multiphase voltage regulators with PMBu= s. + +properties: + compatible: + enum: + - mps,mpq8785 + - mps,mpm82504 + - mps,mpm3695-10 + + reg: + maxItems: 1 + + voltage-scale-loop: + description: + Voltage scale factor for the VOUT_SCALE_LOOP register. + Value expressed in mili-units (1/1000th of a unit). + The simplest way to calculate it is + VOUT_SCALE_LOOP =3D VFB / VOUT * 1000 + $ref: /schemas/types.yaml#/definitions/uint32 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + pmic@30 { + compatible =3D "mps,mpm82504"; + reg =3D <0x30>; + voltage-scale-loop =3D <600>; + }; + }; --=20 2.43.0