-
Notifications
You must be signed in to change notification settings - Fork 919
Add ADF41513 Driver #3012
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: mirror_ci/jic23/iio/testing
Are you sure you want to change the base?
Add ADF41513 Driver #3012
Conversation
ccd64ff to
76e3d30
Compare
61944f0 to
c9591d3
Compare
c9591d3 to
65e501e
Compare
nunojsa
left a comment
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.
Just some comments about using legacy platform_data. Once you mark this ready for reviewing I'll give a more in depth review.
76e3d30 to
fe10392
Compare
fe10392 to
f98be31
Compare
nunojsa
left a comment
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.
Ok, I'm done for now :). We'll need some iterations on this one and skipped more questionable/complicated things for now. We are also pushing the limits of what can go into a DT property so be ready to justify them when upstreaming.
Documentation/devicetree/bindings/iio/frequency/adi,adf41513.yaml
Outdated
Show resolved
Hide resolved
Documentation/devicetree/bindings/iio/frequency/adi,adf41513.yaml
Outdated
Show resolved
Hide resolved
Documentation/devicetree/bindings/iio/frequency/adi,adf41513.yaml
Outdated
Show resolved
Hide resolved
Documentation/devicetree/bindings/iio/frequency/adi,adf41513.yaml
Outdated
Show resolved
Hide resolved
Documentation/devicetree/bindings/iio/frequency/adi,adf41513.yaml
Outdated
Show resolved
Hide resolved
950132e to
b60429f
Compare
f98be31 to
3150872
Compare
fc5e37e to
3cd51ea
Compare
7c80527 to
c477eb9
Compare
aab5dc5 to
1ab9217
Compare
ba8ea08 to
21cdfb2
Compare
nunojsa
left a comment
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.
Ok, it looks like we're getting closer to an upstream v2. My main doubt right now is phase_resync computation
Documentation/devicetree/bindings/iio/frequency/adi,adf41513.yaml
Outdated
Show resolved
Hide resolved
|
|
||
| adf41513_suspend(st); | ||
| if (st->chip_enable) | ||
| gpiod_set_value_cansleep(st->chip_enable, 0); |
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.
Just curious... Are disabling different blocks with the enable_gpio when compared to adf41513_suspend()? IOW, do we need both?
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.
likely not, it could be one or the other. it would not make difference to use both though
| return dev_err_probe(dev, -ERANGE, | ||
| "power-up frequency %llu Hz out of range\n", | ||
| st->data.power_up_frequency_hz); | ||
| } |
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 though you had the above as mandatory now?
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.
yeah, decided to make optional with 10 GHz as default. Still, this value should be set for specific hardware designs so that the initialization sequence starts from a valid configuration.
| frequency accordingly. | ||
| The value written has no effect until out_altvoltageY_frequency | ||
| is updated. Consider to use out_altvoltageY_powerdown to power down the | ||
| PLL and its RFOut buffers during REFin changes. |
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.
The above two lines makes me wonder if this is something we can automatically do in the driver (if it is a best practice to do so)?
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.
The value written has no effect until out_altvoltageY_frequency is updated
I can handle this part.
Consider to use out_altvoltageY_powerdown to power down the PLL and its RFOut buffers during REFin changes
this is not really necessary but avoid glitches in the output.
21cdfb2 to
a879dd2
Compare
450379a to
5be3835
Compare
bf3e09c to
2d1c47d
Compare
nunojsa
left a comment
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.
Ok, take my comments and I think we are good for v2.
Documentation/devicetree/bindings/iio/frequency/adi,adf41513.yaml
Outdated
Show resolved
Hide resolved
dt-bindings for ADF41513, an ultralow noise PLL frequency synthesizer that can be used to implement local oscillators (LOs) as high as 26.5 GHz. Most properties refer to existing PLL driver properties (e.g. ADF4350). Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
The driver is based on existing PLL drivers in the IIO subsystem and implements the following key features: - Integer-N and fractional-N (fixed/variable modulus) synthesis modes - High-resolution frequency calculations using microhertz (µHz) precision to handle sub-Hz resolution across multi-GHz frequency ranges - IIO debugfs interface for direct register access - FW property parsing from devicetree including charge pump settings, reference path configuration and muxout options - Power management support with suspend/resume callbacks - Lock detect GPIO monitoring The driver uses 64-bit microhertz values throughout PLL calculations to maintain precision when working with frequencies that exceed 32-bit Hz representation while requiring fractional Hz resolution. Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
When LE sync is enabled, it is must be set after powering up and must be disabled when powering down. It is recommended when using the PLL as a frequency synthesizer, where reference signal will always be present while the device is being configured. Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
Set Bleed current when PFD frequency changes (bleed enabled when in fractional mode). Set lock detector window size, handling bias and precision. Add phase resync support, setting clock dividers when PFD frequency changes. Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
add documentation for ADF41513 driver which describes the device driver files and shows how userspace may consume the ABI for various tasks Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
Add ABI documentation for ADF41513 PLL sysfs interfaces Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
5be3835 to
b2c782a
Compare
2d1c47d to
d06d4c7
Compare
PR Description
PR Type
PR Checklist