Skip to content

Commit 043e4e5

Browse files
spectrum70jic23
authored andcommitted
dt-bindings: iio: dac: adi-axi-dac: add ad3552r axi variant
Add a new compatible and related bindigns for the fpga-based "ad3552r" AXI IP core, a variant of the generic AXI DAC IP. The AXI "ad3552r" IP is a very similar HDL (fpga) variant of the generic AXI "DAC" IP, intended to control ad3552r and similar chips, mainly to reach high speed transfer rates using a QSPI DDR (dobule-data-rate) interface. The ad3552r device is defined as a child of the AXI DAC, that in this case is acting as an SPI controller. Note, #io-backend is present because it is possible (in theory anyway) to use a separate controller for the control path than that used for the datapath. Signed-off-by: Angelo Dureghello <adureghello@baylibre.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241028-wip-bl-ad3552r-axi-v0-iio-testing-v9-2-f6960b4f9719@kernel-space.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 7683092 commit 043e4e5

File tree

1 file changed

+66
-3
lines changed

1 file changed

+66
-3
lines changed

Documentation/devicetree/bindings/iio/dac/adi,axi-dac.yaml

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ description: |
1919
memory via DMA into the DAC.
2020
2121
https://wiki.analog.com/resources/fpga/docs/axi_dac_ip
22+
https://analogdevicesinc.github.io/hdl/library/axi_ad3552r/index.html
2223
2324
properties:
2425
compatible:
2526
enum:
2627
- adi,axi-dac-9.1.b
28+
- adi,axi-ad3552r
2729

2830
reg:
2931
maxItems: 1
@@ -36,7 +38,14 @@ properties:
3638
- const: tx
3739

3840
clocks:
39-
maxItems: 1
41+
minItems: 1
42+
maxItems: 2
43+
44+
clock-names:
45+
items:
46+
- const: s_axi_aclk
47+
- const: dac_clk
48+
minItems: 1
4049

4150
'#io-backend-cells':
4251
const: 0
@@ -47,7 +56,29 @@ required:
4756
- reg
4857
- clocks
4958

50-
additionalProperties: false
59+
allOf:
60+
- if:
61+
properties:
62+
compatible:
63+
contains:
64+
const: adi,axi-ad3552r
65+
then:
66+
$ref: /schemas/spi/spi-controller.yaml#
67+
properties:
68+
clocks:
69+
minItems: 2
70+
clock-names:
71+
minItems: 2
72+
required:
73+
- clock-names
74+
else:
75+
properties:
76+
clocks:
77+
maxItems: 1
78+
clock-names:
79+
maxItems: 1
80+
81+
unevaluatedProperties: false
5182

5283
examples:
5384
- |
@@ -57,6 +88,38 @@ examples:
5788
dmas = <&tx_dma 0>;
5889
dma-names = "tx";
5990
#io-backend-cells = <0>;
60-
clocks = <&axi_clk>;
91+
clocks = <&clkc 15>;
92+
clock-names = "s_axi_aclk";
93+
};
94+
95+
- |
96+
#include <dt-bindings/gpio/gpio.h>
97+
axi_dac: spi@44a70000 {
98+
compatible = "adi,axi-ad3552r";
99+
reg = <0x44a70000 0x1000>;
100+
dmas = <&dac_tx_dma 0>;
101+
dma-names = "tx";
102+
#io-backend-cells = <0>;
103+
clocks = <&clkc 15>, <&ref_clk>;
104+
clock-names = "s_axi_aclk", "dac_clk";
105+
106+
#address-cells = <1>;
107+
#size-cells = <0>;
108+
109+
dac@0 {
110+
compatible = "adi,ad3552r";
111+
reg = <0>;
112+
reset-gpios = <&gpio0 92 GPIO_ACTIVE_HIGH>;
113+
io-backends = <&axi_dac>;
114+
spi-max-frequency = <20000000>;
115+
116+
#address-cells = <1>;
117+
#size-cells = <0>;
118+
119+
channel@0 {
120+
reg = <0>;
121+
adi,output-range-microvolt = <(-10000000) (10000000)>;
122+
};
123+
};
61124
};
62125
...

0 commit comments

Comments
 (0)