Commit cf4d65ee authored by Rene Habraken's avatar Rene Habraken
Browse files

debugging patches

parent cb99d314
......@@ -285,14 +285,4 @@ CONFIG_YOCTO_NETWORK_SSTATE_FEEDS_URL="http://petalinux.xilinx.com/sswreleases/r
CONFIG_USER_LAYER_0="/home/rene/Data/FPGA_workdir/adi/hdl/meta-adi/meta-adi-core"
CONFIG_USER_LAYER_1="/home/rene/Data/FPGA_workdir/adi/hdl/meta-adi/meta-adi-xilinx"
CONFIG_USER_LAYER_2=""
CONFIG_SUBSYSTEM_BOOTARGS_GENERATED="earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/nfs nfsroot=192.168.10.1:/srv/nfs,tcp ip=192.168.10.2:192.168.10.1 rw"
......@@ -186,7 +186,7 @@ CONFIG_SUBSYSTEM_MACHINE_NAME="template"
#
CONFIG_SUBSYSTEM_BOOTARGS_AUTO=y
CONFIG_SUBSYSTEM_BOOTARGS_EARLYPRINTK=y
CONFIG_SUBSYSTEM_BOOTARGS_GENERATED="earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/nfs nfsroot=192.168.10.1:/srv/nfs,tcp ip=192.168.10.2:192.168.10.1 rw"
CONFIG_SUBSYSTEM_DEVICETREE_FLAGS=""
# CONFIG_SUBSYSTEM_DTB_OVERLAY is not set
# CONFIG_SUBSYSTEM_REMOVE_PL_DTB is not set
......@@ -285,4 +285,3 @@ CONFIG_YOCTO_NETWORK_SSTATE_FEEDS_URL="http://petalinux.xilinx.com/sswreleases/r
CONFIG_USER_LAYER_0="/home/rene/Data/FPGA_workdir/adi/hdl/meta-adi/meta-adi-core"
CONFIG_USER_LAYER_1="/home/rene/Data/FPGA_workdir/adi/hdl/meta-adi/meta-adi-xilinx"
CONFIG_USER_LAYER_2=""
CONFIG_SUBSYSTEM_BOOTARGS_GENERATED="earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/nfs nfsroot=192.168.10.1:/srv/nfs,tcp ip=192.168.10.2:192.168.10.1 rw"
From c7bfd78b32dc47b9cd97521cd191b97d8c85d9e3 Mon Sep 17 00:00:00 2001
From: rhabraken <r.habraken@science.ru.nl>
Date: Thu, 16 Jul 2020 23:51:52 +0200
Subject: [PATCH] 2conv, 2lanes
Signed-off-by: rhabraken <r.habraken@science.ru.nl>
---
drivers/iio/adc/ad9680.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad9680.c b/drivers/iio/adc/ad9680.c
index 23b903798307..83a62a86d5b4 100644
--- a/drivers/iio/adc/ad9680.c
+++ b/drivers/iio/adc/ad9680.c
@@ -1185,16 +1185,18 @@ static int ad9694_setup(struct spi_device *spi)
ret |= ad9680_spi_write(spi, 0x008, 0x03); /* select both channels */
ret |= ad9680_spi_write(spi, 0x108, 0x00); /* Clock divider = 1 */
+
+ ret |= ad9680_spi_write(spi, 0x201, 0x00); // full sample rate (decimation = 1)
memset(&link_config, sizeof(link_config), 0x00);
link_config.did = 0;
link_config.bid = 0;
- link_config.num_lanes = 4;
+ link_config.num_lanes = 2;
for (i = 0; i < link_config.num_lanes; i++) {
link_config.lid[i] = i;
link_config.lane_mux[i] = i;
}
- link_config.num_converters = 4;
+ link_config.num_converters = 2;
link_config.octets_per_frame = 2;
link_config.frames_per_multiframe = 32;
link_config.converter_resolution = 14;
--
2.17.1
From afce176542622e51b5f4b21a0c45fd3ced182de6 Mon Sep 17 00:00:00 2001
From: rhabraken <r.habraken@science.ru.nl>
Date: Thu, 16 Jul 2020 21:32:45 +0200
Subject: [PATCH] changed AD9694_CHAN def
Signed-off-by: rhabraken <r.habraken@science.ru.nl>
---
drivers/iio/adc/ad9680.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad9680.c b/drivers/iio/adc/ad9680.c
index 9cebd6d7bdf9..1e2e086e4320 100644
--- a/drivers/iio/adc/ad9680.c
+++ b/drivers/iio/adc/ad9680.c
@@ -606,8 +606,8 @@ static const struct iio_event_spec ad9680_events[] = {
.scan_index = _chan, \
.scan_type = { \
.sign = 'S', \
- .realbits = 8, \
- .storagebits = 8, \
+ .realbits = 14, \
+ .storagebits = 16, \
.shift = 0, \
}, \
.event_spec = ad9680_events, \
--
2.17.1
From dc8226a5384cb388731da646f5df71d85fa3ff3d Mon Sep 17 00:00:00 2001
From: rhabraken <r.habraken@science.ru.nl>
Date: Tue, 14 Jul 2020 21:42:49 +0200
Subject: [PATCH] changed lane parameters
Signed-off-by: rhabraken <r.habraken@science.ru.nl>
---
drivers/iio/adc/ad9680.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/adc/ad9680.c b/drivers/iio/adc/ad9680.c
index 7190ad2f7936..663b9ce54e62 100644
--- a/drivers/iio/adc/ad9680.c
+++ b/drivers/iio/adc/ad9680.c
@@ -1182,16 +1182,16 @@ static int ad9694_setup(struct spi_device *spi)
memset(&link_config, sizeof(link_config), 0x00);
link_config.did = 0;
link_config.bid = 0;
- link_config.num_lanes = 2;
+ link_config.num_lanes = 4;
for (i = 0; i < link_config.num_lanes; i++) {
link_config.lid[i] = i;
link_config.lane_mux[i] = i;
}
- link_config.num_converters = 2;
- link_config.octets_per_frame = 1;
+ link_config.num_converters = 4;
+ link_config.octets_per_frame = 2;
link_config.frames_per_multiframe = 32;
- link_config.converter_resolution = 8;
- link_config.bits_per_sample = 8;
+ link_config.converter_resolution = 16;
+ link_config.bits_per_sample = 16;
link_config.scrambling = true;
if (conv->sysref_clk) {
--
2.17.1
From 1c019b8bd4b70e1c0afdc886c568a11b11d641ef Mon Sep 17 00:00:00 2001
From: rhabraken <r.habraken@science.ru.nl>
Date: Thu, 16 Jul 2020 22:32:29 +0200
Subject: [PATCH] conv_res14b
Signed-off-by: rhabraken <r.habraken@science.ru.nl>
---
drivers/iio/adc/ad9680.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad9680.c b/drivers/iio/adc/ad9680.c
index 1e2e086e4320..23b903798307 100644
--- a/drivers/iio/adc/ad9680.c
+++ b/drivers/iio/adc/ad9680.c
@@ -1115,7 +1115,12 @@ static int ad9694_setup_jesd204_link(struct axiadc_converter *conv,
sysref_rate = DIV_ROUND_CLOSEST(sample_rate, 128);
else
sysref_rate = DIV_ROUND_CLOSEST(sample_rate, 32);
- lane_rate_kHz = DIV_ROUND_CLOSEST(sample_rate, 100);
+ lane_rate_kHz = DIV_ROUND_CLOSEST(sample_rate, 100);
+ dev_err(&conv->spi->dev, "RH: Lane rate %lu Mbps is",
+ lane_rate_kHz / 1000);
+ dev_err(&conv->spi->dev, "RH: sysref rate %lu Mbps is",
+ sysref_rate);
+
if (lane_rate_kHz < 1687500 || lane_rate_kHz > 15000000) {
dev_err(&conv->spi->dev, "Lane rate %lu Mbps out of bounds. Must be between 1687.5 and 15000 Mbps",
@@ -1192,7 +1197,7 @@ static int ad9694_setup(struct spi_device *spi)
link_config.num_converters = 4;
link_config.octets_per_frame = 2;
link_config.frames_per_multiframe = 32;
- link_config.converter_resolution = 16;
+ link_config.converter_resolution = 14;
link_config.bits_per_sample = 16;
link_config.scrambling = true;
--
2.17.1
From 0117ce0f19f2b421316023367e6d416679dcb694 Mon Sep 17 00:00:00 2001
From: rhabraken <r.habraken@science.ru.nl>
Date: Tue, 14 Jul 2020 23:03:04 +0200
Subject: [PATCH] increased converters
Signed-off-by: rhabraken <r.habraken@science.ru.nl>
---
drivers/iio/adc/ad9680.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad9680.c b/drivers/iio/adc/ad9680.c
index 7190ad2f7936..c1e5b4f3eebd 100644
--- a/drivers/iio/adc/ad9680.c
+++ b/drivers/iio/adc/ad9680.c
@@ -1182,12 +1182,12 @@ static int ad9694_setup(struct spi_device *spi)
memset(&link_config, sizeof(link_config), 0x00);
link_config.did = 0;
link_config.bid = 0;
- link_config.num_lanes = 2;
+ link_config.num_lanes = 4;
for (i = 0; i < link_config.num_lanes; i++) {
link_config.lid[i] = i;
link_config.lane_mux[i] = i;
}
- link_config.num_converters = 2;
+ link_config.num_converters = 4;
link_config.octets_per_frame = 1;
link_config.frames_per_multiframe = 32;
link_config.converter_resolution = 8;
--
2.17.1
From 4ea692cc8be4d95d1381dd20974cf5053253a309 Mon Sep 17 00:00:00 2001
From: rhabraken <r.habraken@science.ru.nl>
Date: Thu, 16 Jul 2020 09:23:47 +0200
Subject: [PATCH] resolution16b
Signed-off-by: rhabraken <r.habraken@science.ru.nl>
---
drivers/iio/adc/ad9680.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/adc/ad9680.c b/drivers/iio/adc/ad9680.c
index 31ed3c88b11f..9cebd6d7bdf9 100644
--- a/drivers/iio/adc/ad9680.c
+++ b/drivers/iio/adc/ad9680.c
@@ -1190,10 +1190,10 @@ static int ad9694_setup(struct spi_device *spi)
link_config.lane_mux[i] = i;
}
link_config.num_converters = 4;
- link_config.octets_per_frame = 1;
+ link_config.octets_per_frame = 2;
link_config.frames_per_multiframe = 32;
- link_config.converter_resolution = 8;
- link_config.bits_per_sample = 8;
+ link_config.converter_resolution = 16;
+ link_config.bits_per_sample = 16;
link_config.scrambling = true;
if (conv->sysref_clk) {
--
2.17.1
......@@ -3,7 +3,12 @@ SRC_URI += "file://user_2020-07-07-12-40-00.cfg \
"
SRC_URI_append += " \
file://0001-debug-ad9680.patch \
file://0001-debug-txcvr.patch \
file://0001-changed-lane-parameters.patch \
file://0001-changed-AD9694_CHAN-def.patch \
file://0001-conv_res14b.patch \
file://0001-2conv-2lanes.patch \
"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
......
......@@ -228,7 +228,7 @@
<0>,
<27000000>, /* out 0 */
<300000000>,
<250000000>, /*500 MHz */
<250000000>, /*250 MHz */
<1000000000>;
out@1 {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment