Hello,
I have the ADRV9004 on a custom board with a Xilinx K26 module. Our custom board has already been confirmed to work using bare metal software and now we are moving into integrating the linux driver. I'm on HDL and kernel branch 2022R2. When I boot linux the ADRV9002 driver finds some of the devices but doesn't find rx2 or either of the tdd cores. Here is the relevant section of the device tree:
/ {
clocks {
adrv9002_clkin: clock@0 {
compatible = "fixed-clock";
clock-frequency = <38400000>;
clock-output-names = "adrv9002_ext_refclk";
#clock-cells = <0>;
};
};
};
&spi0 {
status = "okay";
//generic device for debug
//spidev@0{
// compatible = "rohm,dh2228fv";
// reg = <0>;
// spi-max-frequency = <20000000>;
// };
adc0_adrv9002: adrv9002-phy@0 {
compatible = "adi,adrv9002";
reg = <0>;
interrupt-parent = <&gpio>;
interrupts = <122 IRQ_TYPE_EDGE_RISING>;
spi-max-frequency = <20000000>;
/* Clocks */
clocks = <&adrv9002_clkin 0>;
clock-names = "adrv9002_ext_refclk";
clock-output-names = "rx1_sampl_clk", "tx1_sampl_clk", "tdd1_intf_clk",
"rx2_sampl_clk", "tx2_sampl_clk", "tdd2_intf_clk";
#clock-cells = <1>;
reset-gpios = <&gpio 78 GPIO_ACTIVE_LOW>;
adi,channels {
#address-cells = <1>;
#size-cells = <0>;
rx@0 {
reg = <0>;
adi,port = <0>;
// adi,agc = <&agc0>;
// adi,pinctrl = <&rx_pinctrl0>;
};
//
rx@1 {
reg = <1>;
adi,port = <0>;
// adi,agc = <&agc0>;
// adi,pinctrl = <&rx_pinctrl1>;
};
//
tx@0 {
reg = <0>;
adi,port = <1>;
// adi,pinctrl = <&tx_pinctrl0>;
};
//
tx@1 {
reg = <1>;
adi,port = <1>;
// adi,pinctrl = <&tx_pinctrl1>;
};
//
};
};
};
//&axi_adrv9001 {
&amba_pl {
/delete-node/ axi_adrv9001@80000000;
axi_adrv9002_core_rx1: axi-adrv9002-rx-lpc@80000000 {
compatible = "adi,axi-adrv9002-rx-1.0";
reg = <0x00 0x80000000 0x00 0x6000>;
clocks = <&adc0_adrv9002 0>;
//dmas = <&rx1_dma 0>;
//dma-names = "rx";
spibus-connected = <&adc0_adrv9002>;
};
axi_adrv9002_core_tx1: axi-adrv9002-tx-lpc@8000a000 {
compatible = "adi,axi-adrv9002-tx-1.0";
reg = <0x00 0x8000a000 0x00 0x2000>;
clocks = <&adc0_adrv9002 1>;
clock-names = "sampl_clk";
//dmas = <&tx1_dma 0>;
//dma-names = "tx";
adi,axi-dds-default-scale = <0x800>;
adi,axi-dds-default-frequency = <2000000>;
};
axi_adrv9002_core_tdd1: axi-adrv9002-core-tdd1-lpc@8000c800 {
compatible = "adi,axi-tdd-1.00";
reg = <0x00 0x8000c800 0x00 0x400>;
clocks = <&zynqmp_clk 71>, <&adc0_adrv9002 2>;
clock-names = "s_axi_aclk", "intf_clk";
label = "axi-core-tdd-1";
};
axi_adrv9002_core_rx2: axi-adrv9002-rx2-lpc@80009000 {
compatible = "adi,axi-adrv9002-rx2-1.0";
reg = <0x00 0x80009000 0x00 0x1000>;
clocks = <&adc0_adrv9002 3>;
clock-names = "sampl_clk";
//dmas = <&rx2_dma 0>;
//dma-names = "rx";
};
axi_adrv9002_core_tx2: axi-adrv9002-tx2-lpc@8000c000 {
compatible = "adi,axi-adrv9002-tx-1.0";
reg = <0x00 0x8000c000 0x00 0x2000>;
clocks = <&adc0_adrv9002 4>;
clock-names = "sampl_clk";
//dmas = <&tx2_dma 0>;
//dma-names = "tx";
adi,axi-dds-default-scale = <0x800>;
adi,axi-dds-default-frequency = <2000000>;
};
axi_adrv9002_core_tdd2: axi-adrv9002-core-tdd2-lpc@8000cc00 {
compatible = "adi,axi-tdd-1.00";
reg = <0x00 0x8000cc00 0x00 0x400>;
clocks = <&zynqmp_clk 71>, <&adc0_adrv9002 5>;
clock-names = "s_axi_aclk", "intf_clk";
label = "axi-core-tdd-2";
};
};
Here are the kernel boot messages:
[ 16.007848] adrv9002 spi1.0: adrv9002-phy Rev 12.0, Firmware 0.22.27, Stream 0.7.10.0, API version: 68.10.1 successfully initialized
[ 16.021136] cf_axi_adc 80000000.axi-adrv9002-rx-lpc: ADI AIM (10.03.) at 0x80000000 mapped to 0x0000000046fc8c01 probed ADC ADRV9002 as MASTER
[ 16.053356] cf_axi_dds 80002000.axi-adrv9002-tx-lpc: Analog Devices CF_AXI_DDS_DDS MASTER (9.01.b) at 0x80002000 mapped to 0x0000000094b3491e, probed DDS ADRV9002
[ 16.089363] cf_axi_dds 80004000.axi-adrv9002-tx2-lpc: Analog Devices CF_AXI_DDS_DDS MASTER (9.01.b) at 0x80004000 mapped to 0x0000000093552b98, probed DDS ADRV9002
And here is the output of iio_info | grep iio:device
iio:device0: ams
iio:device1: adrv9002-phy
[ 37.895473] adrv9002 spi1.0: Frequency hopping not enabled
[ 37.901134] adrv9002 spi1.0: Frequency hopping not enabled
[ 37.916363] adrv9002 spi1.0: [ERROR]: Error number 3 (0x00000003), Recovery action -2.In file drivers/iio/adc/navassa/devices/adrv9001/public/src/adi_adrv9001_fh.c, in function adi_adrv9001_fh_HopTable_Inspect_Validate, in line 412, variable name devStateInfo->frequencyHoppingEnabled.Error message Frequency hopping not enabled in device profile.
[ 37.947131] adrv9002 spi1.0: [ERROR]: Error number 3 (0x00000003), Recovery action -2.In file drivers/iio/adc/navassa/devices/adrv9001/public/src/adi_adrv9001_fh.c, in function adi_adrv9001_fh_HopTable_Inspect, in line 864, variable name NULL.Error message Frequency hopping not enabled in device profile.
[ 37.974243] adrv9002 spi1.0: adrv9002_hop_table_dump_show, 974: failed with "Frequency hopping not enabled in device profile" (3)
[ 37.985988] adrv9002 spi1.0: [ERROR]: Error number 3 (0x00000003), Recovery action -2.In file drivers/iio/adc/navassa/devices/adrv9001/public/src/adi_adrv9001_fh.c, in function adi_adrv9001_fh_HopTable_Inspect_Validate, in line 412, variable name devStateInfo->frequencyHoppingEnabled.Error message Frequency hopping not enabled in device profile.
[ 38.016748] adrv9002 spi1.0: [ERROR]: Error number 3 (0x00000003), Recovery action -2.In file drivers/iio/adc/navassa/devices/adrv9001/public/src/adi_adrv9001_fh.c, in function adi_adrv9001_fh_HopTable_Inspect, in line 864, variable name NULL.Error message Frequency hopping not enabled in device profile.
[ 38.043851] adrv9002 spi1.0: adrv9002_hop_table_dump_show, 974: failed with "Frequency hopping not enabled in device profile" (3)
[ 38.055628] adrv9002 spi1.0: [ERROR]: Error number 3 (0x00000003), Recovery action -2.In file drivers/iio/adc/navassa/devices/adrv9001/public/src/adi_adrv9001_fh.c, in function adi_adrv9001_fh_HopTable_Inspect_Validate, in line 412, variable name devStateInfo->frequencyHoppingEnabled.Error message Frequency hopping not enabled in device profile.
[ 38.086388] adrv9002 spi1.0: [ERROR]: Error number 3 (0x00000003), Recovery action -2.In file drivers/iio/adc/navassa/devices/adrv9001/public/src/adi_adrv9001_fh.c, in function adi_adrv9001_fh_HopTable_Inspect, in line 864, variable name NULL.Error message Frequency hopping not enabled in device profile.
[ 38.113493] adrv9002 spi1.0: adrv9002_hop_table_dump_show, 974: failed with "Frequency hopping not enabled in device profile" (3)
[ 38.125181] adrv9002 spi1.0: [ERROR]: Error number 3 (0x00000003), Recovery action -2.In file drivers/iio/adc/navassa/devices/adrv9001/public/src/adi_adrv9001_fh.c, in function adi_adrv9001_fh_HopTable_Inspect_Validate, in line 412, variable name devStateInfo->frequencyHoppingEnabled.Error message Frequency hopping not enabled in device profile.
[ 38.155942] adrv9002 spi1.0: [ERROR]: Error number 3 (0x00000003), Recovery action -2.In file drivers/iio/adc/navassa/devices/adrv9001/public/src/adi_adrv9001_fh.c, in function adi_adrv9001_fh_HopTable_Inspect, in line 864, variable name NULL.Error message Frequency hopping not enabled in device profile.
[ 38.183043] adrv9002 spi1.0: adrv9002_hop_table_dump_show, 974: failed with "Frequency hopping not enabled in device profile" (3)
iio:device2: axi-adrv9002-rx-lpc
iio:device3: axi-adrv9002-tx-lpc
iio:device4: axi-adrv9002-tx2-lpc
It is important to note that I have verified that I can access all base and TDD register locations using devmem and get the expected responses. It seems like the hdl core is alive and everything is where it should be but the kernel module doesn't want to probe everything.
Thanks
Matt