Skip to content

Commit

Permalink
updated README to include support for RJ45 LEDs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis A. Plana committed Mar 22, 2022
1 parent 67c5d24 commit 88e3beb
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 24 deletions.
45 changes: 21 additions & 24 deletions spif-driver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,24 @@ 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:

```
/ {
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:

```
/ {
Expand All @@ -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:

<pre><code>
&gem0 {
status = "okay";
ethernet_phy0: ethernet-phy@0 {
compatible = "marvell,88e1510";
device_type = "ethernet-phy";
reg = <0>;
<b>marvell,reg-init = <3 16 0xff00 0x12 3 17 0xfff0 0x5>;</b>
};
};
```

The memory size must be adjusted for the number of event-processing pipes.

</code></pre>

Installation
------------
Expand Down
106 changes: 106 additions & 0 deletions spif-driver/system-user.dtsi
Original file line number Diff line number Diff line change
@@ -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>;
};
};

0 comments on commit 88e3beb

Please sign in to comment.