Skip to content

Commit

Permalink
zynq dtsi
Browse files Browse the repository at this point in the history
cherry-picked from ADI tree
  • Loading branch information
dlech committed Jan 8, 2024
1 parent 31a2cfc commit a6e9902
Show file tree
Hide file tree
Showing 3 changed files with 344 additions and 0 deletions.
247 changes: 247 additions & 0 deletions arch/arm/boot/dts/xilinx/zynq-zed-adv7511.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
/ {
fpga_axi: fpga-axi@0 {
compatible = "simple-bus";
#address-cells = <0x1>;
#size-cells = <0x1>;
ranges;

i2c@41600000 {
compatible = "xlnx,axi-iic-1.01.b", "xlnx,xps-iic-2.00.a";
reg = <0x41600000 0x10000>;
interrupt-parent = <&intc>;
interrupts = <0 58 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clkc 15>;
clock-names = "pclk";

#size-cells = <0>;
#address-cells = <1>;

adv7511: adv7511@39 {
compatible = "adi,adv7511";
reg = <0x39>, <0x3f>;
reg-names = "primary", "edid";

adi,input-depth = <8>;
adi,input-colorspace = "yuv422";
adi,input-clock = "1x";
adi,input-style = <1>;
adi,input-justification = "right";
adi,clock-delay = <0>;

#sound-dai-cells = <1>;

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
adv7511_in: endpoint {
remote-endpoint = <&axi_hdmi_out>;
};
};

port@1 {
reg = <1>;
};
};
};

adau1761: adau1761@3b {
compatible = "adi,adau1761";
reg = <0x3b>;

clocks = <&audio_clock>;
clock-names = "mclk";

#sound-dai-cells = <0>;
};
};

i2c@41620000 {
compatible = "xlnx,axi-iic-1.01.b", "xlnx,xps-iic-2.00.a";
reg = <0x41620000 0x10000>;
interrupt-parent = <&intc>;
interrupts = <0 55 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clkc 15>;
clock-names = "pclk";

#size-cells = <0>;
#address-cells = <1>;

eeprom1: eeprom@50 {
compatible = "at24,24c02";
reg = <0x50>;
};

};

hdmi_dma: dma@43000000 {
compatible = "adi,axi-dmac-1.00.a";
reg = <0x43000000 0x1000>;
#dma-cells = <1>;
interrupts = <0 59 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clkc 16>;

adi,channels {
#size-cells = <0>;
#address-cells = <1>;

dma-channel@0 {
reg = <0>;
adi,source-bus-width = <64>;
adi,source-bus-type = <0>;
adi,destination-bus-width = <64>;
adi,destination-bus-type = <1>;
};
};
};

hdmi_clock: axi-clkgen@79000000 {
compatible = "adi,axi-clkgen-2.00.a";
reg = <0x79000000 0x10000>;
#clock-cells = <0>;
clocks = <&clkc 15>, <&clkc 16>;
clock-names = "s_axi_aclk", "clkin1";
};

axi_hdmi@70e00000 {
compatible = "adi,axi-hdmi-tx-1.00.a";
reg = <0x70e00000 0x10000>;
dmas = <&hdmi_dma 0>;
dma-names = "video";
clocks = <&hdmi_clock>;

port {
axi_hdmi_out: endpoint {
remote-endpoint = <&adv7511_in>;
};
};
};

axi_spdif_tx_0: axi-spdif-tx@75c00000 {
compatible = "adi,axi-spdif-tx-1.00.a";
reg = <0x75c00000 0x1000>;
dmas = <&dmac_s 0>;
dma-names = "tx";
clocks = <&clkc 15>, <&audio_clock>;
clock-names = "axi", "ref";

#sound-dai-cells = <0>;
};

axi_i2s_0: axi-i2s@77600000 {
compatible = "adi,axi-i2s-1.00.a";
reg = <0x77600000 0x1000>;
dmas = <&dmac_s 1 &dmac_s 2>;
dma-names = "tx", "rx";
clocks = <&clkc 15>, <&audio_clock>;
clock-names = "axi", "ref";

#sound-dai-cells = <0>;
};

axi_sysid_0: axi-sysid-0@45000000 {
compatible = "adi,axi-sysid-1.00.a";
reg = <0x45000000 0x10000>;
};
};

