Skip to content

arm: dts: xilinx: add example for ADAQ4380-4 eval board #2823

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dlech
Copy link
Collaborator

@dlech dlech commented Jun 18, 2025

PR Description

Add an example for the EVAL-ADAQ4380-4 (FMCZ) evaluation board. These are similar to AD738x, but have different power supply requirements, so worth a separate example.

PR Type

Example DTS

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have tested the changes on the relevant hardware
  • I have updated the documentation outside this repo accordingly (if there is the case)

dlech added a commit to dlech/adi-linux that referenced this pull request Jun 18, 2025
This is the same as analogdevicesinc#2823
but has the adi,axi-pwmgen bindings clocks fixed up.

We can drop this and add the fixup to the previous patch after the other
PR is merged.

Signed-off-by: David Lechner <dlechner@baylibre.com>
dlech added a commit to dlech/adi-linux that referenced this pull request Jun 18, 2025
This is the same as analogdevicesinc#2823
but has the adi,axi-pwmgen bindings clocks fixed up.

We can drop this and add the fixup to the previous patch after the other
PR is merged.

Signed-off-by: David Lechner <dlechner@baylibre.com>
@dlech dlech mentioned this pull request Jun 18, 2025
6 tasks
@dlech dlech force-pushed the adi-dts-adaq4380-4 branch from 08e24ee to d9685ea Compare June 19, 2025 14:40
Comment on lines +31 to +35
eval_gnd: eval-board-gnd-regulator {
compatible = "regulator-fixed";
regulator-name = "EVAL GND (0V) supply";
regulator-always-on;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting this one. We would normally assume GND supply pins connected to GND and not declare any GND supply in dt. Though, I see VS- may range from -5V to GND so I think it makes sense to explicitly provide the supply in this case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that was the conclusion from upstream review as well.

Comment on lines 107 to 108
// interrupts = <86 IRQ_TYPE_EDGE_FALLING>;
// interrupt-parent = <&gpio0>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if they are not used (yet), can't we have them anyway uncommented? So when the driver gets to use them, we may only remove the comment about they not being used (assuming interrupt parent and number doesn't change off course).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also depends on an HDL compile option if the interrupt is there or not. The ALERT pin is shared with one of the SDO pins, so we can't use the pin for both at the same time. This .dts file is written with the assumption that we are using all of the pins as SDO (adi,num-sdi = <4>;).

And we don't have plans to add ALERT interrupt support to the driver. We tried this but because of the way the chip auto-resets the interrupt after each sample, it proved very difficult to come up with anything usable in Linux. And according to the applications engineers, this pin is generally hard-wired to some sort of safety shutdown, if it is used. We figured it would be better to wait for a real-world application that needs the interrupt in Linux first rather than trying to guess since there isn't an obvious "right way" to do it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I would just drop (not add) the interrupt props then. If this dts is tailored to use all SDO for data and interrupts wouldn't work well that way, why to have them in dt?

Copy link
Contributor

@machschmitt machschmitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things I would change (according to comments). Otherwise, LGTM.

* ADI tree extension (not mainline). Set this based on
* HDL NUM_OF_SDI compile argument. Can omit if =1.
*/
adi,num-sdi = <4>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adi,ad4030.yaml (upstream) documents spi-rx-bus-width and that is also intended to match a NUM_OF_SDI HDL build parameter (on the ad4630_fmc hdl project). On the ad4630_fmc project, the NUM_OF_SDI specifies how many SDO lines are used for each channel. Would it make sense to use the same property name here? If not, might be a good idea to add a comment telling how this is different from adi,ad4030.yaml spi-rx-bus-width (or add a TODO tag to remind this will need to be updated). Currently, ADI Linux adi,ad4630.yaml uses adi,lane-mode to tell what NUM_OF_SDI was the HDL built with, but I guess it's safe to assume that prop will also be updated at some point.

Copy link
Collaborator Author

@dlech dlech Jun 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spi-rx-bus-width is not the same as multiple buses. spi-rx-bus-width lets you read multiple bits of the same word at one time. But multiple buses lets you read one bit each of multiple words at the same time. AD4630 has both actually (i.e. 8 SDO lines consisting of 2 buses and 4 bits per bus), but this chip only has multiple buses.

There is a proposed upstream binding for multiple buses currently on the mailing lists right now and I'm working with the HDL engineers to adapt the AXI SPI Engine to do something like that as well so that we can have proper upstream support.

Comment on lines 107 to 108
// interrupts = <86 IRQ_TYPE_EDGE_FALLING>;
// interrupt-parent = <&gpio0>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I would just drop (not add) the interrupt props then. If this dts is tailored to use all SDO for data and interrupts wouldn't work well that way, why to have them in dt?

Add an example for the EVAL-ADAQ4380-4 (FMCZ) evaluation board. These
are similar to AD738x, but have different power supply requirements, so
worth a separate example.

Signed-off-by: David Lechner <dlechner@baylibre.com>
@dlech dlech force-pushed the adi-dts-adaq4380-4 branch from d9685ea to 195f96a Compare June 20, 2025 18:48
@dlech
Copy link
Collaborator Author

dlech commented Jun 20, 2025

updated:

  • dropped the commented-out interrupts property
  • added REVIST to the adi,num-sdi property comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants