Skip to content

Commit

Permalink
arch: arm: dts: de10_nano: Add support for ad57xx.
Browse files Browse the repository at this point in the history
Add devicetree for ad57xx on de10nano.

Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
  • Loading branch information
ahaslam2 committed Oct 15, 2024
1 parent 024d9ad commit 6ebc008
Showing 1 changed file with 124 additions and 0 deletions.
124 changes: 124 additions & 0 deletions arch/arm/boot/dts/socfpga_cyclone5_de10_nano_ad57xx.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Analog Devices AD5791
* https://www.analog.com/en/products/ad5791.html
* https://wiki.analog.com/resources/tools-software/linux-build/generic/socfpga
*
* hdl_project: <ad57xx_ardz/de10nano>
* board_revision: <B>
*
* Copyright (C) 2024 Analog Devices Inc.
*/
/dts-v1/;
#include "socfpga_cyclone5_de10_nano.dtsi"
#include <dt-bindings/dma/axi-dmac.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>

/ {
dac_vdd: regulator-vdd {
compatible = "regulator-fixed";
regulator-name = "fixed-supply";
regulator-min-microvolt = <4096000>;
regulator-max-microvolt = <4096000>;
regulator-always-on;
};

dac_vss: regulator-vss {
compatible = "regulator-fixed";
regulator-name = "fixed-supply";
regulator-min-microvolt = <4096000>;
regulator-max-microvolt = <4096000>;
regulator-always-on;
};

};

&fpga_axi {

ref_clk: ref_clk {
#clock-cells = <0x0>;
compatible = "fixed-clock";
clock-frequency = <50000000>;
clock-output-names = "reference_clock";
};

adc_trigger: pwm@0x00050000 {
compatible = "adi,axi-pwmgen";
reg = <0x00050000 0x1000>;
#pwm-cells = <2>;
clocks = <&spi_clk 0>;
};

tx_dma: tx-dma@0x00030000 {
compatible = "adi,axi-dmac-1.00.a";
reg = <0x00030000 0x00000800>;
#dma-cells = <1>;
interrupt-parent = <&intc>;
interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&spi_clk 0>;
adi,channels {
#size-cells = <0>;
#address-cells = <1>;

dma-channel@0 {
reg = <0>;
adi,source-bus-width = <128>;
adi,source-bus-type = <AXI_DMAC_BUS_TYPE_AXI_MM>;
adi,destination-bus-width = <32>;
adi,destination-bus-type = <AXI_DMAC_BUS_TYPE_AXI_STREAM>;
};
};
};

spi_clk: clock-controller@0x00060000 {
compatible = "altr,c5-fpll";
reg = <0x00060000 0x00000100>;
#clock-cells = <0x1>;

#address-cells = <1>;
#size-cells = <0>;
clocks = <&ref_clk>;
assigned-clocks = <&spi_clk 0>;
assigned-clock-rates = <185000000>;
clock-output-names = "outclk0";
adi,fractional-carry-bit = <32>;

spi_c0: channel@0 {
reg = <0>;
adi,extended-name = "SPI_CLOCK";
};
};

spi@0x00040000 {
compatible = "adi-ex,axi-spi-engine-1.00.a";
reg = <0x00040000 0x00010000>;
interrupt-parent = <&intc>;
interrupts = <0 45 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&sys_clk>, <&spi_clk 0>;
clock-names = "s_axi_aclk", "spi_clk";
#address-cells = <0x1>;
#size-cells = <0x0>;

ad57xx_1: dac@0 {
compatible = "adi,ad5791";
spi-cpha;
reg = <0>;
spi-max-frequency = <35000000>;
vss-supply = <&dac_vss>;
vdd-supply = <&dac_vdd>;
reset-gpios = <&gpio_bd 16 GPIO_ACTIVE_LOW>;
clear-gpios = <&gpio_bd 17 GPIO_ACTIVE_LOW>;
ldac-gpios = <&gpio_bd 18 GPIO_ACTIVE_HIGH>;

clocks = <&spi_clk 0>;
clock-names = "ref_clk";

dmas = <&tx_dma 0>;
dma-names = "tx";
pwms = <&adc_trigger 0 0>;
pwm-names = "cnv";

};
};
};

0 comments on commit 6ebc008

Please sign in to comment.