Skip to content

Commit

Permalink
add support for Pluto+
Browse files Browse the repository at this point in the history
This adds a Makefile TARGET=plutoplus to build the Pluto+ firmware,
together with matching .its and .mk files for the target, and updates
the commits of the linux, maia-sdr and u-boot-xlnx repositories to
add support for the Pluto+.

Signed-off-by: Daniel Estévez <[email protected]>
  • Loading branch information
daniestevez committed Jul 7, 2023
1 parent 3b4e0ab commit 37ce26c
Show file tree
Hide file tree
Showing 8 changed files with 225 additions and 15 deletions.
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $(error " 3] export VIVADO_VERSION=v20xx.x")
endif

TARGET ?= pluto
SUPPORTED_TARGETS:=pluto sidekiqz2
SUPPORTED_TARGETS:=pluto sidekiqz2 plutoplus

# Include target specific constants
include scripts/$(TARGET).mk
Expand All @@ -59,7 +59,7 @@ endif

ifeq ($(findstring $(TARGET),$(SUPPORTED_TARGETS)),)
all:
@echo "Invalid `TARGET variable ; valid values are: pluto, sidekiqz2" &&
@echo "Invalid `TARGET variable ; valid values are: pluto, sidekiqz2, plutoplus" &&
exit 1
else
all: clean-build $(TARGETS) zip-all legal-info
Expand Down Expand Up @@ -119,7 +119,7 @@ maia-sdr/maia-kmod/maia-sdr.ko:

.PHONY: maia-sdr/maia-kmod/maia-sdr.ko

buildroot/board/pluto/maia-sdr.ko: maia-sdr/maia-kmod/maia-sdr.ko | build
buildroot/board/$(TARGET)/maia-sdr.ko: maia-sdr/maia-kmod/maia-sdr.ko | build
cp $< $@

### maia-httpd ###
Expand All @@ -134,7 +134,7 @@ maia-sdr/maia-httpd/target/armv7-unknown-linux-gnueabihf/release/maia-httpd: bui

.PHONY: maia-sdr/maia-httpd/target/armv7-unknown-linux-gnueabihf/release/maia-httpd

buildroot/board/pluto/maia-httpd: maia-sdr/maia-httpd/target/armv7-unknown-linux-gnueabihf/release/maia-httpd | build
buildroot/board/$(TARGET)/maia-httpd: maia-sdr/maia-httpd/target/armv7-unknown-linux-gnueabihf/release/maia-httpd | build
cp $< $@

### maia-wasm ###
Expand All @@ -143,16 +143,16 @@ maia-sdr/maia-wasm/pkg:

.PHONY: maia-sdr/maia-wasm/pkg

buildroot/board/pluto/maia-wasm:
buildroot/board/$(TARGET)/maia-wasm:
mkdir $@

buildroot/board/pluto/maia-wasm/pkg: maia-sdr/maia-wasm/pkg | build buildroot/board/pluto/maia-wasm
cp -r $< buildroot/board/pluto/maia-wasm/
buildroot/board/$(TARGET)/maia-wasm/pkg: maia-sdr/maia-wasm/pkg | build buildroot/board/$(TARGET)/maia-wasm
cp -r $< buildroot/board/$(TARGET)/maia-wasm/

buildroot/board/pluto/maia-wasm/assets: maia-sdr/maia-wasm/assets | build buildroot/board/pluto/maia-wasm
cp -r $< buildroot/board/pluto/maia-wasm/
buildroot/board/$(TARGET)/maia-wasm/assets: maia-sdr/maia-wasm/assets | build buildroot/board/$(TARGET)/maia-wasm
cp -r $< buildroot/board/$(TARGET)/maia-wasm/

maia-wasm: buildroot/board/pluto/maia-wasm/pkg buildroot/board/pluto/maia-wasm/assets
maia-wasm: buildroot/board/$(TARGET)/maia-wasm/pkg buildroot/board/$(TARGET)/maia-wasm/assets

