Message ID | 20250225-upstream-lt3074-v2-0-18ad10ba542e@analog.com |
---|---|
Headers | show |
Series | Add support for LT3074 low voltage linear regulator | expand |
On Tue, Feb 25, 2025 at 09:01:13PM +0800, Cedric Encarnacion wrote: > Add Analog Devices LT3074 Ultralow Noise, High PSRR Dropout Linear > Regulator. > > Signed-off-by: Cedric Encarnacion <cedricjustine.encarnacion@analog.com> > --- > .../bindings/hwmon/pmbus/adi,lt3074.yaml | 64 ++++++++++++++++++++++ > MAINTAINERS | 7 +++ > 2 files changed, 71 insertions(+) > > diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/adi,lt3074.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/adi,lt3074.yaml > new file mode 100644 > index 0000000000000000000000000000000000000000..714426fd655a8daa96e15e1f789743f36001ac7a > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/pmbus/adi,lt3074.yaml > @@ -0,0 +1,64 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/hwmon/pmbus/adi,lt3074.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Analog Devices LT3074 voltage regulator > + > +maintainers: > + - Cedric Encarnacion <cedricjustine.encarnacion@analog.com> > + > +description: | > + The LT3074 is a low voltage, ultra-low noise and ultra-fast transient > + response linear regulator. It allows telemetry for input/output voltage, > + output current and temperature through the PMBus serial interface. > + > + Datasheet: > + https://www.analog.com/en/products/lt3074.html > + > +properties: > + compatible: > + enum: > + - adi,lt3074 > + > + reg: > + maxItems: 1 > + > + regulators: > + type: object > + description: | > + list of regulators provided by this controller. You have only one regulator, so drop the "regulators". vout could be here, but since you do not have any other resources, I doubt it stands on its own either. This is even visible in your DTS - you named the device as regulator, so logically this is the regulator. Regulator does not have regulators (otherwise they could also have regulators... so triple regulator). hwmon code might need some changes, but that's not really relevant for proper hardware description. Best regards, Krzysztof
On Wed, Feb 26, 2025 at 09:20:40AM +0100, Krzysztof Kozlowski wrote: > On Tue, Feb 25, 2025 at 09:01:13PM +0800, Cedric Encarnacion wrote: > > Add Analog Devices LT3074 Ultralow Noise, High PSRR Dropout Linear > > Regulator. > > > > Signed-off-by: Cedric Encarnacion <cedricjustine.encarnacion@analog.com> > > --- > > .../bindings/hwmon/pmbus/adi,lt3074.yaml | 64 ++++++++++++++++++++++ > > MAINTAINERS | 7 +++ > > 2 files changed, 71 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/adi,lt3074.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/adi,lt3074.yaml > > new file mode 100644 > > index 0000000000000000000000000000000000000000..714426fd655a8daa96e15e1f789743f36001ac7a > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/hwmon/pmbus/adi,lt3074.yaml > > @@ -0,0 +1,64 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/hwmon/pmbus/adi,lt3074.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Analog Devices LT3074 voltage regulator > > + > > +maintainers: > > + - Cedric Encarnacion <cedricjustine.encarnacion@analog.com> > > + > > +description: | > > + The LT3074 is a low voltage, ultra-low noise and ultra-fast transient > > + response linear regulator. It allows telemetry for input/output voltage, > > + output current and temperature through the PMBus serial interface. > > + > > + Datasheet: > > + https://www.analog.com/en/products/lt3074.html > > + > > +properties: > > + compatible: > > + enum: > > + - adi,lt3074 > > + > > + reg: > > + maxItems: 1 > > + > > + regulators: > > + type: object > > + description: | > > + list of regulators provided by this controller. > > You have only one regulator, so drop the "regulators". vout could be > here, but since you do not have any other resources, I doubt it stands > on its own either. This is even visible in your DTS - you named the > device as regulator, so logically this is the regulator. Regulator does > not have regulators (otherwise they could also have regulators... so > triple regulator). > > hwmon code might need some changes, but that's not really relevant for > proper hardware description. Normally, I would agree, but it seems generic pmbus code expects this structure. This just came up with changing another binding maintained by 'Not Me' to follow this structure. We're stuck with the existing way, so I don't know that it is worth supporting 2 ways forever. OTOH, is it guaranteed that these devices will only ever be pmbus devices or that other regulator devices which are not handled as pmbus devices currently will be in the future. If so, more flexibility in the bindings will be needed. Rob
Introduce hardware monitoring and regulator support for LT3074. The component is an ultrafast, ultralow noise 3A, 5.5V dropout linear regulator with a PMBus serial interface that allows telemetry for input/output voltage, output current, and die temperature. It has a single channel and requires a bias voltage which can be monitored via manufacturer-specific registers. Signed-off-by: Cedric Encarnacion <cedricjustine.encarnacion@analog.com> --- Changes in v2: * Separated dt-binding for LT3074. * Added __maybe_unused attribute to of_device_id. This addresses kernel test robot warning. * Added entry to MAINTAINERS. - Link to v1: https://lore.kernel.org/r/20250124-upstream-lt3074-v1-0-7603f346433e@analog.com --- Cedric Encarnacion (2): dt-bindings: hwmon: pmbus: add lt3074 hwmon: (pmbus/lt3074): add support for lt3074 .../bindings/hwmon/pmbus/adi,lt3074.yaml | 64 +++++++++++ Documentation/hwmon/index.rst | 1 + Documentation/hwmon/lt3074.rst | 72 ++++++++++++ MAINTAINERS | 9 ++ drivers/hwmon/pmbus/Kconfig | 18 +++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/lt3074.c | 122 +++++++++++++++++++++ 7 files changed, 287 insertions(+) --- base-commit: 8df0f002827e18632dcd986f7546c1abf1953a6f change-id: 20250124-upstream-lt3074-123384246e0b Best regards,