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 <[email protected]>
---
 .../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 0000000..e235826
--- /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 0000000..336d7a2
--- /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 0000000..7da1f9f
--- /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 0000000..336d7a2
--- /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 0000000..6782e92
--- /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 0000000..249a786
--- /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 0000000..3d75be6
--- /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>;
+};
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8143): 
https://lists.yoctoproject.org/g/meta-virtualization/message/8143
Mute This Topic: https://lists.yoctoproject.org/mt/100401327/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to