.PHONY: maia-wasm

Expand All @@ -167,7 +167,7 @@ buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-gcc:
make -C buildroot ARCH=arm zynq_$(TARGET)_defconfig
make -C buildroot ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) toolchain

buildroot/output/images/rootfs.cpio.gz: buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-gcc buildroot/board/pluto/maia-sdr.ko buildroot/board/pluto/maia-httpd maia-wasm
buildroot/output/images/rootfs.cpio.gz: buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-gcc buildroot/board/$(TARGET)/maia-sdr.ko buildroot/board/$(TARGET)/maia-httpd maia-wasm
make -C buildroot legal-info
scripts/legal_info_html.sh "$(COMPLETE_NAME)" "$(CURDIR)/buildroot/board/$(TARGET)/VERSIONS"
cp build/LICENSE.html buildroot/board/$(TARGET)/msd/LICENSE.html
Expand Down
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,49 @@ make
| zynq-pluto-sdr-revb.dtb | Device Tree Blob for Rev.B|
| zynq-pluto-sdr-revc.dtb | Device Tree Blob for Rev.C|

## Pluto+

**Disclaimer:** The Maia SDR project acknowledges that the name Pluto+ is
unfortunate, because this hardware device is unrelated to Analog Devices
ADALM products. However, this device is not known by any other name, so us
referring to it in another way would have been very confusing. Therefore,
within Maia SDR, the firmware build for the Pluto+ is refered to as Pluto+ or
`plutoplus`.

Here are some notes about the Pluto+ Maia SDR firmware.

