Post Go back to editing

ad9361 bringup RX tuning failed with petalinux

Category: Software
Product Number: AD9361
Software Version: petalinux 2022.2 and meta-adi 2022.2

Booting Linux on physical CPU 0x0
Linux version 5.15.36-xilinx-v2022.2 (oe-user@oe-host) (arm-xilinx-linux-gnueabi-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37.20210721) #1 SMP PREEMPT Fri Oct 4 10:26:26 UTC 2024
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: custom zynq baseband board
earlycon: cdns0 at MMIO 0xe0001000 (options '115200n8')
printk: bootconsole [cdns0] enabled
Memory policy: Data cache writealloc
cma: Reserved 128 MiB at 0x38000000
Zone ranges:
  Normal   [mem 0x0000000000000000-0x000000002fffffff]
  HighMem  [mem 0x0000000030000000-0x000000003fffffff]
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000000000-0x000000003fffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x000000003fffffff]
percpu: Embedded 11 pages/cpu s14156 r8192 d22708 u45056
pcpu-alloc: s14156 r8192 d22708 u45056 alloc=11*4096
pcpu-alloc: [0] 0 [0] 1 
Built 1 zonelists, mobility grouping on.  Total pages: 260608
Kernel command line: console=ttyPS0,115200 earlycon root=/dev/ram0 rw
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 864152K/1048576K available (12288K kernel code, 804K rwdata, 8048K rodata, 1024K init, 475K bss, 53352K reserved, 131072K cma-reserved, 131072K highmem)
rcu: Preemptible hierarchical RCU implementation.
rcu: 	RCU event tracing is enabled.
rcu: 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
	Trampoline variant of Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to (ptrval)
