-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Xilinx DTS: Use upstream source and only change what we need to.
Instead of checking in decompiled dtbs, use the the upstream kernel as the source of DTS. Then use include files to change what we need to. * Use the Linux v6.5.8 DTS source files * Using include files add the openamp specific definitions * Update example/dts/,gitignore to ignore dtbo files everywhere * Update xilinx/.gitignore to ignore the specific products of the Makefile * This handles the current versions of zcu102 and kv260 * This handles lockstep and split mode of the R5 subsystem The OpenAMP devicetree changes here are the work of Tanmay Shah and the Makefile and restructure to include files is by Bill Mills. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> Signed-off-by: Bill Mills <bill.mills@linaro.org>
- Loading branch information
Showing
11 changed files
with
210 additions
and
5,521 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
*.dtb | ||
*.dtbo | ||
*.dts.pp | ||
*.dtso.pp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# These files come from a copy command in the Makefile | ||
# don't check them in even though they look like source files | ||
|
||
zynqmp-sck-kv-g-revB.dtso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Build Devicetree Binaries and Devicetree Binary Overlays | ||
|
||
DTBS := zcu102-openamp-lockstep.dtb zcu102-openamp-split.dtb | ||
DTBS += kria-openamp-lockstep.dtb kria-openamp-split.dtb | ||
|
||
#DTBOS := zynqmp-split.dtbo | ||
|
||
# DTBC = DTBs as a result of combining a base with one or more overlays | ||
DTBCS := kv260-openamp-lockstep.dtb kv260-openamp-split.dtb | ||
|
||
|
||
# any file to test we have a valid kernel source dir | ||
XILINX_DTS_DIR := $(LINUX_SRC_DIR)/arch/arm64/boot/dts/xilinx | ||
LINUX_INC_DIR := $(LINUX_SRC_DIR)/include/ | ||
|
||
SHELL := /bin/bash | ||
|
||
all: $(DTBS) $(DTBOS) $(DTBCS) | ||
|
||
check-linux-dir: | ||
@if [ ! -d $(XILINX_DTS_DIR) ]; then \ | ||
echo "LINUX_SRC_DIR must point to a Linux source directory"; \ | ||
echo "LINUX_SRC_DIR=$(LINUX_SRC_DIR)"; \ | ||
exit 2; \ | ||
fi | ||
|
||
.PHONY : all check-linux-dir | ||
|
||
DTC_CPP_FLAGS= -E -x assembler-with-cpp -nostdinc -undef -D__DTS__ | ||
|
||
# Note: -@ includes symbols which is need to apply overlays | ||
%.dtb: %.dts | ||
# Linux DTS uses C preprocessor first | ||
$(CC) $(DTC_CPP_FLAGS) \ | ||
-I $(XILINX_DTS_DIR) \ | ||
-I $(LINUX_INC_DIR) \ | ||
-o $<.pp $< | ||
dtc -@ -I dts -O dtb -o $@ $<.pp | ||
|
||
%.dtbo: %.dtso | ||
# Linux DTS uses C preprocessor first | ||
$(CC) $(DTC_CPP_FLAGS) \ | ||
-I $(XILINX_DTS_DIR) \ | ||
-I $(LINUX_INC_DIR) \ | ||
-o $<.pp $< | ||
dtc -@ -I dts -O dtb -o $@ $<.pp | ||
|
||
$(DTBS): check-linux-dir | ||
|
||
zynqmp-sck-kv-g-revB.dtso: $(XILINX_DTS_DIR)/zynqmp-sck-kv-g-revB.dtso | ||
cp $< $@ | ||
|
||
kv260-openamp-lockstep.dtb: kria-openamp-lockstep.dtb zynqmp-sck-kv-g-revB.dtbo | ||
fdtoverlay -o $@ -i $^ | ||
|
||
kv260-openamp-split.dtb: kria-openamp-split.dtb zynqmp-sck-kv-g-revB.dtbo | ||
fdtoverlay -o $@ -i $^ | ||
|
||
clean: | ||
rm -f $(DTBS) $(DTBOS) $(DTBCS) *.pp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
#### zcu102-openamp-lockstep.dts | ||
- Base dts from Yocto 2022.1_update3 release: https://github.com/Xilinx/yocto-manifests/tree/xlnx-rel-v2022.1_update3 | ||
- `MACHINE=zcu102-zynqmp bitbake device-tree` will generate system-top.dtb | ||
- Remoteproc nodes are available to configure RPU and TCM in lockstep mode using Xilinx downstream driver | ||
- Board: Xilinx zcu102 | ||
- Works for QEMU | ||
- Generate DTB: `dtc -I dts -O dtb -o zcu102-openamp-lockstep.dtb zcu102-openamp-lockstep.dts` | ||
|
||
#### zcu102-openamp-split.dts | ||
- Base dts from Yocto 2022.1_update3 release: https://github.com/Xilinx/yocto-manifests/tree/xlnx-rel-v2022.1_update3 | ||
- `MACHINE=zcu102-zynqmp bitbake device-tree` will generate system-top.dtb that is base dtb | ||
- Added Remoteproc nodes to configure RPU and TCM in split mode using Xilinx downstream driver | ||
- Board: Xilinx zcu102 | ||
- Works for QEMU | ||
- Generate DTB: `dtc -I dts -O dtb -o zcu102-openamp-split.dtb zcu102-openamp-split.dts` | ||
#### Building DTBs | ||
- You will need a copy of the Linux source tree | ||
- For consitency use the same kernel version as the OpenAMP-CI Builds is using | ||
- Below we assume the kernel source is at ~/my-dir/kernel-source | ||
- `make LINUX_SRC_DIR=~/my-dir/kernel-source' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* A base DTB for all kria for lockstep mode | ||
** A carrier card overlay will be applied to this dtb, | ||
** either at compile or at boot time | ||
*/ | ||
|
||
#include "zynqmp-smk-k26-revA.dts" | ||
#include "zynqmp-openamp.dtsi" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* A base DTB for all kria for split mode | ||
** A carrier card overlay will be applied to this dtb, | ||
** either at compile or at boot time | ||
*/ | ||
|
||
#include "zynqmp-smk-k26-revA.dts" | ||
#include "zynqmp-openamp.dtsi" | ||
#include "zynqmp-split.dtsi" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* Changes specific to zcu102 but common to mode */ | ||
|
||
/ { | ||
axi { | ||
serial@ff010000 { | ||
status = "disabled"; | ||
}; | ||
}; | ||
}; |
Oops, something went wrong.