diff --git a/spif-driver/README.md b/spif-driver/README.md index ff6345f..9f723f1 100644 --- a/spif-driver/README.md +++ b/spif-driver/README.md @@ -14,7 +14,7 @@ The driver has been tested on two different FPGA platforms: Compilation ----------- -`spif-driver` has been compiled with `Petalinux 2019.2`. +`spif-driver` has been compiled with `Petalinux 2019.2`. File `system-user.dtsi` was used to build the device tree during compilation for the Trenz Electronic TE0715-04-15 board (ZYNQ 7000). Equivalent updates to the device tree are required for other platforms. The following node must be added to the device tree: @@ -22,18 +22,16 @@ The following node must be added to the device tree: / { spif { compatible = "uom,spif"; + apb = <&APB_M_0>; memory-region = <&spif_reserved>; dma0 = <&axi_dma_0 0>; - apb = <&APB_M_0>; }; }; ``` -The `dma0` resource corresponds to the first event-processing pipe. An additional `dma` resource must be included for every additional pipe. +The `dma0` resource corresponds to the first event-processing pipe. A `dma` resource must be included for every additional pipe. -The driver expects to find 4 KB (per event-processing pipe) of reserved memory for its use. The reserved memory is platform-dependent. The following single-pipe device tree nodes have been used: - -- Trenz Electronic TE0715-04-15 board (ZYNQ 7000). +The driver expects to find 4 KB (per event-processing pipe) of reserved memory for its use. The reserved memory is platform-dependent. The following single-pipe device tree node is used for this purpose: ``` / { @@ -42,33 +40,32 @@ The driver expects to find 4 KB (per event-processing pipe) of reserved memory f #size-cells = <1>; ranges; - spif_reserved: reserved: buffer@3ffff000 { - no-map; - reg = <0x3ffff000 0x1000>; + spif_reserved: reserved: buffer@3fffc000 { + compatible = "shared-dma-pool"; + reusable; + reg = <0x3fffc000 0x4000>; + linux,dma-default; }; }; }; ``` -- Xilinx ZCU102 development board (ZYNQ Ultrascale+) +The memory size must be adjusted for the number of event-processing pipes. -``` -/ { - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - spif_reserved: buffer@7fef5000 { - no-map; - reg = <0x0 0x7fef5000 0x0 0x1000>; - }; +Finally, support to drive the Ethernet RJ45 connector LEDs requires the following addtion: + +
+&gem0 {
+ status = "okay";
+ ethernet_phy0: ethernet-phy@0 {
+ compatible = "marvell,88e1510";
+ device_type = "ethernet-phy";
+ reg = <0>;
+ marvell,reg-init = <3 16 0xff00 0x12 3 17 0xfff0 0x5>;
};
};
-```
-
-The memory size must be adjusted for the number of event-processing pipes.
-
+
Installation
------------
diff --git a/spif-driver/system-user.dtsi b/spif-driver/system-user.dtsi
new file mode 100644
index 0000000..c8ee05d
--- /dev/null
+++ b/spif-driver/system-user.dtsi
@@ -0,0 +1,106 @@
+/include/ "system-conf.dtsi"
+/ {
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ spif_reserved: reserved: buffer@3fffc000 {
+ compatible = "shared-dma-pool";
+ reusable;
+ reg = <0x3fffc000 0x4000>;
+ linux,dma-default;
+ };
+ };
+
+ spif {
+ compatible = "uom,spif";
+ apb = <&APB_M_0>;
+ memory-region = <&spif_reserved>;
+ dma0 = <&axi_dma_0 0>;
+ dma1 = <&axi_dma_1 0>;
+ };
+};
+
+/ {
+ amba_pl: amba_pl {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "simple-bus";
+ ranges ;
+
+ APB_M_0: APB_M_0@43c20000 {
+ reg = <0x43c20000 0x10000>;
+ };
+ };
+};
+
+/ {
+ chosen {
+ xlnx,eeprom = &eeprom;
+ };
+};
+
+/* default */
+
+/* QSPI PHY */
+&qspi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+ flash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0x0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+};
+
+
+
+/* ETH PHY */
+&gem0 {
+
+ status = "okay";
+ ethernet_phy0: ethernet-phy@0 {
+ compatible = "marvell,88e1510";
+ device_type = "ethernet-phy";
+ reg = <0>;
+ marvell,reg-init = <3 16 0xff00 0x12 3 17 0xfff0 0x5>;
+ };
+};
+
+
+/* USB PHY */
+/{
+ usb_phy0: usb_phy@0 {
+ compatible = "ulpi-phy";
+ //compatible = "usb-nop-xceiv";
+ #phy-cells = <0>;
+ reg = <0xe0002000 0x1000>;
+ view-port = <0x0170>;
+ drv-vbus;
+ };
+};
+
+&usb0 {
+ dr_mode = "host";
+ //dr_mode = "peripheral";
+ usb-phy = <&usb_phy0>;
+};
+
+/* I2C */
+// i2c PLL: 0x70, i2c eeprom: 0x50
+
+&i2c1 {
+ rtc@6F { // Real Time Clock
+ compatible = "isl12022";
+ reg = <0x6F>;
+ };
+ //MAC EEPROM
+ eeprom: eeprom@50 {
+ compatible = "atmel,24c08";
+ reg = <0x50>;
+ };
+};
+