slcr mapped to (ptrval)
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
random: get_random_bytes called from start_kernel+0x480/0x638 with crng_init=0
zynq_clock_init: clkc starts at (ptrval)
Zynq clock init
sched_clock: 64 bits at 166MHz, resolution 6ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x26703d7dd8, max_idle_ns: 440795208065 ns
Switching to timer-based delay loop, resolution 6ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at (ptrval), irq=25
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 BogoMIPS (lpj=1666666)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
CPU: Testing write buffer coherency: ok
CPU0: Spectre v2: using BPIALL workaround
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100060
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
CPU1: Spectre v2: using BPIALL workaround
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (666.66 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes, linear)
pinctrl core: initialized pinctrl subsystem
NET: Registered PF_NETLINK/PF_ROUTE protocol family
DMA: preallocated 256 KiB pool for atomic coherent allocations
thermal_sys: Registered thermal governor 'step_wise'
cpuidle: using governor ladder
amba f8801000.etb: Fixing up cyclic dependency with replicator
amba f8803000.tpiu: Fixing up cyclic dependency with replicator
amba f8804000.funnel: Fixing up cyclic dependency with replicator
amba f889c000.ptm: Fixing up cyclic dependency with f8804000.funnel
amba f889d000.ptm: Fixing up cyclic dependency with f8804000.funnel
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 32, base_baud = 3125000) is a xuartps
printk: console [ttyPS0] enabled
printk: bootconsole [cdns0] disabled
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
mc: Linux media interface: v0.10
videodev: Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
jesd204: found 0 devices and 0 topologies
FPGA manager framework
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered PF_INET protocol family
IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
armv7-pmu f8891000.pmu: hw perfevents: no interrupt-affinity property, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=30 max_order=18 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
fuse: init (API version 7.34)
bounce: pool size: 64 pages
io scheduler mq-deadline registered
io scheduler kyber registered
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: 	DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
brd: module loaded
loop: module loaded
Registered mathworks_ip class
SPI driver spidev has no spi_device_id for adi,swspi
spi-nor spi1.0: SPI-NOR-UniqueID 1044001866140010f8ff1d008fcb13e755
spi-nor spi1.0: found mt25qu02g, expected n25q128a11
spi-nor spi1.0: mt25qu02g (524288 Kbytes)
5 fixed-partitions partitions found on MTD device spi1.0
Creating 5 MTD partitions on "spi1.0":
0x000000000000-0x000000500000 : "boot"
0x000000500000-0x000000520000 : "bootenv"
0x000000520000-0x000000540000 : "config"
0x000000540000-0x000000fc0000 : "image"
0x000000fc0000-0x000020000000 : "spare"
MACsec IEEE 802.1AE
tun: Universal TUN/TAP device driver, 1.6
Freeing initrd memory: 19848K
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 35 (66:72:b6:34:ae:c1)
usbcore: registered new interface driver asix
usbcore: registered new interface driver ax88179_178a
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver net1080
usbcore: registered new interface driver cdc_subset
usbcore: registered new interface driver zaurus
usbcore: registered new interface driver cdc_ncm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
usbcore: registered new interface driver uas
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver upd78f0730
usbserial: USB Serial support registered for upd78f0730
SPI driver ads7846 has no spi_device_id for ti,tsc2046
SPI driver ads7846 has no spi_device_id for ti,ads7843
SPI driver ads7846 has no spi_device_id for ti,ads7845
SPI driver ads7846 has no spi_device_id for ti,ads7873
i2c_dev: i2c /dev entries driver
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
si570: probe of 1-005d failed with error -5
i2c i2c-0: Added multiplexed i2c bus 1
i2c 2-0039: Fixing up cyclic dependency with 70e00000.axi_hdmi
adv7511 2-0039: supply avdd not found, using dummy regulator
adv7511 2-0039: supply dvdd not found, using dummy regulator
adv7511 2-0039: supply pvdd not found, using dummy regulator
adv7511 2-0039: supply bgvdd not found, using dummy regulator
adv7511 2-0039: supply dvdd-3v not found, using dummy regulator
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
adv7511: probe of 2-0039 failed with error -5
i2c i2c-0: Added multiplexed i2c bus 2
at24 3-0054: supply vcc not found, using dummy regulator
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
i2c i2c-0: Added multiplexed i2c bus 3
pca953x 4-0021: supply vcc not found, using dummy regulator
pca953x 4-0021: using no AI
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
i2c i2c-0: Added multiplexed i2c bus 4
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
rtc-pcf8563 5-0051: pcf8563_read_block_data: read error
rtc-pcf8563 5-0051: registered as rtc0
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
rtc-pcf8563 5-0051: pcf8563_read_block_data: read error
rtc-pcf8563 5-0051: hctosys: unable to read the hardware clock
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
rtc-pcf8563 5-0051: pcf8563_read_block_data: read error
i2c i2c-0: Added multiplexed i2c bus 5
i2c i2c-0: Added multiplexed i2c bus 6
at24 7-0050: supply vcc not found, using dummy regulator
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
i2c i2c-0: Added multiplexed i2c bus 7
i2c i2c-0: Added multiplexed i2c bus 8
pca954x 0-0074: registered 8 multiplexed busses for I2C switch pca9548
usbcore: registered new interface driver uvcvideo
gspca_main: v2.14.0 registered
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer with timeout 10s
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
ledtrig-cpu: registered to indicate activity on CPUs
hid: raw HID events driver (C) Jiri Kosina
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
SPI driver fb_seps525 has no spi_device_id for syncoam,seps525
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7988-5
mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7988-1
mmc1: SDHCI controller on e0101000.mmc [e0101000.mmc] using ADMA
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7984
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7983
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7982
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7980
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7949
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7946
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7942
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7699
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7693
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7691
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7690
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7689
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7688
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7687
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7686
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7685
SPI driver pulsar_adc has no spi_device_id for adi,pulsar,ad7682
SPI driver ad7124 has no spi_device_id for adi,ad7124-4
SPI driver ad7124 has no spi_device_id for adi,ad7124-8
SPI driver ad7192 has no spi_device_id for adi,ad7190
SPI driver ad7192 has no spi_device_id for adi,ad7193
SPI driver ad7192 has no spi_device_id for adi,ad7195
ad9361 spi0.0: ad9361_probe : enter (ad9361)
ad9361 spi0.0: No GPIOs defined for ext band ctrl
random: fast init done
ad9361 spi0.0: ad9361_probe : AD936x Rev 0 successfully initialized
SPI driver ad9467 has no spi_device_id for adi,ad9643
SPI driver ad9467 has no spi_device_id for adi,ad9250
SPI driver ad9467 has no spi_device_id for adi,ad9250_2
SPI driver ad9467 has no spi_device_id for adi,ad9265
SPI driver ad9467 has no spi_device_id for adi,ad9683
SPI driver ad9467 has no spi_device_id for adi,ad9434
SPI driver ad9467 has no spi_device_id for adi,ad9625
SPI driver ad9467 has no spi_device_id for adi,ad9652
SPI driver ad9467 has no spi_device_id for adi,ad9649
SPI driver adar3000 has no spi_device_id for adi,adar3001
SPI driver adar3000 has no spi_device_id for adi,adar3002
cf_axi_dds 43c04000.cf-ad9361-dds-core-lpc: Analog Devices CF_AXI_DDS_DDS MASTER (9.01.b) at 0x43C04000 mapped to 0x(ptrval), probed DDS AD9361
SPI driver ad9783 has no spi_device_id for adi,ad9780
SPI driver ad9783 has no spi_device_id for adi,ad9781
SPI driver adis16475 has no spi_device_id for adi,adis16470
SPI driver adis16475 has no spi_device_id for adi,adis16475-1
SPI driver adis16475 has no spi_device_id for adi,adis16475-2
SPI driver adis16475 has no spi_device_id for adi,adis16475-3
SPI driver adis16475 has no spi_device_id for adi,adis16477-1
SPI driver adis16475 has no spi_device_id for adi,adis16477-2
SPI driver adis16475 has no spi_device_id for adi,adis16477-3
SPI driver adis16475 has no spi_device_id for adi,adis16465-1
SPI driver adis16475 has no spi_device_id for adi,adis16465-2
SPI driver adis16475 has no spi_device_id for adi,adis16465-3
SPI driver adis16475 has no spi_device_id for adi,adis16467-1
SPI driver adis16475 has no spi_device_id for adi,adis16467-2
SPI driver adis16475 has no spi_device_id for adi,adis16467-3
SPI driver adis16475 has no spi_device_id for adi,adis16500
SPI driver adis16475 has no spi_device_id for adi,adis16505-1
SPI driver adis16475 has no spi_device_id for adi,adis16505-2
SPI driver adis16475 has no spi_device_id for adi,adis16505-3
SPI driver adis16475 has no spi_device_id for adi,adis16507-1
SPI driver adis16475 has no spi_device_id for adi,adis16507-2
SPI driver adis16475 has no spi_device_id for adi,adis16507-3
axi_sysid 45000000.axi-sysid-0: AXI System ID core version (1.01.a) found
axi_sysid 45000000.axi-sysid-0: system ID header version mismatch. Expected 2, Reported 0
axi_sysid: probe of 45000000.axi-sysid-0 failed with error -14
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
usbcore: registered new interface driver snd-usb-audio
NET: Registered PF_INET6 protocol family
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
NET: Registered PF_IEEE802154 protocol family
Key type dns_resolver registered
zynq_pm_remap_ocm: OCM pool is not available
zynq_pm_suspend_init: Unable to map OCM.
Registering SWP/SWPB emulation handler
of-fpga-region fpga-full: FPGA Region probed
SAMPL CLK: 61439999 tuning: RX
  0:1:2:3:4:5:6:7:8:9:a:b:c:d:e:f:
0:# # # # # # # # # # # # # # # # 
1:# # # # # # # # # # # # # # # # 
ad9361 spi0.0: ad9361_dig_tune_delay: Tuning RX FAILED!
cf_axi_adc: probe of 43c00000.cf-ad9361-lpc failed with error -5
of_cfs_init
of_cfs_init: OK
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
rtc-pcf8563 5-0051: pcf8563_read_block_data: read error
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
rtc-pcf8563 5-0051: pcf8563_read_block_data: read error
ALSA device list:
  No soundcards found.
Freeing unused kernel image (initmem) memory: 1024K
Run /init as init process
  with arguments:
    /init
  with environment:
    HOME=/
    TERM=linux
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
rtc-pcf8563 5-0051: pcf8563_read_block_data: read error
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
rtc-pcf8563 5-0051: pcf8563_read_block_data: read error
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
rtc-pcf8563 5-0051: pcf8563_read_block_data: read error
random: dd: uninitialized urandom read (512 bytes read)
macb e000b000.ethernet eth0: PHY [e000b000.ethernet-ffffffff:00] driver [Marvell 88E1510] (irq=POLL)
macb e000b000.ethernet eth0: configuring for phy/mii link mode
macb e000b000.ethernet eth0: Link is Up - 100Mbps/Full - flow control tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
random: dbus-uuidgen: uninitialized urandom read (12 bytes read)
random: dbus-uuidgen: uninitialized urandom read (8 bytes read)
random: dbus-daemon: uninitialized urandom read (12 bytes read)
random: crng init done
random: 1 urandom warning(s) missed due to ratelimiting
xiic-i2c 41600000.i2c: Timeout waiting at Tx empty
rtc-pcf8563 5-0051: pcf8563_read_block_data: read error
8255.dts_post.zip