The Pluto+ is largerly compatible with the ADALM-Pluto in terms of firmware. It
uses a different Zynq 7010 package and FPGA pinout, but its pinout ensures that
all the signals go to the same FPGA wirebonding pads (even though the BGA pins
are called differently and placed differently in the package). This means that a
regular ADALM-Pluto firmware mostly works on the Pluto+, though Ethernet and the
SD card will not work because the ADALM-Pluto does not have this hardware. There
is one pinout difference between the ADALM-Pluto and the Pluto+: the USB PHY
reset (URST) on the ADALM-Pluto is connected to MIO52. On the Pluto+ it is
usually connected to MIO46, because MIO52 is required for the Ethernet
MDIO. However, the Pluto+ has a jumper to allow connecting the USB PHY reset to
MIO52 instead when a firmware for the ADALM-Pluto (which does not support
Ethernet) is used (see the [plutoplus
README](https://github.com/plutoplus/plutoplus/tree/master#jumpers-and-pinouts)). When
using the Pluto+ Maia SDR firmware, it is required to connect the jumper to
MIO46.

There is usually no point in using the ADALM-Pluto Maia SDR firmware in a
Pluto+. Generally, the Pluto+ Maia SDR firmware should be used, as it supports
Ethernet and the SD card.

In order to distinguish it from the ADALM-Pluto firmware, the files for the
Pluto+ Maia SDR firmware are called `plutoplus` instead of `plutosdr` or
`pluto`. When using the USB storage firmware update method, the file that is
copied to the USB storage device must be called `pluto.frm`. The file
`plutoplus.frm` must be renamed to `pluto.frm`.

The
[`ipaddrmulti`](https://maia-sdr.org/installation/#configure-the-pluto-usb-ethernet)
feature can conflict with the IP address assignment for the Pluto+ Ethernet. It
is probably better to disable `ipaddrmulti` in the Pluto+.

The Pluto+ firmware can be built with
```
TARGET=plutoplus make
```
2 changes: 1 addition & 1 deletion buildroot
2 changes: 1 addition & 1 deletion linux
157 changes: 157 additions & 0 deletions scripts/plutoplus.its
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
/*
* U-Boot uImage source file with multiple kernels, ramdisks and FDT blobs
* This example makes use of the 'loadables' field
*/

/*
* fdt get addr foo /images/fdt@1 data
*/

/dts-v1/;

/ {
description = "Configuration to load fpga before Kernel";
magic = "ITB PlutoSDR (ADALM-PLUTO)";
#address-cells = <1>;
images {

fdt@1 {
description = "zynq-plutoplus";
data = /incbin/("../build/zynq-plutoplus-maiasdr.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
};

fpga@1 {
description = "FPGA";
data = /incbin/("../build/system_top.bit");
type = "fpga";
arch = "arm";
compression = "none";
load = <0xF000000>;
hash@1 {
algo = "md5";
};
};

linux_kernel@1 {
description = "Linux";
data = /incbin/("../build/zImage");
type = "kernel";
arch = "arm";
os = "linux";
compression = "none";
load = <0x8000>;
entry = <0x8000>;
hash@1 {
algo = "md5";
};
};
ramdisk@1 {
description = "Ramdisk";
data = /incbin/("../build/rootfs.cpio.gz");
type = "ramdisk";
arch = "arm";
os = "linux";
compression = "gzip";
hash@1 {
algo = "md5";
};
};

};

configurations {
default = "config@0";
/* TODO: can all these configurations be deleted except config@0 ? */
config@0 {
description = "Linux with fpga Pluto+";
fdt = "fdt@1";
kernel = "linux_kernel@1";
ramdisk = "ramdisk@1";
fpga = "fpga@1";
};

config@1 {
description = "Linux with fpga Pluto+";
fdt = "fdt@1";
kernel = "linux_kernel@1";
ramdisk = "ramdisk@1";
fpga = "fpga@1";
};

config@2 {
description = "Linux with fpga Pluto+";
fdt = "fdt@1";
kernel = "linux_kernel@1";
ramdisk = "ramdisk@1";
fpga = "fpga@1";
};

config@3 {
description = "Linux with fpga Pluto+";
fdt = "fdt@1";
kernel = "linux_kernel@1";
ramdisk = "ramdisk@1";
fpga = "fpga@1";
};

config@4 {
description = "Linux with fpga Pluto+";
fdt = "fdt@1";
kernel = "linux_kernel@1";
ramdisk = "ramdisk@1";
fpga = "fpga@1";
};

config@5 {
description = "Linux with fpga Pluto+";
fdt = "fdt@1";
kernel = "linux_kernel@1";
ramdisk = "ramdisk@1";
fpga = "fpga@1";
};

config@6 {
description = "Linux with fpga Pluto+";
fdt = "fdt@1";
kernel = "linux_kernel@1";
ramdisk = "ramdisk@1";
fpga = "fpga@1";
};


config@7 {
description = "Linux with fpga Pluto+";
fdt = "fdt@1";
kernel = "linux_kernel@1";
ramdisk = "ramdisk@1";
fpga = "fpga@1";
};

config@8 {
description = "Linux with fpga Pluto+";
fdt = "fdt@1";
kernel = "linux_kernel@1";
ramdisk = "ramdisk@1";
fpga = "fpga@1";
};

config@9 {
description = "Linux with fpga Pluto+";
fdt = "fdt@1";
kernel = "linux_kernel@1";
ramdisk = "ramdisk@1";
fpga = "fpga@1";
};

config@10 {
description = "Linux with fpga Pluto+";
fdt = "fdt@1";
kernel = "linux_kernel@1";
ramdisk = "ramdisk@1";
fpga = "fpga@1";
};
};
};
8 changes: 8 additions & 0 deletions scripts/plutoplus.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

# Target specific constants go here

TARGET_DTS_FILES:= zynq-plutoplus-maiasdr.dtb
COMPLETE_NAME:=Pluto+
ZIP_ARCHIVE_PREFIX:=plutoplus
DEVICE_VID:=0x0456
DEVICE_PID:=0xb673
2 changes: 1 addition & 1 deletion u-boot-xlnx

0 comments on commit 37ce26c

Please sign in to comment.