Conversation
|
Will review when back in the office. We are out this week (and some of next). Thanks for the PR :) |
d41ee6b to
0b0d394
Compare
adidt/cli/main.py
Outdated
| def profile2dt(ctx, profile): | ||
| """Generate devicetree from Profile Configuration Wizard files | ||
| """ | ||
| adrv = adidt.adrv9009_pcbz() | ||
| adrv.parse_profile(profile) | ||
| adrv.gen_dt() | ||
| print(f'Wrote {adrv.output_filename}') |
There was a problem hiding this comment.
This needs to be more generic. Eventually we'll need to support other profiles. Can you change this to use something like ast.literal_eval or eval to take like the part or board name?
There was a problem hiding this comment.
Hi @tfcollins, apologies for the delay I was away for a few days.
This needs to be more generic. Eventually we'll need to support other profiles.
Understood, I'll make the change.
I was also working on a parser for talise_config.c that I'll add to this MR. I think it can help fill more fields in the devicetree template.
|
For some of these parameters (mostly for jesd204), it seems like the DT has to match what is set in the vivado project. Would it be possible to expose those in axi registers, and have the driver read them during the probe? I know that these have to be set for different drivers i.e. the FPGA cores and the 9009 for example, but wouldn't that be easier now with the jesd204-fsm code? |
Yes a big chunk of the JESD config is defined at synthesis time but its not globally true. We tend to give as much detail about the hardware in the devicetree as practical so things are not ambiguous. Having all this information available beforehand is useful for other debugging in the system as well. Technically you can also bring up a design without JESD cores in the FPGA (possibly existing somewhere else) and you would still need this information to perform some tasks. |
0b0d394 to
b2cb551
Compare
I see, that makes more sense now. It can get a bit hard to wrap your head around all these configurations, and which tool to use for which parameters. Hopefully with this, we can try to automate some of that process, and help others too :) |
Signed-off-by: Travis F. Collins <travis.collins@analog.com>
Signed-off-by: Travis F. Collins <travis.collins@analog.com>
Use lpbkAdcProfile instead of FIR filter coefs Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Add support for ADI's ADRV9009-PCBZ FMC card. The devicetree was taken as-is from the kernel tree. Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Add a new command to generate devicetree files from a profile. Signed-off-by: Liam Beguin <liambeguin@gmail.com>
In preparation for the addition of the AD9528 parser, move Profile Wizard code to it's own file. Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
In some cases, it seems like the channel enable options might not be defined. Catch those instances and default to off. Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Replace test data with default ADRV9009 profile from the Profile Wizard. This profile was generated with the "Write AD9528 settings to file" option in preparation for the addition of that feature. Signed-off-by: Liam Beguin <liambeguin@gmail.com>
The Profile Wizard can be made to export a profile for the ad9528 clock buffer. Add support for parsing the profile and generating devicetree files. Some parameters are part of the profile, but can't be edited in the GUI including hardware configurations such as single-ended/differential and buffer modes. Signed-off-by: Liam Beguin <liambeguin@gmail.com>
The profile tool (and the no-OS implementation) seem to allow sysrefNshotMode=0 which is undefined according to the datasheet of the ad9528. Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
TES (Transceiver Evaluation Software) can be used to generate filters, and JESD204 configurations. It support a few output formats including a talise_config.c file. This adds a basic parser to read the talInit data structure which will be used to fill more parameter in the adrv9009 devicetree template. Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Add a cli option to parse a talise_config.c file, and add it's jesd204 components to the devicetree output. Signed-off-by: Liam Beguin <liambeguin@gmail.com>
b2cb551 to
b6f4c5b
Compare
|
@tfcollins, I updated the original code with your suggestion using This also adds:
Your original commit was marked as WIP, were there other changes you wanted to make? I could have a look at that, or just drop I'm not totally convinced by the |
small rework of the already existing PR #18.
I'm not really sure about the cli part or how we want to do that part, but it gave me something to test with.
I'm happy to rework this more, and take over the cleanup part.