-
Notifications
You must be signed in to change notification settings - Fork 877
Add support for LTC7871 #2690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add support for LTC7871 #2690
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) | ||
# Copyright (c) 2025 Analog Devices, Inc. | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/regulator/adi,ltc7871-regulator.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Analog Devices LTC7871 Buck-Boost Voltage Regulator | ||
maintainers: | ||
- Celine Joy Capua <celinejoy.capua@analog.com> | ||
|
||
description: | ||
The LTC7871 is a high performance bidirectional buck or boost switching | ||
regulator controller that operates in either buck or boost mode on demand. | ||
It regulates in buck mode from VHIGH-to-VLOW and boost mode from | ||
VLOW-to-VHIGH depending on a control signal, making it ideal for 48V/12V | ||
automotive dual battery systems | ||
properties: | ||
compatible: | ||
enum: | ||
- adi,ltc7871 | ||
- adi,ltc7872 | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
adi,enable-chip-ctrl-wp: | ||
description: If present, this indicates the use of regulator's | ||
internal write protection. | ||
type: boolean | ||
|
||
adi,ra-external-ohms: | ||
description: External Resistor used to compute the value of | ||
programmable VLOW in buck mode. | ||
default: 10000 | ||
|
||
adi,rb-external-ohms: | ||
description: External Resistor used to compute the value of | ||
programmable VLOW in buck mode. | ||
default: 107000 | ||
|
||
adi,rc-external-ohms: | ||
description: External Resistor used to compute the value of | ||
programmable VHIGH in boost mode. | ||
default: 12700 | ||
|
||
adi,rd-external-ohms: | ||
description: External Resistor used to compute the value of | ||
programmable VHIGH in boost mode. | ||
default: 499000 | ||
|
||
adi,idac-setcur-microamp: | ||
description: Adjusts the IDAC_SETCUR to program SETCUR | ||
pin's sourcing current. | ||
minimum: -63 | ||
maximum: 64 | ||
default: 0 | ||
|
||
adi,freq-spread-percentage: | ||
description: Sets the range of modulation with respect to the | ||
switching frequency. | ||
enum: [+-12%, +-15%, +-10%, +-8%] | ||
default: +-12% | ||
|
||
adi,switching-freq-divider: | ||
description: The factor at which the switching frequency is | ||
divided to get the modulation frequency. | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
enum: [512, 1024, 2048, 4096, 256, 128, 64] | ||
default: 512 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we somehow express this in frequency and do the math in the driver to get the actual divider? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The switching frequency is set via another external resistor which is arbitrary which means that the modulation frequency cannot be computed without prior knowledge of this resistor. Thus, we cannot directly use the modulation frequency as a property because it doesn't have fixed values. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An alternative would be to make the user input an integer for the modulation frequency, do the math in the driver, then round to the nearest valid value for the divisor. However, if we do this, the user will not be able to readback the actual value of the modulation frequency. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Why not? But for the above to work you would need to know the controller switching frequency so that you would need another resistor property right? I mean, if an external clock is used on the SYNC pin, it would be trivial to get the frequency but if you have the resistor on the FREQ pin, you would need to know it in order to do the math. Maybe let's go with the divider and see if upstream accepts it. Divider properties are not that uncommon after all. But one thing though... you're missing an optional clock property for the SYNC pin when an external clock is used (should also be enabled in the driver). You could also add some regulator properties for the chip supplies. |
||
|
||
required: | ||
- compatible | ||
- reg | ||
|
||
allOf: | ||
- $ref: regulator.yaml# | ||
- $ref: /schemas/spi/spi-peripheral-props.yaml# | ||
|
||
unevaluatedProperties: false | ||
|
||
examples: | ||
- | | ||
spi { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
regulator@0 { | ||
compatible = "adi,ltc7871"; | ||
reg = <0>; | ||
adi,ra-external-ohm = <10000>; | ||
adi,rb-external-ohm = <107000>; | ||
adi,rc-external-ohm = <12700>; | ||
adi,rd-external-ohm = <499000>; | ||
adi,idac-setcur-microamp = <0>; | ||
adi,freq-spread-percentage = "+-12%"; | ||
adi,switching-freq-divider = <512>; | ||
}; | ||
}; |
Uh oh!
There was an error while loading. Please reload this page.