Skip to content

Commit

Permalink
iio: frequency: cf_axi_dds: Add support for dual ADRV9009 setup
Browse files Browse the repository at this point in the history
Signed-off-by: Dragos Bogdan <[email protected]>
  • Loading branch information
dbogdan authored and commodo committed Jun 11, 2019
1 parent 46154df commit b1df362
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/xilinx/zynqmp-adrv9009-zu11eg.dts
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@
};

axi_adrv9009_core_tx: axi-adrv9009-tx-hpc@84a04000 {
compatible = "adi,axi-adrv9009-tx-1.0";
compatible = "adi,axi-adrv9009-x2-tx-1.0";
reg = <0x0 0x84a04000 0x4000>;
dmas = <&tx_dma 0>;
dma-names = "tx";
Expand Down
10 changes: 10 additions & 0 deletions drivers/iio/frequency/cf_axi_dds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,13 @@ static const struct axidds_core_info ad9371_6_00_a_info = {
.chip_info = &cf_axi_dds_chip_info_ad9371,
};

static const struct axidds_core_info adrv9009_x2_9_00_a_info = {
.version = PCORE_VERSION(9, 0, 'a'),
.standalone = true,
.rate = 3,
.chip_info = &cf_axi_dds_chip_info_adrv9009_x2,
};

static const struct axidds_core_info ad9162_1_00_a_info = {
.version = PCORE_VERSION(9, 0, 'a'),
.rate = 1,
Expand Down Expand Up @@ -1449,6 +1456,9 @@ static const struct of_device_id cf_axi_dds_of_match[] = {
}, {
.compatible = "adi,axi-adrv9009-tx-1.0",
.data = &ad9371_6_00_a_info,
}, {
.compatible = "adi,axi-adrv9009-x2-tx-1.0",
.data = &adrv9009_x2_9_00_a_info,
}, {
.compatible = "adi,axi-ad9162-1.0",
.data = &ad9162_1_00_a_info,
Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/frequency/cf_axi_dds.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ struct cf_axi_dds_chip_info {
unsigned int num_buf_channels;
unsigned num_shadow_slave_channels;
const unsigned long *scan_masks;
struct iio_chan_spec channel[18];
struct iio_chan_spec channel[24];
};

struct cf_axi_dds_state {
Expand Down

0 comments on commit b1df362

Please sign in to comment.