Dear ADI Team,

We have designed a custom ZYNQ board with the AD9361. The board has been successfully tested with version 2022.2 and NO-OS, and everything works as expected.

However, while testing with PetaLinux 2022.2, we encountered an "RX Tuning Failed" error during boot. For your reference, we are attaching the device tree and boot log.

Upon comparison of the HDL registers between the NO-OS and PetaLinux implementations, we noticed one key difference in the REG_CLK_FREQ register:

Value in NO-OS: 0x13A93
Value in PetaLinux: 0x27525
The clock source in both designs is 26 MHz, and we have confirmed that the clock at the XTAL is identical.

I have attached the boot logs and dts files in the zip.

Could you please help us identify the root cause of this issue?

Thread Notes

  • Hi,

    If it works with no-OS, my guess is that the configuration is done wrongly in Petalinux, regarding the clock rates. I'm guessing this because the clock frequency reported in Petalinux is double the one from no-OS (with a minor error, as 0x13A93 * 2 is 0x27526). It could be that in Petalinux the configuration between the AD9361 chip and the crystal is not ok. So you should probably start with those.

    After looking briefly at you dts/dtsi, I see you changed the addresses for the ad9361 and dds nodes. Why is that? They should correspond to the ones in the HDL project. Unless you have a custom HDL project?

    Best regards,
    Iulia

  • Hi,

    For Clock, we are using the 26MHz Osc of part number "KT2520F26000ACW18TAN" which is fixed and there is no configuration required for the XO as it runs by default from the power on. Yes, as you said, we also suspect the clock configuration only, but in the device tree i mentioned as 26MHZ as input clock. We don't know what else we need to configure in the petalinux.

    For the address, we just re-instantiated the ad9361 IP, hence there is a change in the address. The same design we tested with non os.

    Please let us know what other aspects we can debug. Also similar to the non os can we enable any debug prints in petalinux for ad9361 drivers?

  • Hi  , could you give some thoughts on the Petalinux side?

    Thanks,
    Iulia

  • HI Team,

    Please let us know any update is there ?

  • HI Team,

    Please let us know any update is there ?

  • Hi Team,

    could you please let us know the update on the query?

  • Hi,

    Could you share the devicetree you have on your system? Also if this is a custom board, how are you integrating it with petalinux? Do you have your own devicetree?

    Another thing that could make sense to test would be to manually build things and test it so that we can see if the problem is with the petalinux flow or some other root cause. Manually build instructions can be found here:

    https://wiki.analog.com/resources/tools-software/linux-build/generic/zynq

    - Nuno Sá

  • Hi,

    Thanks for the reply.

    We are working on custom board, but we tested the board with baremetal code in vitis, with that we are not getting any rx-tuning error

    I'm attaching the device tree of petalinux below.

    // SPDX-License-Identifier: GPL-2.0
    /*
     * Analog Devices AD-FMCOMMS2-EBZ/AD-FMCOMMS3-EBZ
     * https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz
     * https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms3-ebz
     *
     * hdl_project: <fmcomms2/zc706>
     * board_revision: <>
     *
     * Copyright (C) 2014-2019 Analog Devices Inc.
     */
    /dts-v1/;
    
    #include "zynq-zc706-board.dtsi"
    #include "zynq-zc706-adv7511.dtsi"
    
    
    &fpga_axi  {
    
    
    	cf_ad9361_adc_core_0: cf-ad9361-lpc@43c00000 {
    		compatible = "adi,axi-ad9361-6.00.a";
    		reg = <0x43c00000 0x6000>;
    		
    
    		spibus-connected = <&adc0_ad9361>;
    	};
    
    	cf_ad9361_dac_core_0: cf-ad9361-dds-core-lpc@43c04000 {
    		compatible = "adi,axi-ad9361-dds-6.00.a";
    		reg = <0x43c04000 0x1000>;
    		clocks = <&adc0_ad9361 13>;
    		clock-names = "sampl_clk";
    	
    	};
    
    
    };
    
    &spi0 {
    	status = "okay";
    };
    
    
    
    #define fmc_spi spi0
    
    
    #include "adi-fmcomms2.dtsi"
    
    &adc0_ad9361 {
    	en_agc-gpios = <&gpio0 98 0>;
    	sync-gpios = <&gpio0 99 0>;
    	reset-gpios = <&gpio0 100 0>; /* Previously 83 */
    	enable-gpios = <&gpio0 101 0>;
    	txnrx-gpios = <&gpio0 102 0>;
    };
    
    
    
    /include/ "system-conf.dtsi"
    #include "zynq-7000.dtsi"
    #include <dt-bindings/interrupt-controller/irq.h>
    
    / {
    	interrupt-parent = <&intc>;
    
    	aliases: aliases {
    		ethernet0 = &gem0;
    		serial0 = &uart1;
    	
    	};
    };
    
    
    
    &clkc {
    	ps-clk-frequency = <33333333>;
    };
    
    
    &uart1 {
    	status = "okay";
    };
    
    &sdhci0 {
    	status = "okay";
    };
    
    
    &sdhci1 {
    	status = "okay";
    };
    
    
    / {
    	model = "custom zynq baseband board";
    	memory {
    		device_type = "memory";
    		reg = <0x00000000 0x40000000>;
    	};
    	
    
    	chosen {
    		bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait";
    		stdout-path = "/amba@0/uart@E0001000";
    	};
    	
    	
    };
    
    
    
    &usb0 {
    	xlnx,phy-reset-gpio = <&gpio0 7 0>;
    };
    
    
    
    &gem0 {
    	status = "okay";
    
    };
    
    
    &qspi {
    	status = "okay";
    	is-dual = <1>;
    	num-cs = <1>;
    	primary_flash: ps7-qspi@0 {
    		#address-cells = <1>;
    		#size-cells = <1>;
    		spi-tx-bus-width = <1>;
    		spi-rx-bus-width = <4>;
    		compatible = "n25q128a11";
    		reg = <0x0>;
    		spi-max-frequency = <50000000>;
    		partition@0 {
    			label = "boot";
    			reg = <0x00000000 0x00500000>;
    		};
    		partition@500000 {
    			label = "bootenv";
    			reg = <0x00500000 0x00020000>;
    		};
    		partition@520000 {
    			label = "config";
    			reg = <0x00520000 0x00020000>;
    		};
    		partition@540000 {
    			label = "image";
    			reg = <0x00540000 0x00a80000>;
    		};
    		partition@fc0000 {
    			label = "spare";
    			reg = <0x00fc0000 0x00000000>;
    		};
    	};
    };
    
    
    
    
    
    
    / {
    	clocks {
    		ad9361_clkin: clock@0 {
    			compatible = "fixed-clock";
    
    			clock-frequency = <26000000>;
    			clock-output-names = "ad9361_ext_refclk";
    			#clock-cells = <0>;
    		};
    	};
    
    
    };
    
    &fmc_spi {
    	adc0_ad9361: ad9361-phy@0 {
    		compatible = "adi,ad9361";
    		reg = <0>;
    
    		/* SPI Setup */
    		spi-cpha;
    		spi-max-frequency = <10000000>;
    
    		/* Clocks */
    		clocks = <&ad9361_clkin 0>;
    		clock-names = "ad9361_ext_refclk";
    		clock-output-names = "rx_sampl_clk", "tx_sampl_clk";
    		#clock-cells = <1>;
    
    		adi,debug-mode-enable;
    		/* Digital Interface Control */
    
    		 /* adi,digital-interface-tune-skip-mode:
    		  * 0 = TUNE RX&TX
    		  * 1 = SKIP TX
    		  * 2 = SKIP ALL
    		  */
    		adi,digital-interface-tune-skip-mode = <0>;
    
    		adi,pp-tx-swap-enable;
    		adi,pp-rx-swap-enable;
    		adi,rx-frame-pulse-mode-enable;
    		adi,lvds-mode-enable;
    		adi,lvds-bias-mV = <150>;
    		adi,lvds-rx-onchip-termination-enable;
    		adi,rx-data-delay = <4>;
    		adi,tx-fb-clock-delay = <7>;
    
    		adi,dcxo-coarse-and-fine-tune = <8 5920>;
    		//adi,xo-disable-use-ext-refclk-enable;
    
    		/* Mode Setup */
    
    		adi,2rx-2tx-mode-enable;
    		//adi,split-gain-table-mode-enable;
    
    		/* ENSM Mode */
    		adi,frequency-division-duplex-mode-enable;
    		//adi,ensm-enable-pin-pulse-mode-enable;
    		//adi,ensm-enable-txnrx-control-enable;
    
    
    		/* adi,rx-rf-port-input-select:
    		 * 0 = (RX1A_N &  RX1A_P) and (RX2A_N & RX2A_P) enabled; balanced
    		 * 1 = (RX1B_N &  RX1B_P) and (RX2B_N & RX2B_P) enabled; balanced
    		 * 2 = (RX1C_N &  RX1C_P) and (RX2C_N & RX2C_P) enabled; balanced
    		 *
    		 * 3 = RX1A_N and RX2A_N enabled; unbalanced
    		 * 4 = RX1A_P and RX2A_P enabled; unbalanced
    		 * 5 = RX1B_N and RX2B_N enabled; unbalanced
    		 * 6 = RX1B_P and RX2B_P enabled; unbalanced
    		 * 7 = RX1C_N and RX2C_N enabled; unbalanced
    		 * 8 = RX1C_P and RX2C_P enabled; unbalanced
    		 */
    
    		adi,rx-rf-port-input-select = <1>; /* (RX1A_N &  RX1A_P) and (RX2A_N & RX2A_P) enabled; balanced */
    
    		/* adi,tx-rf-port-input-select:
    		 * 0	TX1A, TX2A
    		 * 1	TX1B, TX2B
    		 */
    
    		adi,tx-rf-port-input-select = <1>; /* TX1A, TX2A */
    		//adi,update-tx-gain-in-alert-enable;
    		adi,tx-attenuation-mdB = <10000>;
    		adi,tx-lo-powerdown-managed-enable;
    
    		adi,rf-rx-bandwidth-hz = <18000000>;
    		adi,rf-tx-bandwidth-hz = <18000000>;
    		adi,rx-synthesizer-frequency-hz = /bits/ 64 <2400000000>;
    		adi,tx-synthesizer-frequency-hz = /bits/ 64 <2450000000>;
    
    		/*				BBPLL     ADC        R2CLK     R1CLK    CLKRF    RSAMPL  */
    		adi,rx-path-clock-frequencies = <983040000 245760000 122880000 61440000 30720000 30720000>;
    		//adi,rx-path-clock-frequencies = <1280000003 80000000 40000000 20000000 10000000 10000000>;
    		/*				BBPLL     DAC        T2CLK     T1CLK    CLKTF    TSAMPL  */
    		adi,tx-path-clock-frequencies = <983040000 122880000 122880000 61440000 30720000 30720000>;
    		//adi,tx-path-clock-frequencies = <1280000003 80000000 40000000 20000000 10000000 10000000>;
    
    		/* Gain Control */
    		/* adi,gc-rx[1|2]-mode:
    		 * 0 = RF_GAIN_MGC
    		 * 1 = RF_GAIN_FASTATTACK_AGC
    		 * 2 = RF_GAIN_SLOWATTACK_AGC
    		 * 3 = RF_GAIN_HYBRID_AGC
    		 */
    
    		adi,gc-rx1-mode = <2>;
    		adi,gc-rx2-mode = <2>;
    		adi,gc-adc-ovr-sample-size = <4>; /* sum 4 samples */
    		adi,gc-adc-small-overload-thresh = <47>; /* sum of squares */
    		adi,gc-adc-large-overload-thresh = <58>; /* sum of squares */
    		adi,gc-lmt-overload-high-thresh = <800>; /* mV */
    		adi,gc-lmt-overload-low-thresh = <704>; /* mV */
    		adi,gc-dec-pow-measurement-duration = <8192>; /* 0..524288 Samples */
    		adi,gc-low-power-thresh = <24>; /* 0..-64 dBFS vals are set pos */
    		//adi,gc-dig-gain-enable;
    		//adi,gc-max-dig-gain = <15>;
    
    		/* Manual Gain Control Setup */
    
    		//adi,mgc-rx1-ctrl-inp-enable; /* uncomment to use ctrl inputs */
    		//adi,mgc-rx2-ctrl-inp-enable; /* uncomment to use ctrl inputs */
    		adi,mgc-inc-gain-step = <2>;
    		adi,mgc-dec-gain-step = <2>;
    
    		/* adi,mgc-split-table-ctrl-inp-gain-mode:
    		 * (relevant if adi,split-gain-table-mode-enable is set)
    		 * 0 = AGC determine this
    		 * 1 = only in LPF
    		 * 2 = only in LMT
    		 */
    
    		adi,mgc-split-table-ctrl-inp-gain-mode = <0>;
    
    		/* Automatic Gain Control Setup */
    
    		adi,agc-attack-delay-extra-margin-us= <1>; /* us */
    		adi,agc-outer-thresh-high = <5>; /* -dBFS */
    		adi,agc-outer-thresh-high-dec-steps = <2>; /* 0..15 */
    		adi,agc-inner-thresh-high = <10>; /* -dBFS */
    		adi,agc-inner-thresh-high-dec-steps = <1>; /* 0..7 */
    		adi,agc-inner-thresh-low = <12>; /* -dBFS */
    		adi,agc-inner-thresh-low-inc-steps = <1>; /* 0..7 */
    		adi,agc-outer-thresh-low = <18>; /* -dBFS */
    		adi,agc-outer-thresh-low-inc-steps = <2>; /* 0..15 */
    
    		adi,agc-adc-small-overload-exceed-counter = <10>; /* 0..15 */
    		adi,agc-adc-large-overload-exceed-counter = <10>; /* 0..15 */
    		adi,agc-adc-large-overload-inc-steps = <2>; /* 0..15 */
    		//adi,agc-adc-lmt-small-overload-prevent-gain-inc-enable;
    		adi,agc-lmt-overload-large-exceed-counter = <10>; /* 0..15 */
    		adi,agc-lmt-overload-small-exceed-counter = <10>; /* 0..15 */
    		adi,agc-lmt-overload-large-inc-steps = <2>; /* 0..7 */
    		//adi,agc-dig-saturation-exceed-counter = <3>; /* 0..15 */
    		//adi,agc-dig-gain-step-size = <4>; /* 1..8 */
    
    		//adi,agc-sync-for-gain-counter-enable;
    		adi,agc-gain-update-interval-us = <1000>;  /* 1ms */
    		//adi,agc-immed-gain-change-if-large-adc-overload-enable;
    		//adi,agc-immed-gain-change-if-large-lmt-overload-enable;
    
    		/* Fast AGC */
    
    		adi,fagc-dec-pow-measurement-duration = <64>; /* 64 Samples */
                    //adi,fagc-allow-agc-gain-increase-enable;
                    adi,fagc-lp-thresh-increment-steps = <1>;
                    adi,fagc-lp-thresh-increment-time = <5>;
    
                    adi,fagc-energy-lost-stronger-sig-gain-lock-exit-cnt = <8>;
                    adi,fagc-final-overrange-count = <3>;
                    //adi,fagc-gain-increase-after-gain-lock-enable;
                    adi,fagc-gain-index-type-after-exit-rx-mode = <0>;
                    adi,fagc-lmt-final-settling-steps = <1>;
                    adi,fagc-lock-level = <10>;
                    adi,fagc-lock-level-gain-increase-upper-limit = <5>;
                    adi,fagc-lock-level-lmt-gain-increase-enable;
    
                    adi,fagc-lpf-final-settling-steps = <1>;
                    adi,fagc-optimized-gain-offset = <5>;
                    adi,fagc-power-measurement-duration-in-state5 = <64>;
                    adi,fagc-rst-gla-engergy-lost-goto-optim-gain-enable;
                    adi,fagc-rst-gla-engergy-lost-sig-thresh-below-ll = <10>;
                    adi,fagc-rst-gla-engergy-lost-sig-thresh-exceeded-enable;
                    adi,fagc-rst-gla-if-en-agc-pulled-high-mode = <0>;
                    adi,fagc-rst-gla-large-adc-overload-enable;
                    adi,fagc-rst-gla-large-lmt-overload-enable;
                    adi,fagc-rst-gla-stronger-sig-thresh-above-ll = <10>;
                    adi,fagc-rst-gla-stronger-sig-thresh-exceeded-enable;
                    adi,fagc-state-wait-time-ns = <260>;
                    adi,fagc-use-last-lock-level-for-set-gain-enable;
    
    		/* RSSI */
    
    		/* adi,rssi-restart-mode:
    		 * 0 = AGC_IN_FAST_ATTACK_MODE_LOCKS_THE_GAIN,
    		 * 1 = EN_AGC_PIN_IS_PULLED_HIGH,
    		 * 2 = ENTERS_RX_MODE,
    		 * 3 = GAIN_CHANGE_OCCURS,
    		 * 4 = SPI_WRITE_TO_REGISTER,
    		 * 5 = GAIN_CHANGE_OCCURS_OR_EN_AGC_PIN_PULLED_HIGH,
    		 */
    		adi,rssi-restart-mode = <3>;
    		//adi,rssi-unit-is-rx-samples-enable;
    		adi,rssi-delay = <1>; /* 1us */
    		adi,rssi-wait = <1>; /* 1us */
    		adi,rssi-duration = <1000>; /* 1ms */
    
    		/* Control Outputs */
    		adi,ctrl-outs-index = <0>;
    		adi,ctrl-outs-enable-mask = <0xFF>;
    
    		/* AuxADC Control*/
    		adi,aux-adc-decimation = <256>;
    		adi,aux-adc-rate = <40000000>;
    
    		/* AuxADC Temp Sense Control */
    
    		adi,temp-sense-measurement-interval-ms = <1000>;
    		adi,temp-sense-offset-signed = <0xCE>;
    		adi,temp-sense-periodic-measurement-enable;
    
    		/* AuxDAC Control */
    
    		adi,aux-dac-manual-mode-enable;
    
    		adi,aux-dac1-default-value-mV = <0>;
    		//adi,aux-dac1-active-in-rx-enable;
    		//adi,aux-dac1-active-in-tx-enable;
    		//adi,aux-dac1-active-in-alert-enable;
    		adi,aux-dac1-rx-delay-us = <0>;
    		adi,aux-dac1-tx-delay-us = <0>;
    
    		adi,aux-dac2-default-value-mV = <0>;
    		//adi,aux-dac2-active-in-rx-enable;
    		//adi,aux-dac2-active-in-tx-enable;
    		//adi,aux-dac2-active-in-alert-enable;
    		adi,aux-dac2-rx-delay-us = <0>;
    		adi,aux-dac2-tx-delay-us = <0>;
    	};
    };
    
    

  • Hi Team,
    could you please let us know the update on the query? 

    I am attaching the debug prints of Vitis and Petalinux along with the device tree. 

    WE ARE EXPECTING SOME RESPONSE FROM YOUR TEAM.

    vitis_final_log.txtplx_final_reg.txt

    // SPDX-License-Identifier: GPL-2.0
    /*
     * Analog Devices AD-FMCOMMS2-EBZ/AD-FMCOMMS3-EBZ
     * https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz
     * https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms3-ebz
     *
     * hdl_project: <fmcomms2/zc706>
     * board_revision: <>
     *
     * Copyright (C) 2014-2019 Analog Devices Inc.
     */
    /dts-v1/;
    
    #include "zynq-zc706-board.dtsi"
    #include "zynq-zc706-adv7511.dtsi"
    
    
    &fpga_axi  {
    
    
    	cf_ad9361_adc_core_0: cf-ad9361-lpc@43c00000 {
    		compatible = "adi,axi-ad9361-6.00.a";
    		reg = <0x43c00000 0x6000>;
    		
    
    		spibus-connected = <&adc0_ad9361>;
    	};
    
    	cf_ad9361_dac_core_0: cf-ad9361-dds-core-lpc@43c04000 {
    		compatible = "adi,axi-ad9361-dds-6.00.a";
    		reg = <0x43c04000 0x1000>;
    		clocks = <&adc0_ad9361 13>;
    		clock-names = "sampl_clk";
    	
    	};
    
    
    };
    
    &spi0 {
    	status = "okay";
    };
    
    
    
    #define fmc_spi spi0
    
    
    #include "adi-fmcomms2.dtsi"
    
    &adc0_ad9361 {
    	en_agc-gpios = <&gpio0 98 0>;
    	sync-gpios = <&gpio0 99 0>;
    	reset-gpios = <&gpio0 100 0>; /* Previously 83 */
    	enable-gpios = <&gpio0 101 0>;
    	txnrx-gpios = <&gpio0 102 0>;
    };
    
    
    
    / {
    	clocks {
    		ad9361_clkin: clock@0 {
    			compatible = "fixed-clock";
    			clock-accuracy = <1>;  /* 0.5 PPM rounded to the nearest integer */
    			clock-frequency = <26000000>;
    			clock-output-names = "ad9361_ext_refclk";
    			#clock-cells = <0>;
    		};
    	};
    
    
    };
    
    &fmc_spi {
    	adc0_ad9361: ad9361-phy@0 {
    		compatible = "adi,ad9361";
    		reg = <0>;
    
    		/* SPI Setup */
    		spi-cpha;
    		spi-max-frequency = <10000000>;
    
    		/* Clocks */
    		clocks = <&ad9361_clkin 0>;
    		clock-names = "ad9361_ext_refclk";
    		clock-output-names = "rx_sampl_clk", "tx_sampl_clk";
    		#clock-cells = <1>;
    
    		adi,debug-mode-enable;
    
    		/* Mode Setup */
    
    		adi,2rx-2tx-mode-enable;
    		//adi,1rx-1tx-mode-use-rx-num;
    		//adi,1rx-1tx-mode-use-tx-num;
    		//adi,split-gain-table-mode-enable;
    
    		/* ENSM Mode */
    		adi,frequency-division-duplex-mode-enable;
    		//adi,frequency-division-duplex-independent-mode-enable;
    		//adi,tdd-use-dual-synth-mode-enable;
    		//adi,tdd-skip-vco-cal-enable;
    		//adi,tx-fastlock-delay-ns;
    		//adi,rx-fastlock-delay-ns;
    		//adi,rx-fastlock-pincontrol-enable
    		//adi,tx-fastlock-pincontrol-enable
    		//adi,external-rx-lo-enable
    		//adi,external-tx-lo-enable
    		
    		adi,dc-offset-tracking-update-event-mask = <5>;
    		adi,dc-offset-attenuation-high-range = <6>;
    		adi,dc-offset-attenuation-low-range = <5>;
    		adi,dc-offset-count-high-range = <0x28>;
    		adi,dc-offset-count-low-range = <0x32>;
    		
    		adi,trx-synthesizer-target-fref-overwrite-hz = <80008000>;
    		//adi,qec-tracking-slow-mode-enable;
    		
    		//adi,ensm-enable-pin-pulse-mode-enable;
    		//adi,ensm-enable-txnrx-control-enable;
    
    		adi,rx-synthesizer-frequency-hz = /bits/ 64 <2400000000>;
    		adi,tx-synthesizer-frequency-hz = /bits/ 64 <2400000000>;
    		
    		adi,tx-lo-powerdown-managed-enable;
    		
    		/*				BBPLL     ADC        R2CLK     R1CLK    CLKRF    RSAMPL  */
    		adi,rx-path-clock-frequencies = <983040000 245760000 122880000 61440000 30720000 30720000>;
    		
    		/*				BBPLL     DAC        T2CLK     T1CLK    CLKTF    TSAMPL  */
    		adi,tx-path-clock-frequencies = <983040000 122880000 122880000 61440000 30720000 30720000>;
    		
    		adi,rf-rx-bandwidth-hz = <18000000>;
    		adi,rf-tx-bandwidth-hz = <18000000>;
    
    		/* adi,rx-rf-port-input-select:
    		 * 0 = (RX1A_N &  RX1A_P) and (RX2A_N & RX2A_P) enabled; balanced
    		 * 1 = (RX1B_N &  RX1B_P) and (RX2B_N & RX2B_P) enabled; balanced
    		 * 2 = (RX1C_N &  RX1C_P) and (RX2C_N & RX2C_P) enabled; balanced
    		 *
    		 * 3 = RX1A_N and RX2A_N enabled; unbalanced
    		 * 4 = RX1A_P and RX2A_P enabled; unbalanced
    		 * 5 = RX1B_N and RX2B_N enabled; unbalanced
    		 * 6 = RX1B_P and RX2B_P enabled; unbalanced
    		 * 7 = RX1C_N and RX2C_N enabled; unbalanced
    		 * 8 = RX1C_P and RX2C_P enabled; unbalanced
    		 */
    
    		adi,rx-rf-port-input-select = <1>; /* (RX1A_N &  RX1A_P) and (RX2A_N & RX2A_P) enabled; balanced */
    
    		/* adi,tx-rf-port-input-select:
    		 * 0	TX1A, TX2A
    		 * 1	TX1B, TX2B
    		 */
    
    		adi,tx-rf-port-input-select = <1>; /* TX1A, TX2A */
    		adi,tx-attenuation-mdB = <10000>;
    		//adi,update-tx-gain-in-alert-enable;
    
    		adi,xo-disable-use-ext-refclk-enable;
    		adi,dcxo-coarse-and-fine-tune = <8 5920>;
    		
    		adi,clk-output-mode-select = <0>;
    
    		/* Gain Control */
    		/* adi,gc-rx[1|2]-mode:
    		 * 0 = RF_GAIN_MGC
    		 * 1 = RF_GAIN_FASTATTACK_AGC
    		 * 2 = RF_GAIN_SLOWATTACK_AGC
    		 * 3 = RF_GAIN_HYBRID_AGC
    		 */
    
    		adi,gc-rx1-mode = <2>;
    		adi,gc-rx2-mode = <2>;
    		adi,gc-adc-large-overload-thresh = <58>; /* sum of squares */
    		adi,gc-adc-ovr-sample-size = <4>; /* sum 4 samples */
    		adi,gc-adc-small-overload-thresh = <47>; /* sum of squares */
    		adi,gc-dec-pow-measurement-duration = <8192>; /* 0..524288 Samples */
    		//adi,gc-dig-gain-enable;
    		adi,gc-lmt-overload-high-thresh = <800>; /* mV */
    		adi,gc-lmt-overload-low-thresh = <704>; /* mV */
    		adi,gc-low-power-thresh = <24>; /* 0..-64 dBFS vals are set pos */
    		adi,gc-max-dig-gain = <15>;
    		
    		//adi,gc-use-rx-fir-out-for-dec-pwr-meas-enable;
    
    		/* Manual Gain Control Setup */
    		adi,mgc-inc-gain-step = <2>;
    		adi,mgc-dec-gain-step = <2>;
    		//adi,mgc-rx1-ctrl-inp-enable; /* uncomment to use ctrl inputs */
    		//adi,mgc-rx2-ctrl-inp-enable; /* uncomment to use ctrl inputs */
    		
    
    		/* adi,mgc-split-table-ctrl-inp-gain-mode:
    		 * (relevant if adi,split-gain-table-mode-enable is set)
    		 * 0 = AGC determine this
    		 * 1 = only in LPF
    		 * 2 = only in LMT
    		 */
    
    		adi,mgc-split-table-ctrl-inp-gain-mode = <0>;
    
    		/* Automatic Gain Control Setup */
    
    		adi,agc-adc-large-overload-exceed-counter = <10>; /* 0..15 */
    		adi,agc-adc-large-overload-inc-steps = <2>; /* 0..15 */
    		//adi,agc-adc-lmt-small-overload-prevent-gain-inc-enable;
    		adi,agc-adc-small-overload-exceed-counter = <10>; /* 0..15 */
    		adi,agc-dig-gain-step-size = <4>; /* 1..8 */
    		adi,agc-dig-saturation-exceed-counter = <3>; /* 0..15 */
    		adi,agc-gain-update-interval-us = <1000>;  /* 1ms */
    		//adi,agc-immed-gain-change-if-large-adc-overload-enable;
    		//adi,agc-immed-gain-change-if-large-lmt-overload-enable;
    		
    		adi,agc-inner-thresh-high = <10>; /* -dBFS */
    		adi,agc-inner-thresh-high-dec-steps = <1>; /* 0..7 */
    		adi,agc-inner-thresh-low = <12>; /* -dBFS */
    		adi,agc-inner-thresh-low-inc-steps = <1>; /* 0..7 */
    		adi,agc-lmt-overload-large-exceed-counter = <10>; /* 0..15 */
    		adi,agc-lmt-overload-large-inc-steps = <2>; /* 0..7 */
    		adi,agc-lmt-overload-small-exceed-counter = <10>; /* 0..15 */
    		adi,agc-outer-thresh-high = <5>; /* -dBFS */
    		adi,agc-outer-thresh-high-dec-steps = <2>; /* 0..15 */
    		adi,agc-outer-thresh-low = <18>; /* -dBFS */
    		adi,agc-outer-thresh-low-inc-steps = <2>; /* 0..15 */
    		adi,agc-attack-delay-extra-margin-us= <1>; /* us */
    	
    		/* Fast AGC */
    
    		adi,fagc-dec-pow-measurement-duration = <64>; /* 64 Samples */
    		adi,fagc-state-wait-time-ns = <260>;
    		
    		//adi,fagc-allow-agc-gain-increase-enable;
    		adi,fagc-lp-thresh-increment-time = <5>;
    		adi,fagc-lp-thresh-increment-steps = <1>;
                    
    		adi,fagc-lock-level-lmt-gain-increase-enable;
    		adi,fagc-lock-level-gain-increase-upper-limit = <5>;
    
    		adi,fagc-lpf-final-settling-steps = <1>;
    		adi,fagc-lmt-final-settling-steps = <1>;
    		adi,fagc-final-overrange-count = <3>;
    		//adi,fagc-gain-increase-after-gain-lock-enable;
    		adi,fagc-gain-index-type-after-exit-rx-mode = <0>;
    		adi,fagc-use-last-lock-level-for-set-gain-enable;
    		adi,fagc-rst-gla-stronger-sig-thresh-exceeded-enable;
    		adi,fagc-optimized-gain-offset = <5>;
    		adi,fagc-rst-gla-stronger-sig-thresh-above-ll = <10>;
    		adi,fagc-rst-gla-engergy-lost-sig-thresh-exceeded-enable;
    		adi,fagc-rst-gla-engergy-lost-goto-optim-gain-enable;
    		adi,fagc-rst-gla-engergy-lost-sig-thresh-below-ll = <10>;
    		adi,fagc-energy-lost-stronger-sig-gain-lock-exit-cnt = <8>;
            adi,fagc-rst-gla-large-adc-overload-enable;        
            adi,fagc-rst-gla-large-lmt-overload-enable;
    		//adi,fagc-rst-gla-en-agc-pulled-high-enable;        
    		adi,fagc-rst-gla-if-en-agc-pulled-high-mode = <0>;
    		
    		adi,fagc-power-measurement-duration-in-state5 = <64>;
    		adi,fagc-adc-large-overload-inc-steps = <2>;
    		
    		/* RSSI */
    		adi,rssi-delay = <1>; /* 1us */
    		/* adi,rssi-restart-mode:
    		 * 0 = AGC_IN_FAST_ATTACK_MODE_LOCKS_THE_GAIN,
    		 * 1 = EN_AGC_PIN_IS_PULLED_HIGH,
    		 * 2 = ENTERS_RX_MODE,
    		 * 3 = GAIN_CHANGE_OCCURS,
    		 * 4 = SPI_WRITE_TO_REGISTER,
    		 * 5 = GAIN_CHANGE_OCCURS_OR_EN_AGC_PIN_PULLED_HIGH,
    		 */
    		adi,rssi-restart-mode = <3>;
    		adi,rssi-duration = <1000>; /* 1ms */
    		//adi,rssi-unit-is-rx-samples-enable;
    		adi,rssi-wait = <1>; /* 1us */
    		
    		/* AuxADC Control*/
    		adi,aux-adc-decimation = <256>;
    		adi,aux-adc-rate = <40000000>;
    		
    		/* AuxDAC Control */
    		adi,aux-dac-manual-mode-enable;
    
    		adi,aux-dac1-default-value-mV = <0>;
    		//adi,aux-dac1-active-in-rx-enable;
    		//adi,aux-dac1-active-in-tx-enable;
    		//adi,aux-dac1-active-in-alert-enable;
    		adi,aux-dac1-rx-delay-us = <0>;
    		adi,aux-dac1-tx-delay-us = <0>;
    
    		adi,aux-dac2-default-value-mV = <0>;
    		//adi,aux-dac2-active-in-rx-enable;
    		//adi,aux-dac2-active-in-tx-enable;
    		//adi,aux-dac2-active-in-alert-enable;
    		adi,aux-dac2-rx-delay-us = <0>;
    		adi,aux-dac2-tx-delay-us = <0>;
    		
    		/* AuxADC Temp Sense Control */
    		adi,temp-sense-decimation = <256>;
    		adi,temp-sense-measurement-interval-ms = <1000>;
    		adi,temp-sense-offset-signed = <0xCE>;
    		adi,temp-sense-periodic-measurement-enable;
    		
    		/* Control Outputs */
    		adi,ctrl-outs-enable-mask = <0xFF>;
    		adi,ctrl-outs-index = <0>;
    		
    		/* External LNA Control */
    		adi,elna-settling-delay-ns = <0>;
    		adi,elna-gain-mdB = <0>;
    		adi,elna-bypass-loss-mdB = <0>;
    		//adi,elna-rx1-gpo0-control-enable
    		//adi,elna-rx2-gpo1-control-enable
    		//adi,elna-gaintable-all-index-enable
    		
    		
    		/* Digital Interface Control */
    
    		 /* adi,digital-interface-tune-skip-mode:
    		  * 0 = TUNE RX&TX
    		  * 1 = SKIP TX
    		  * 2 = SKIP ALL
    		  */
    		adi,digital-interface-tune-skip-mode = <0>;
    		//adi,digital-interface-tune-fir-disable;
    
    		adi,pp-tx-swap-enable;
    		adi,pp-rx-swap-enable;
    		//adi,tx-channel-swap-enable;
    		//adi,rx-channel-swap-enable;
    		adi,rx-frame-pulse-mode-enable;
    		//adi,2t2r-timing-enable;
    		//adi,invert-data-bus-enable;
    		//adi,invert-data-clk-enable;
    		//adi,fdd-alt-word-order-enable;
    		//adi,invert-rx-frame-enable;
    		//adi,fdd-rx-rate-2tx-enable;
    		//adi,swap-ports-enable;
    		//adi,single-data-rate-enable;
    		
    		adi,lvds-mode-enable;
    		//adi,half-duplex-mode-enable;
    		//adi,single-port-mode-enable
    		//adi,full-port-enable
    		//adi,full-duplex-swap-bits-enable
    		adi,delay-rx-data = <0>;
    		adi,rx-data-clock-delay = <0>;
    		adi,rx-data-delay = <4>;
    		adi,tx-fb-clock-delay = <7>;
    		adi,tx-data-delay = <0>;
    		adi,lvds-bias-mV = <150>;
    		adi,lvds-rx-onchip-termination-enable;
    		//adi,rx1-rx2-phase-inversion-enable;
    		adi,lvds-invert1-control = <0xFF>;
    		adi,lvds-invert2-control = <0x0F>;
    		
    		
    		/* GPO Control */
    		//adi,gpo-manual-mode-enable;
    		//adi,gpo-manual-mode-enable-mask;
    		//adi,gpo0-inactive-state-high-enable;
    		//adi,gpo1-inactive-state-high-enable;
    		//adi,gpo2-inactive-state-high-enable;
    		//adi,gpo3-inactive-state-high-enable;
    		//adi,gpo0-slave-rx-enable;
    		//adi,gpo0-slave-tx-enable;
    		//adi,gpo1-slave-rx-enable;
    		//adi,gpo1-slave-tx-enable;
    		//adi,gpo2-slave-rx-enable;
    		//adi,gpo2-slave-tx-enable;
    		//adi,gpo3-slave-rx-enable;
    		//adi,gpo3-slave-tx-enable;
    		adi,gpo0-rx-delay-us = <0>;
    		adi,gpo0-tx-delay-us = <0>;
    		adi,gpo1-rx-delay-us = <0>;
    		adi,gpo1-tx-delay-us = <0>;
    		adi,gpo2-rx-delay-us = <0>;
    		adi,gpo2-tx-delay-us = <0>;
    		adi,gpo3-rx-delay-us = <0>;
    		adi,gpo3-tx-delay-us = <0>;
    			
    		/* Tx Monitor Control */
    		adi,txmon-low-high-thresh = <37000>;
    		adi,txmon-low-gain = <0>;
    		adi,txmon-high-gain = <24>;
    		//adi,txmon-dc-tracking-enable;
    		//adi,txmon-one-shot-mode-enable;
    		adi,txmon-delay = <511>;
    		adi,txmon-duration = <8192>;
    		adi,txmon-1-front-end-gain = <2>;
    		adi,txmon-2-front-end-gain = <2>;
    		adi,txmon-1-lo-cm = <48>;
    		adi,txmon-2-lo-cm = <48>;
    	
    	};
    };