Skip to content

analogdevicesinc/pyadi-dt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

160 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyadi-dt

GitHub Pages

Device tree management tools for ADI hardware

props command

Quick install

pip install git+https://github.com/analogdevicesinc/pyadi-dt.git

CLI basics

Get basic info of CLI

> adidtc
Usage: adidtc [OPTIONS] COMMAND [ARGS]...

  ADI device tree utility

Options:
  -nc, --no-color                 Disable formatting
  -c, --context [local_file|local_sd|local_sysfs|remote_sysfs|remote_sd]
                                  Set context  [default: local_sysfs]
  -i, --ip TEXT                   Set ip used by remote contexts  [default:
                                  192.168.2.1]
  -u, --username TEXT             Set username used by remote SSH sessions
                                  (default is root)  [default: root]
  -w, --password TEXT             Set password used by remote SSH sessions
                                  (default is analog)  [default: analog]
  -a, --arch [arm|arm64|auto]     Set target architecture which will set the
                                  target DT. auto with determine from running
                                  system  [default: auto]
  --help                          Show this message and exit.

Commands:
  jif      JIF supported updates of DT
  prop     Get and set device tree properties
  props    Get, set, and explore device tree properties
  sd-move  Move files on existing SD card

Use the prop sub command to read device tree attributes

> adidtc -c remote_sysfs -i 192.168.2.1 prop -cp adi,ad9361 clock-output-names
clock-output-names rx_sampl_clk,tx_sampl_clk

Device Tree Generation

Generate device tree source (DTS) files for AD9081 FMC evaluation boards across multiple FPGA platforms (ZCU102, VPK180, ZC706).

Quick Example

# Generate DTS for ZCU102
adidtc gen-dts --platform zcu102 --config my_config.json

# Generate and compile to DTB
adidtc gen-dts --platform vpk180 --config my_config.json --compile

Supported Platforms

  • ZCU102: Zynq UltraScale+ (ARM64, GTH transceivers)
  • VPK180: Versal (ARM64, GTY transceivers)
  • ZC706: Zynq-7000 (ARM, GTX transceivers)

Features

  • Platform-specific device tree generation from JSON configurations
  • Automatic FPGA transceiver configuration (QPLL/CPLL settings)
  • HMC7044 clock chip configuration
  • AD9081 JESD204B/C link configuration
  • ADC/DAC datapath configuration (CDDC, FDDC, CDUC, FDUC)
  • Optional DTB compilation with proper include paths

Setup

The tool requires Linux kernel source for platform base DTS files:

# Option 1: Clone to default location
git clone https://github.com/analogdevicesinc/linux.git

# Option 2: Set environment variable
export LINUX_KERNEL_PATH=/path/to/your/linux

# Option 3: Pass via CLI
adidtc gen-dts -p zcu102 -c config.json -k /path/to/linux

Documentation

See doc/source/ad9081_device_tree_generation.md for:

  • Complete configuration file format
  • FPGA configuration options
  • Python API usage
  • Troubleshooting guide
  • Adding new platforms

Building Documentation

Documentation is built using Sphinx with the ADI cosmic theme.

Setup

# Install documentation dependencies
pip install -r requirements/requirements_doc.txt

# Install package in development mode
pip install -e .

Build

# Build HTML documentation
cd doc
make html

# View the documentation (open in browser)
open build/html/index.html  # macOS
xdg-open build/html/index.html  # Linux
start build/html/index.html  # Windows

Additional Commands

# Check documentation coverage
make coverage

# Validate links
make linkcheck

# Clean build artifacts
make clean

The documentation is automatically built and deployed to GitHub Pages on every push to the main branch.

About

Device tree management tools for ADI hardware

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors