From c9b65ee0e53cba999b8061b72039f108187b9600 Mon Sep 17 00:00:00 2001 From: Sandeep Gundlupet Raju Date: Thu, 27 Jul 2023 17:22:28 -0600 Subject: [PATCH] recipes-bsp: Add device-tree files for Xen support Add device-tree files for Xen support, Earlier all these files were in meta-petalinux layer, Hence move these files to this layer so that users can build Xen without including meta-petalinux. Signed-off-by: Sandeep Gundlupet Raju Signed-off-by: Bruce Ashfield --- .../device-tree/device-tree.bbappend | 19 +++ .../files/versal-net-xen-qemu.dtsi | 2 + .../device-tree/files/versal-net-xen.dtsi | 67 ++++++++++ .../device-tree/files/versal-xen-qemu.dtsi | 2 + .../device-tree/files/versal-xen.dtsi | 59 +++++++++ .../device-tree/files/zynqmp-xen-qemu.dtsi | 16 +++ .../device-tree/files/zynqmp-xen.dtsi | 123 ++++++++++++++++++ 7 files changed, 288 insertions(+) create mode 100644 dynamic-layers/xilinx/recipes-bsp/device-tree/device-tree.bbappend create mode 100644 dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen-qemu.dtsi create mode 100644 dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen.dtsi create mode 100644 dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen-qemu.dtsi create mode 100644 dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen.dtsi create mode 100644 dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen-qemu.dtsi create mode 100644 dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen.dtsi diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/device-tree.bbappend b/dynamic-layers/xilinx/recipes-bsp/device-tree/device-tree.bbappend new file mode 100644 index 00000000..e2358262 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/device-tree.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +ENABLE_XEN_DTSI ?= "" +ENABLE_XEN_QEMU_DTSI ?= "" + +XEN_EXTRA_OVERLAYS = "" +XEN_EXTRA_QEMU_OVERLAYS = "" + +XEN_EXTRA_OVERLAYS:zynqmp = "zynqmp-xen.dtsi" +XEN_EXTRA_QEMU_OVERLAYS:zynqmp = "zynqmp-xen.dtsi zynqmp-xen-qemu.dtsi" + +XEN_EXTRA_OVERLAYS:versal = "versal-xen.dtsi" +XEN_EXTRA_QEMU_OVERLAYS:versal = "versal-xen.dtsi versal-xen-qemu.dtsi" + +XEN_EXTRA_OVERLAYS:versal-net = "versal-net-xen.dtsi" +XEN_EXTRA_QEMU_OVERLAYS:versal-net = "versal-net-xen.dtsi versal-net-xen-qemu.dtsi" + +EXTRA_OVERLAYS:append = "${@' ${XEN_EXTRA_OVERLAYS}' if d.getVar('ENABLE_XEN_DTSI') == '1' else ''}" +EXTRA_OVERLAYS:append = "${@' ${XEN_EXTRA_QEMU_OVERLAYS}' if d.getVar('ENABLE_XEN_QEMU_DTSI') == '1' else ''}" diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen-qemu.dtsi b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen-qemu.dtsi new file mode 100644 index 00000000..336d7a25 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen-qemu.dtsi @@ -0,0 +1,2 @@ +/ { +}; diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen.dtsi b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen.dtsi new file mode 100644 index 00000000..7da1f9f1 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen.dtsi @@ -0,0 +1,67 @@ +&smmu { + status = "okay"; +}; + +&adma0 { + iommus = <&smmu 0x210>; +}; + +&adma1 { + iommus = <&smmu 0x212>; +}; + +&adma2 { + iommus = <&smmu 0x214>; +}; + +&adma3 { + iommus = <&smmu 0x216>; +}; + +&adma4 { + iommus = <&smmu 0x218>; +}; + +&adma5 { + iommus = <&smmu 0x21a>; +}; + +&adma6 { + iommus = <&smmu 0x21c>; +}; + +&adma7 { + iommus = <&smmu 0x21e>; +}; + +&dwc3_0 { + iommus = <&smmu 0x230>; +}; + +&dwc3_1 { + iommus = <&smmu 0x232>; +}; + +&gem0 { + iommus = <&smmu 0x234>; +}; + +&gem1 { + iommus = <&smmu 0x235>; +}; + +&sdhci0 { + iommus = <&smmu 0x242>; +}; + +&sdhci1 { + iommus = <&smmu 0x243>; +}; + +&qspi { + iommus = <&smmu 0x244>; +}; + +&ospi { + iommus = <&smmu 0x245>; +}; diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen-qemu.dtsi b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen-qemu.dtsi new file mode 100644 index 00000000..336d7a25 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen-qemu.dtsi @@ -0,0 +1,2 @@ +/ { +}; diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen.dtsi b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen.dtsi new file mode 100644 index 00000000..6782e925 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen.dtsi @@ -0,0 +1,59 @@ +&smmu { + status = "okay"; +}; + +&gem0 { + iommus = <&smmu 0x234>; +}; + +&gem1 { + iommus = <&smmu 0x235>; +}; + +&dwc3_0 { + iommus = <&smmu 0x230>; +}; + +&qspi { + iommus = <&smmu 0x244>; +}; + +&lpd_dma_chan0 { + iommus = <&smmu 0x210>; +}; + +&lpd_dma_chan1 { + iommus = <&smmu 0x212>; +}; + +&lpd_dma_chan2 { + iommus = <&smmu 0x214>; +}; + +&lpd_dma_chan3 { + iommus = <&smmu 0x216>; +}; + +&lpd_dma_chan4 { + iommus = <&smmu 0x218>; +}; + +&lpd_dma_chan5 { + iommus = <&smmu 0x21a>; +}; + +&lpd_dma_chan6 { + iommus = <&smmu 0x21c>; +}; + +&lpd_dma_chan7 { + iommus = <&smmu 0x21e>; +}; + +&sdhci0 { + iommus = <&smmu 0x242>; +}; + +&sdhci1 { + iommus = <&smmu 0x243>; +}; diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen-qemu.dtsi b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen-qemu.dtsi new file mode 100644 index 00000000..249a786b --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen-qemu.dtsi @@ -0,0 +1,16 @@ +/ { + cpus { + cpu@1 { + //compatible = "disabled"; + device_type = "none"; + }; + cpu@2 { + //compatible = "disabled"; + device_type = "none"; + }; + cpu@3 { + //compatible = "disabled"; + device_type = "none"; + }; + }; +}; diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen.dtsi b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen.dtsi new file mode 100644 index 00000000..3d75be65 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen.dtsi @@ -0,0 +1,123 @@ +&smmu { + status = "okay"; +}; + +&gem0 { + iommus = <&smmu 0x874>; +}; + +&gem1 { + iommus = <&smmu 0x875>; +}; + +&gem2 { + iommus = <&smmu 0x876>; +}; + +&gem3 { + iommus = <&smmu 0x877>; +}; + +&dwc3_0 { + iommus = <&smmu 0x860>; +}; + +&dwc3_1 { + iommus = <&smmu 0x861>; +}; + +&qspi { + iommus = <&smmu 0x873>; +}; + +&lpd_dma_chan1 { + iommus = <&smmu 0x868>; +}; + +&lpd_dma_chan2 { + iommus = <&smmu 0x869>; +}; + +&lpd_dma_chan3 { + iommus = <&smmu 0x86a>; +}; + +&lpd_dma_chan4 { + iommus = <&smmu 0x86b>; +}; + +&lpd_dma_chan5 { + iommus = <&smmu 0x86c>; +}; + +&lpd_dma_chan6 { + iommus = <&smmu 0x86d>; +}; + +&lpd_dma_chan7 { + iommus = <&smmu 0x86e>; +}; + +&lpd_dma_chan8 { + iommus = <&smmu 0x86f>; +}; + +&fpd_dma_chan1 { + iommus = <&smmu 0x14e8>; +}; + +&fpd_dma_chan2 { + iommus = <&smmu 0x14e9>; +}; + +&fpd_dma_chan3 { + iommus = <&smmu 0x14ea>; +}; + +&fpd_dma_chan4 { + iommus = <&smmu 0x14eb>; +}; + +&fpd_dma_chan5 { + iommus = <&smmu 0x14ec>; +}; + +&fpd_dma_chan6 { + iommus = <&smmu 0x14ed>; +}; + +&fpd_dma_chan7 { + iommus = <&smmu 0x14ee>; +}; + +&fpd_dma_chan8 { + iommus = <&smmu 0x14ef>; +}; + +&sdhci0 { + iommus = <&smmu 0x870>; +}; + +&sdhci1 { + iommus = <&smmu 0x871>; +}; + +&nand0 { + iommus = <&smmu 0x872>; +}; + +&pcie { + iommus = <&smmu 0x4d0>; +}; + +&zynqmp_dpsub { + iommus = <&smmu 0xce3>; +}; + +&zynqmp_dpdma { + iommus = <&smmu 0xce4>; +}; + +&sata { + iommus = <&smmu 0x4c0>, <&smmu 0x4c1>, <&smmu 0x4c2>, <&smmu 0x4c3>; +};