ADRV9001 B0 silicon no longer supported in 2019_R2 kernel

Hello

I am busy building a ZCU102 Petalinux project for the ADRV9002 evaluation board. I have the B0 revision of the silicon. The HDL is the ADI reference project for the ADRV9002 evaluation board on the ZCU102.

During boot up, I am getting the following error:

[ 12.803551] adrv9002 spi1.0: [ERROR]: Error number 3 (0x00000003), Recovery action -101.In file drivers/iio/adc/navassa/devices/adrv9001/public/src/adi_adrv9001_arm.c, in function adi_adrv9001_arm_StartStatus_Check, in line 189, variable name device.Error message Timed out waiting for ARM bootup to happen.
[ 12.830848] adrv9002 spi1.0: adrv9002_digital_init, 2219: failed with "Timed out waiting for ARM bootup to happen" (3)
[ 19.292025] adrv9002 spi1.0: [ERROR]: Error number 3 (0x00000003), Recovery action -101.In file drivers/iio/adc/navassa/devices/adrv9001/public/src/adi_adrv9001_arm.c, in function adi_adrv9001_arm_StartStatus_Check, in line 189, variable name device.Error message Timed out waiting for ARM bootup to happen.
[ 19.319318] adrv9002 spi1.0: adrv9002_digital_init, 2219: failed with "Timed out waiting for ARM bootup to happen" (3)
[ 19.330043] cf_axi_adc: probe of 84a00000.axi-adrv9002-rx-lpc failed with error -14

I have found in other forum posts that this is related to the B0 silicon and needing to enable the following kernel configuration option:

CONFIG_ADRV9001_B0_HW-REV

However, I can no longer find this kernel configuration option in the latest 2019_R2:

https://github.com/analogdevicesinc/linux/blob/2019_R2/drivers/iio/adc/Kconfig#L352

Has it been removed? Is there a specific version of 2019_R2 branch that still included support for setting this kernel configuration option?

Thank you.

  • I have found another forum post that included the specific git version of 2019_R2 that still includes support for B0 silicon. I checked out that version and now the booting gets past that stage.

    However, now it fails with another error:

    [ 14.869076] adrv9002 spi1.0: adrv9002-phy Rev 11.0, Firmware 0.13.7.3, Stream 0.7.1.0, API version: 45.0.5 successfully initialized
    [ 14.942765] adrv9002 spi1.0: Error registering clock=0, err=-17
    [ 14.948701] cf_axi_adc: probe of 84a00000.axi-adrv9002-rx-lpc failed with error -17

    Any advice would be great.

    Thank you.

  • Some information that might be useful:

    I am using the ADI device tree files for the ADRV9002 on the ZCU102 as-is. I have made no changes to these device tree files.

    The specific git version that I checked out to include support for B0 silicon was:

    46ba2c7cfe92f94158f833fc16448e8412d59fe1

  • I have added some printouts to the ADRV9002 device driver around the clock registering and this is what I get:

    [ 6.324103] adrv9002 clock: clock name spi1.0-rx1_sampl_clk
    [ 6.329677] adrv9002 devm_clk_register
    [ 6.333661] adrv9002 adrv9002_clk_register complete
    [ 6.338536] adrv9002 clock: clock name spi1.0-tx1_sampl_clk
    [ 6.344099] adrv9002 devm_clk_register
    [ 6.348006] adrv9002 adrv9002_clk_register complete
    [ 6.352876] adrv9002 clock: clock name spi1.0-tdd1_intf_clk
    [ 6.358439] adrv9002 devm_clk_register
    [ 6.362345] adrv9002 adrv9002_clk_register complete
    [ 6.367220] adrv9002 clock: clock name spi1.0-rx2_sampl_clk
    [ 6.372789] adrv9002 devm_clk_register
    [ 6.376696] adrv9002 adrv9002_clk_register complete
    [ 6.381567] adrv9002 clock: clock name spi1.0-tx2_sampl_clk
    [ 6.387128] adrv9002 devm_clk_register
    [ 6.391038] adrv9002 adrv9002_clk_register complete
    [ 6.395907] adrv9002 clock: clock name spi1.0-tdd2_intf_clk
    [ 6.401469] adrv9002 devm_clk_register
    [ 6.405377] adrv9002 adrv9002_clk_register complete
    [ 15.063017] adrv9002 spi1.0: adrv9002-phy Rev 11.0, Firmware 0.13.7.3, Stream 0.7.1.0, API version: 45.0.5 successfully initialized
    [ 15.075559] adrv9002 adrv9002_post_setup complete
    [ 15.142512] adrv9002 clock: clock name spi1.0-rx1_sampl_clk
    [ 15.148082] adrv9002 devm_clk_register
    [ 15.151838] adrv9002 spi1.0: Error registering clock=0, err=-17

    As you can see, it registers all the clocks at the start. But then it tries to register the clocks again after completing the adrv9002_post_setup. Why would this be happening?

    There is only one ADRV9002 device in the device tree.

  • Further investigation has revealed that during the first attempt at initialising the ADRV9002, it falls over in the axiadc_configure_ring_stream function when it calls iio_dmaengine_buffer_alloc. It then tries to initialise the ADRV9002 again and then it fails early at the clock registering stage because the clocks were already registered during the previous attempt.

    I am going to try and work out why iio_dmaengine_buffer_alloc is failing but any advice in terms of what is going wrong would be greatly appreciated!

    Thank you.

  • It is failing at dma_request_chan() in iio_dmaengine_buffer_alloc. 

    My project is simply including the ADI device tree for the ADRV9002 on the ZCU102 so I would be surprised if there is something related to the DMAs that are not being configured correctly.