-
Notifications
You must be signed in to change notification settings - Fork 894
Wip/bl/ad3552r v1 #2525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wip/bl/ad3552r v1 #2525
Changes from all commits
baa6f78
6a31296
bd4521e
43b8526
3b8383b
d8974ad
abd41ec
40099a0
1b1a492
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,10 @@ Description: | |
multiple predefined symbols. Each symbol corresponds to a different | ||
output, denoted as out_voltageY_rawN, where N is the integer value | ||
of the symbol. Writing an integer value N will select out_voltageY_rawN. | ||
|
||
What: /sys/bus/iio/devices/iio:deviceX/out_voltage_synchronous_mode | ||
KernelVersion: 6.13 | ||
Contact: [email protected] | ||
Description: | ||
This attribute allows a specific synchronization mode, mainly | ||
intended for DACs where multiple synchronization methods are available. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,15 @@ properties: | |
clocks: | ||
maxItems: 1 | ||
|
||
bus-type: | ||
dlech marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Jonathan always suggests to add a default value for when the property is not present. So we should add that. Otherwise, I think maintainers will say the same as Nuno that this should be a boolean property since it only has one value. I guess There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the code there is no handling for the parallel bus, so not totally sure adding "parallel" here now is appropriate. What about, as i initially did, to add AXI_DAC_BUS_TYPE_NONE as 0 ? And setting default 0 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the point of view of the device tree that is describing the wiring, there is always going to be some kind of bus that is connected to the DAC chip, so I don't think "none" makes sense to put in the device tree. I suggested "parallel" as the default since the one already existing user of the AXI DAC (ad9739a) uses a parallel bus connection. |
||
maxItems: 1 | ||
description: | | ||
Configure bus type: | ||
- 0: none | ||
- 1: qspi | ||
enum: [0, 1] | ||
default: 0 | ||
|
||
'#io-backend-cells': | ||
const: 0 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* Analog Devices AXI-AD3551R | ||
* | ||
* hdl_project: <ad3552r_fmc/zed> | ||
* board_revision: <> | ||
* | ||
* Copyright (C) 2024 Analog Devices Inc. | ||
*/ | ||
/dts-v1/; | ||
|
||
#include "zynq-zed.dts" | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
#include <dt-bindings/gpio/gpio.h> | ||
|
||
/ { | ||
clocks { | ||
ext_clk: clock@0 { | ||
#clock-cells = <0>; | ||
compatible = "fixed-clock"; | ||
clock-frequency = <100000000>; | ||
}; | ||
}; | ||
}; | ||
|
||
&amba { | ||
|
||
ref_clk: clk@44B00000 { | ||
compatible = "adi,axi-clkgen-2.00.a"; | ||
reg = <0x44B00000 0x10000>; | ||
#clock-cells = <0>; | ||
clocks = <&clkc 15>, <&clkc 15>; | ||
clock-names = "s_axi_aclk", "clkin1"; | ||
clock-output-names = "ref_clk"; | ||
}; | ||
|
||
dac_tx_dma: dma-controller@0x44a30000 { | ||
compatible = "adi,axi-dmac-1.00.a"; | ||
reg = <0x44a30000 0x10000>; | ||
#dma-cells = <1>; | ||
interrupt-parent = <&intc>; | ||
interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>; | ||
clocks = <&clkc 15>; | ||
|
||
adi,channels { | ||
#size-cells = <0>; | ||
#address-cells = <1>; | ||
|
||
dma-channel@0 { | ||
reg = <0>; | ||
adi,source-bus-width = <32>; | ||
adi,source-bus-type = <0>; | ||
adi,destination-bus-width = <32>; | ||
adi,destination-bus-type = <1>; | ||
}; | ||
}; | ||
}; | ||
|
||
backend: controller@44a70000 { | ||
compatible = "adi,axi-dac-9.1.b"; | ||
reg = <0x44a70000 0x1000>; | ||
dmas = <&dac_tx_dma 0>; | ||
dma-names = "tx"; | ||
#io-backend-cells = <0>; | ||
clocks = <&ref_clk>; | ||
bus-type = <1>; /* IIO QSPI */ | ||
}; | ||
|
||
axi-ad3552r { | ||
compatible = "adi,ad3552r"; | ||
reset-gpios = <&gpio0 92 GPIO_ACTIVE_LOW>; | ||
io-backends = <&backend>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
channel@0 { | ||
reg = <0>; | ||
adi,output-range-microvolt = <(-10000000) (10000000)>; | ||
}; | ||
}; | ||
}; |
Uh oh!
There was an error while loading. Please reload this page.