-
Notifications
You must be signed in to change notification settings - Fork 856
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
Add support for ADP5055 #2668
base: main
Are you sure you want to change the base?
Add support for ADP5055 #2668
Conversation
Please, fix first the valid CI errors you have... |
5d77901
to
36d5ba8
Compare
It seems the checks returns some errors I couldn't capture when locally running commit check scripts like "./scripts/checkpatch <driver_file>" I have fixed them except 1 last error which I am confused about since the error is not related to my files. Edit: was fixed by rebasing to latest main |
Add documentation for devicetree bindings for ADP5055. Signed-off-by: Alexis Czezar Torreno <[email protected]>
Add ADI ADP5055 triple buck regulator driver support. Signed-off-by: Alexis Czezar Torreno <[email protected]>
imply REGULATOR_ADP5055. Signed-off-by: Alexis Czezar Torreno <[email protected]>
36d5ba8
to
03486f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ADP5055 is PMBUS compatible, should this be under hwmon/pmbus?
The datasheet did say "pmbus compatible" but it didn't have any pmbus commands the other typical pmbus dataseet contain some colleagues agreed with me that it was just an i2c interface and decided it is better off in the regulator subsystem |
Hmm, I do think this is a pertinent question... Looking at the description: "The ADP5055 is a power management unit that combines three high performance buck regulators with a PMBus interface..." So this looks like a typical power management device that fits in HWMON/PMBUs. Note that the pmbus subsystem also has an interface with the regulator subsystem and it will also check what standard PMbus registers are supported by the device. On top of that, you can pretty much bypass the standard registers and control the device as you want. Example, I see the VIDx_LOW/HIGH registers that could fit in the standard HWMON ABI and you totally support it even not using standard pmbus commands. There's also power good and overcurrent stuff that could very likely be made to work. All the above to say that pmbus might be doable and allows you to better support this device (meaning, more features). You can also internally reach the apps engineer for this part and try to understand the actual PMBUS commands supported. Looking at the datasheet, I can see STATUS_CML to be supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not convinced on the location of the driver but i'm already doing some comments on the DT bindings
0 - Physical EN pin is used for enabling. | ||
1 - Internal Register is used for enabling. | ||
2 - Both register and physical pin needed. | ||
3 - Either register or physical pin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks custom implementation of a subset of the ON_OFF_CONFIG command. Moreover, DT maintainers do not like much of properties like this where you just give the register code. You should have a string property and do the mapping in the driver (for register values). On top of that, you should likely control 3 gpios that should be mandatory for options 0 and 3.
Enables or disables over current protection | ||
blanking (OCP) for all channels. | ||
0 = Disabled | ||
1 = Enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for the 0/1 description. Should encode the state in the property name. Simply adi,ocp-blanking
and if the property is enabled, then it's pretty clear we're enabling the feature.
items: | ||
minimum: 0 | ||
maximum: 3 | ||
default: 3, 3, 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a lot properties for the channels so I think it might be a good idea to create channel child nodes and have the properties per channel instead of this.
PR Description
PR Type
PR Checklist