audio_clock: audio_clock {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <12288000>;
};

adv7511_hdmi_snd {
compatible = "simple-audio-card";
simple-audio-card,name = "HDMI monitor";
simple-audio-card,widgets =
"Speaker", "Speaker";
simple-audio-card,routing =
"Speaker", "TX";

simple-audio-card,dai-link@0 {
format = "spdif";
cpu {
sound-dai = <&axi_spdif_tx_0>;
};
codec {
sound-dai = <&adv7511 1>;
};
};
};

zed_sound {
compatible = "simple-audio-card";
simple-audio-card,name = "ZED ADAU1761";
simple-audio-card,widgets =
"Microphone", "Mic In",
"Headphone", "Headphone Out",
"Line", "Line In",
"Line", "Line Out";
simple-audio-card,routing =
"Line Out", "LOUT",
"Line Out", "ROUT",
"Headphone Out", "LHP",
"Headphone Out", "RHP",
"Mic In", "MICBIAS",
"LINN", "Mic In",
"RINN", "Mic In",
"LAUX", "Line In",
"RAUX", "Line In";

simple-audio-card,dai-link@0 {
format = "i2s";
cpu {
sound-dai = <&axi_i2s_0>;
};
codec {
sound-dai = <&adau1761>;
};
};
};

leds {
compatible = "gpio-leds";
ld0 {
label = "ld0:red";
gpios = <&gpio0 73 0>;
};

ld1 {
label = "ld1:red";
gpios = <&gpio0 74 0>;
};

ld2 {
label = "ld2:red";
gpios = <&gpio0 75 0>;
};

ld3 {
label = "ld3:red";
gpios = <&gpio0 76 0>;
};

ld4 {
label = "ld4:red";
gpios = <&gpio0 77 0>;
};

ld5 {
label = "ld5:red";
gpios = <&gpio0 78 0>;
};

ld6 {
label = "ld6:red";
gpios = <&gpio0 79 0>;
};

ld7 {
label = "ld7:red";
gpios = <&gpio0 80 0>;
};
};
};
65 changes: 65 additions & 0 deletions arch/arm/boot/dts/xilinx/zynq-zed.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#include "zynq.dtsi"

#include <dt-bindings/interrupt-controller/irq.h>

/ {
model = "Xilinx Zynq ZED";
memory {
device_type = "memory";
reg = <0x000000000 0x20000000>;
};

chosen {
// bootargs = "console=ttyPS0,115200 root=/dev/ram rw initrd=0x1100000,33M ip=:::::eth0:dhcp earlyprintk";
bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait";
stdout-path = "/amba@0/uart@E0001000";
};
};

&gem0 {
phy-handle = <&phy0>;
phy-mode = "rgmii-id";

phy0: phy@0 {
device_type = "ethernet-phy";
reg = <0x0>;
marvell,reg-init=<3 16 0xff00 0x1e 3 17 0xfff0 0x0a>;
};
};

&usb0 {
xlnx,phy-reset-gpio = <&gpio0 85 0>;
};

&qspi {
status = "okay";
is-dual = <0>;
num-cs = <1>;
primary_flash: ps7-qspi@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "n25q128a11";
reg = <0x0>;
spi-max-frequency = <50000000>;
partition@0 {
label = "boot";
reg = <0x00000000 0x00500000>;
};
partition@500000 {
label = "bootenv";
reg = <0x00500000 0x00020000>;
};
partition@520000 {
label = "config";
reg = <0x00520000 0x00020000>;
};
partition@540000 {
label = "image";
reg = <0x00540000 0x00a80000>;
};
partition@fc0000 {
label = "spare";
reg = <0x00fc0000 0x00000000>;
};
};
};
32 changes: 32 additions & 0 deletions arch/arm/boot/dts/xilinx/zynq.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

#include "zynq-7000.dtsi"

/ {
interrupt-parent = <&intc>;

aliases: aliases {
ethernet0 = &gem0;
serial0 = &uart1;
};
};

&gem0 {
status = "okay";
};

&clkc {
ps-clk-frequency = <33333333>;
};

&usb0 {
status = "okay";
dr_mode = "host"; /* This breaks OTG mode */
};

&uart1 {
status = "okay";
};

&sdhci0 {
status = "okay";
};

0 comments on commit a6e9902

Please sign in to comment.