Skip to content

Commit 73d4b4c

Browse files
committed
Add AD9084 VCU118 hardware test with adijif profile-driven DTS generation
- Add vcu118 (MicroBlaze) platform support to ad9084_fmc board class - Add ad9084_fmc_vcu118.tmpl: profile-specific macro defines + base DTS include - Update test to use adijif to parse Apollo profiles, solve clock/JESD config, generate a per-profile DTS, and build/deploy the resulting simpleImage - Each profile yields a vcu118_ad9084_{profile}.dts placed in the kernel tree before the MicroBlaze simpleImage build
1 parent 5ba803d commit 73d4b4c

16 files changed

+21732
-3
lines changed

adidt/boards/ad9084_fmc.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ class ad9084_fmc(layout):
5555
"spi_bus": "spi0",
5656
"output_dir": "generated_dts",
5757
},
58+
"vcu118": {
59+
"template_filename": "ad9084_fmc_vcu118.tmpl",
60+
# base_dts_file is None: VCU118 DTS is placed directly in the kernel tree
61+
# The generated DTS includes the existing hardware base DTS from the kernel
62+
"base_dts_file": None,
63+
"base_dts_include": "vcu118_ad9084_204C_M4_L8_NP16_20p0_4x4.dts",
64+
"arch": "microblaze",
65+
"jesd_phy": "GTY",
66+
"default_fpga_adc_pll": "XCVR_QPLL1",
67+
"default_fpga_dac_pll": "XCVR_QPLL1",
68+
"spi_bus": "axi_spi_2",
69+
"output_dir": None, # Set directly via output_filename in tests
70+
},
5871
}
5972

6073
template_filename = "ad9084_fmc_vpk180.tmpl"
@@ -85,9 +98,12 @@ def __init__(self, platform="vpk180", kernel_path=None):
8598
# Set template and output based on platform
8699
self.template_filename = self.platform_config["template_filename"]
87100
base_name = f"ad9084_fmc_{platform}.dts"
88-
self.output_filename = os.path.join(
89-
self.platform_config["output_dir"], base_name
90-
)
101+
output_dir = self.platform_config["output_dir"]
102+
if output_dir is not None:
103+
self.output_filename = os.path.join(output_dir, base_name)
104+
else:
105+
# No default output dir (e.g. VCU118): caller must set output_filename
106+
self.output_filename = base_name
91107

92108
# Store original kernel_path argument to determine validation strategy
93109
self._kernel_path_explicit = kernel_path is not None
@@ -147,6 +163,11 @@ def _validate_kernel_path(self):
147163
f" 3. Clone kernel source to {self.DEFAULT_KERNEL_PATH}"
148164
)
149165

166+
# Skip base DTS validation if not specified (e.g. VCU118 where the
167+
# generated DTS is placed directly in the kernel tree)
168+
if self.platform_config["base_dts_file"] is None:
169+
return
170+
150171
base_dts_path = os.path.join(
151172
self.kernel_path, self.platform_config["base_dts_file"]
152173
)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
// AUTOGENERATED BY PYADI-DT {{ date }}
3+
/*
4+
* Analog Devices AD9084-FMCA-EBZ
5+
* Platform: VCU118 (MicroBlaze)
6+
* Profile: {{ profile_name }}
7+
* Generated from: {{ config_source }}
8+
*
9+
* hdl_project: <ad9084_fmc/vcu118>
10+
* Copyright (C) 2025 Analog Devices Inc.
11+
*/
12+
13+
/* --- Profile-specific configuration (generated by adijif) --- */
14+
15+
#ifndef DEVICE_PROFILE_NAME
16+
#define DEVICE_PROFILE_NAME "{{ profile_name }}.bin"
17+
#endif
18+
19+
/* RX JESD204C path */
20+
#ifndef AD9084_RX_LANERATE_KHZ
21+
#define AD9084_RX_LANERATE_KHZ {{ rx_lanerate_khz | int }}
22+
#endif
23+
#ifndef AD9084_RX_LINK_CLK
24+
#define AD9084_RX_LINK_CLK {{ rx_link_clk | int }}
25+
#endif
26+
27+
/* TX JESD204C path */
28+
#ifndef AD9084_TX_LANERATE_KHZ
29+
#define AD9084_TX_LANERATE_KHZ {{ tx_lanerate_khz | int }}
30+
#endif
31+
#ifndef AD9084_TX_LINK_CLK
32+
#define AD9084_TX_LINK_CLK {{ tx_link_clk | int }}
33+
#endif
34+
35+
/* SYSREF from ADF4030 */
36+
#ifndef SYSREF_CLK_HZ
37+
#define SYSREF_CLK_HZ {{ sysref_hz | int }}
38+
#endif
39+
40+
/* JESD204C parameters */
41+
#define AD9084_JESD_M {{ jesd_m | int }}
42+
#define AD9084_JESD_L {{ jesd_l | int }}
43+
#define AD9084_JESD_S {{ jesd_s | int }}
44+
#define AD9084_JESD_NP {{ jesd_np | int }}
45+
#define AD9084_JESD_F {{ jesd_f | int }}
46+
47+
/* ADF4382 device clock: {{ device_clock_hz | int }} Hz */
48+
49+
/* Include base VCU118 AD9084 FMC hardware description.
50+
* This file contains the MicroBlaze processor, AXI peripherals,
51+
* JESD204 cores, DMA engines, and SPI device nodes.
52+
* The macros above parameterise the profile-specific settings. */
53+
#include "{{ base_dts_include }}"

test/ad9084/2023_R2.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# ADI Linux Kernel Build Configuration for ad9084 development branch
2+
# This configuration supports building the ADI Linux kernel for Microblaze
3+
4+
project: linux
5+
repository: https://github.com/analogdevicesinc/linux.git
6+
tag: staging/xlnx/main-next-ad9084-dev
7+
8+
build:
9+
parallel_jobs: 4
10+
clean_before: false
11+
output_dir: ./build
12+
13+
platforms:
14+
microblaze:
15+
arch: microblaze
16+
cross_compile: microblazeel-xilinx-linux-gnu-
17+
defconfig: adi_mb_apollo_defconfig
18+
kernel_target: simpleImage.vcu118_ad9084_204C_M4_L8_NP16_20p0_4x4.strip
19+
simpleimage_targets:
20+
- simpleImage.vcu118_ad9084_204C_M4_L8_NP16_20p0_4x4
21+
dtbs: []
22+
23+
toolchain:
24+
preferred: vivado
21.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)