ZYNQ UltraScale 设备树
/include/ "system-conf.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/pinctrl-zynqmp.h>
#include <dt-bindings/phy/phy.h>
/ {
chosen {
bootargs = "earlycon console=ttyPS0,115200 maxcpus=1 clk_ignore_unused ";
};//uio_pdrv_genirq.of_id=generic-uio
// maxcpus=1 单核启动
// uio_pdrv_genirq.of_id=generic-uio 使用UIO
leds {
compatible = "gpio-leds";
heartbeat_led {
label = "heartbeat";
gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
linux,default-trigger = "heartbeat";
};
};
memory {
device_type = "memory";
//reg = <0x0 0x0 0x0 0x80000000>, <0x00000008 0x00000000 0x0 0x80000000>;
reg = <0x0 0x0 0x0 0x70000000>, <0x00000008 0x00000000 0x0 0x70000000>;
};
//Baremetal +Linux 分别运行于cpu0 cpu1 DDR空间不能重复
/*************************
amba_pl: amba_pl@0 {
#address-cells = <2>;
#size-cells = <2>;
compatible = "simple-bus";
ranges;
irq: irq@0{
compatible = "hello,irq";
interrupt-parent = <&gic>;
interrupts = <0 91 4>;
};
//PL-PS之间的中断
axi_dma_0: dma@a0001000 {
dma-channel@a0001000 {
//compatible = "xlnx,axi-dma-mm2s-channel";
xlnx,device-id = <0x0>;
};
dma-channel@a0001030 {
//compatible = "xlnx,axi-dma-s2mm-channel";
xlnx,device-id = <0x1>;
};
};
//DMA配置
uio@0{
compatible="generic-uio";
status="okay";
interrupt-controller;
interrupt-parent=<&gic>;
interrupts=<0x0 91 0x4>;
};
uio@1{
compatible="generic-uio";
status="okay";
interrupt-controller;
interrupt-parent=<&gic>;
interrupts=<0x0 90 0x4>;
};
uio@2{
compatible="generic-uio";
status="okay";
interrupt-controller;
interrupt-parent=<&gic>;
interrupts=<0x0 89 0x4>;
};
};
******************/
/****************************
axidma_chrdev: axidma_chrdev@0 {
compatible = "xlnx,axidma-chrdev";
dmas = <&axi_dma_0 0 &axi_dma_0 1>;
dma-names = "tx_channel", "rx_channel";
};
//生成axidma字符设备
axidmatest_1: axidmatest@1 {
compatible ="xlnx,axi-dma-test-1.00.a";
dmas = <&axi_dma_0 0
&axi_dma_0 1>;
dma-names = "axidma0", "axidma1";
};
****************************/
};
&gem0{
//local-mac-address = [00 40 85 44 00 E0];
status = "okay";
phy-handle = <&phy3>;
mdio {
#address-cells = <0x1>;
#size-cells = <0x0>;
phy3: phy@3 {
compatible = "marvell,88e1111";
device_type = "ethernet-phy";
reg = <0x3>;
//linux,phandle = <0x4>;
//phandle = <0x4>;
};
phy4: phy@4 {
compatible = "marvell,88e1111";
device_type = "ethernet-phy";
//max-speed = <100>;
reg = <4>;
};
phy2: phy@2 {
compatible = "marvell,88e1111";
device_type = "ethernet-phy";
//max-speed = <100>;
reg = <2>;
};
phy1: phy@1 {
compatible = "marvell,88e1111";
device_type = "ethernet-phy";
max-speed = <100>;
reg = <1>;
};
};
};
&gem1{
//local-mac-address = [00 40 85 44 00 E0];
status = "okay";
phy-handle = <&phy4>;
//phy-mode = "sgmii";
//pinctrl-names = "default";
};
&gem2{
//local-mac-address = [00 40 85 44 00 E0];
status = "okay";
Phy-handle = <&phy2>;
phy-mode = "rgmii";
pinctrl-names = "default";
};
&gem3{
//local-mac-address = [00 40 85 44 00 E0];
status = "okay";
phy-handle = <&phy1>;
phy-mode = "rgmii";
pinctrl-names = "default";
};
&i2c0 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
m24c64@50 {
compatible = "eeprom";//atmel,24c64";
reg = <0x50>;
};
};
&i2c1 {
status = "okay";
address-cells = <1>;
#size-cells = <0>;
m24c64@51 {
compatible = "atmel,24c64";
reg = <0x51>;
};
};