summaryrefslogtreecommitdiff
path: root/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree')
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb88
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend30
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/files/microzed-zynq7.dts96
3 files changed, 21 insertions, 193 deletions
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb b/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb
index dc49cbbff..81965c13c 100644
--- a/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb
+++ b/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb
@@ -1,85 +1,39 @@
-SUMMARY = "Device Trees for BSPs"
-DESCRIPTION = "Device Tree generation and packaging for BSP Device Trees."
+SUMMARY = "Xilinx BSP device trees"
+DESCRIPTION = "Xilinx BSP device trees from within layer."
SECTION = "bsp"
+# the device trees from within the layer are licensed as MIT, kernel includes are GPL
LICENSE = "MIT & GPLv2"
LIC_FILES_CHKSUM = " \
file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
"
-inherit deploy kernel-arch
+inherit devicetree
PROVIDES = "virtual/dtb"
-INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS += "dtc-native"
+# common zynq include
+SRC_URI_append_zynq = " file://zynq-7000-qspi-dummy.dtsi"
-COMPATIBLE_MACHINE ?= "^$"
+# device tree sources for the various machines
+COMPATIBLE_MACHINE_picozed-zynq7 = ".*"
+SRC_URI_append_picozed-zynq7 = " file://picozed-zynq7.dts"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE_qemu-zynq7 = ".*"
+SRC_URI_append_qemu-zynq7 = " file://qemu-zynq7.dts"
-FILES_${PN} = "/boot/devicetree/*.dtb /boot/devicetree/*.dtbo"
-
-S = "${WORKDIR}"
-B = "${WORKDIR}/build"
-
-SYSROOT_DIRS += "/boot/devicetree"
-
-# By default provide the current kernel arch's boot/dts and boot/dts/include.
-KERNEL_DTS_INCLUDE ??= " \
- ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts \
- ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts/include \
+COMPATIBLE_MACHINE_zybo-linux-bd-zynq7 = ".*"
+SRC_URI_append_zybo-linux-bd-zynq7 = " \
+ file://zybo-linux-bd-zynq7.dts \
+ file://pcw.dtsi \
+ file://pl.dtsi \
"
-# For arm64/zynqmp the xilinx specific includes are subdired under a vendor directory.
-KERNEL_DTS_INCLUDE_append_zynqmp = " \
- ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts/xilinx \
- "
-
-DTS_FILES_PATH ?= "${S}"
-DTS_INCLUDE ?= "${DTS_FILES_PATH} ${KERNEL_DTS_INCLUDE}"
-DT_PADDING_SIZE ?= "0x3000"
-DEVICETREE_FLAGS ?= " \
- -R 8 -p ${DT_PADDING_SIZE} -b 0 \
- ${@' '.join(['-i %s' % i for i in d.getVar('DTS_INCLUDE', True).split()])} \
- "
-DEVICETREE_OFLAGS ?= "-@ -H epapr"
-DEVICETREE_PP_FLAGS ?= " \
- -nostdinc -Ulinux -x assembler-with-cpp \
- ${@' '.join(['-I%s' % i for i in d.getVar('DTS_INCLUDE', True).split()])} \
+COMPATIBLE_MACHINE_kc705-microblazeel = ".*"
+SRC_URI_append_kc705-microblazeel = " \
+ file://kc705-microblazeel.dts \
+ file://pl.dtsi \
+ file://system-conf.dtsi \
"
-python () {
- # auto add dependency on kernel tree
- if d.getVar("KERNEL_DTS_INCLUDE") != "":
- d.appendVarFlag("do_compile", "depends", " virtual/kernel:do_configure")
-}
-
-do_compile() {
- for DTS_FILE in ${DTS_FILES_PATH}/*.dts; do
- DTS_NAME=`basename -s .dts ${DTS_FILE}`
- ${BUILD_CPP} ${DEVICETREE_PP_FLAGS} -o `basename ${DTS_FILE}`.pp ${DTS_FILE}
-
- # for now use the existance of the '/plugin/' tag to detect overlays
- if grep -qse "/plugin/;" `basename ${DTS_FILE}`.pp; then
- dtc ${DEVICETREE_OFLAGS} -I dts -O dtb ${DEVICETREE_FLAGS} -o ${DTS_NAME}.dtbo `basename ${DTS_FILE}`.pp
- else
- dtc -I dts -O dtb ${DEVICETREE_FLAGS} -o ${DTS_NAME}.dtb `basename ${DTS_FILE}`.pp
- fi
- done
-}
-
-do_install() {
- for DTB_FILE in `ls *.dtb *.dtbo`; do
- install -Dm 0644 ${B}/${DTB_FILE} ${D}/boot/devicetree/${DTB_FILE}
- done
-}
-
-do_deploy() {
- for DTB_FILE in `ls *.dtb *.dtbo`; do
- install -Dm 0644 ${B}/${DTB_FILE} ${DEPLOYDIR}/${DTB_FILE}
- done
-}
-addtask deploy before do_build after do_install
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend b/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend
deleted file mode 100644
index e128e0e84..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend
+++ /dev/null
@@ -1,30 +0,0 @@
-
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-# common zynq include
-SRC_URI_append_zynq = " file://zynq-7000-qspi-dummy.dtsi"
-
-# device tree sources for the various machines
-COMPATIBLE_MACHINE_picozed-zynq7 = ".*"
-SRC_URI_append_picozed-zynq7 = " file://picozed-zynq7.dts"
-
-COMPATIBLE_MACHINE_microzed-zynq7 = ".*"
-SRC_URI_append_microzed-zynq7 = " file://microzed-zynq7.dts"
-
-COMPATIBLE_MACHINE_qemu-zynq7 = ".*"
-SRC_URI_append_qemu-zynq7 = " file://qemu-zynq7.dts"
-
-COMPATIBLE_MACHINE_zybo-linux-bd-zynq7 = ".*"
-SRC_URI_append_zybo-linux-bd-zynq7 = " \
- file://zybo-linux-bd-zynq7.dts \
- file://pcw.dtsi \
- file://pl.dtsi \
- "
-
-COMPATIBLE_MACHINE_kc705-microblazeel = ".*"
-SRC_URI_append_kc705-microblazeel = " \
- file://kc705-microblazeel.dts \
- file://pl.dtsi \
- file://system-conf.dtsi \
- "
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/files/microzed-zynq7.dts b/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/files/microzed-zynq7.dts
deleted file mode 100644
index b9376a490..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/files/microzed-zynq7.dts
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2011 - 2014 Xilinx
- * Copyright (C) 2016 Jagan Teki <jteki@openedev.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-/dts-v1/;
-/include/ "zynq-7000.dtsi"
-
-/ {
- model = "Zynq MicroZED Development Board";
- compatible = "xlnx,zynq-microzed", "xlnx,zynq-7000";
-
- aliases {
- ethernet0 = &gem0;
- serial0 = &uart1;
- };
-
- memory {
- device_type = "memory";
- reg = <0x0 0x40000000>;
- };
-
- chosen {
- bootargs = "earlycon";
- stdout-path = "serial0:115200n8";
- };
-
- usb_phy0: phy0 {
- compatible = "usb-nop-xceiv";
- #phy-cells = <0>;
- };
-};
-
-&clkc {
- ps-clk-frequency = <33333333>;
-};
-
-&gem0 {
- status = "okay";
- phy-mode = "rgmii-id";
- phy-handle = <&ethernet_phy>;
-
- ethernet_phy: ethernet-phy@0 {
- reg = <0>;
- };
-};
-
-&sdhci0 {
- status = "okay";
-};
-
-&uart1 {
- status = "okay";
-};
-
-&usb0 {
- status = "okay";
- dr_mode = "host";
- usb-phy = <&usb_phy0>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_usb0_default>;
-};
-
-&pinctrl0 {
- pinctrl_usb0_default: usb0-default {
- mux {
- groups = "usb0_0_grp";
- function = "usb0";
- };
-
- conf {
- groups = "usb0_0_grp";
- slew-rate = <0>;
- io-standard = <1>;
- };
-
- conf-rx {
- pins = "MIO29", "MIO31", "MIO36";
- bias-high-impedance;
- };
-
- conf-tx {
- pins = "MIO28", "MIO30", "MIO32", "MIO33", "MIO34",
- "MIO35", "MIO37", "MIO38", "MIO39";
- bias-disable;
- };
- };
-};