diff options
Diffstat (limited to 'bsp/meta-ti/recipes-kernel')
59 files changed, 2873 insertions, 0 deletions
diff --git a/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-add-ptp-to-TARGETS.patch b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-add-ptp-to-TARGETS.patch new file mode 100644 index 00000000..4c4a00e7 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-add-ptp-to-TARGETS.patch @@ -0,0 +1,25 @@ +From 9e1b0f0d7148524c226befdef90849f9e143ef66 Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko <denys@ti.com> +Date: Fri, 17 May 2019 18:20:21 +0000 +Subject: [PATCH] selftests: add "ptp" to TARGETS + +Signed-off-by: Denys Dmytriyenko <denys@ti.com> +--- + tools/testing/selftests/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile +index 831022b1..6bd7cf81 100644 +--- a/tools/testing/selftests/Makefile ++++ b/tools/testing/selftests/Makefile +@@ -20,6 +20,7 @@ TARGETS += net + TARGETS += nsfs + TARGETS += powerpc + TARGETS += pstore ++TARGETS += ptp + TARGETS += ptrace + TARGETS += seccomp + TARGETS += sigaltstack +-- +2.17.1 + diff --git a/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-breakpoints-allow-to-cross-compile-for-aar.patch b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-breakpoints-allow-to-cross-compile-for-aar.patch new file mode 100644 index 00000000..8b7aa25a --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-breakpoints-allow-to-cross-compile-for-aar.patch @@ -0,0 +1,32 @@ +From 607192f42d65e17f55fc6e85c00019bf71b18770 Mon Sep 17 00:00:00 2001 +From: Fathi Boudra <fathi.boudra@linaro.org> +Date: Wed, 22 Mar 2017 19:47:32 +0200 +Subject: [PATCH 1/1] selftests: breakpoints: allow to cross-compile for + aarch64/arm64 + +To build breakpoint_test_arm64, ARCH value is only tested for "aarch64". +It covers only the native build because it's computed from uname -m output. +For cross-compilation, ARCH is set to arm64 and prevent to cross-compile +the test. +Fix the test to allow both native and cross-compilation of the test. + +Note: glibc is missing several of the TRAP_* constants in the userspace + definitions. Specifically TRAP_BRANCH and TRAP_HWBKPT. + See https://sourceware.org/bugzilla/show_bug.cgi?id=21286 + +Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> +--- + tools/testing/selftests/breakpoints/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/testing/selftests/breakpoints/Makefile ++++ b/tools/testing/selftests/breakpoints/Makefile +@@ -5,7 +5,7 @@ ARCH ?= $(shell echo $(uname_M) | sed -e + ifeq ($(ARCH),x86) + TEST_PROGS := breakpoint_test + endif +-ifeq ($(ARCH),aarch64) ++ifneq (,$(filter $(ARCH),aarch64 arm64)) + TEST_PROGS := breakpoint_test_arm64 + endif + diff --git a/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-gpio-use-pkg-config.patch b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-gpio-use-pkg-config.patch new file mode 100644 index 00000000..0d0bfc7e --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-gpio-use-pkg-config.patch @@ -0,0 +1,53 @@ +From: Fathi Boudra <fathi.boudra@linaro.org> +Subject: [PATCH] selftests: gpio: use pkg-config + +Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> +--- +--- + tools/testing/selftests/gpio/Makefile | 31 ++++++++++++++++++------------- + 1 file changed, 18 insertions(+), 13 deletions(-) + +--- a/tools/testing/selftests/gpio/Makefile ++++ b/tools/testing/selftests/gpio/Makefile +@@ -1,23 +1,28 @@ ++CFLAGS += -O2 -g -std=gnu99 -Wall ++CFLAGS += -I../../../../usr/include/ ++CFLAGS += $(shell pkg-config --cflags mount) ++LDLIBS += $(shell pkg-config --libs mount) + + TEST_PROGS := gpio-mockup.sh +-TEST_FILES := gpio-mockup-sysfs.sh $(BINARIES) +-BINARIES := gpio-mockup-chardev ++TEST_PROGS_EXTENDED := gpio-mockup-chardev ++TEST_FILES := gpio-mockup-sysfs.sh + +-include ../lib.mk ++GPIODIR := ../../../gpio ++GPIOOBJ := gpio-utils.o ++GPIOINC := gpio.h + +-all: $(BINARIES) ++all: $(GPIOINC) $(TEST_PROGS_EXTENDED) + + clean: +- $(RM) $(BINARIES) +- +-CFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/ +-LDLIBS += -lmount -I/usr/include/libmount ++ $(RM) $(TEST_PROGS_EXTENDED) ++ $(MAKE) -C $(GPIODIR) clean + +-$(BINARIES): ../../../gpio/gpio-utils.o ../../../../usr/include/linux/gpio.h ++include ../lib.mk + +-../../../gpio/gpio-utils.o: +- make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C ../../../gpio ++$(TEST_PROGS_EXTENDED): $(GPIODIR)/$(GPIOOBJ) + +-../../../../usr/include/linux/gpio.h: +- make -C ../../../.. headers_install INSTALL_HDR_PATH=$(shell pwd)/../../../../usr/ ++$(GPIODIR)/$(GPIOOBJ): ++ $(MAKE) -C $(GPIODIR) + ++$(GPIOINC): ++ $(MAKE) -C ../../../.. headers_install diff --git a/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-lib-allow-to-override-CC-in-the-top-level-Makefile.patch b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-lib-allow-to-override-CC-in-the-top-level-Makefile.patch new file mode 100644 index 00000000..9d48fd5d --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-lib-allow-to-override-CC-in-the-top-level-Makefile.patch @@ -0,0 +1,22 @@ +From 2e93b68257aa88ccdc127ca119304a5f4c76b7c5 Mon Sep 17 00:00:00 2001 +From: Fathi Boudra <fathi.boudra@linaro.org> +Date: Wed, 22 Mar 2017 17:36:53 +0200 +Subject: [PATCH] selftests: lib: allow to override CC in the top-level Makefile + +Relax CC assignment to allow to override CC in the top-level Makefile. + +Signed-off-by: Denys Dmytriyenko <denys@ti.com> +--- + tools/testing/selftests/lib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/testing/selftests/lib.mk ++++ b/tools/testing/selftests/lib.mk +@@ -1,6 +1,6 @@ + # This mimics the top-level Makefile. We do it explicitly here so that this + # Makefile can operate with or without the kbuild infrastructure. +-CC := $(CROSS_COMPILE)gcc ++CC ?= $(CROSS_COMPILE)gcc + + define RUN_TESTS + @for TEST in $(TEST_PROGS); do \ diff --git a/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-net-use-LDLIBS-to-link-against-libnuma.patch b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-net-use-LDLIBS-to-link-against-libnuma.patch new file mode 100644 index 00000000..da5ac00c --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-net-use-LDLIBS-to-link-against-libnuma.patch @@ -0,0 +1,24 @@ +Subject: [PATCH] selftests: net: use LDLIBS to link against libnuma + +Use the same fixup as used for timers test: +use LDLIBS to properly link against libnuma. + +Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> +--- + tools/testing/selftests/net/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/tools/testing/selftests/net/Makefile ++++ b/tools/testing/selftests/net/Makefile +@@ -9,9 +9,9 @@ NET_PROGS += reuseport_bpf reuseport_bpf + NET_PROGS += reuseport_dualstack + + all: $(NET_PROGS) +-reuseport_bpf_numa: LDFLAGS += -lnuma ++reuseport_bpf_numa: LDLIBS += -lnuma + %: %.c +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ++ $(CC) $(CFLAGS) $(LDLIBS) -o $@ $^ + + TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh + TEST_FILES := $(NET_PROGS) diff --git a/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-seccomp-use-LDLIBS-to-link-against-libpthread.patch b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-seccomp-use-LDLIBS-to-link-against-libpthread.patch new file mode 100644 index 00000000..447a61bb --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-seccomp-use-LDLIBS-to-link-against-libpthread.patch @@ -0,0 +1,23 @@ +From 0fd29435ce41d60cdb3b5e06e491500ddc54a86b Mon Sep 17 00:00:00 2001 +From: Fathi Boudra <fathi.boudra@linaro.org> +Date: Wed, 22 Mar 2017 17:39:37 +0200 +Subject: [PATCH] selftests: seccomp: use LDLIBS to link against libpthread + +Use the same fixup as used for timers test: +use LDLIBS to properly link against libpthread. + +Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> +--- + tools/testing/selftests/seccomp/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/testing/selftests/seccomp/Makefile ++++ b/tools/testing/selftests/seccomp/Makefile +@@ -1,6 +1,6 @@ + TEST_PROGS := seccomp_bpf + CFLAGS += -Wl,-no-as-needed -Wall +-LDFLAGS += -lpthread ++LDLIBS += -lpthread + + all: $(TEST_PROGS) + diff --git a/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-sigaltstack-fix-packaging.patch b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-sigaltstack-fix-packaging.patch new file mode 100644 index 00000000..4cc5907a --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-sigaltstack-fix-packaging.patch @@ -0,0 +1,26 @@ +From b0448d7816ca561b6470dc50fc1621aec2620f57 Mon Sep 17 00:00:00 2001 +From: Fathi Boudra <fathi.boudra@linaro.org> +Date: Wed, 22 Mar 2017 17:40:11 +0200 +Subject: [PATCH] selftests: sigaltstack: fix packaging + +sigaltstack was not using TEST_PROGS resulting in binary not being installed. + +Signed-off-by: Denys Dmytriyenko <denys@ti.com> +--- + tools/testing/selftests/sigaltstack/Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/tools/testing/selftests/sigaltstack/Makefile ++++ b/tools/testing/selftests/sigaltstack/Makefile +@@ -1,8 +1,8 @@ + CFLAGS = -Wall +-BINARIES = sas +-all: $(BINARIES) ++TEST_PROGS = sas ++all: $(TEST_PROGS) + + include ../lib.mk + + clean: +- rm -rf $(BINARIES) ++ rm -rf $(TEST_PROGS) diff --git a/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-timers-use-LDLIBS-to-link-against-libpthread.patch b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-timers-use-LDLIBS-to-link-against-libpthread.patch new file mode 100644 index 00000000..9f12c6ca --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/kselftests/files/0001-selftests-timers-use-LDLIBS-to-link-against-libpthread.patch @@ -0,0 +1,23 @@ +From b0448d7816ca561b6470dc50fc1621aec2620f57 Mon Sep 17 00:00:00 2001 +From: Fathi Boudra <fathi.boudra@linaro.org> +Date: Wed, 22 Mar 2017 17:40:11 +0200 +Subject: [PATCH] selftests: timers: use LDLIBS to link against libpthread + +use LDLIBS to properly link against libpthread. + +Signed-off-by: Denys Dmytriyenko <denys@ti.com> +--- + tools/testing/selftests/timers/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/testing/selftests/timers/Makefile ++++ b/tools/testing/selftests/timers/Makefile +@@ -1,7 +1,7 @@ + CC = $(CROSS_COMPILE)gcc + BUILD_FLAGS = -DKTEST + CFLAGS += -O3 -Wl,-no-as-needed -Wall $(BUILD_FLAGS) +-LDFLAGS += -lrt -lpthread ++LDLIBS += -lrt -lpthread + + # these are all "safe" tests that don't modify + # system time or require escalated privledges diff --git a/bsp/meta-ti/recipes-kernel/kselftests/kselftests_4.10.bb b/bsp/meta-ti/recipes-kernel/kselftests/kselftests_4.10.bb new file mode 100644 index 00000000..b28868f5 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/kselftests/kselftests_4.10.bb @@ -0,0 +1,186 @@ +SUMMARY = "Linux Kernel Selftests" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +SRC_URI = "\ + https://www.kernel.org/pub/linux/kernel/v4.x/linux-${PV}.tar.xz \ + file://0001-selftests-lib-allow-to-override-CC-in-the-top-level-Makefile.patch \ + file://0001-selftests-timers-use-LDLIBS-to-link-against-libpthread.patch \ + file://0001-selftests-sigaltstack-fix-packaging.patch \ + file://0001-selftests-seccomp-use-LDLIBS-to-link-against-libpthread.patch \ + file://0001-selftests-gpio-use-pkg-config.patch \ + file://0001-selftests-net-use-LDLIBS-to-link-against-libnuma.patch \ + file://0001-selftests-breakpoints-allow-to-cross-compile-for-aar.patch;apply=no \ + file://0001-selftests-add-ptp-to-TARGETS.patch \ +" + +SRC_URI[md5sum] = "b5e7f6b9b2fe1b6cc7bc56a3a0bfc090" +SRC_URI[sha256sum] = "3c95d9f049bd085e5c346d2c77f063b8425f191460fcd3ae9fe7e94e0477dc4b" + +S = "${WORKDIR}/linux-${PV}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +DEPENDS = "libcap libcap-ng popt rsync-native util-linux pkgconfig-native \ +" + +inherit kernel-arch + +EXTRA_OEMAKE += "V=1 -C ${S}/tools/testing/selftests INSTALL_PATH=${D}${bindir}/kselftests CC="${CC}" LD="${LD}"" + +do_compile () { + # Make sure to install the user space API used by some tests + # but not properly declared as a build dependency + ${MAKE} -C ${S} headers_install + oe_runmake +} + +do_install () { + oe_runmake install + chown -R root:root ${D} + # fixup run_kselftest.sh due to spurious lines starting by "make[1]:" + sed -i '/^make/d' ${D}${bindir}/kselftests/run_kselftest.sh +} + +PACKAGE_BEFORE_PN = " \ + ${PN}-bpf \ + ${PN}-breakpoints \ + ${PN}-capabilities \ + ${PN}-cpu-hotplug \ + ${PN}-efivarfs \ + ${PN}-exec \ + ${PN}-firmware \ + ${PN}-ftrace \ + ${PN}-futex \ + ${PN}-gpio \ + ${PN}-ipc \ + ${PN}-kcmp \ + ${PN}-lib \ + ${PN}-membarrier \ + ${PN}-memfd \ + ${PN}-memory-hotplug \ + ${PN}-mount \ + ${PN}-mqueue \ + ${PN}-net \ + ${PN}-nsfs \ + ${PN}-powerpc \ + ${PN}-pstore \ + ${PN}-ptp \ + ${PN}-ptrace \ + ${PN}-seccomp \ + ${PN}-sigaltstack \ + ${PN}-size \ + ${PN}-static-keys \ + ${PN}-sync \ + ${PN}-sysctl \ + ${PN}-timers \ + ${PN}-user \ + ${PN}-vm \ + ${PN}-x86 \ + ${PN}-zram \ +" + +FILES_${PN}-bpf = "${bindir}/kselftests/bpf" +FILES_${PN}-breakpoints = "${bindir}/kselftests/breakpoints" +FILES_${PN}-capabilities = "${bindir}/kselftests/capabilities" +FILES_${PN}-cpu-hotplug = "${bindir}/kselftests/cpu-hotplug" +FILES_${PN}-efivarfs = "${bindir}/kselftests/efivarfs" +FILES_${PN}-exec = "${bindir}/kselftests/exec" +FILES_${PN}-firmware = "${bindir}/kselftests/firmware" +FILES_${PN}-ftrace = "${bindir}/kselftests/ftrace" +FILES_${PN}-futex = "${bindir}/kselftests/futex" +FILES_${PN}-gpio = "${bindir}/kselftests/gpio" +FILES_${PN}-ipc = "${bindir}/kselftests/ipc" +FILES_${PN}-kcmp = "${bindir}/kselftests/kcmp" +FILES_${PN}-lib = "${bindir}/kselftests/lib" +FILES_${PN}-membarrier = "${bindir}/kselftests/membarrier" +FILES_${PN}-memfd = "${bindir}/kselftests/memfd" +FILES_${PN}-memory-hotplug = "${bindir}/kselftests/memory-hotplug" +FILES_${PN}-mount = "${bindir}/kselftests/mount" +FILES_${PN}-mqueue = "${bindir}/kselftests/mqueue" +FILES_${PN}-net = "${bindir}/kselftests/net" +FILES_${PN}-nsfs = "${bindir}/kselftests/nsfs" +FILES_${PN}-powerpc = "${bindir}/kselftests/powerpc" +FILES_${PN}-pstore = "${bindir}/kselftests/pstore" +FILES_${PN}-ptp = "${bindir}/kselftests/ptp" +FILES_${PN}-ptrace = "${bindir}/kselftests/ptrace" +FILES_${PN}-seccomp = "${bindir}/kselftests/seccomp" +FILES_${PN}-sigaltstack = "${bindir}/kselftests/sigaltstack" +FILES_${PN}-size = "${bindir}/kselftests/size" +FILES_${PN}-static-keys = "${bindir}/kselftests/static_keys" +FILES_${PN}-sync = "${bindir}/kselftests/sync" +FILES_${PN}-sysctl = "${bindir}/kselftests/sysctl" +FILES_${PN}-timers = "${bindir}/kselftests/timers" +FILES_${PN}-user = "${bindir}/kselftests/user" +FILES_${PN}-vm = "${bindir}/kselftests/vm" +FILES_${PN}-x86 = "${bindir}/kselftests/x86" +FILES_${PN}-zram = "${bindir}/kselftests/zram" +FILES_${PN}-dbg += "${bindir}/kselftests/*/.debug" + +# FIXME bpf target is failing to build and need to be fixed: +# In file included from test_verifier.c:23:0: +# ../../../../usr/include/linux/bpf_perf_event.h:14:17: error: field 'regs' has incomplete type +# struct pt_regs regs; +# ^~~~ +# make[1]: *** [test_verifier] Error 1 +ALLOW_EMPTY_${PN}-bpf = "1" + +# gcc 7.x fails to build seccomp +ALLOW_EMPTY_${PN}-seccomp = "1" + +# FIXME net target builds most of the binaries, but reuseport_bpf_numa depends on libnuma, +# which is not availbale on ARM, failing entire test case +ALLOW_EMPTY_${PN}-net = "1" + +RDEPENDS_${PN}-cpu-hotplug += "bash" +RDEPENDS_${PN}-efivarfs += "bash" +RDEPENDS_${PN}-futex += "bash ncurses" +RDEPENDS_${PN}-gpio += "bash" +RDEPENDS_${PN}-memory-hotplug += "bash" +RDEPENDS_${PN}-net += "bash" +RDEPENDS_${PN}-vm += "bash sudo" +RDEPENDS_${PN}-zram += "bash bc" +RDEPENDS_${PN} += "bash \ + ${PN}-bpf \ + ${PN}-capabilities \ + ${PN}-cpu-hotplug \ + ${PN}-efivarfs \ + ${PN}-exec \ + ${PN}-firmware \ + ${PN}-ftrace \ + ${PN}-futex \ + ${PN}-gpio \ + ${PN}-kcmp \ + ${PN}-lib \ + ${PN}-membarrier \ + ${PN}-memfd \ + ${PN}-memory-hotplug \ + ${PN}-mount \ + ${PN}-mqueue \ + ${PN}-net \ + ${PN}-nsfs \ + ${PN}-pstore \ + ${PN}-ptrace \ + ${PN}-seccomp \ + ${PN}-sigaltstack \ + ${PN}-size \ + ${PN}-static-keys \ + ${PN}-sync \ + ${PN}-sysctl \ + ${PN}-timers \ + ${PN}-user \ + ${PN}-vm \ + ${PN}-zram \ +" + +RDEPENDS_${PN}_append_aarch64 = " ${PN}-breakpoints ${PN}-ipc" +RDEPENDS_${PN}_append_x86 = " ${PN}-breakpoints ${PN}-ipc ${PN}-x86" +RDEPENDS_${PN}_append_x86-64 = " ${PN}-breakpoints ${PN}-ipc ${PN}-x86" +RDEPENDS_${PN}_append_powerpc = " ${PN}-powerpc" +RDEPENDS_${PN}_append_powerpc64 = " ${PN}-powerpc" + +INSANE_SKIP_${PN} = "already-stripped" +INSANE_SKIP_${PN}-exec = "ldflags" +INSANE_SKIP_${PN}-ipc = "ldflags" +INSANE_SKIP_${PN}-mount = "ldflags" +INSANE_SKIP_${PN}-vm = "ldflags" diff --git a/bsp/meta-ti/recipes-kernel/linux/bundle-devicetree.inc b/bsp/meta-ti/recipes-kernel/linux/bundle-devicetree.inc new file mode 100644 index 00000000..4d450374 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/bundle-devicetree.inc @@ -0,0 +1,26 @@ +# Upstream kernel-devicetree.bbclass only supports bundling the DTB with +# zImage. The factory u-boot on lego-ev3 EEPROM only supports uImage, so we +# append the DTB to the final uImage here. + +do_deploy_append() { + if [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then + install -d ${DEPLOYDIR} + for dtbf in ${KERNEL_DEVICETREE}; do + dtb=`normalize_dtb "$dtbf"` + dtb_ext=${dtb##*.} + dtb_base_name=`basename $dtb .$dtb_ext` + for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + if [ "$type" = "uImage" ]; then + cat ${D}/${KERNEL_IMAGEDEST}/$type \ + ${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \ + > ${DEPLOYDIR}/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin + ln -sf $type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin \ + ${DEPLOYDIR}/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin + cat ${D}/${KERNEL_IMAGEDEST}/$type \ + ${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \ + > ${DEPLOYDIR}/$type + fi + done + done + fi +} diff --git a/bsp/meta-ti/recipes-kernel/linux/cmem.inc b/bsp/meta-ti/recipes-kernel/linux/cmem.inc new file mode 100644 index 00000000..5fd0b9d9 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/cmem.inc @@ -0,0 +1,91 @@ +# Add concept of machine variants to split DTBs into subsets +# +# Use these for temporary overrides +CMEM_MACHINE = "${MACHINE}" +CMEM_MACHINE_am57xx-evm = "am571x am572x am574x" +CMEM_MACHINE_am57xx-hs-evm = "am571x am572x am574x" +CMEM_MACHINE_dra7xx-evm = "dra71x dra72x dra74x" +CMEM_MACHINE_dra7xx-hs-evm = "dra71x dra72x dra74x" + +# Set cmem.dtsi per machine or machine variant +CMEM_DTSI = "cmem.dtsi" +CMEM_DTSI_am571x = "cmem-am571x.dtsi" +CMEM_DTSI_am574x = "cmem-am574x.dtsi" +CMEM_DTSI_dra71x = "cmem-dra71x.dtsi" +CMEM_DTSI_dra72x = "cmem-dra72x.dtsi" + +# Split device trees between variants +CMEM_DEVICETREE = "${KERNEL_DEVICETREE}" +CMEM_DEVICETREE_am571x = "am571x-idk.dtb am571x-idk-lcd-osd101t2045.dtb am571x-idk-lcd-osd101t2587.dtb" +CMEM_DEVICETREE_am572x = "am57xx-beagle-x15.dtb am57xx-beagle-x15-revc.dtb \ + am572x-idk.dtb am572x-idk-lcd-osd101t2045.dtb am572x-idk-lcd-osd101t2587.dtb" +CMEM_DEVICETREE_am574x = "am574x-idk.dtb am574x-idk-lcd-osd101t2587.dtb" +CMEM_DEVICETREE_dra71x = "dra71-evm.dtb" +CMEM_DEVICETREE_dra72x = "dra72-evm.dtb dra72-evm-lcd-osd101t2045.dtb dra72-evm-lcd-osd101t2587.dtb \ + dra72-evm-revc.dtb dra72-evm-revc-lcd-osd101t2045.dtb dra72-evm-revc-lcd-osd101t2587.dtb" +CMEM_DEVICETREE_dra74x = "dra7-evm.dtb dra7-evm-lcd-osd101t2045.dtb dra7-evm-lcd-osd101t2587.dtb" + +# Flag to enable CMEM injection +RESERVE_CMEM ?= "0" + +# Variables which influence setup_cmem +CMEM_VARS = "RESERVE_CMEM CMEM_MACHINE" +CMEM_VARS += "CMEM_DTSI ${@' '.join(map(lambda s: 'CMEM_DTSI_' + s, (d.getVar('CMEM_MACHINE') or '').split()))}" +CMEM_VARS += "CMEM_DEVICETREE ${@' '.join(map(lambda s: 'CMEM_DEVICETREE_' + s, (d.getVar('CMEM_MACHINE') or '').split()))}" + +# Add correct cmem.dtsi to SRC_URI for each variant for a given machine +python do_unpack() { + old_overrides = d.getVar('OVERRIDES', False) + + # Initialize with empty string to simplify logic to append to SRC_URI + cmem_dtsi = set(['']) + + for cmem_machine in (d.getVar('CMEM_MACHINE') or '').split(): + # Create copy of data for additional override + localdata = bb.data.createCopy(d) + localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides)) + bb.data.update_data(localdata) + + cmem_dtsi.add(localdata.getVar('CMEM_DTSI')) + + d.appendVar('SRC_URI', ' file://'.join(cmem_dtsi)) + bb.build.exec_func('base_do_unpack', d) +} + +python do_setup_cmem() { + import shutil + + old_overrides = d.getVar('OVERRIDES', False) + + if d.getVar('RESERVE_CMEM') is '1': + for cmem_machine in (d.getVar('CMEM_MACHINE') or '').split(): + # Create copy of data for additional override + localdata = bb.data.createCopy(d) + localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides)) + bb.data.update_data(localdata) + + # Get source directory and dtsi filename + src_dir = localdata.getVar('WORKDIR') + src_dtsi = localdata.getVar('CMEM_DTSI') + + # Get destination directory and destination dtsi filename which adds + # the MACHINE prefix. + dst_dir = os.path.join(localdata.getVar('S'), localdata.expand('arch/${ARCH}/boot/dts')) + dst_dtsi = localdata.expand('${MACHINE}-${CMEM_DTSI}') + + # Copy cmem.dtsi into source tree + if localdata.getVar('ARCH') is 'arm64': + shutil.copy(os.path.join(src_dir,src_dtsi), os.path.join(dst_dir,'ti',dst_dtsi)) + else: + shutil.copy(os.path.join(src_dir,src_dtsi), os.path.join(dst_dir,dst_dtsi)) + + # Inject dtsi into each dts in list + for dtb in (localdata.getVar('CMEM_DEVICETREE') or '').split(): + dts = dtb[:-4] + '.dts' + + with open(os.path.join(dst_dir,dts), 'a') as dts_file: + dts_file.write('\n#include "%s"\n' % dst_dtsi) +} + +do_patch[postfuncs] += "do_setup_cmem" +do_patch[vardeps] += "${CMEM_VARS}" diff --git a/bsp/meta-ti/recipes-kernel/linux/files/cmem.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/cmem.dtsi new file mode 100644 index 00000000..23119861 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/cmem.dtsi @@ -0,0 +1,38 @@ +/* + * This is a placeholder for CMEM reserved memory declarations. This + * is simply an example and does not actually reserve any memory for + * CMEM. + * + * The commented sections below provide an example for how to provide + * a reserved memory region for CMEM to use as a buffer pool. + */ +/ { +/* + reserved-memory { + cmem_block_mem_0: cmem_block_mem@a0000000 { + reg = <0x0 0xa0000000 0x0 0x0a000000>; + no-map; + status = "okay"; + }; + }; +*/ + + cmem { + compatible = "ti,cmem"; + #address-cells = <1>; + #size-cells = <0>; + + #pool-size-cells = <2>; + + status = "disabled"; +/* + status = "okay"; + + cmem_block_0: cmem_block@0 { + reg = <0>; + memory-region = <&cmem_block_mem_0>; + cmem-buf-pools = <1 0x0 0x0a000000>; + }; +*/ + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/configs/empty b/bsp/meta-ti/recipes-kernel/linux/files/configs/empty new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/configs/empty diff --git a/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/am571x-pru-uio.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/am571x-pru-uio.dtsi new file mode 100644 index 00000000..4228827e --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/am571x-pru-uio.dtsi @@ -0,0 +1,284 @@ +&pruss_soc_bus1 { + uio_pruss1_mdio { + status = "okay"; + + compatible = "ti,davinci_mdio"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&dpll_gmac_h13x2_ck>; + clock-names = "fck"; + bus_freq = <1000000>; + reg = <0x32400 0x90>; + + reset-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>; + reset-delay-us = <2>; /* PHY datasheet states 1uS min */ + uio_pruss1_eth0_phy: uio_ethernet-phy@0 { + reg = <0>; + }; + + uio_pruss1_eth1_phy: uio_ethernet-phy@1 { + reg = <1>; + }; + }; + + uio_pruss1_mem: uio_pruss1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4b200000 0x2000>, + <0x4b202000 0x2000>, + <0x4b210000 0x8000>, + <0x4b220000 0x5404>, + <0x4b226000 0x474>, + <0x4b22e000 0xc04>, + <0x4b232000 0x154>; + mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg", + "iep", "mii_rt"; + status = "okay"; + }; + uio_pruss1_mem2: uio_pruss1_mem2 { + compatible = "ti,uio-module-drv"; + mem = <0x4b228000 0xd4>, + <0x4b230000 0x174>, + <0x4b232400 0x234>, + <0x40300000 0x40000>; + mem-names = "uart", "ecap", "mdio", "ocmc"; + status = "okay"; + }; + uio_pruss1_evt0: uio_pruss1_evt0 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt1: uio_pruss1_evt1 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt2: uio_pruss1_evt2 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt3: uio_pruss1_evt3 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt4: uio_pruss1_evt4 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt5: uio_pruss1_evt5 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt6: uio_pruss1_evt6 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt7: uio_pruss1_evt7 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + + uio_pruss1_0_mem: uio_pruss1_0_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4b234000 0x3000>, + <0x4b222000 0xb4>, + <0x4b222400 0x3f4>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; + + uio_pruss1_1_mem: uio_pruss1_1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4b238000 0x3000>, + <0x4b224000 0xb4>, + <0x4b224400 0x3f4>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; +}; + +&pruss_soc_bus2 { + uio_pruss2_mdio { + compatible = "ti,davinci_mdio"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&dpll_gmac_h13x2_ck>; + clock-names = "fck"; + bus_freq = <1000000>; + reg = <0x32400 0x90>; + status = "okay"; + + reset-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>; + reset-delay-us = <2>; /* PHY datasheet states 1uS min */ + + uio_pruss2_eth0_phy: ethernet-phy@0 { + reg = <0>; + }; + + uio_pruss2_eth1_phy: ethernet-phy@1 { + reg = <1>; + }; + }; + + uio_pruss2_mem: uio_pruss2_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4b280000 0x2000>, + <0x4b282000 0x2000>, + <0x4b290000 0x8000>, + <0x4b2a0000 0x5404>, + <0x4b2a6000 0x474>, + <0x4b2ae000 0xc04>, + <0x4b2b2000 0x154>; + mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg", + "iep", "mii_rt"; + status = "okay"; + }; + uio_pruss2_mem2: uio_pruss2_mem2 { + compatible = "ti,uio-module-drv"; + mem = <0x4b2a8000 0xd4>, + <0x4b2b0000 0x174>, + <0x4b2b2400 0x234>, + <0x40340000 0x40000>; + mem-names = "uart", "ecap", "mdio", "ocmc"; + status = "okay"; + }; + uio_pruss2_evt0: uio_pruss2_evt0 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt1: uio_pruss2_evt1 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt2: uio_pruss2_evt2 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt3: uio_pruss2_evt3 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt4: uio_pruss2_evt4 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt5: uio_pruss2_evt5 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt6: uio_pruss2_evt6 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt7: uio_pruss2_evt7 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + + uio_pruss2_0_mem: uio_pruss2_0_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4b2b4000 0x3000>, + <0x4b2a2000 0xb4>, + <0x4b2a2400 0x3f4>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; + uio_pruss2_1_mem: uio_pruss2_1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4b2b8000 0x3000>, + <0x4b2a4000 0xb4>, + <0x4b2a4400 0x3f4>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; + }; + +&pruss1_eth { + status = "disabled"; +}; + +&pruss1_emac0 { + status = "disabled"; +}; + +&pruss1_emac1 { + status = "disabled"; +}; + +&pruss2_emac0 { + status = "disabled"; +}; + +&pruss2_emac1 { + status = "disabled"; +}; + +&pruss1 { + status = "disabled"; +}; + +&pru1_0 { + status = "disabled"; +}; + +&pru1_1 { + status = "disabled"; +}; + +&pruss1_intc { + status = "disabled"; +}; + +&pruss1_mdio { + status = "disabled"; +}; + +&pruss2 { + status = "disabled"; +}; + +&pru2_0 { + status = "disabled"; +}; + +&pru2_1 { + status = "disabled"; +}; + +&pruss2_intc { + status = "disabled"; +}; + +&pruss2_mdio { + status = "disabled"; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/am57xx-pru-uio.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/am57xx-pru-uio.dtsi new file mode 100644 index 00000000..17b3f963 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/am57xx-pru-uio.dtsi @@ -0,0 +1,252 @@ +&pruss_soc_bus1 { + uio_pruss1_mem: uio_pruss1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4b200000 0x2000>, + <0x4b202000 0x2000>, + <0x4b210000 0x8000>, + <0x4b220000 0x2000>, + <0x4b226000 0x2000>, + <0x4b22e000 0x31c>, + <0x4b232000 0x58>; + mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg", + "iep", "mii_rt"; + status = "okay"; + }; + uio_pruss1_mem2: uio_pruss1_mem2 { + compatible = "ti,uio-module-drv"; + mem = <0x4b228000 0x38>, + <0x4b230000 0x60>, + <0x4b232400 0x90>, + <0x40340000 0x40000>; + mem-names = "uart", "ecap", "mdio", "ocmc"; + status = "okay"; + }; + uio_pruss1_evt0: uio_pruss1_evt0 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt1: uio_pruss1_evt1 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt2: uio_pruss1_evt2 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt3: uio_pruss1_evt3 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt4: uio_pruss1_evt4 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt5: uio_pruss1_evt5 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt6: uio_pruss1_evt6 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt7: uio_pruss1_evt7 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + + uio_pruss1_0_mem: uio_pruss1_0_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4b234000 0x3000>, + <0x4b222000 0x400>, + <0x4b222400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; + + uio_pruss1_1_mem: uio_pruss1_1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4b238000 0x3000>, + <0x4b224000 0x400>, + <0x4b224400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; +}; + +&pruss1 { + status = "disabled"; +}; + +&pru1_0 { + status = "disabled"; +}; + +&pru1_1 { + status = "disabled"; +}; + +&pruss1_intc { + status = "disabled"; +}; + +&pruss_soc_bus2 { + uio_pruss2_mdio: uio_pruss2_mdio { + compatible = "ti,davinci_mdio"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&dpll_gmac_h13x2_ck>; + clock-names = "fck"; + bus_freq = <1000000>; + reg = <0x32400 0x90>; + status = "disabled"; + }; + + uio_pruss2_mem: uio_pruss2_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4b280000 0x2000>, + <0x4b282000 0x2000>, + <0x4b290000 0x8000>, + <0x4b2a0000 0x2000>, + <0x4b2a6000 0x2000>, + <0x4b2ae000 0x31c>, + <0x4b2b2000 0x58>; + mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg", + "iep", "mii_rt"; + status = "okay"; + }; + uio_pruss2_mem2: uio_pruss2_mem2 { + compatible = "ti,uio-module-drv"; + mem = <0x4b2a8000 0x38>, + <0x4b2b0000 0x60>, + <0x4b2b2400 0x90>, + <0x40300000 0x40000>; + mem-names = "uart", "ecap", "mdio", "ocmc"; + status = "okay"; + }; + uio_pruss2_evt0: uio_pruss2_evt0 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt1: uio_pruss2_evt1 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt2: uio_pruss2_evt2 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt3: uio_pruss2_evt3 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt4: uio_pruss2_evt4 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt5: uio_pruss2_evt5 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt6: uio_pruss2_evt6 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt7: uio_pruss2_evt7 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + + uio_pruss2_0_mem: uio_pruss2_0_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4b2b4000 0x3000>, + <0x4b2a2000 0x400>, + <0x4b2a2400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; + uio_pruss2_1_mem: uio_pruss2_1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4b2b8000 0x3000>, + <0x4b2a4000 0x400>, + <0x4b2a4400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; +}; + +&uio_pruss2_mdio { + reset-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>, + <&gpio5 9 GPIO_ACTIVE_LOW>; + reset-delay-us = <2>; /* PHY datasheet states 1uS min */ +}; + +&uio_pruss2_mdio { + status = "okay"; + uio_pruss2_eth0_phy: uio_pruss2_eth0_phy@0 { + reg = <0>; + }; + + uio_pruss2_eth1_phy: uio_pruss2_eth1_phy@1 { + reg = <1>; + }; +}; + +&pruss2_emac0 { + status = "disabled"; +}; + +&pruss2_emac1 { + status = "disabled"; +}; + +&pruss2 { + status = "disabled"; +}; + +&pru2_0 { + status = "disabled"; +}; + +&pru2_1 { + status = "disabled"; +}; + +&pruss2_intc { + status = "disabled"; +}; + +&pruss2_mdio { + status = "disabled"; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem-am571x.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem-am571x.dtsi new file mode 100644 index 00000000..ebd61296 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem-am571x.dtsi @@ -0,0 +1,29 @@ +/ { + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + cmem_block_mem_0: cmem_block_mem@a0000000 { + reg = <0x0 0xa0000000 0x0 0x0c000000>; + no-map; + status = "okay"; + }; + }; + + cmem { + compatible = "ti,cmem"; + #address-cells = <1>; + #size-cells = <0>; + + #pool-size-cells = <2>; + + status = "okay"; + + cmem_block_0: cmem_block@0 { + reg = <0>; + memory-region = <&cmem_block_mem_0>; + cmem-buf-pools = <1 0x0 0x0c000000>; + }; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem-am574x.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem-am574x.dtsi new file mode 100644 index 00000000..8fb3e871 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem-am574x.dtsi @@ -0,0 +1,40 @@ +/ { + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + cmem_block_mem_0: cmem_block_mem@a0000000 { + reg = <0x0 0xa0000000 0x0 0x18000000>; + no-map; + status = "okay"; + }; + + cmem_block_mem_1_ocmc3: cmem_block_mem@40500000 { + reg = <0x0 0x40500000 0x0 0x100000>; + no-map; + status = "okay"; + }; + }; + + cmem { + compatible = "ti,cmem"; + #address-cells = <1>; + #size-cells = <0>; + + #pool-size-cells = <2>; + + status = "okay"; + + cmem_block_0: cmem_block@0 { + reg = <0>; + memory-region = <&cmem_block_mem_0>; + cmem-buf-pools = <1 0x0 0x18000000>; + }; + + cmem_block_1: cmem_block@1 { + reg = <1>; + memory-region = <&cmem_block_mem_1_ocmc3>; + }; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem-dra71x.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem-dra71x.dtsi new file mode 100644 index 00000000..ebd61296 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem-dra71x.dtsi @@ -0,0 +1,29 @@ +/ { + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + cmem_block_mem_0: cmem_block_mem@a0000000 { + reg = <0x0 0xa0000000 0x0 0x0c000000>; + no-map; + status = "okay"; + }; + }; + + cmem { + compatible = "ti,cmem"; + #address-cells = <1>; + #size-cells = <0>; + + #pool-size-cells = <2>; + + status = "okay"; + + cmem_block_0: cmem_block@0 { + reg = <0>; + memory-region = <&cmem_block_mem_0>; + cmem-buf-pools = <1 0x0 0x0c000000>; + }; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem-dra72x.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem-dra72x.dtsi new file mode 100644 index 00000000..ebd61296 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem-dra72x.dtsi @@ -0,0 +1,29 @@ +/ { + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + cmem_block_mem_0: cmem_block_mem@a0000000 { + reg = <0x0 0xa0000000 0x0 0x0c000000>; + no-map; + status = "okay"; + }; + }; + + cmem { + compatible = "ti,cmem"; + #address-cells = <1>; + #size-cells = <0>; + + #pool-size-cells = <2>; + + status = "okay"; + + cmem_block_0: cmem_block@0 { + reg = <0>; + memory-region = <&cmem_block_mem_0>; + cmem-buf-pools = <1 0x0 0x0c000000>; + }; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem.dtsi new file mode 100644 index 00000000..c7781c48 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/dra7xx/cmem.dtsi @@ -0,0 +1,40 @@ +/ { + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + cmem_block_mem_0: cmem_block_mem@a0000000 { + reg = <0x0 0xa0000000 0x0 0x0c000000>; + no-map; + status = "okay"; + }; + + cmem_block_mem_1_ocmc3: cmem_block_mem@40500000 { + reg = <0x0 0x40500000 0x0 0x100000>; + no-map; + status = "okay"; + }; + }; + + cmem { + compatible = "ti,cmem"; + #address-cells = <1>; + #size-cells = <0>; + + #pool-size-cells = <2>; + + status = "okay"; + + cmem_block_0: cmem_block@0 { + reg = <0>; + memory-region = <&cmem_block_mem_0>; + cmem-buf-pools = <1 0x0 0x0c000000>; + }; + + cmem_block_1: cmem_block@1 { + reg = <1>; + memory-region = <&cmem_block_mem_1_ocmc3>; + }; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/k2e/cmem.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/k2e/cmem.dtsi new file mode 100644 index 00000000..c233768d --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/k2e/cmem.dtsi @@ -0,0 +1,36 @@ +/ { + reserved-memory { + cmem_block_mem_0: cmem_block_mem@830000000 { + reg = <0x00000008 0x30000000 0x00000000 0x18000000>; + no-map; + status = "okay"; + }; + }; + + cmem { + compatible = "ti,cmem"; + #address-cells = <1>; + #size-cells = <0>; + + #pool-size-cells = <2>; + + status = "okay"; + + cmem_block_0: cmem_block@0 { + reg = <0>; + memory-region = <&cmem_block_mem_0>; + cmem-buf-pools = <1 0x00000000 0x18000000>; + }; + + cmem_block_1: cmem_block@1 { + reg = <1>; + sram = <&sram_cmem>; + }; + }; +}; + +&msm_ram { + sram_cmem: sram-cmem@80000 { + reg = <0x80000 0xc0000>; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/k2e/k2e-uio.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/k2e/k2e-uio.dtsi new file mode 100644 index 00000000..052ae97c --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/k2e/k2e-uio.dtsi @@ -0,0 +1,32 @@ +/ { + soc { + uio_hyperlink0: hyperlink0 { + compatible = "ti,uio-module-drv"; + mem = <0x21400000 0x00001000 + 0x40000000 0x10000000 + 0x0231a000 0x00002000>; + clocks = <&clkhyperlink0>; + interrupts = <0 387 0x101>; + cfg-params + { + ti,serdes_refclk_khz = <312500>; + ti,serdes_maxserrate_khz = <6250000>; + ti,serdes_lanerate = "half"; + ti,serdes_numlanes = <4>; + ti,serdes_c1 = <4 4 4 4>; + ti,serdes_c2 = <0 0 0 0>; + ti,serdes_cm = <0 0 0 0>; + ti,serdes_tx_att = <12 12 12 12>; + ti,serdes_tx_vreg = <4 4 4 4>; + ti,serdes_rx_att = <11 11 11 11>; + ti,serdes_rx_boost = <3 3 3 3>; + }; + }; + uio_srss: srss { + compatible = "ti,uio-module-drv"; + mem = <0x02330000 0x0000400>; + clocks=<&clksr>; + interrupts = <0 0x173 0xf01>; + }; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/k2g/cmem.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/k2g/cmem.dtsi new file mode 100644 index 00000000..4c68d82d --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/k2g/cmem.dtsi @@ -0,0 +1,37 @@ +/ { + reserved-memory { + + cmem_block_mem_0: cmem_block_mem@818000000 { + reg = <0x00000008 0x18000000 0x00000000 0x5000000>; + no-map; + status = "okay"; + }; + }; + + cmem { + compatible = "ti,cmem"; + #address-cells = <1>; + #size-cells = <0>; + + #pool-size-cells = <2>; + + status = "okay"; + + cmem_block_0: cmem_block@0 { + reg = <0>; + memory-region = <&cmem_block_mem_0>; + cmem-buf-pools = <1 0x00000000 0x5000000>; + }; + + cmem_block_1: cmem_block@1 { + reg = <1>; + sram = <&sram_cmem>; + }; + }; +}; + +&msm_ram { + sram_cmem: sram-cmem@a0000 { + reg = <0xa0000 0x57000>; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/k2g/keystone-k2g-pru-uio.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/k2g/keystone-k2g-pru-uio.dtsi new file mode 100644 index 00000000..e4baca50 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/k2g/keystone-k2g-pru-uio.dtsi @@ -0,0 +1,391 @@ +&pruss_soc_bus0 { + uio_pruss1_mdio: uio_mdio@32400 { + compatible = "ti,davinci_mdio"; + reg = <0x32400 0x90>; + clocks = <&k2g_clks 0x0014 1>; + clock-names = "fck"; + #address-cells = <1>; + #size-cells = <0>; + bus_freq = <2500000>; + status = "disabled"; + }; + + uio_pruss1_mem: uio_pruss1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x20a80000 0x2000>, + <0x20a82000 0x2000>, + <0x20a90000 0x10000>, + <0x20aa0000 0x2000>, + <0x20aa6000 0x2000>, + <0x20aae000 0x31c>, + <0x20ab2000 0x70>; + mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg", + "iep", "mii_rt"; + status = "okay"; + }; + uio_pruss1_mem2: uio_pruss1_mem2 { + compatible = "ti,uio-module-drv"; + mem = <0x20aa8000 0x38>, + <0x20ab0000 0x60>, + <0x20ab2400 0x90>, + <0x0c080000 0xe000>; + mem-names = "uart", "ecap", "mdio", "ocmc"; + status = "okay"; + }; + uio_pruss1_evt0: uio_pruss1_evt0 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 224 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + uio_pruss1_evt1: uio_pruss1_evt1 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 225 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + uio_pruss1_evt2: uio_pruss1_evt2 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 226 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + uio_pruss1_evt3: uio_pruss1_evt3 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 227 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + uio_pruss1_evt4: uio_pruss1_evt4 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 228 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + uio_pruss1_evt6: uio_pruss1_evt6 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 230 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + uio_pruss1_evt7: uio_pruss1_evt7 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 231 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + + uio_pruss1_0_mem: uio_pruss1_0_mem { + compatible = "ti,uio-module-drv"; + mem = <0x20ab4000 0x3000>, + <0x20aa2000 0x400>, + <0x20aa2400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; + + uio_pruss1_1_mem: uio_pruss1_1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x20ab8000 0x3000>, + <0x20aa4000 0x400>, + <0x20aa4400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; +}; + +&pruss_soc_bus1 { + uio_pruss2_mdio: uio_mdio@32400 { + compatible = "ti,davinci_mdio"; + reg = <0x32400 0x90>; + clocks = <&k2g_clks 0x0015 1>; + clock-names = "fck"; + #address-cells = <1>; + #size-cells = <0>; + bus_freq = <2500000>; + status = "disabled"; + }; + + uio_pruss2_mem: uio_pruss2_mem { + compatible = "ti,uio-module-drv"; + mem = <0x20ac0000 0x2000>, + <0x20ac2000 0x2000>, + <0x20ad0000 0x10000>, + <0x20ae0000 0x2000>, + <0x20ae6000 0x2000>, + <0x20aee000 0x31c>, + <0x20af2000 0x70>; + mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg", + "iep", "mii_rt"; + status = "okay"; + }; + uio_pruss2_mem2: uio_pruss2_mem2 { + compatible = "ti,uio-module-drv"; + mem = <0x20ae8000 0x38>, + <0x20af0000 0x60>, + <0x20af2400 0x90>, + <0x0c08e000 0xe000>; + mem-names = "uart", "ecap", "mdio", "ocmc"; + status = "okay"; + }; + uio_pruss2_evt0: uio_pruss2_evt0 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 232 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + uio_pruss2_evt1: uio_pruss2_evt1 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 233 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + uio_pruss2_evt2: uio_pruss2_evt2 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 234 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + uio_pruss2_evt3: uio_pruss2_evt3 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 235 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + uio_pruss2_evt4: uio_pruss2_evt4 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 236 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + uio_pruss2_evt6: uio_pruss2_evt6 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 238 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + uio_pruss2_evt7: uio_pruss2_evt7 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 239 0xf01>; + interrupt-mode = <0>; + status = "okay"; + }; + + uio_pruss2_0_mem: uio_pruss2_0_mem { + compatible = "ti,uio-module-drv"; + mem = <0x20af4000 0x3000>, + <0x20ae2000 0x400>, + <0x20ae2400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; + uio_pruss2_1_mem: uio_pruss2_1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x20af8000 0x3000>, + <0x20ae4000 0x400>, + <0x20ae4400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; +}; + +&k2g_pinctrl { + uio_pruss1_mdio_eth_default: uio_pruss1_mdio_eth_default { + pinctrl-single,pins = < + K2G_CORE_IOPAD(0x12cc) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE0) /* pr0_mdio_data.pr0_mdio_data */ + K2G_CORE_IOPAD(0x12d0) (BUFFER_CLASS_B | PIN_PULLDOWN | MUX_MODE0) /* pr0_mdio_mdclk.pr0_mdio_mdclk */ + K2G_CORE_IOPAD(0x105c) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE3) /* gpmc_wait1.gpio0_23 (pr0_mii0_resetn) */ + K2G_CORE_IOPAD(0x1070) (BUFFER_CLASS_B | PIN_PULLUP | MUX_MODE3) /* gpmc_csn2.gpio0_28 (pr0_mii0_intn) */ + K2G_CORE_IOPAD(0x1054) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE3) /* gpmc_be1n.gpio0_21 (pr0_mii1_resetn) */ + K2G_CORE_IOPAD(0x1074) (BUFFER_CLASS_B | PIN_PULLUP | MUX_MODE3) /* gpmc_csn3.gpio0_29 (pr0_mii1_intn) */ + + /* PRUSS0 External Mux routing */ + K2G_CORE_IOPAD(0x11d4) (BUFFER_CLASS_B | MUX_MODE3) /* uart0_ctsn.gpio0_106 */ + K2G_CORE_IOPAD(0x11d8) (BUFFER_CLASS_B | MUX_MODE3) /* uart0_rtsn.gpio0_107 */ + K2G_CORE_IOPAD(0x11fc) (BUFFER_CLASS_B | MUX_MODE3) /* dcan0_rx.gpio1_57 */ + K2G_CORE_IOPAD(0x1200) (BUFFER_CLASS_B | MUX_MODE3) /* dcan0_tx.gpio1_56 */ + K2G_CORE_IOPAD(0x1224) (BUFFER_CLASS_B | MUX_MODE3) /* qspi_csn2.gpio1_66 */ + K2G_CORE_IOPAD(0x1228) (BUFFER_CLASS_B | MUX_MODE3) /* qspi_csn3.gpio1_67 */ + + /* PRUSS0 PRU0 Ethernet */ + K2G_CORE_IOPAD(0x122c) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru0_gpo0.pr0_pru0_gpi0 (pr0_mii0_rxd0) */ + K2G_CORE_IOPAD(0x1230) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru0_gpo1.pr0_pru0_gpi1 (pr0_mii0_rxd1) */ + K2G_CORE_IOPAD(0x1234) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru0_gpo2.pr0_pru0_gpi2 (pr0_mii0_rxd2) */ + K2G_CORE_IOPAD(0x1238) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru0_gpo3.pr0_pru0_gpi3 (pr0_mii0_rxd3) */ + K2G_CORE_IOPAD(0x123c) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru0_gpo4.pr0_pru0_gpi4 (pr0_mii0_rxdv) */ + K2G_CORE_IOPAD(0x1240) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru0_gpo5.pr0_pru0_gpi5 (pr0_mii0_rxer) */ + K2G_CORE_IOPAD(0x1244) (BUFFER_CLASS_B | MUX_MODE1) /* pr0_pru0_gpo6.pr0_pru0_gpi6 (pr0_mii_mr0_clk) */ + + K2G_CORE_IOPAD(0x124c) (BUFFER_CLASS_B | MUX_MODE1) /* pr0_pru0_gpo8.pr0_pru0_gpi8 (pr0_mii0_rxlink) */ + K2G_CORE_IOPAD(0x1250) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru0_gpo9.pr0_pru0_gpi9 (pr0_mii0_col) */ + K2G_CORE_IOPAD(0x1254) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru0_gpo10.pr0_pru0_gpi10 (pr0_mii0_crs) */ + + K2G_CORE_IOPAD(0x12a8) (BUFFER_CLASS_B | MUX_MODE0) /* pr0_pru1_gpo11.pr0_pru1_gpo11 (pr0_mii0_txd0) */ + K2G_CORE_IOPAD(0x12ac) (BUFFER_CLASS_B | MUX_MODE0) /* pr0_pru1_gpo12.pr0_pru1_gpo12 (pr0_mii0_txd1) */ + K2G_CORE_IOPAD(0x12b0) (BUFFER_CLASS_B | MUX_MODE0) /* pr0_pru1_gpo13.pr0_pru1_gpo13 (pr0_mii0_txd2) */ + K2G_CORE_IOPAD(0x12b4) (BUFFER_CLASS_B | MUX_MODE0) /* pr0_pru1_gpo14.pr0_pru1_gpo14 (pr0_mii0_txd3) */ + K2G_CORE_IOPAD(0x12b8) (BUFFER_CLASS_B | MUX_MODE0) /* pr0_pru1_gpo15.pr0_pru1_gpo15 (pr0_mii0_txen) */ + K2G_CORE_IOPAD(0x12bc) (BUFFER_CLASS_B | MUX_MODE1) /* pr0_pru1_gpo16.pr0_pru1_gpo16 (pr0_mii_mt0_clk) */ + + /* PRUSS0 PRU1 Ethernet */ + K2G_CORE_IOPAD(0x127c) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru1_gpo0.pr0_pru1_gpi0 (pr0_mii1_rxd0) */ + K2G_CORE_IOPAD(0x1280) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru1_gpo1.pr0_pru1_gpi1 (pr0_mii1_rxd1) */ + K2G_CORE_IOPAD(0x1284) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru1_gpo2.pr0_pru1_gpi2 (pr0_mii1_rxd2) */ + K2G_CORE_IOPAD(0x1288) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru1_gpo3.pr0_pru1_gpi3 (pr0_mii1_rxd3) */ + K2G_CORE_IOPAD(0x128c) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru1_gpo4.pr0_pru1_gpi4 (pr0_mii1_rxdv) */ + K2G_CORE_IOPAD(0x1290) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru1_gpo5.pr0_pru1_gpi5 (pr0_mii1_rxer) */ + K2G_CORE_IOPAD(0x1294) (BUFFER_CLASS_B | MUX_MODE1) /* pr0_pru1_gpo6.pr0_pru1_gpi6 (pr0_mii_mr1_clk) */ + + K2G_CORE_IOPAD(0x129c) (BUFFER_CLASS_B | MUX_MODE1) /* pr0_pru1_gpo8.pr0_pru1_gpi8 (pr0_mii1_rxlink) */ + K2G_CORE_IOPAD(0x12a0) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru1_gpo9.pr0_pru1_gpi9 (pr0_mii1_col) */ + K2G_CORE_IOPAD(0x12a4) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr0_pru1_gpo10.pr0_pru1_gpi10 (pr0_mii1_crs) */ + + K2G_CORE_IOPAD(0x1258) (BUFFER_CLASS_B | MUX_MODE0) /* pr0_pru0_gpo11.pr0_pru0_gpo11 (pr0_mii1_txd0) */ + K2G_CORE_IOPAD(0x125c) (BUFFER_CLASS_B | MUX_MODE0) /* pr0_pru0_gpo12.pr0_pru0_gpo12 (pr0_mii1_txd1) */ + K2G_CORE_IOPAD(0x1260) (BUFFER_CLASS_B | MUX_MODE0) /* pr0_pru0_gpo13.pr0_pru0_gpo13 (pr0_mii1_txd2) */ + K2G_CORE_IOPAD(0x1264) (BUFFER_CLASS_B | MUX_MODE0) /* pr0_pru0_gpo14.pr0_pru0_gpo14 (pr0_mii1_txd3) */ + K2G_CORE_IOPAD(0x1268) (BUFFER_CLASS_B | MUX_MODE0) /* pr0_pru0_gpo15.pr0_pru0_gpo15 (pr0_mii1_txen) */ + K2G_CORE_IOPAD(0x126c) (BUFFER_CLASS_B | MUX_MODE1) /* pr0_pru0_gpo16.pr0_pru0_gpo16 (pr0_mii_mt1_clk) */ + >; + }; + + uio_pruss2_mdio_eth_default: uio_pruss2_mdio_eth_default { + pinctrl-single,pins = < + K2G_CORE_IOPAD(0x1374) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE0) /* pr1_mdio_data.pr1_mdio_data */ + K2G_CORE_IOPAD(0x1378) (BUFFER_CLASS_B | PIN_PULLDOWN | MUX_MODE0) /* pr1_mdio_mdclk.pr1_mdio_mdclk */ + K2G_CORE_IOPAD(0x1050) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE3) /* gpmc_be0ncle.gpio0_20 (pr1_mii0_resetn) */ + K2G_CORE_IOPAD(0x1044) (BUFFER_CLASS_B | PIN_PULLUP | MUX_MODE3) /* gpmc_advnale.gpio0_17 (pr1_mii0_intn) */ + K2G_CORE_IOPAD(0x1060) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE3) /* gpmc_wpn.gpio0_24 (pr1_mii1_resetn) */ + K2G_CORE_IOPAD(0x1088) (BUFFER_CLASS_B | PIN_PULLUP | MUX_MODE3) /* gpmc_wait0.gpio0_22 (pr1_mii1_intn) */ + + /* PRUSS1 PRU0 Ethernet */ + K2G_CORE_IOPAD(0x12d4) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru0_gpo0.pr1_pru0_gpi0 (pr1_mii0_rxd0) */ + K2G_CORE_IOPAD(0x12d8) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru0_gpo1.pr1_pru0_gpi1 (pr1_mii0_rxd1) */ + K2G_CORE_IOPAD(0x12dc) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru0_gpo2.pr1_pru0_gpi2 (pr1_mii0_rxd2) */ + K2G_CORE_IOPAD(0x12e0) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru0_gpo3.pr1_pru0_gpi3 (pr1_mii0_rxd3) */ + K2G_CORE_IOPAD(0x12e4) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru0_gpo4.pr1_pru0_gpi4 (pr1_mii0_rxdv) */ + K2G_CORE_IOPAD(0x12e8) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru0_gpo5.pr1_pru0_gpi5 (pr1_mii0_rxer) */ + K2G_CORE_IOPAD(0x12ec) (BUFFER_CLASS_B | MUX_MODE1) /* pr1_pru0_gpo6.pr1_pru0_gpi6 (pr1_mii_mr0_clk) */ + + K2G_CORE_IOPAD(0x12f4) (BUFFER_CLASS_B | MUX_MODE1) /* pr1_pru0_gpo8.pr1_pru0_gpi8 (pr1_mii0_rxlink) */ + K2G_CORE_IOPAD(0x12f8) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru0_gpo9.pr1_pru0_gpi9 (pr1_mii0_col) */ + K2G_CORE_IOPAD(0x12fc) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru0_gpo10.pr1_pru0_gpi10 (pr1_mii0_crs) */ + + K2G_CORE_IOPAD(0x1350) (BUFFER_CLASS_B | MUX_MODE0) /* pr1_pru1_gpo11.pr1_pru1_gpo11 (pr1_mii0_txd0) */ + K2G_CORE_IOPAD(0x1354) (BUFFER_CLASS_B | MUX_MODE0) /* pr1_pru1_gpo12.pr1_pru1_gpo12 (pr1_mii0_txd1) */ + K2G_CORE_IOPAD(0x1358) (BUFFER_CLASS_B | MUX_MODE0) /* pr1_pru1_gpo13.pr1_pru1_gpo13 (pr1_mii0_txd2) */ + K2G_CORE_IOPAD(0x135c) (BUFFER_CLASS_B | MUX_MODE0) /* pr1_pru1_gpo14.pr1_pru1_gpo14 (pr1_mii0_txd3) */ + K2G_CORE_IOPAD(0x1360) (BUFFER_CLASS_B | MUX_MODE0) /* pr1_pru1_gpo15.pr1_pru1_gpo15 (pr1_mii0_txen) */ + K2G_CORE_IOPAD(0x1364) (BUFFER_CLASS_B | MUX_MODE1) /* pr1_pru1_gpo16.pr1_pru1_gpo16 (pr1_mii_mt0_clk) */ + + /* PRUSS1 PRU1 Ethernet */ + K2G_CORE_IOPAD(0x1324) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru1_gpo0.pr1_pru1_gpi0 (pr1_mii1_rxd0) */ + K2G_CORE_IOPAD(0x132c) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru1_gpo2.pr1_pru1_gpi2 (pr1_mii1_rxd2) */ + K2G_CORE_IOPAD(0x1330) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru1_gpo3.pr1_pru1_gpi3 (pr1_mii1_rxd3) */ + K2G_CORE_IOPAD(0x1334) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru1_gpo4.pr1_pru1_gpi4 (pr1_mii1_rxdv) */ + K2G_CORE_IOPAD(0x1338) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru1_gpo5.pr1_pru1_gpi5 (pr1_mii1_rxer) */ + K2G_CORE_IOPAD(0x133c) (BUFFER_CLASS_B | MUX_MODE1) /* pr1_pru1_gpo6.pr1_pru1_gpi6 (pr1_mii_mr1_clk) */ + + K2G_CORE_IOPAD(0x1344) (BUFFER_CLASS_B | MUX_MODE1) /* pr1_pru1_gpo8.pr1_pru1_gpi8 (pr1_mii1_rxlink) */ + K2G_CORE_IOPAD(0x1348) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru1_gpo9.pr1_pru1_gpi9 (pr1_mii1_col) */ + K2G_CORE_IOPAD(0x134c) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE1) /* pr1_pru1_gpo10.pr1_pru1_gpi10 (pr1_mii1_crs) */ + + K2G_CORE_IOPAD(0x1300) (BUFFER_CLASS_B | MUX_MODE0) /* pr1_pru0_gpo11.pr1_pru0_gpo11 (pr1_mii1_txd0) */ + K2G_CORE_IOPAD(0x1304) (BUFFER_CLASS_B | MUX_MODE0) /* pr1_pru0_gpo12.pr1_pru0_gpo12 (pr1_mii1_txd1) */ + K2G_CORE_IOPAD(0x1308) (BUFFER_CLASS_B | MUX_MODE0) /* pr1_pru0_gpo13.pr1_pru0_gpo13 (pr1_mii1_txd2) */ + K2G_CORE_IOPAD(0x130c) (BUFFER_CLASS_B | MUX_MODE0) /* pr1_pru0_gpo14.pr1_pru0_gpo14 (pr1_mii1_txd3) */ + K2G_CORE_IOPAD(0x1310) (BUFFER_CLASS_B | MUX_MODE0) /* pr1_pru0_gpo15.pr1_pru0_gpo15 (pr1_mii1_txen) */ + K2G_CORE_IOPAD(0x1314) (BUFFER_CLASS_B | MUX_MODE1) /* pr1_pru0_gpo16.pr1_pru0_gpo16 (pr1_mii_mt1_clk) */ + >; + }; +}; + +&uio_pruss1_mdio { + status = "okay"; + pinctrl-0 = <&uio_pruss1_mdio_eth_default>; + pinctrl-names = "default"; + reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>, + <&gpio0 21 GPIO_ACTIVE_LOW>; + reset-delay-us = <20>; + + uio_pruss1_eth0_phy: uio-ethernet-phy@0 { + reg = <0>; + }; + + uio_pruss1_eth1_phy: uio-ethernet-phy@1 { + reg = <1>; + }; +}; + +&uio_pruss2_mdio { + status = "okay"; + pinctrl-0 = <&uio_pruss2_mdio_eth_default>; + pinctrl-names = "default"; + reset-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>, + <&gpio0 24 GPIO_ACTIVE_LOW>; + reset-delay-us = <20>; + + uio_pruss2_eth0_phy: uio-ethernet-phy@2 { + reg = <2>; + }; + + uio_pruss2_eth1_phy: uio-ethernet-phy@3 { + reg = <3>; + }; +}; + +&pruss0 { + status = "disabled"; +}; + +&pru0_0 { + status = "disabled"; +}; + +&pru0_1 { + status = "disabled"; +}; + +&pruss0_intc { + status = "disabled"; +}; + +&pruss0_mdio { + status = "disabled"; +}; + +&pruss1 { + status = "disabled"; +}; + +&pru1_0 { + status = "disabled"; +}; + +&pru1_1 { + status = "disabled"; +}; + +&pruss1_intc { + status = "disabled"; +}; + +&pruss1_mdio { + status = "disabled"; +}; + +&pruss0_emac0 { + status = "disabled"; +}; + +&pruss0_emac1 { + status = "disabled"; +}; + +&pruss1_emac0 { + status = "disabled"; +}; + +&pruss1_emac1 { + status = "disabled"; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/k2hk/cmem.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/k2hk/cmem.dtsi new file mode 100644 index 00000000..400aa9dd --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/k2hk/cmem.dtsi @@ -0,0 +1,37 @@ +/ { + reserved-memory { + + cmem_block_mem_0: cmem_block_mem@830000000 { + reg = <0x00000008 0x30000000 0x00000000 0x18000000>; + no-map; + status = "okay"; + }; + }; + + cmem { + compatible = "ti,cmem"; + #address-cells = <1>; + #size-cells = <0>; + + #pool-size-cells = <2>; + + status = "okay"; + + cmem_block_0: cmem_block@0 { + reg = <0>; + memory-region = <&cmem_block_mem_0>; + cmem-buf-pools = <1 0x00000000 0x18000000>; + }; + + cmem_block_1: cmem_block@1 { + reg = <1>; + sram = <&sram_cmem>; + }; + }; +}; + +&msm_ram { + sram_cmem: sram-cmem@100000 { + reg = <0x100000 0x480000>; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/k2hk/k2hk-uio.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/k2hk/k2hk-uio.dtsi new file mode 100644 index 00000000..cabe0b8d --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/k2hk/k2hk-uio.dtsi @@ -0,0 +1,58 @@ +/ { + soc { + uio_hyperlink0: hyperlink0 { + compatible = "ti,uio-module-drv"; + mem = <0x21400000 0x00001000 + 0x40000000 0x10000000 + 0x0231a000 0x00002000>; + clocks = <&clkhyperlink0>; + interrupts = <0 387 0x101>; + cfg-params + { + ti,serdes_refclk_khz = <312500>; + ti,serdes_maxserrate_khz = <6250000>; + ti,serdes_lanerate = "half"; + ti,serdes_numlanes = <4>; + ti,serdes_c1 = <4 4 4 4>; + ti,serdes_c2 = <0 0 0 0>; + ti,serdes_cm = <0 0 0 0>; + ti,serdes_tx_att = <12 12 12 12>; + ti,serdes_tx_vreg = <4 4 4 4>; + ti,serdes_rx_att = <11 11 11 11>; + ti,serdes_rx_boost = <3 3 3 3>; + }; + }; + + uio_hyperlink1: hyperlink1 { + compatible = "ti,uio-module-drv"; + mem = <0x21400000 0x00001000 + 0x28000000 0x08000000 + 0x0231c000 0x00002000>; + clocks = <&clkhyperlink1>; + interrupts = <0 388 0x101>; + cfg-params + { + ti,serdes_refclk_khz = <312500>; + ti,serdes_maxserrate_khz = <6250000>; + ti,serdes_lanerate = "half"; + ti,serdes_numlanes = <4>; + ti,serdes_c1 = <4 4 4 4>; + ti,serdes_c2 = <0 0 0 0>; + ti,serdes_cm = <0 0 0 0>; + ti,serdes_tx_att = <12 12 12 12>; + ti,serdes_tx_vreg = <4 4 4 4>; + ti,serdes_rx_att = <11 11 11 11>; + ti,serdes_rx_boost = <3 3 3 3>; + }; + }; + + uio_srio: srio { + compatible = "ti,uio-module-drv"; + mem = <0x0232C000 0x00002000 + 0x02900000 0x00040000 + 0x0232C000 0x00002000>; + clocks=<&clksrio>; + interrupts = <0 154 0xf01>; + }; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/k2l/cmem.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/k2l/cmem.dtsi new file mode 100644 index 00000000..da389e5d --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/k2l/cmem.dtsi @@ -0,0 +1,37 @@ +/ { + reserved-memory { + + cmem_block_mem_0: cmem_block_mem@830000000 { + reg = <0x00000008 0x30000000 0x00000000 0x18000000>; + no-map; + status = "okay"; + }; + }; + + cmem { + compatible = "ti,cmem"; + #address-cells = <1>; + #size-cells = <0>; + + #pool-size-cells = <2>; + + status = "okay"; + + cmem_block_0: cmem_block@0 { + reg = <0>; + memory-region = <&cmem_block_mem_0>; + cmem-buf-pools = <1 0x00000000 0x18000000>; + }; + + cmem_block_1: cmem_block@1 { + reg = <1>; + sram = <&sram_cmem>; + }; + }; +}; + +&msm_ram { + sram_cmem: sram-cmem@80000 { + reg = <0x80000 0xc0000>; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/k2l/k2l-uio.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/k2l/k2l-uio.dtsi new file mode 100644 index 00000000..a1b2e07e --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/k2l/k2l-uio.dtsi @@ -0,0 +1,10 @@ +/ { + soc { + uio_srss: srss { + compatible = "ti,uio-module-drv"; + mem = <0x02330000 0x0000400>; + clocks=<&clksr>; + interrupts = <0 0x173 0xf01>; + }; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/keystone/keystone-uio.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/keystone/keystone-uio.dtsi new file mode 100644 index 00000000..43b183db --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/keystone/keystone-uio.dtsi @@ -0,0 +1,186 @@ +/ { + soc { + uio_mpax: mpax { + compatible = "ti,uio-module-drv"; + mem = <0x00bc00000 0x00000a00>; + }; + + uio_edma3: edma3 { + compatible = "ti,uio-module-drv"; + mem = <0x02700000 0x000C0000>; + }; + uio_secmgr: secmgr { + compatible = "ti,uio-module-drv"; + mem = <0x002500100 0x00000004>; + }; + uio_qmss: qmss { + compatible = "ti,uio-module-drv"; + mem = <0x02a00000 0x00100000 + 0x23a00000 0x00200000>; + }; + + uio_qpend0: qpend0 { + compatible = "ti,uio-module-drv"; + interrupts = <0 44 0xf04>; + interrupt-mode = <1>; /* Interrupt mode oneshot */ + cfg-params + { + ti,qm-queue = <662>; + }; + }; + + uio_qpend1: qpend1 { + compatible = "ti,uio-module-drv"; + interrupts = <0 45 0xf04>; + interrupt-mode = <1>; /* Interrupt mode oneshot */ + cfg-params + { + ti,qm-queue = <663>; + }; + }; + + uio_qpend2: qpend2 { + compatible = "ti,uio-module-drv"; + interrupts = <0 46 0xf04>; + interrupt-mode = <1>; /* Interrupt mode oneshot */ + cfg-params + { + ti,qm-queue = <664>; + }; + }; + + uio_qpend3: qpend3 { + compatible = "ti,uio-module-drv"; + interrupts = <0 47 0xf04>; + interrupt-mode = <1>; /* Interrupt mode oneshot */ + cfg-params + { + ti,qm-queue = <665>; + }; + }; + + /* The following uio cic2 entries allow access to interupt output + * by the cic2 controller: The actual input event triggering the + * interrupt is assumed to be programmed other drivers + */ + uio_cic2_out32: cic2_out32 { + compatible = "ti,uio-module-drv"; + interrupts = <0 451 0xf01>; + }; + + uio_cic2_out33: cic2_out33 { + compatible = "ti,uio-module-drv"; + interrupts = <0 452 0xf01>; + }; + + uio_cic2_out34: cic2_out34 { + compatible = "ti,uio-module-drv"; + interrupts = <0 453 0xf01>; + }; + + uio_cic2_out35: cic2_out35 { + compatible = "ti,uio-module-drv"; + interrupts = <0 454 0xf01>; + }; + + uio_cic2_out36: cic2_out36 { + compatible = "ti,uio-module-drv"; + interrupts = <0 455 0xf01>; + }; + + uio_cic2_out37: cic2_out37 { + compatible = "ti,uio-module-drv"; + interrupts = <0 456 0xf01>; + }; + + uio_cic2_out38: cic2_out38 { + compatible = "ti,uio-module-drv"; + interrupts = <0 457 0xf01>; + }; + + uio_cic2_out39: cic2_out39 { + compatible = "ti,uio-module-drv"; + interrupts = <0 458 0xf01>; + }; + + uio_cic2_out40: cic2_out40 { + compatible = "ti,uio-module-drv"; + interrupts = <0 459 0xf01>; + }; + + uio_cic2_out41: cic2_out41 { + compatible = "ti,uio-module-drv"; + interrupts = <0 460 0xf01>; + }; + + uio_cic2_out42: cic2_out42 { + compatible = "ti,uio-module-drv"; + interrupts = <0 461 0xf01>; + }; + + uio_cic2_out43: cic2_out43 { + compatible = "ti,uio-module-drv"; + interrupts = <0 462 0xf01>; + }; + + uio_cic2_out44: cic2_out44 { + compatible = "ti,uio-module-drv"; + interrupts = <0 463 0xf01>; + }; + + uio_cic2_out45: cic2_out45 { + compatible = "ti,uio-module-drv"; + interrupts = <0 464 0xf01>; + }; + + uio_cic2_out46: cic2_out46 { + compatible = "ti,uio-module-drv"; + interrupts = <0 465 0xf01>; + }; + + uio_cic2_out47: cic2_out47 { + compatible = "ti,uio-module-drv"; + interrupts = <0 466 0xf01>; + }; + + uio_cic2_out18: cic2_out18 { + compatible = "ti,uio-module-drv"; + interrupts = <0 467 0xf01>; + }; + + uio_cic2_out19: cic2_out19 { + compatible = "ti,uio-module-drv"; + interrupts = <0 468 0xf01>; + }; + + uio_cic2_out22: cic2_out22 { + compatible = "ti,uio-module-drv"; + interrupts = <0 469 0xf01>; + }; + + uio_cic2_out23: cic2_out23 { + compatible = "ti,uio-module-drv"; + interrupts = <0 470 0xf01>; + }; + + uio_cic2_out50: cic2_out50 { + compatible = "ti,uio-module-drv"; + interrupts = <0 471 0xf01>; + }; + + uio_cic2_out51: cic2_out51 { + compatible = "ti,uio-module-drv"; + interrupts = <0 472 0xf01>; + }; + + uio_cic2_out66: cic2_out66 { + compatible = "ti,uio-module-drv"; + interrupts = <0 473 0xf01>; + }; + + uio_cic2_out67: cic2_out67 { + compatible = "ti,uio-module-drv"; + interrupts = <0 474 0xf01>; + }; + }; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/ti33x/am335x-pru-uio.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/ti33x/am335x-pru-uio.dtsi new file mode 100644 index 00000000..714b1d78 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/ti33x/am335x-pru-uio.dtsi @@ -0,0 +1,192 @@ +&pruss_soc_bus { + uio_pruss_mdio: uio_pruss_mdio@32400 { + compatible = "ti,davinci_mdio"; + reg = <0x32400 0x90>; + clocks = <&dpll_core_m4_ck>; + clock-names = "fck"; + bus_freq = <1000000>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + uio_pruss_mem: uio_pruss_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4a300000 0x2000>, + <0x4a302000 0x2000>, + <0x4a310000 0x3000>, + <0x4a320000 0x2000>, + <0x4a326000 0x2000>, + <0x4a32e000 0x31c>, + <0x4a332000 0x58>; + mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg", + "iep", "mii_rt"; + + status = "okay"; + }; + uio_pruss_mem2: uio_pruss_mem2 { + compatible = "ti,uio-module-drv"; + mem = <0x4a328000 0xd4>, + <0x4a330000 0x174>, + <0x4a332400 0x90>, + <0x40302000 0x0e000>; + mem-names = "uart", "ecap", "mdio", "ocmc"; + status = "okay"; + }; + + uio_pruss_evt0: uio_pruss_evt0 { + compatible = "ti,uio-module-drv"; + interrupts = <20>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt1: uio_pruss_evt1 { + compatible = "ti,uio-module-drv"; + interrupts = <21>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt2: uio_pruss_evt2 { + compatible = "ti,uio-module-drv"; + interrupts = <22>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt3: uio_pruss_evt3 { + compatible = "ti,uio-module-drv"; + interrupts = <23>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt4: uio_pruss_evt4 { + compatible = "ti,uio-module-drv"; + interrupts = <24>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt5: uio_pruss_evt5 { + compatible = "ti,uio-module-drv"; + interrupts = <25>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt6: uio_pruss_evt6 { + compatible = "ti,uio-module-drv"; + interrupts = <26>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt7: uio_pruss_evt7 { + compatible = "ti,uio-module-drv"; + interrupts = <27>; + interrupt-mode = <1>; + status = "okay"; + }; + + uio_pruss_0_mem: uio_pruss_0_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4a334000 0x2000>, + <0x4a322000 0x400>, + <0x4a322400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; + + uio_pruss_1_mem: uio_pruss_1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4a338000 0x2000>, + <0x4a324000 0x400>, + <0x4a324400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; +}; + +&am33xx_pinmux { + uio_pruss_mdio_eth_default: uio_pruss_mdio_eht_default { + pinctrl-single,pins = < + AM33XX_IOPAD(0x88c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_clk.pr1_mdio_mdclk */ + AM33XX_IOPAD(0x888, (PIN_INPUT | MUX_MODE5)) /* gpmc_csn3.pr1_mdio_data */ + AM33XX_IOPAD(0x89c, (PIN_INPUT_PULLUP | MUX_MODE7)) /* gpmc_ben0_cle.gpio2_5 */ + /* disable CPSW MDIO */ + AM33XX_IOPAD(0x948, (PIN_INPUT_PULLUP | MUX_MODE7)) /* mdio_data.gpio0_0 */ + AM33XX_IOPAD(0x94c, (PIN_INPUT_PULLUP | MUX_MODE7)) /* mdio_clk.gpio0_1 */ + AM33XX_IOPAD(0x8a0, (PIN_INPUT | MUX_MODE2)) /* dss_data0.pr1_mii_mt0_clk */ + AM33XX_IOPAD(0x8b4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data5.pr1_mii0_txd0 */ + AM33XX_IOPAD(0x8b0, (PIN_OUTPUT | MUX_MODE2)) /* dss_data4.pr1_mii0_txd1 */ + AM33XX_IOPAD(0x8ac, (PIN_OUTPUT | MUX_MODE2)) /* dss_data3.pr1_mii0_txd2 */ + AM33XX_IOPAD(0x8a8, (PIN_OUTPUT | MUX_MODE2)) /* dss_data2.pr1_mii0_txd3 */ + AM33XX_IOPAD(0x8cc, (PIN_INPUT | MUX_MODE5)) /* dss_data11.pr1_mii0_rxd0 */ + AM33XX_IOPAD(0x8c8, (PIN_INPUT | MUX_MODE5)) /* dss_data10.pr1_mii0_rxd1 */ + AM33XX_IOPAD(0x8c4, (PIN_INPUT | MUX_MODE5)) /* dss_data9.pr1_mii0_rxd2 */ + AM33XX_IOPAD(0x8c0, (PIN_INPUT | MUX_MODE5)) /* dss_data8.pr1_mii0_rxd3 */ + AM33XX_IOPAD(0x8a4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data1.pr1_mii0_txen */ + AM33XX_IOPAD(0x8d8, (PIN_INPUT | MUX_MODE5)) /* dss_data14.pr1_mii_mr0_clk */ + AM33XX_IOPAD(0x8dc, (PIN_INPUT | MUX_MODE5)) /* dss_data15.pr1_mii0_rxdv */ + AM33XX_IOPAD(0x8d4, (PIN_INPUT | MUX_MODE5)) /* dss_data13.pr1_mii0_rxer */ + AM33XX_IOPAD(0x8d0, (PIN_INPUT | MUX_MODE5)) /* dss_data12.pr1_mii0_rxlink */ + AM33XX_IOPAD(0x8e8, (PIN_INPUT | MUX_MODE2)) /* dss_pclk.pr1_mii0_crs */ + + AM33XX_IOPAD(0x840, (PIN_INPUT | MUX_MODE5)) /* gpmc_a0.pr1_mii_mt1_clk */ + AM33XX_IOPAD(0x850, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a4.pr1_mii1_txd0 */ + AM33XX_IOPAD(0x84c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a3.pr1_mii1_txd1 */ + AM33XX_IOPAD(0x848, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a2.pr1_mii1_txd2 */ + AM33XX_IOPAD(0x844, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a1.pr1_mii1_txd3 */ + AM33XX_IOPAD(0x860, (PIN_INPUT | MUX_MODE5)) /* gpmc_a8.pr1_mii1_rxd0 */ + AM33XX_IOPAD(0x85c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a7.pr1_mii1_rxd1 */ + AM33XX_IOPAD(0x858, (PIN_INPUT | MUX_MODE5)) /* gpmc_a6.pr1_mii1_rxd2 */ + AM33XX_IOPAD(0x854, (PIN_INPUT | MUX_MODE5)) /* gpmc_a5.pr1_mii1_rxd3 */ + AM33XX_IOPAD(0x874, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_wpn.pr1_mii1_txen */ + AM33XX_IOPAD(0x864, (PIN_INPUT | MUX_MODE5)) /* gpmc_a9.pr1_mii_mr1_clk */ + AM33XX_IOPAD(0x868, (PIN_INPUT | MUX_MODE5)) /* gpmc_a10.pr1_mii1_rxdv */ + AM33XX_IOPAD(0x86c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a11.pr1_mii1_rxer */ + AM33XX_IOPAD(0x878, (PIN_INPUT | MUX_MODE5)) /* gpmc_ben1.pr1_mii1_rxlink */ + AM33XX_IOPAD(0x8ec, (PIN_INPUT | MUX_MODE2)) /* lcd_ac_bias_en.pr1_mii1_crs */ + AM33XX_IOPAD(0x870, (PIN_INPUT | MUX_MODE5)) /* gpmc_wait0.pr1_mii1_col */ + >; + }; +}; + +&uio_pruss_mdio { + pinctrl-0 = <&uio_pruss_mdio_eth_default>; + pinctrl-names = "default"; + reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; + reset-delay-us = <2>; /* PHY datasheet states 1uS min */ + status = "okay"; + + uio_pruss_eth0_phy: ethernet-phy@1 { + reg = <1>; + }; + + uio_pruss_eth1_phy: ethernet-phy@3 { + reg = <3>; + }; +}; + +&pruss { + status = "disabled"; +}; + +&pru0 { + status = "disabled"; +}; + +&pru1 { + status = "disabled"; +}; + +&pruss_intc { + status = "disabled"; +}; + +&pruss_mdio { + status = "disabled"; +}; + +&pruss_emac0 { + status = "disabled"; +}; + +&pruss_emac1 { + status = "disabled"; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/files/ti43x/am437x-pru-uio.dtsi b/bsp/meta-ti/recipes-kernel/linux/files/ti43x/am437x-pru-uio.dtsi new file mode 100644 index 00000000..81c16e34 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/files/ti43x/am437x-pru-uio.dtsi @@ -0,0 +1,292 @@ +&pruss_soc_bus { + uio_pruss2_mdio: uio_mdio@32400 { + compatible = "ti,davinci_mdio"; + reg = <0x32400 0x90>; + clocks = <&dpll_core_m4_ck>; + clock-names = "fck"; + bus_freq = <1000000>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + uio_pruss2_mem: uio_pruss2_mem { + compatible = "ti,uio-module-drv"; + mem = <0x54400000 0x2000>, + <0x54402000 0x2000>, + <0x54410000 0x8000>, + <0x54420000 0x2000>, + <0x54426000 0x2000>, + <0x5442e000 0x31c>, + <0x54432000 0x58>; + mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg", + "iep", "mii_rt"; + status = "okay"; + }; + uio_pruss2_mem2: uio_pruss2_mem2 { + compatible = "ti,uio-module-drv"; + mem = <0x54428000 0x38>, + <0x54430000 0x60>, + <0x54432400 0x90>, + <0x40320000 0x20000>; + mem-names = "uart", "ecap", "mdio", "ocmc"; + status = "okay"; + }; + uio_pruss2_evt0: uio_pruss2_evt0 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt1: uio_pruss2_evt1 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt2: uio_pruss2_evt2 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt3: uio_pruss2_evt3 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt4: uio_pruss2_evt4 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt5: uio_pruss2_evt5 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt6: uio_pruss2_evt6 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss2_evt7: uio_pruss2_evt7 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + + uio_pruss2_0_mem: uio_pruss2_0_mem { + compatible = "ti,uio-module-drv"; + mem = <0x54434000 0x3000>, + <0x54422000 0x400>, + <0x54422400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; + + uio_pruss2_1_mem: uio_pruss2_1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x54438000 0x3000>, + <0x54424000 0x400>, + <0x54424400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; + + uio_pruss1_mem: uio_pruss1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x54440000 0x1000>, + <0x54442000 0x1000>, + <0x54450000 0x8000>, + <0x54460000 0x2000>, + <0x54466000 0x2000>, + <0x5446e000 0x31c>, + <0x54472000 0x58>; + mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg", + "iep", "mii_rt"; + status = "okay"; + }; + uio_pruss1_mem2: uio_pruss1_mem2 { + compatible = "ti,uio-module-drv"; + mem = <0x54468000 0x38>, + <0x54470000 0x60>, + <0x54472400 0x90>, + <0x40302000 0x1e000>; + mem-names = "uart", "ecap", "mdio", "ocmc"; + status = "okay"; + }; + uio_pruss1_evt0: uio_pruss1_evt0 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt1: uio_pruss1_evt1 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt2: uio_pruss1_evt2 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt3: uio_pruss1_evt3 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt4: uio_pruss1_evt4 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt5: uio_pruss1_evt5 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt6: uio_pruss1_evt6 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss1_evt7: uio_pruss1_evt7 { + compatible = "ti,uio-module-drv"; + interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>; + interrupt-mode = <1>; + status = "okay"; + }; + + uio_pruss1_0_mem: uio_pruss1_0_mem { + compatible = "ti,uio-module-drv"; + mem = <0x54474000 0x1000>, + <0x54462000 0x400>, + <0x54462400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; + uio_pruss1_1_mem: uio_pruss1_1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x54478000 0x1000>, + <0x54464000 0x400>, + <0x54464400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; +}; + +&am43xx_pinmux { + uio_pruss2_mdio_eth_default: uio_pruss2_mdio_eth_default { + pinctrl-single,pins = < + AM4372_IOPAD(0x88c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_clk.pr1_mdio_mdclk */ + AM4372_IOPAD(0xa70, (PIN_INPUT | MUX_MODE8)) /* xdma_event_intr0.pr1_mdio_data */ + AM4372_IOPAD(0xa00, (PIN_INPUT_PULLUP | MUX_MODE7)) /* cam1_data6.gpio4_20 */ + AM4372_IOPAD(0x8a0, (PIN_INPUT | MUX_MODE2)) /* dss_data0.pr1_mii_mt0_clk */ + AM4372_IOPAD(0x8b4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data5.pr1_mii0_txd0 */ + AM4372_IOPAD(0x8b0, (PIN_OUTPUT | MUX_MODE2)) /* dss_data4.pr1_mii0_txd1 */ + AM4372_IOPAD(0x8ac, (PIN_OUTPUT | MUX_MODE2)) /* dss_data3.pr1_mii0_txd2 */ + AM4372_IOPAD(0x8a8, (PIN_OUTPUT | MUX_MODE2)) /* dss_data2.pr1_mii0_txd3 */ + AM4372_IOPAD(0x8cc, (PIN_INPUT | MUX_MODE5)) /* dss_data11.pr1_mii0_rxd0 */ + AM4372_IOPAD(0x8c8, (PIN_INPUT | MUX_MODE5)) /* dss_data10.pr1_mii0_rxd1 */ + AM4372_IOPAD(0x8c4, (PIN_INPUT | MUX_MODE5)) /* dss_data9.pr1_mii0_rxd2 */ + AM4372_IOPAD(0x8c0, (PIN_INPUT | MUX_MODE5)) /* dss_data8.pr1_mii0_rxd3 */ + AM4372_IOPAD(0x8a4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data1.pr1_mii0_txen */ + AM4372_IOPAD(0x8d8, (PIN_INPUT | MUX_MODE5)) /* dss_data14.pr1_mii_mr0_clk */ + AM4372_IOPAD(0x8dc, (PIN_INPUT | MUX_MODE5)) /* dss_data15.pr1_mii0_rxdv */ + AM4372_IOPAD(0x8d4, (PIN_INPUT | MUX_MODE5)) /* dss_data13.pr1_mii0_rxer */ + AM4372_IOPAD(0x8d0, (PIN_INPUT | MUX_MODE5)) /* dss_data12.pr1_mii0_rxlink */ + AM4372_IOPAD(0xa40, (PIN_INPUT | MUX_MODE5)) /* gpio5_10.pr1_mii0_crs */ + AM4372_IOPAD(0xa38, (PIN_INPUT | MUX_MODE5)) /* gpio5_8.pr1_mii0_col */ + AM4372_IOPAD(0x858, (PIN_INPUT | MUX_MODE5)) /* gpmc_a6.pr1_mii_mt1_clk */ + AM4372_IOPAD(0x854, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a5.pr1_mii1_txd0 */ + AM4372_IOPAD(0x850, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a4.pr1_mii1_txd1 */ + AM4372_IOPAD(0x84c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a3.pr1_mii1_txd2 */ + AM4372_IOPAD(0x848, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a2.pr1_mii1_txd3 */ + AM4372_IOPAD(0x86c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a11.pr1_mii1_rxd0 */ + AM4372_IOPAD(0x868, (PIN_INPUT | MUX_MODE5)) /* gpmc_a10.pr1_mii1_rxd1 */ + AM4372_IOPAD(0x864, (PIN_INPUT | MUX_MODE5)) /* gpmc_a9.pr1_mii1_rxd2 */ + AM4372_IOPAD(0x860, (PIN_INPUT | MUX_MODE5)) /* gpmc_a8.pr1_mii1_rxd3 */ + AM4372_IOPAD(0x840, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a0.pr1_mii1_txen */ + AM4372_IOPAD(0x85c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a7.pr1_mii_mr1_clk */ + AM4372_IOPAD(0x844, (PIN_INPUT | MUX_MODE5)) /* gpmc_a1.pr1_mii1_rxdv */ + AM4372_IOPAD(0x874, (PIN_INPUT | MUX_MODE5)) /* gpmc_wpn.pr1_mii1_rxer */ + AM4372_IOPAD(0xa4c, (PIN_INPUT | MUX_MODE5)) /* gpio5_13.pr1_mii1_rxlink */ + AM4372_IOPAD(0xa44, (PIN_INPUT | MUX_MODE5)) /* gpio5_11.pr1_mii1_crs */ + AM4372_IOPAD(0x878, (PIN_INPUT | MUX_MODE5)) /* gpmc_be1n.pr1_mii1_col */ + >; + }; +}; + +&uio_pruss2_mdio { + pinctrl-0 = <&uio_pruss2_mdio_eth_default>; + pinctrl-names = "default"; + status = "okay"; + + reset-gpios = <&gpio4 20 GPIO_ACTIVE_LOW>; + reset-delay-us = <2>; /* PHY datasheet states 1uS min */ + + uio_pruss2_eth0_phy: uio_ethernet-phy@0 { + reg = <0>; + }; + + uio_pruss2_eth1_phy: uio_ethernet-phy@1 { + reg = <1>; + }; +}; + +&pruss1 { + status = "disabled"; +}; + +&pru1_0 { + status = "disabled"; +}; + +&pru1_1 { + status = "disabled"; +}; + +&pruss1_intc { + status = "disabled"; +}; + +&pruss1_mdio { + status = "disabled"; +}; + +&pruss0 { + status = "disabled"; +}; + +&pru0_0 { + status = "disabled"; +}; + +&pru0_1 { + status = "disabled"; +}; + +&pruss0_intc { + status = "disabled"; +}; + +&pruss1_emac0 { + status = "disabled"; +}; + +&pruss1_emac1 { + status = "disabled"; +}; diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/defconfig new file mode 100644 index 00000000..d083d182 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_omap2_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/dra7xx/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/dra7xx/defconfig new file mode 100644 index 00000000..dcb53bab --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/dra7xx/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_dra7x_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k2g/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k2g/defconfig new file mode 100644 index 00000000..316b04bb --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k2g/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_k2g_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k3/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k3/defconfig new file mode 100644 index 00000000..b9bc6137 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k3/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_arm64_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/keystone/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/keystone/defconfig new file mode 100644 index 00000000..5a40b93d --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/keystone/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_keystone_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/omapl138/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/omapl138/defconfig new file mode 100644 index 00000000..b3467853 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/omapl138/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_omapl138_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti33x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti33x/defconfig new file mode 100644 index 00000000..88f80fa9 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti33x/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_am3x_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti43x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti43x/defconfig new file mode 100644 index 00000000..4b9daaf9 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti43x/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_am4x_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/defconfig new file mode 100644 index 00000000..f0b8bab0 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_omap2_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/dra7xx/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/dra7xx/defconfig new file mode 100644 index 00000000..47e3d04a --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/dra7xx/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_dra7x_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k2g/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k2g/defconfig new file mode 100644 index 00000000..a9c24f2e --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k2g/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_k2g_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k3/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k3/defconfig new file mode 100644 index 00000000..cc10bfda --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k3/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_arm64_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/keystone/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/keystone/defconfig new file mode 100644 index 00000000..fc68085f --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/keystone/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_keystone_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti33x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti33x/defconfig new file mode 100644 index 00000000..0a4fbac2 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti33x/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_am3x_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti43x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti43x/defconfig new file mode 100644 index 00000000..99594c81 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti43x/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_am4x_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_4.19.bb b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_4.19.bb new file mode 100644 index 00000000..12532db6 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_4.19.bb @@ -0,0 +1,10 @@ +require linux-ti-staging_4.19.bb + +# Look in the generic major.minor directory for files +# This will have priority over generic non-rt path +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.19:" + +BRANCH = "ti-rt-linux-4.19.y" + +SRCREV = "b8935c3f161b90a15cec065066d710b216ae5c97" +PV = "4.19.38+git${SRCPV}" diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/defconfig new file mode 100644 index 00000000..5d051bd1 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_omap2_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/dra7xx/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/dra7xx/defconfig new file mode 100644 index 00000000..2b3635c3 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/dra7xx/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_dra7x_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k2g/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k2g/defconfig new file mode 100644 index 00000000..abfb3309 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k2g/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_k2g_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k3/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k3/defconfig new file mode 100644 index 00000000..56cf9302 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k3/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_arm64_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/keystone/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/keystone/defconfig new file mode 100644 index 00000000..e95bcf95 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/keystone/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_keystone_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/omapl138/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/omapl138/defconfig new file mode 100644 index 00000000..95b61168 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/omapl138/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_omapl138_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti33x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti33x/defconfig new file mode 100644 index 00000000..9ab6733c --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti33x/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_am3x_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti43x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti43x/defconfig new file mode 100644 index 00000000..825c31cd --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti43x/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_am4x_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_4.19.bb b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_4.19.bb new file mode 100644 index 00000000..6f02f1a7 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_4.19.bb @@ -0,0 +1,5 @@ +require linux-ti-staging_4.19.bb + +# Look in the generic major.minor directory for files +# This will have priority over generic non-rt path +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.19:" diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_4.19.bb b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_4.19.bb new file mode 100644 index 00000000..c7cf13b4 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_4.19.bb @@ -0,0 +1,71 @@ +SECTION = "kernel" +DESCRIPTION = "Linux kernel for TI devices" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +inherit kernel + +require recipes-kernel/linux/setup-defconfig.inc +require recipes-kernel/linux/cmem.inc +require recipes-kernel/linux/ti-uio.inc +require recipes-kernel/linux/bundle-devicetree.inc + +# Look in the generic major.minor directory for files +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.19:" + +# Pull in the devicetree files into the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base += "kernel-devicetree" + +# Add run-time dependency for PM firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_ti33x = " amx3-cm3" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_ti43x = " amx3-cm3" + +# Add run-time dependency for VPE VPDMA firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_dra7xx = " vpdma-fw" + +# Add run-time dependency for Goodix firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_dra7xx = " goodix-fw" + +# Install boot-monitor skern file into /boot dir of rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_keystone = " boot-monitor" + +# Install ti-sci-fw into /boot dir of rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2g = " ti-sci-fw" + +# Add run-time dependency for SerDes firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_keystone = " serdes-fw" + +# Add run-time dependency for QMSS PDSP firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_keystone = " qmss-pdsp-fw" + +# Add run-time dependency for NETCP PA firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2hk = " netcp-pa-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2e = " netcp-pa-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2l = " netcp-pa-fw" + +# Add run-time dependency for PRU Ethernet firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_am57xx-evm = " prueth-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_am437x-evm = " prueth-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_am335x-evm = " prueth-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2g = " prueth-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_am65xx-evm = " prueth-fw-bin" + +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" + +S = "${WORKDIR}/git" + +BRANCH = "ti-linux-4.19.y" + +SRCREV = "c17c3766610f07dc0549e51694b4149b92f3ce97" +PV = "4.19.38+git${SRCPV}" + +# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild +MACHINE_KERNEL_PR_append = "a" +PR = "${MACHINE_KERNEL_PR}" + +KERNEL_GIT_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git" +KERNEL_GIT_PROTOCOL = "git" +SRC_URI += "${KERNEL_GIT_URI};protocol=${KERNEL_GIT_PROTOCOL};branch=${BRANCH} \ + file://defconfig" + +FILES_${KERNEL_PACKAGE_NAME}-devicetree += "/${KERNEL_IMAGEDEST}/*.itb" diff --git a/bsp/meta-ti/recipes-kernel/linux/setup-defconfig.inc b/bsp/meta-ti/recipes-kernel/linux/setup-defconfig.inc new file mode 100644 index 00000000..dcf2adae --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/setup-defconfig.inc @@ -0,0 +1,92 @@ +# KERNEL_LOCALVERSION can be set to add a tag to the end of the +# kernel version string. such as the commit id +def get_git_revision(p): + import subprocess + + try: + return subprocess.Popen("git rev-parse HEAD 2>/dev/null ", cwd=p, shell=True, stdout=subprocess.PIPE, universal_newlines=True).communicate()[0].rstrip() + except OSError: + return None + +KERNEL_LOCALVERSION = "-g${@get_git_revision('${S}').__str__()[:10]}" + +# Check the defconfig file and see if it points to an in kernel +# defconfig that should be used, or if it is a complete config file +# Or if it points to a combined defconfig that lists both in kernel +# defconfig and associated config fragments. + +do_configure() { + # Always copy the defconfig file to .config to keep consistency + # between the case where there is a real config and the in kernel + # tree config + cp ${WORKDIR}/defconfig ${B}/.config + + echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion + echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion + + # Zero, when using "tisdk" configs, pass control to defconfig_builder + config=`cat ${B}/.config | grep use-tisdk-config | cut -d= -f2` + if [ -n "$config" ] + then + ${S}/ti_config_fragments/defconfig_builder.sh -w ${S} -t $config + oe_runmake -C ${S} O=${B} "$config"_defconfig + else + # First, check if pointing to a combined config with config fragments + config=`cat ${B}/.config | grep use-combined-config | cut -d= -f2` + if [ -n "$config" ] + then + cp ${S}/$config ${B}/.config + fi + + # Second, extract any config fragments listed in the defconfig + config=`cat ${B}/.config | grep config-fragment | cut -d= -f2` + if [ -n "$config" ] + then + configfrags="" + for f in $config + do + # Check if the config fragment is available + if [ ! -e "${S}/$f" ] + then + echo "Could not find kernel config fragment $f" + exit 1 + else + # Sanitize config fragment files to be relative to sources + configfrags="$configfrags ${S}/$f" + fi + done + fi + + # Third, check if pointing to a known in kernel defconfig + config=`cat ${B}/.config | grep use-kernel-config | cut -d= -f2` + if [ -n "$config" ] + then + oe_runmake -C ${S} O=${B} $config + else + yes '' | oe_runmake -C ${S} O=${B} oldconfig + fi + fi + + # Fourth, handle config fragments specified in the recipe + # The assumption is that the config fragment will be specified with the absolute path. + # E.g. ${WORKDIR}/config1.cfg or ${S}/config2.cfg + if [ -n "${KERNEL_CONFIG_FRAGMENTS}" ] + then + for f in ${KERNEL_CONFIG_FRAGMENTS} + do + # Check if the config fragment is available + if [ ! -e "$f" ] + then + echo "Could not find kernel config fragment $f" + exit 1 + fi + done + fi + + # Now that all the fragments are located merge them + if [ -n "${KERNEL_CONFIG_FRAGMENTS}" -o -n "$configfrags" ] + then + ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config $configfrags ${KERNEL_CONFIG_FRAGMENTS} 1>&2 ) + yes '' | oe_runmake -C ${S} O=${B} oldconfig + fi +} diff --git a/bsp/meta-ti/recipes-kernel/linux/ti-uio.inc b/bsp/meta-ti/recipes-kernel/linux/ti-uio.inc new file mode 100644 index 00000000..80dad7dc --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/ti-uio.inc @@ -0,0 +1,92 @@ +SRC_URI_append_keystone = " file://keystone-uio.dtsi" +SRC_URI_append_k2hk = " file://k2hk-uio.dtsi" +SRC_URI_append_k2l = " file://k2l-uio.dtsi" +SRC_URI_append_k2e = " file://k2e-uio.dtsi" +SRC_URI_append_k2g = " file://keystone-k2g-pru-uio.dtsi" +SRC_URI_append_dra7xx = " file://am57xx-pru-uio.dtsi \ + file://am571x-pru-uio.dtsi \ +" +SRC_URI_append_ti33x = " file://am335x-pru-uio.dtsi" +SRC_URI_append_ti43x = " file://am437x-pru-uio.dtsi" + +DTSI_LIST = "" +DTSI_LIST_append_keystone = " keystone-uio.dtsi" +DTSI_LIST_append_k2hk = " k2hk-uio.dtsi" +DTSI_LIST_append_k2l = " k2l-uio.dtsi" +DTSI_LIST_append_k2e = " k2e-uio.dtsi" + +do_setup_uio() { + if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ] + then + for dtsi in ${DTSI_LIST} + do + cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/ + for dtb in ${KERNEL_DEVICETREE} + do + dts=`echo $dtb | sed -e 's|dtb$|dts|'` + echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts + done + done + fi +} + +do_setup_uio_append_dra7xx() { + + if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ] + then + dtsi="am57xx-pru-uio.dtsi" + cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/ + + dts="am572x-idk-pru-excl-uio.dts" + cp ${S}/arch/arm/boot/dts/am572x-idk.dts ${S}/arch/arm/boot/dts/$dts + echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts + + dts="am574x-idk-pru-excl-uio.dts" + cp ${S}/arch/arm/boot/dts/am574x-idk.dts ${S}/arch/arm/boot/dts/$dts + echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts + + dts="am571x-idk-pru-excl-uio.dts" + dtsi="am571x-pru-uio.dtsi" + cp ${S}/arch/arm/boot/dts/am571x-idk.dts ${S}/arch/arm/boot/dts/$dts + cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/ + echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts + fi +} + +do_setup_uio_append_ti33x() { + + if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ] + then + dts="am335x-icev2-pru-excl-uio.dts" + dtsi="am335x-pru-uio.dtsi" + cp ${S}/arch/arm/boot/dts/am335x-icev2-prueth.dts ${S}/arch/arm/boot/dts/$dts + cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/ + echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts + fi +} + +do_setup_uio_append_ti43x() { + + if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ] + then + dts="am437x-idk-pru-excl-uio.dts" + dtsi="am437x-pru-uio.dtsi" + cp ${S}/arch/arm/boot/dts/am437x-idk-evm.dts ${S}/arch/arm/boot/dts/$dts + cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/ + echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts + fi +} + +do_setup_uio_append_k2g() { + + if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ] + then + dts="keystone-k2g-ice-pru-excl-uio.dts" + dtsi="keystone-k2g-pru-uio.dtsi" + cp ${S}/arch/arm/boot/dts/keystone-k2g-ice.dts ${S}/arch/arm/boot/dts/$dts + cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/ + echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts + fi +} + +do_patch[postfuncs] += "do_setup_uio" |