ZedBoard / AD-FMCOMMS2-EBZ SPI speed limit at 40MHz?


As a part of ad9361 integration efforts we are testing the reference ZedBoard / AD-FMCOMMS2-EBZ platform.

The default SPI speed of the ad9361 device on this platform is 10MHz. While this works fine, for various reasons we need to use faster SPI transfers.

As AD9361 Reference Manual UG-570 states that

The maximum SPI_CLK frequency is 50 MHz.

we tried to raise SPI speed to 50MHz to verify such claim.

To our great surprise the highest SPI speed that seems to works reliably is 40MHz: above that limit the driver is unable even to create valid sysfs entries.

SPI speed modification method

  1. Binary patch to the devicetree.dtb.
    Find the offset of amba/spi@e0006000/ad9361-phy@0/spi-max-frequency attribute in the devicetree.dtb
    and modify it as a hexadecimal number by a binary editor.

  2. Check that the value is modified correctly by dtc -I dtb devicetree.dtb.
    For example, for 42MHz the deciphered device tree looks like 

        spi-max-frequency = < 0x280de80 >;

    where 0x280de80 = 42000000.

  3. Boot the ZedBoard, mount /dev/mmcblk0p1 as /mnt to and replace the default file /mnt/devicetree.dtb with modified version.

  4. Reboot the ZedBoard and check that amba/spi@e0006000/ad9361-phy@0/spi-max-frequency
    entry in /proc/device-tree really has a new value.

ZedBoard kernel

Linux version 4.6.0-gca4cf2a (jenkins@romlx1) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29) )
#21 SMP PREEMPT Mon Nov 21 14:17:49 GMT 2016

Could you please explain why the SPI frequencies above 40MHz do not work?

Do we need to change anything in ad9361 SPI configuration for 40+ MHz frequencies to work?

Does ad9361 really support 50MHz SPI transfers?

Thank you in advance,