Staging/max20826 support#3431
Conversation
The INA232 is a current/power monitor from Texas Instruments sharing the same register map as the other INA2xx. Signed-off-by: Martino Facchin <m.facchin@arduino.cc> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260611-monza-ina232-v2-1-e4375ce652d0@oss.qualcomm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The INA232 is a current/power monitor. It shares the same register layout as the other chips in the series and uses the INA226 default configuration, but differs in its electrical characteristics: Signed-off-by: Martino Facchin <m.facchin@arduino.cc> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260611-monza-ina232-v2-2-e4375ce652d0@oss.qualcomm.com [groeck: Rephrased commit message] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add devicetree binding documentation for the Silergy SQ24860 eFuse. The device is a PMBus hardware monitoring device which reports voltage, current, power, and temperature telemetry. The board-specific IMON resistor value is described with silergy,rimon-micro-ohms. Signed-off-by: Ziming Zhu <ziming.zhu@silergycorp.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20260612030304.5165-2-zmzhu0630@163.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add PMBus hwmon support for the Silergy SQ24860 eFuse. The driver reports input voltage, output voltage, auxiliary voltage, input current, input power, and temperature. It also exposes peak, average, and minimum history attributes, sample count configuration, and maps the manufacturer-specific VIREF register to the generic input over-current fault limit attribute. The IMON resistor value is read from the silergy,rimon-micro-ohms device property and used to configure the input current calibration gain. Signed-off-by: Ziming Zhu <ziming.zhu@silergycorp.com> Link: https://lore.kernel.org/r/20260612030304.5165-3-zmzhu0630@163.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Document the supported sysfs attributes for the Silergy SQ24860 PMBus hwmon driver. Signed-off-by: Ziming Zhu <ziming.zhu@silergycorp.com> Link: https://lore.kernel.org/r/20260612030304.5165-4-zmzhu0630@163.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add a 'ti,current-range' string property to configure the device's Current Limit (CL) behavior to "high" or "low" via the register, overriding the physical CL pin setting. This configuration is supported on LM25066, LM5064, LM5066, and LM5066i. LM25056 is excluded because it does not support configuring the current limit via the DEVICE_SETUP register (bit 2 of DEVICE_SETUP is reserved). The values "low" and "high" map to the respective low/high threshold voltages of the chips: - LM25066: low = 25 mV, high = 46 mV - LM5064, LM5066, LM5066i: low = 26 mV, high = 50 mV Signed-off-by: Potin Lai <potin.lai.pt@gmail.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20260615-lm25066-cl-config-v3-1-decb4f5b0b77@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add support for the 'ti,current-range' devicetree property to configure the current limit via the DEVICE_SETUP (0xD9) register, overriding the physical CL pin setting. This configuration is supported on all chips in this driver (LM25066, LM5064, LM5066, LM5066i) except LM25056. The property values "low" and "high" map to: - LM25066: low = 25 mV, high = 46 mV - LM5064, LM5066, LM5066i: low = 26 mV, high = 50 mV The Bit 4 mapping to High/Low current limit is handled dynamically on probe because it is swapped for LM25066 compared to the other supported chips. Signed-off-by: Potin Lai <potin.lai.pt@gmail.com> Link: https://lore.kernel.org/r/20260615-lm25066-cl-config-v3-2-decb4f5b0b77@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Fix two minor wording issues in the coretemp documentation. Signed-off-by: Ximing Zhang <xzhangjr@gmail.com> Link: https://lore.kernel.org/r/20260616121549.29484-1-xzhangjr@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The attr_size field stores the number of sysfs attributes created for a temperature data group. Clarify the comment to describe the field directly. No functional change intended. Signed-off-by: Ximing Zhang <xzhangjr@gmail.com> Link: https://lore.kernel.org/r/20260616125631.35537-1-xzhangjr@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Register both dual-loop output channels with the regulator framework by populating regulator_desc[] and num_regulators in pmbus_driver_info. This exposes the standard PMBus OPERATION-based on/off control and status reporting to consumer drivers. Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai> Link: https://lore.kernel.org/r/20260619-xdpe1a2g7b-v1-1-428c3847be0d@nexthop.ai Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add support for an optional label property similar to other hwmon devices. This allows, in case of boards with multiple CHIPCAP2 sensors, to assign distinct names to each instance. Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260625160423.17882-1-flaviu.nistor@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add support for label sysfs attribute similar to other hwmon devices. This is particularly useful for systems with multiple sensors on the same board, where identifying individual sensors is much easier since labels can be defined via device tree. Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com> Reviewed-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20260625160423.17882-2-flaviu.nistor@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Support ROHM BD12780 and BD12780A hot-swap controllers, which are largely compatible with the Analog Devices adm1278. Main difference between the BD12780 and the BD12780A is, that the BD12780 has one I2C address configuration pin more (ADDR3) than the BD12780A. Introduce own compatibles for both variants but require the BD12780A to always have the BD12780 as a fall-back. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/2b7d5bb8cba773d0bba1d6779f0e6daa6a40eed4.1782458224.git.mazziesaccount@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Populating the i2c_device_id -table is not enough to make the driver module automatically load when device-tree node for the power-monitor is parsed at boot. Adding the of_device_id tables causes the driver module to be automatically load at boot. Testing has been done with rather old Debian system. When inspecting the generated module-aliases with the insmod, following entries seem to be the difference: alias: of:N*T*Cadi,adm1075C* alias: of:N*T*Cadi,adm1075 I suspect these are required for the module loading to work. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/9eca6831f9fe2d781bb88337397c39b10e36f5c6.1782458224.git.mazziesaccount@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add the ROHM BD12780 and the BD12780A to the list of the ICs supported by the adm1275 driver. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/5ff4a4a7a939cd642522fde407b5c9fa123a7089.1782458224.git.mazziesaccount@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
ROHM BD12780 and BD12780A are hot-swap controllers. They are largely similar to Analog Devices ADM1278. Besides the ID registers and some added functionality, the BD12780 and BD12780A mark PMON_CONFIG bits [15:14] as reserved. Hence TSFILT setting must be omitted on these ICs. The BD12780 has 3 pins usable for configuring the I2C address. The BD12780A lists the ADDR3-pin as "not connect". Support ROHM BD12780 and BD12780A controllers. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/e1e6e6218c08b562311356ef9c57378d32c26b08.1782458224.git.mazziesaccount@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add the ROHM BD12790 to the list of the ICs supported by the adm1275 driver. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/9bafcfe37190b5a3925e8dcfa3b59f8d240234ba.1782458224.git.mazziesaccount@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Support ROHM BD12790 hot-swap controller which is largely compatible with the Analog Devices adm1272. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/753a6ded3e1aff1aaba7d932f0a883f789d9dfaa.1782458224.git.mazziesaccount@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add support for ROHM BD12790 hot-swap controller which is largely similar to Analog Devices adm1272. The BD12790 uses the same selectable 60V/100V voltage ranges and 15mV/30mV current-sense ranges as the ADM1272, and the same VRANGE (bit 5) and IRANGE (bit 0) layout in PMON_CONFIG. It therefore uses a dedicated coefficient table that mirrors adm1272_coefficients, with the following differences derived from BD12790 datasheet Table 1 (p.18): - power 60V/30mV: m=17560 (vs. 17561) - power 100V/30mV: m=10536 (vs. 10535) - temperature: b=31880 (vs. 31871, reflecting T[11:0] = 4.2*T + 3188) Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Assisted-by: GitHub Copilot:claude-sonnet-4.6 Link: https://lore.kernel.org/r/b209c1b47712b69f17b52cfd7a7a38ed76024ca7.1782458224.git.mazziesaccount@gmail.com [groeck: Fixed comment describing BD12790 coefficients] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
ACPI specification defines the generic PCC shared memory signature as the PCC base signature ORed with the subspace ID. ACPI 6.6 added clarification that the signature is populated by the platform and verified by OSPM. The PCC mailbox controller now validates the signature when the channel is requested. Stop rewriting the signature before each command and leave the platform-populated value intact. Cc: Guenter Roeck <linux@roeck-us.net> Cc: linux-hwmon@vger.kernel.org Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org> Link: https://lore.kernel.org/r/20260627-acpi_pcc_signature-v1-2-c1b7268d4fdc@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add a driver for the temperature and voltage sensors on PolarFire SoC. The temperature reports how hot the die is, and the voltages are the SoC's 1.05, 1.8 and 2.5 volt rails respectively. The hardware supports alarms in theory, but there is an erratum that prevents clearing them once triggered, so no support is added for them. The hardware measures voltage with 16 bits, of which 1 is a sign bit and the remainder holds the voltage as a fixed point integer value. It's improbable that the hardware will work if the voltages are negative, so the driver ignores the sign bits. There's no dt support etc here because this is the child of a simple-mfd syscon. Signed-off-by: Lars Randers <lranders@mail.dk> Co-developed-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20260629-wriggle-headscarf-c85a4070dddb@spud Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The ChromeOS EC APIs use integers representing degrees kelvin for temperatures. The default conversions from linux/units.h will then always convert these integer degrees celsius with a 150 millidegree offset. This is a bit confusing, as it also differs from other CrOS EC tooling. Internally the EC uses a kelvin to celsius offset of a round 273, so the current conversion is also not entirely accurate. Implement a custom conversion which preserves round values. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20260630-cros_ec-hwmon-overflow-v1-1-3d2ecd3eb0f2@weissschuh.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add device tree binding documentation for ESWIN EIC7700 Voltage and Temperature sensor. The EIC7700 SoC integrates two PVT instances for monitoring SoC and DDR power domains respectively. Signed-off-by: Yulin Lu <luyulin@eswincomputing.com> Signed-off-by: Huan He <hehuan1@eswincomputing.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Xuyang Dong <dongxuyang@eswincomputing.com> Link: https://lore.kernel.org/r/20260630091122.1462-1-dongxuyang@eswincomputing.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add support for ESWIN EIC7700 Voltage and Temperature sensor. The driver supports temperature and voltage monitoring with polynomial conversion, and provides sysfs interface for sensor data access. The PVT IP contains one temperature sensor and one voltage sensor. Signed-off-by: Yulin Lu <luyulin@eswincomputing.com> Signed-off-by: Huan He <hehuan1@eswincomputing.com> Signed-off-by: Xuyang Dong <dongxuyang@eswincomputing.com> Link: https://lore.kernel.org/r/20260630091220.1608-1-dongxuyang@eswincomputing.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The driver populates acpi_device_name() and acpi_device_class() that are never read afterward, so make it stop doing that and drop the symbols defined for this purpose. Since ACPI_POWER_METER_CLASS is also used for generating ACPI netlink events, use the "pwr_meter_resource" string literal directly instead of it for that. No intentional functional impact. This will facilitate the removal of device_name and device_class from struct acpi_device_pnp in the future. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/2297496.irdbgypaU6@rafael.j.wysocki Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add support for ROG Maximus Z790 Hero. Signed-off-by: Florian Schut <mail@florianschut.nl> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260705113125.812045-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add support for ROG CROSSHAIR X870E HERO Signed-off-by: Miska Hämäläinen <miska.hamalainen@hotmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260705113246.812500-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The board sensors is a copy of ROG STRIX X870E-E GAMING WIFI7, thus we simply reuse its board_info struct. Signed-off-by: Vishaal Saraiya <vishaal.saraiya@gmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260709204037.1998433-3-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add the Lenovo LOQ 15IAX9 product family to the yogafan dmi_system_id table. Unlike the Legion series, ACPI table extraction reveals this LOQ utilizes an 8-bit EC architecture with a 100x multiplier, but maintains a dual-fan setup via the \_SB.PC00.LPCB.EC0.FA1S and FA2S paths. A new loq_15iax9_8bit_dual_cfg structure was added to properly map these hardware registers and calculate RPMs correctly while avoiding path conflicts with AMD-based LOQ variants. Signed-off-by: Sarbajit Sarkar <sarbajitsarkar16108@gmail.com> Link: https://lore.kernel.org/r/20260709183500.13761-1-sarbajitsarkar16108@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add support for the ProArt Z690-CREATOR WIFI board Signed-off-by: Maurice Mehlhaff <maurice.mehlhaff@gmx.de> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260708195638.1324168-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4e21503 to
97e15ef
Compare
fe3685a to
000f1c8
Compare
LLM reviewThis series adds PMBus hwmon driver support for MAX20826/MAX20855B/MAX20908/MAX20912/MAX20916 run: 29316844925
|
000f1c8 to
0be7b8a
Compare
LLM reviewThis series adds PMBus hwmon driver support for MAX20826/MAX20855B/MAX20908/MAX20912/MAX20916 run: 29320436295
|
0be7b8a to
2a92a56
Compare
LLM reviewThis series adds PMBus hwmon driver support for MAX20826/MAX20855B/MAX20908/MAX20912/MAX20916 run: 29338694846
|
The MAX20826 IC and similar provide a high-density, flexible and scalable dual-loop solution for high current cores for AI applications. These are dual loop solutions multiphase voltage regulators. Between Rails A and B, MAX20855B and MAX20908 supports up to 8 phases total configurable from 8+0 to 4+4 phases, MAX20912 supports up to 12 phases from 12+0 to 6+6, and MAX20826 and MAX20916 supports up to 16 phases from 16+0 to 8+8. Co-developed-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
2a92a56 to
6f837e7
Compare
| /* | ||
| * OPERATION | ||
| */ | ||
| #define PB_OPERATION_CONTROL_V_SRC GENMASK(5, 4) |
There was a problem hiding this comment.
as a total stranger to pmbus, I wanted to find where this is defined. Now that I found it, feel free to use the citation in your commit message if you want:
12.1.3. OPERATION Command Bits [5:4]
https://pmbus.org/wp-content/uploads/2022/01/PMBus-Specification-Rev-1-3-1-Part-II-20150313.pdf
LLM reviewThis series adds PMBus hwmon/regulator driver support for MAX20826/MAX20855B/MAX20908/MAX20912/MAX20916 run: 29344289845
|
sipraga
left a comment
There was a problem hiding this comment.
quite a weak review from me as I'm not at all familiar with pmbus, but having said that, it looks very good to me
4010bbc to
25c3559
Compare
| return ret; | ||
|
|
||
| /* Let's see if RAIL_B is present */ | ||
| rail = max20826_select_rail(st, RAIL_B, true); |
There was a problem hiding this comment.
this line changes page to RAIL B
if no bvren declared, driver can still probe, but it's on rail B rather than rail A
around line 920 or before 'ret = max20826_setup_vout_format(st);'
should we reselect RAIL A?
There was a problem hiding this comment.
should we revert to the older code style
- check bvren gpio
- if(bvren)
select rail b
do rail B code stuff
There was a problem hiding this comment.
Hmm yeah seems right! Will fix this
| if (ret < 0) | ||
| goto out_restore_oper; | ||
|
|
||
| n_phases = field_get(st->chip_info->phase_num_mask, status_mon[1]); |
There was a problem hiding this comment.
missing defintion of this small letters 'field_get'
innersource version has:
#define field_get(_mask, _reg) (_reg & _mask) >> __builtin_ctz(_mask);
because the actual FIELD_GET wanted a constant for the mask field
(not sure if there's a cleaner way to do this, and am surprised this built with no error)
There was a problem hiding this comment.
not an issue! upstream kernel already defines field_get() for non constant masks
| for (unsigned int page = 0; page < info->pages; page++) { | ||
| if (!st->chip_info->select_vrm) { | ||
| /* only vr13 in this case */ | ||
| st->info.vrm_version[page] = vr13; |
There was a problem hiding this comment.
max209xx devices are VR12,
There was a problem hiding this comment.
Will double check this one
f74258c to
8411d1b
Compare
PR Description
Just opening for the llm review. If someone else wants to add some reviewing, also welcome to do so.
PR Type
PR Checklist