From 84ad7c5b112283d1ccb14744025a2d2ba986412d Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Sat, 27 Jun 2020 00:00:16 -0500 Subject: meta-xilinx: subtree update:757bac706c..bef2bf9b15 Alejandro Enedino Hernandez Samaniego (76): libmali-xlnx: Use update-alternatives to switch between GL backends libmali-xlnx: modify REQUIRED_DISTRO_FEATURES libmali-xlnx: only use and install dependencies that the DISTRO supports libmali-xlnx: fix x11 headers libmali-xlnx: Dont provide KHR headers libmali-xlnx: Change version on gbm.pc to be compatible with mesa libmali-xlnx: modify version on egl.pc for compatibility run-postinsts: Pass the output of the scripts run to kmsg zynqmp-pmu.conf: Upgrade tune to use Microblaze v10.0 zynqmp-pmu.conf: Update to Microblaze v11.0 newlib: export CC_FOR_TARGET as CC gcc-cross: Dont override EXTRA_OECONF unless DISTRO is xilinx-standalone Adds MACHINE.conf containing default tune for Cortex R5 Adds MACHINE.conf containing default tune for Cortex A53 toolchain: Provide specific configuration for cross(-canadian) gcc and binutils Adds MACHINE.conf containing default tune for Cortex A72 xilinx-standalone: switch override and append xilinx-standalone: Add staticdev packages for newlib and libgloss to dependencies xilinx-standalone: Reorganize toolchain configure options toolchain: add cortex-A9 options for gcc and binutils gcc-cross-microblazeel: disable multilib gcc: Separate binutils options gcc: Add multilib-list=aprofile configure option for cortex A9 gcc-runtime: Enable bulding libsdtc++ for baremetal applications gcc-runtime: Set correct overrides now that the build has been fixed in oe-core gcc-xilinx-standalone: Enable multilib builds for baremetal microblaze gcc-microblaze: Remove multilib builds that arent working (m64) meta-xilinx-standalone: Restructure layer properly, gcc and binutils belong on recipes-devtools newlib: Keep version numbers on bbappends meta-xilinx-standalone: Restructure layer properly, newlib belongs to recipes-bsp gcc-runtime: Move gcc-runtime to GCCs directory layer.conf: Include recipe files from a pattern with no directory required Create machines that use SOC_FAMILY Microblaze-pmu: Change overrides to reflect machine name changes from zynqmp-pmu to microblaze-pmu cortexr5: Change overrides to reflect machine name changes from cortexr5 to zynqmp and versal variants cortexa72: To keep up with a standard rename cortexa72 to add its SOC_FAMILY to its name meta-xilinx-bsp: Unify machine confs cortexr5-versal.conf: Include the tune inc file from the correct path cortexr5-zynqmp.conf: Include the tune inc file from the correct path tune-cortexrm: Include PACKAGE_EXTRA_ARCHS to avoid parsing errors esw: first step to move everything into an embeddedsw class pmufw: Install and hence package and strip the pmufw elf file fix license and compatible host for now pmufw: fix filename on elf file and fix task order to get stripped elf file deployed libxil: add flow for a53 using dtg device-tree.bbappend: add appent to support cortexa53 MACHINE device-tree: switch to AUTOREV to keep up with the repo changes for now zynqmp-fsbl: Sync flow with pmufw libxil: fix device tree flags for a53 libxil: Fix DTB and DTG flow to make it more transparent for the user Fix XILINX_RELEASE_VERSION Increase layer priority device-tree: the Flags used from device tree have to be set on the device tree recipe, not in the libxil one esw.bbclass: Fix devtool and externalsrc flow esw.bbclass: Install artifacts from the build directory vs WORKDIR pmufw: Install artifacts from the build directory vs WORKDIR esw.bbclass: Make it possible for packages to use the cmake ncurses gui libxil: Unify flow and get DTB using the device-tree recipe instead of creating it manually SOC_FAMILY: Change overrides Microblaze-pmu: Change overrides to reflect machine name chanches from zynqmp-pmu to microblaze-pmu device-tree: Install psu_init files as well fsbl: avoid using underscore in the directory filename meta-xilinx-standalone: Restructure layer properly, pmufw and fsbl belong on recipes-applications meta-xilinx-standalone: device-tree belongs on recipes-bsp meta-xilinx-standalone: Restructure layer properly, move existing libraries from decoupling to recipes-libraries zynqmp-fsbl: Fix race condition on copy_psu_init device-tree: Fix install directory meta-xilinx-standalone: clean up layer libraries: Add inherit on python3native on libraries that were invoking nativepython3 meta-xilinx: Include templates for local.conf and bblayers.conf esw: fix machines that have been renamed libgloss: Dont install libgloss as libxil since we actually have libxil esw: Switch release version to 2020.1 xilinx-standalone: Add buildhistory to the DISTRO to avoid cooker errors device-tree: Override repo for supported machines system-zcu102: Create heterogeneous machine configuration for ZCU102 evaluation board. Anirudha Sarangi (4): meta-xilinx-standalone: conf: distro: Add new distro for freertos meta-xilinx-standalone: classes: Update CMAKE_SYSTEM_NAME for Freertos meta-xilinx-standalone: recipes-libraries: Add recipe for freertos meta-xilinx-standalone: recipes-applications: freertos-hello-world: Add recipe for freertos hello world Appana Durga Kedareswara rao (82): libxil: Add recipes for libxil and xilstandalone pmufw: recipes for pmufw app generation in decoupled flow Add recipes for xilffs and xilpm libraries Add recipes for building zynqmp fsbl application meta-xilinx-standalone: Add support for PLM and dependent library recipes zynqmp-fsbl: Copy psu_init files to source code meta-xilinx: meta-xilinx-standalone: Update source url path meta-xilinx: meta-xilinx-standalone: comment flto flags by default meta-xilinx-standalone: Using S instead of WORKDIR meta-xilinx-standalone: classes: Add bbclass for building esw examples meta-xilinx-standalone: recipes-drivers: Add recipe for compiling csudma driver examples meta-xilinx-standalone: recipes-drivers: Add recipe for compiling emacps driver examples meta-xilinx-standalone: recipes-drivers: Add recipe for compiling axiethernet driver examples meta-xilinx-standalone: recipes-drivers: Add recipe for compiling axicdma driver examples meta-xilinx-standalone: recipes-drivers: Add recipe for compiling axidma driver examples meta-xilinx-standalone: recipes-drivers: Add recipe for compiling llfifo driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling mcdma driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling zdma driver examples meta-xilinx-standalone: recipes-applications: Add recipe for compiling hello world application meta-xilinx-standalone: classes: Update md5 checksum as per latest license meta-xilinx-standalone: Add support for cortexa72 processor meta-xilinx-standalone: recipes-libraries: xilstandalone: Cleanup the recipe meta-xilinx-standalone: recipes-libraries: libxil: Cleanup the recipe meta-xilinx-standalone: classes: cleanup the class meta-xilinx-standalone: recipes-applications: hello-world: Remove dependency on esw_examples class meta-xilinx-standalone: recipes-libraries: Add recipe for xilmailbox cortexa72: Update cortexa72 machine variable naming meta-xilinx: Add support for cortexr5 processor meta-xilinx-standalone: Add dependencies on python3-dtc-native meta-xilinx-standalone: recipes-libraries: xiltimer: Add task for generating cmake meta-data meta-xilinx-standalone: recipes-libraries: lwip: Add recipe for lwip meta-xilinx-standalone: recipes-applications: lwip-echo-server: Add recipe for compiling lwip echo server application meta-xilinx-standalone: Add support for versal cortexr5 processor meta-xilinx-standalone: recipes-applications: lwip-tcp-perf-client: Add recipe for compiling lwip tcp perf client application meta-xilinx-standalone: recipes-applications: lwip-tcp-perf-server: Add recipe for compiling lwip tcp perf server application meta-xilinx-standalone: recipes-applications: lwip-udp-perf-server: Add recipe for compiling lwip udp perf server application meta-xilinx-standalone: recipes-applications: lwip-udp-perf-client: Add recipe for compiling lwip udp perf client application meta-xilinx-standalone: recipes-applications: freertos-lwip-echo-server: Add recipe for compiling freertos lwip echo server application meta-xilinx-standalone: recipes-applications: freertos-lwip-tcp-perf-client: Add recipe for compiling freertos lwip tcp perf client application meta-xilinx-standalone: recipes-applications: freertos-lwip-tcp-perf-server: Add recipe for compiling freertos lwip tcp perf server application meta-xilinx-standalone: recipes-applications: freertos-lwip-udp-perf-client: Add recipe for compiling freertos lwip udp perf client application meta-xilinx-standalone: recipes-applications: freertos-lwip-udp-perf-server: Add recipe for compiling freertos lwip udp perf server application meta-xilinx-standalone: recipes-libraries: Update depends list for socket mode meta-xilinx-standalone: recipes-libraries: Add recipe for xilpuf meta-xilinx-standalone: recipes-libraries: Fix workarounds meta-xilinx-standalone: recipes-libraries: xilloader: Update depends list meta-xilinx-standalone: recipes-applications: freertos-hello-world: Fix do_deploy elf variable name meta-xilinx-standalone: classes: esw: Remove unneeded DISTRO check meta-xilinx-standalone: recipe-drivers: Add recipe for compiling dmaps driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling usbpsu driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling axivdma driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling emaclite driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling xxvethernet driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling scugic driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling ttcps driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling tmrctr driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling qspipsu driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling ospipsv driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling resetps driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling clockps driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling canfd driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling canps driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling can driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling wdtps driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling rtcpsu driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling gpiops driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling sdps driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling ipipsu driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling nandpsu driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling devcfg driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling mbox driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling mutex driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling uartlite driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling uartps driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling gpio driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling spips driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling qspips driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling xadcps driver examples meta-xilinx-standalone: recipe-drivers: Add recipe for compiling sysmon driver examples device-tree: Install psu_init files as well for zynqmp machines meta-xilinx-standalone: recipes-applications: zynqmp-fsbl: Correct cflags based on the machine type meta-xilinx-standalone: recipes-bsp: device-tree: Install psu_init* files only for standalone configuration Bruce Ashfield (1): linux-xlnx: cleanup and make yocto-kernel-cache available Himanshu Choudhary (8): xrt_git:zocl_git: added package_class for generating rpm zocl_git: added post install script xrt_git: added veral flags and dependencies xrt_git:zocl_git: license and PV update from meta-xilinx-internal xrt,zocl:Update commit id for 2020.1 release xrt_git:zocl_git: updated commitid > CR-1063204 xrt_git:zocl_git: update commitid for 2020.1 release xrt_git:zocl_git: update commitid for 2020.1 release Jaewon Lee (28): Update recipes for 2019.2 release u-boot-zynq-scr: reworking boot.scr recipe to work for zynq and zynqmp u-boot-zynq-scr: Setting sd as default bootmode for versal zynq/zynqmp confs: Adding boot.scr to IMAGE_BOOT_FILES bootgen_1.0.bb: Adding initial bootgen recipe to build bootgen flashstrip utility: Build and ship flash strip utility needed for qemu machine-xilinx-default.inc: Adding required dependencies to image_wic **TEMPORARY**: Removing preferred provider overrides for mali backend meson: Adding patch to add microblaze as supported CPU glibc-locale_%.bbappend: Fix directory installed but not shipped issue Revert "**TEMPORARY**: Removing preferred provider overrides for mali backend" arm-trusted-firmware.inc: Changing generic DEBUG to DEBUG_ATF gcc-cross-canadian_%.bbappend:temporary hack to build gcc cross canadian gcc-source: Adding microblaze patch to fix compiler crash with -freg-struct-return newlib: Adding xilinx specific patches on top of newlib/libgloss 3.1.0 cortexa*.conf: Change arch-armv8.inc to arch-armv8a.inc gdb: Switching microblaze to use upstream gdb version 8.3.1 microblaze gdb/binutils: Adding necessary patches for microblaze Using tune-cortexa72-cortexa53.inc for versal and zynqmp tunes qemu-system-aarch64-multiarch: Adding comment for future fix xilinx-standalone.conf: Adding qemu to TOOLCHAIN_HOST_TASK arm-trusted-firmware.inc: installing elf with standard name u-boot-xlnx:Updating defconfig for all zynq machines Correcting ':' placement for appending file paths Add older version of OpenCV 3.4.3 opencv_3.4.3.bb: Removing tiny-dnn from SRC_URI versal confs: Upping RAM in runqemu command to 8G for versal boards versal confs: cleaning up unnecessary file loading in runqemu command Jean-Francois Dagenais (3): libmali-xlnx: clean and fix FILESXTRAPATHS libmali-xlnx: make version recognizable kernel-module-mali: add patch to check dma_map_page error Jeegar Patel (1): kernel-module-vcu.bb : Autoload dmaproxy module on boot Madhurkiran Harikrishnan (14): libmali-xlnx: MALI will not provide wayland-egl libmali-xlnx.bb: ABIs are made consistent for all backends libmali-xlnx: Squash all monolithic library name into a variable libmali-xlnx: Upgrade the userspace driver to r9p0 kernel-module-mali: Upgrade the kernel space driver to r9p0 weston: Migrate ZynqMP specific patches for weston to meta-xilinx weston: Remove opaque substitute for ARGB8888 as ZynqMP DP does not support kernel-module-mali: Make the driver compatible with kernel 5.4 Revert "libmali-xlnx: Dont provide KHR headers" mesa: Do not provide KHR headers cairo: For ZynqMP enable glesv2 packageconfig libglu: Add build time dependency on glesv2 for zynqmp xf86-video-armsoc: Bypass the exa layer to free the root pixmap libmali: Fetch mali binaries from rel-v2020.1 branch Manjukumar Matha (17): libmali-xlnx: upgrade MALI recipe for 2019.2 xrt_git.bb: Fix xrt recipe for externalsrc zocl_git.bb: Update the S path for zocl kernel-module-hdmi_git.bb: New Yocto recipe for Xilinx HDMI drivers machine-xilinx-default.inc: Add qemu-xilinx-helper-native as preferred provider zynq-generic.conf: Add qemu wiring to generic conf meta-xilinx-pynq: Add layer to support PYNQ image-types-xilinx-qemu.bbclass: Add sector size as 512K ultra96-zynqmp.conf: Add support for Ultra96 evaluation board linux-firmware_git.bbappend: Add hook for wl18xx and bts file vc-p-a2197-00-versal.conf:Add versal Tenzing +SE1 board configuration kc705-microblaze: Update u-boot patch for kc705 layer.conf: Update XILINX_RELEASE_VERSION to v2020.1 libgpg-error: Add microblaze platform specific gpg-error.h file qemu-xilinx-native: Enable packageconfig option for libgcrypt qemu-xilinx.inc: Remove stale packageconfig options qemu-xilinx.inc: Configure qemu-xilinx with gcrypt Mark Hatle (82): binutils/gcc: Refactor the oeconf Revert "binutils/gcc: Refactor the oeconf" gcc-runtime: Make the baremetal changes specific to class-target binutils/gcc: Refactor the oeconf gcc: Remove cortexa53 errata fixes binutils: Merge latest binutils work Revert "gcc-microblaze: Remove multilib builds that arent working (m64)" gcc-cross-canadian: Fix issue being unable to find stdio.h Enable multilib baremetal toolchains gcc-runtime: Fix C++ multilib headers Limit multilib toolchains to symlinks to the main toolchain Create new baremetal toolchain machines Fix arm cortex r/m profiles microblaze-tc: Minor update and corrections Adjust the microblaze standalone toolchain to match vitis expectations. newlib: Adjust configuration for standalone to allow BSP library qemu-xilinx: Point to master branch by default distro/xilinx-standalone: Make LTO optional distr/xilinx-standalone: Switch default optimization from ESW to Distro cortex-r5: Add cortexr5f configuration xilinx-standalone: When building for cortexr5, add -DARMR5 for CCARGS newlib: Move microblaze support newlib: Cleanup and merge the two newlib bbappends into a single append python3-dtc: Add python3 dtc module Ensure that bbappends do not affect task hashes xlnx-compatible-os.bbclass: Class to allow recipes to list OS compatibility Remove hardcoded XILINX_RELEASE_VERSION in recipes meta-xilinx-standalone: Add dependencies on python3-dtc meta-xilinx-standalone/device-tree: remove duplicate internal references lopper: Add lopper utility xilinx-standalone: sync distros xilinx-standalone.inc: Replace qemu dependency with mingw32 specific recipe lopper: Add runtime dependency of python3-dtc cortexa53-zynqmp/cortexa72-versal: Fix cortex based BSPs README.md: revise README.md based README.md: Add information about the new embeddedsw support microblaze_dtb.py: Convert a dtb to one or more microblaze TUNE_FEATURES linux-xlnx: Use new default defconfigs meta-xilinx-bsp: Rename soc configuration masquerading as a tune file meta-xilinx-bsp: Remove default values machine-xilinx-overrides: Make this generic meta-xilinx-bsp: Update recipes to use SOC_FAMILY_ARCH and SOC_VARIANT_ARCH meta-xilinx-bsp: rename machine-xilinx-override to xilinx-soc-family.inc meta-xilinx-standalone: Move soc overrides from meta-xilinx-default meta-xilinx-bsp: Adjust soc to permit multiple CPU/TUNES libmali-xlnx: Remove virtual provides meta-xilinx-bsp: remove redundant PREFERRED_PROVIDER Revert "libmali-xlnx: Remove virtual provides" meta-xilinx-bsp: machine-xilinx-default.inc allow empty WIC_DEPENDS microblaze_dtb.py: Move to scripts subdir zc706-zynq7: Add qemu wiring for zc706 machine qemu-zynq7: Add qemu wiring for zc706 machine meta-xilinx-bsp: cleanup qemu references xilinx-qemu: Move -multiarch extension to the machine-xilinx-qemu *-generic.conf: Add QEMU support to each of the generic BSPs versal-generic: Move from vck190 to vc-p-a2197-00-versal esw.bbclass: Adjust get_xlnx_cmake_process to use both tune and machine Revise COMPATIBLE_MACHINE settings esw.bbclass: Move DTBFILE to a single definition xilinx-standalone.conf: Add workaround for microblaze -Os bug Revert "linux-xlnx: Use new default defconfigs" qemu-xilinx.inc: Move the URL to 'gitsm' and disable compile time submodules esw.bbclass: Only work with xilinx-standalone distro Rename plm_git.bb to plm-standalong_git.bb meta-xilinx-standalone esw.bbclass: Allow SRCREV and SRC_URI to be overwritten esw.bbclass: Change 'or' to 'and' to verify EXTERNALSRC is defined Revert "xlnx-compatible-os.bbclass: Class to allow recipes to list OS compatibility" Define COMPATIBLE_HOST to prevent mix of Linux and Baremetal recipes device-tree.bbappend: Move to COMPATIBLE_HOST machines: Move from SERIAL_CONSOLE (deprecated) to SERIAL_CONSOLES machines: Move from SERIAL_CONSOLE (deprecated) to SERIAL_CONSOLES machines: Allow the user to override SERIAL_CONSOLES machines: Remove default SERIAL_CONSOLES_CHECK machines: Allow user to override SERIAL_CONSOLE microblaze machines: Set LINKER_HASH_STYLE defaults kernel-module-mali: WIP libcma: Fix SRC_URI definition binutils: Microblaze integrate fix from upstream init-ifupdown: Fix BSPs that were setting partial overrides zynq-generic.conf: Remove the qemu overrides, not needed meta-xilinx-standalone gcc: Fix microblaze crtend.o lopper: Fix python3 reference in lopper_sanity.py Min Ma (1): xrt_git.bb: update XRT dependency Mubin Usman Sayyed (3): meta-xilinx-bsp: conf: machine: Add standalone based machine for zynq meta-xilinx-standalone: Add support for zynq meta-xilinx-standalone: classes: esw: Update ESW_CFLAGS with spec file Mukund PVVN (3): zcu1275-zynqmp.conf: Rename zc1275 to zcu1275 zcu1285-zynqmp.conf: Update UBOOT_MACHINE v350-versal.conf:Add versal board configuration Peter Ogden (1): python3-pynq.bb: Update PYNQ to 2.5.1 Sai Hari Chandana Kalluri (54): u-boot-xlnx_2019.2.bb: Rename zc1275 to zcu1275 board name ultra96-zynqmp.conf: Include mipi as MACHINE_FEATURE linux-xlnx.inc: Add MIPI kernel configuration for Ultra96 pynq-ultra96-*: Add Ultra96 specific pynq example demo: vck-sc-zynqmp: Machine configuration for vck190 system controller v350-versal.conf: Enforce system.dtb name when using virtual/dtb vmk180-versal.conf: Add machine configuration for vmk180-versal tune-versal.inc: Set default SOC_VARIANT = s80 arm-trusted-firmware_2019.2.bbappend: Update compilation flag u-boot-xlnx: Add the platform init file for zcu216-zynqmp plm_2019.2.bb: recipe to build plm standalone psm-firmware_2019.2.bb: Create psm-firmware recipe for standalone build versal-mb.conf: Add machine configuration to support standalone build for versal components like plm, psm-firmware vck190-versal.conf: Add deploy dir for psm and plm firmware tune-versal.inc: Rename include file from arch-armv8 to arch-armv8a Move recipes to use _%.bb instead of version qemu-*: Upgrade QEMU version 2.11 -> 4.1.5 Upgrade recipes to 2020.1 libmali-xlnx: Provide single shlib provider for libMali.so.9 "**TEMPORARY**" linux-xlnx.inc: Trim PV variable expansion Revert "Revert "**TEMPORARY**: Removing preferred provider overrides for mali backend"" versal-generic: Add versal-generic machine configuration Revert "**TEMPORARY**: Removing preferred provider overrides for mali backend""" qemu-xilinx*: Enable qemu-xilinx-native as PROVIDER for qemu-native u-boot-zyqn-scr.bb: Update DEVICETREE and KERNEL LOAD ADDRESS for zynqmp machines u-boot-xlnx:Update UBOOT-MACHINE to xilinx_zynqmp_virt_defconfig for all zynqmp machines qemu-xilinx: Enable qemu-xilinx to provide nativesdk-qemu zedboard-zynq7.conf:update u-boot binary name qemu-system-aarch64-multiarch: Update the binpath for qemu targets zcu102-zynqmp.conf: Modify PMU_FIRMWARE_DEPLOY_DIR and PMU_FIRMWARE_IMAGE_NAME Update KERNEL_VERSION to 5.4 zcu102-zynqmp.conf: Pass dtb and dtb load address as QB_OPT args for qemuboot Enable kernel configurations for viruatlization distro feature zc702-zynq7: Add qemu wiring for zc702 machine qemu-xilinx-multiarch-helper-native_1.0.bb: Move multiarch wrapper script to bindir qemuboot-xilinx.bbclass: Remove the subdir added to the qemu target path external-hdf.bbappend: move to meta-xilinx-tools layer xrt: Remove references to PACKAGE_CLASSES from xrt recipes kernel-module-hdmi: Update LICENSE_CHECKSUM for kenrel-module-hdmi xilinx-kmeta: Upstream xen and ocicontainer configs to YP kernel-cache Update commit ids for 2020.1 release arm-trusted-firmware.inc: Update package version Update commit ids for 2020.1 release lopper: Update commit id for 2020.1 release layer.conf: Set layer compat to dunfell & gatesgarth qemu-xilinx-native.inc: Fix the patch file names for dunfell Fix patch file names for dunfell libmali-xlnx: Inherit features_check instead of distro_features_check gcc-9*: Upgrade gcc from 9.2->10.1 libgloss, newlib: Upgrade version from 3.1 -> 3.3 meson_%.bbappend: Remove bbappend from layer qemu-xilinx.inc: Add patch to enable/disbable libudev in qemu configure python3-dtc_1.5.1.bb: Explicitly set the path to run make during configure qemu-devicetrees: Use python3 instead of python u-boot-xlnx.inc: Explicitly set builddir path Sandeep Gundlupet Raju (2): conf/machine/kc705-microbalzeel.conf: Fix U-boot defconfig local.conf.sample: Updating XILINX_VER_MAIN Swagath Gadde (4): u-boot-zynq-scr: Add pxeboot support in u-boot-scr zcu216-zynqmp: Add support for zcu216 board u-boot-zynq-scr:Add initrd label to pxe config zcu208-zynqmp: Add support for zcu208 board Varalaxmi Bingi (4): Update XILINX_RELEASE_VERSION to v2020.1 zcu1285-zynqmp.conf:using common u-boot defconfig u-boot-xlnx.inc:u-boot-xlnx_2020.1.bb: kc705 patch removing kc705 patch Vishal Sagar (3): kernel-module-hdmi_git.bb: Add versal support kernel-module-hdmi: Update for 2020.1 release kernel-module-hdmi: Update commit id and license md5sum for 2020.1 ch vamshi krishna (1): xrt_git.bb: Add icd support for edge platforms Signed-off-by: Andrew Geissler Change-Id: I71ace4a7992c023b84c864abd45e634b5e48f751 --- meta-xilinx/meta-xilinx-contrib/conf/layer.conf | 3 +- .../conf/machine/minized-zynq7.conf | 3 +- ...rm-xilinx-Add-encoder-for-Digilent-boards.patch | 305 ----------- ...002-clk-Add-driver-for-axi_dynclk-IP-Core.patch | 607 --------------------- ...0003-drm-xilinx-Fix-DPMS-transition-to-on.patch | 54 -- .../v2019.1/0004-minized-wifi-bluetooth.cfg | 33 -- ...rm-xilinx-Add-encoder-for-Digilent-boards.patch | 305 +++++++++++ ...002-clk-Add-driver-for-axi_dynclk-IP-Core.patch | 607 +++++++++++++++++++++ ...0003-drm-xilinx-Fix-DPMS-transition-to-on.patch | 54 ++ .../v2020.1/0004-minized-wifi-bluetooth.cfg | 33 ++ .../linux/linux-xlnx_2019.1.bbappend | 9 - .../linux/linux-xlnx_2020.1.bbappend | 9 + 12 files changed, 1011 insertions(+), 1011 deletions(-) delete mode 100644 meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch delete mode 100644 meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch delete mode 100644 meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch delete mode 100644 meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0004-minized-wifi-bluetooth.cfg create mode 100644 meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch create mode 100644 meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch create mode 100644 meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch create mode 100644 meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0004-minized-wifi-bluetooth.cfg delete mode 100644 meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2019.1.bbappend create mode 100644 meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2020.1.bbappend (limited to 'meta-xilinx/meta-xilinx-contrib') diff --git a/meta-xilinx/meta-xilinx-contrib/conf/layer.conf b/meta-xilinx/meta-xilinx-contrib/conf/layer.conf index 942925eb4..4de81bf98 100644 --- a/meta-xilinx/meta-xilinx-contrib/conf/layer.conf +++ b/meta-xilinx/meta-xilinx-contrib/conf/layer.conf @@ -12,5 +12,6 @@ BBFILE_PRIORITY_xilinx-contrib = "5" LAYERDEPENDS_xilinx-contrib = "core" LAYERDEPENDS_xilinx-contrib = "xilinx" -LAYERSERIES_COMPAT_xilinx-contrib = "warrior" +LAYERSERIES_COMPAT_xilinx-contrib = "dunfell gatesgarth" +XILINX_RELEASE_VERSION = "v2020.1" diff --git a/meta-xilinx/meta-xilinx-contrib/conf/machine/minized-zynq7.conf b/meta-xilinx/meta-xilinx-contrib/conf/machine/minized-zynq7.conf index de617d0b6..b43bcec75 100644 --- a/meta-xilinx/meta-xilinx-contrib/conf/machine/minized-zynq7.conf +++ b/meta-xilinx/meta-xilinx-contrib/conf/machine/minized-zynq7.conf @@ -16,8 +16,7 @@ EXTRA_IMAGEDEPENDS += " \ virtual/bootloader \ " -SERIAL_CONSOLE = "115200 ttyPS0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +SERIAL_CONSOLES ?= "115200;ttyPS0" MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "device-tree" diff --git a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch deleted file mode 100644 index 660bc2182..000000000 --- a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch +++ /dev/null @@ -1,305 +0,0 @@ -From 21cc8144efdaa3cd8dbd7279f87b14fa3432fae4 Mon Sep 17 00:00:00 2001 -From: Jason Wu -Date: Sun, 10 Apr 2016 13:14:13 +1000 -Subject: [PATCH 1/3] drm: xilinx: Add encoder for Digilent boards - -Add the dglnt_encoder driver that enables DRM support for the VGA and -HDMI output ports found on many Digilent boards. - -Upstream-Status: Pending - -Signed-off-by: Sam Bobrowicz -Signed-off-by: Jason Wu ---- - .../bindings/drm/xilinx/dglnt_encoder.txt | 23 +++ - drivers/gpu/drm/xilinx/Kconfig | 6 + - drivers/gpu/drm/xilinx/Makefile | 1 + - drivers/gpu/drm/xilinx/dglnt_encoder.c | 217 +++++++++++++++++++++ - 4 files changed, 247 insertions(+) - create mode 100644 Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt - create mode 100644 drivers/gpu/drm/xilinx/dglnt_encoder.c - -diff --git a/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt -new file mode 100644 -index 0000000..242b24e ---- /dev/null -+++ b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt -@@ -0,0 +1,23 @@ -+Device-Tree bindings for Digilent DRM Encoder Slave -+ -+This driver provides support for VGA and HDMI outputs on Digilent FPGA boards. -+The VGA or HDMI port must be connected to a Xilinx display pipeline via an -+axi2vid IP core. -+ -+Required properties: -+ - compatible: Should be "digilent,drm-encoder". -+ -+Optional properties: -+ - dglnt,edid-i2c: The I2C device connected to the DDC bus on the video -+ connector. This is used to obtain the supported resolutions -+ of an attached monitor. If not defined, then a default -+ set of resolutions is used and the display will initialize -+ to 720p. Note most VGA connectors on Digilent boards do -+ not have the DDC bus routed out. -+ -+Example: -+ -+ encoder_0: digilent_encoder { -+ compatible = "digilent,drm-encoder"; -+ dglnt,edid-i2c = <&i2c1>; -+ }; -diff --git a/drivers/gpu/drm/xilinx/Kconfig b/drivers/gpu/drm/xilinx/Kconfig -index 57e18a9..d9ecff2 100644 ---- a/drivers/gpu/drm/xilinx/Kconfig -+++ b/drivers/gpu/drm/xilinx/Kconfig -@@ -33,6 +33,12 @@ config DRM_XILINX_DP_SUB - help - DRM driver for Xilinx Display Port Subsystem. - -+config DRM_DIGILENT_ENCODER -+ tristate "Digilent VGA/HDMI DRM Encoder Driver" -+ depends on DRM_XILINX -+ help -+ DRM slave encoder for Video-out on Digilent boards. -+ - config DRM_XILINX_DP_SUB_DEBUG_FS - bool "Xilinx DRM DPSUB debugfs" - depends on DEBUG_FS && DRM_XILINX_DP_SUB -diff --git a/drivers/gpu/drm/xilinx/Makefile b/drivers/gpu/drm/xilinx/Makefile -index 19bc154..c2717e40 100644 ---- a/drivers/gpu/drm/xilinx/Makefile -+++ b/drivers/gpu/drm/xilinx/Makefile -@@ -7,6 +7,7 @@ xilinx_drm-y := xilinx_drm_crtc.o xilinx_drm_connector.o xilinx_drm_drv.o \ - xilinx_drm_plane.o - xilinx_drm-y += xilinx_cresample.o xilinx_osd.o xilinx_rgb2yuv.o xilinx_vtc.o - -+obj-$(CONFIG_DRM_DIGILENT_ENCODER) += dglnt_encoder.o - obj-$(CONFIG_DRM_XILINX) += xilinx_drm.o - obj-$(CONFIG_DRM_XILINX_DP) += xilinx_drm_dp.o - obj-$(CONFIG_DRM_XILINX_DP_SUB) += xilinx_drm_dp_sub.o -diff --git a/drivers/gpu/drm/xilinx/dglnt_encoder.c b/drivers/gpu/drm/xilinx/dglnt_encoder.c -new file mode 100644 -index 0000000..cb9fc7d ---- /dev/null -+++ b/drivers/gpu/drm/xilinx/dglnt_encoder.c -@@ -0,0 +1,217 @@ -+/* -+ * dglnt_encoder.c - DRM slave encoder for Video-out on Digilent boards -+ * -+ * Copyright (C) 2015 Digilent -+ * Author: Sam Bobrowicz -+ * -+ * Based on udl_encoder.c and udl_connector.c, Copyright (C) 2012 Red Hat. -+ * Also based on xilinx_drm_dp.c, Copyright (C) 2014 Xilinx, Inc. -+ * -+ * This software is licensed under the terms of the GNU General Public -+ * License version 2, as published by the Free Software Foundation, and -+ * may be copied, distributed, and modified under those terms. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ */ -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define DGLNT_ENC_MAX_FREQ 150000 -+#define DGLNT_ENC_MAX_H 1920 -+#define DGLNT_ENC_MAX_V 1080 -+#define DGLNT_ENC_PREF_H 1280 -+#define DGLNT_ENC_PREF_V 720 -+ -+struct dglnt_encoder { -+ struct drm_encoder *encoder; -+ struct i2c_adapter *i2c_bus; -+ bool i2c_present; -+}; -+ -+static inline struct dglnt_encoder *to_dglnt_encoder( -+ struct drm_encoder *encoder) -+{ -+ return to_encoder_slave(encoder)->slave_priv; -+} -+ -+static bool dglnt_mode_fixup(struct drm_encoder *encoder, -+ const struct drm_display_mode *mode, -+ struct drm_display_mode *adjusted_mode) -+{ -+ return true; -+} -+ -+static void dglnt_encoder_mode_set(struct drm_encoder *encoder, -+ struct drm_display_mode *mode, -+ struct drm_display_mode *adjusted_mode) -+{ -+} -+ -+static void -+dglnt_encoder_dpms(struct drm_encoder *encoder, int mode) -+{ -+} -+ -+static void dglnt_encoder_save(struct drm_encoder *encoder) -+{ -+} -+ -+static void dglnt_encoder_restore(struct drm_encoder *encoder) -+{ -+} -+ -+static int dglnt_encoder_mode_valid(struct drm_encoder *encoder, -+ struct drm_display_mode *mode) -+{ -+ if (mode && -+ !(mode->flags & ((DRM_MODE_FLAG_INTERLACE | -+ DRM_MODE_FLAG_DBLCLK) | DRM_MODE_FLAG_3D_MASK)) && -+ (mode->clock <= DGLNT_ENC_MAX_FREQ) && -+ (mode->hdisplay <= DGLNT_ENC_MAX_H) && -+ (mode->vdisplay <= DGLNT_ENC_MAX_V)) -+ return MODE_OK; -+ return MODE_BAD; -+} -+ -+static int dglnt_encoder_get_modes(struct drm_encoder *encoder, -+ struct drm_connector *connector) -+{ -+ struct dglnt_encoder *dglnt = to_dglnt_encoder(encoder); -+ struct edid *edid; -+ int num_modes = 0; -+ -+ if (dglnt->i2c_present) { -+ edid = drm_get_edid(connector, dglnt->i2c_bus); -+ drm_connector_update_edid_property(connector, edid); -+ if (edid) { -+ num_modes = drm_add_edid_modes(connector, edid); -+ kfree(edid); -+ } -+ } else { -+ num_modes = drm_add_modes_noedid(connector, DGLNT_ENC_MAX_H, -+ DGLNT_ENC_MAX_V); -+ drm_set_preferred_mode(connector, DGLNT_ENC_PREF_H, -+ DGLNT_ENC_PREF_V); -+ } -+ return num_modes; -+} -+ -+static enum drm_connector_status dglnt_encoder_detect( -+ struct drm_encoder *encoder, -+ struct drm_connector *connector) -+{ -+ struct dglnt_encoder *dglnt = to_dglnt_encoder(encoder); -+ -+ if (dglnt->i2c_present) { -+ if (drm_probe_ddc(dglnt->i2c_bus)) -+ return connector_status_connected; -+ return connector_status_disconnected; -+ } else -+ return connector_status_unknown; -+} -+ -+static struct drm_encoder_slave_funcs dglnt_encoder_slave_funcs = { -+ .dpms = dglnt_encoder_dpms, -+ .save = dglnt_encoder_save, -+ .restore = dglnt_encoder_restore, -+ .mode_fixup = dglnt_mode_fixup, -+ .mode_valid = dglnt_encoder_mode_valid, -+ .mode_set = dglnt_encoder_mode_set, -+ .detect = dglnt_encoder_detect, -+ .get_modes = dglnt_encoder_get_modes, -+}; -+ -+static int dglnt_encoder_encoder_init(struct platform_device *pdev, -+ struct drm_device *dev, -+ struct drm_encoder_slave *encoder) -+{ -+ struct dglnt_encoder *dglnt = platform_get_drvdata(pdev); -+ struct device_node *sub_node; -+ -+ encoder->slave_priv = dglnt; -+ encoder->slave_funcs = &dglnt_encoder_slave_funcs; -+ -+ dglnt->encoder = &encoder->base; -+ -+ /* get i2c adapter for edid */ -+ dglnt->i2c_present = false; -+ sub_node = of_parse_phandle(pdev->dev.of_node, "dglnt,edid-i2c", 0); -+ if (sub_node) { -+ dglnt->i2c_bus = of_find_i2c_adapter_by_node(sub_node); -+ if (!dglnt->i2c_bus) -+ DRM_INFO("failed to get the edid i2c adapter, using default modes\n"); -+ else -+ dglnt->i2c_present = true; -+ of_node_put(sub_node); -+ } -+ -+ return 0; -+} -+ -+static int dglnt_encoder_probe(struct platform_device *pdev) -+{ -+ struct dglnt_encoder *dglnt; -+ -+ dglnt = devm_kzalloc(&pdev->dev, sizeof(*dglnt), GFP_KERNEL); -+ if (!dglnt) -+ return -ENOMEM; -+ -+ platform_set_drvdata(pdev, dglnt); -+ -+ return 0; -+} -+ -+static int dglnt_encoder_remove(struct platform_device *pdev) -+{ -+ return 0; -+} -+ -+static const struct of_device_id dglnt_encoder_of_match[] = { -+ { .compatible = "digilent,drm-encoder", }, -+ { /* end of table */ }, -+}; -+MODULE_DEVICE_TABLE(of, dglnt_encoder_of_match); -+ -+static struct drm_platform_encoder_driver dglnt_encoder_driver = { -+ .platform_driver = { -+ .probe = dglnt_encoder_probe, -+ .remove = dglnt_encoder_remove, -+ .driver = { -+ .owner = THIS_MODULE, -+ .name = "dglnt-drm-enc", -+ .of_match_table = dglnt_encoder_of_match, -+ }, -+ }, -+ -+ .encoder_init = dglnt_encoder_encoder_init, -+}; -+ -+static int __init dglnt_encoder_init(void) -+{ -+ return platform_driver_register(&dglnt_encoder_driver.platform_driver); -+} -+ -+static void __exit dglnt_encoder_exit(void) -+{ -+ platform_driver_unregister(&dglnt_encoder_driver.platform_driver); -+} -+ -+module_init(dglnt_encoder_init); -+module_exit(dglnt_encoder_exit); -+ -+MODULE_AUTHOR("Digilent, Inc."); -+MODULE_DESCRIPTION("DRM slave encoder for Video-out on Digilent boards"); -+MODULE_LICENSE("GPL v2"); --- -2.7.4 - diff --git a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch deleted file mode 100644 index 9b6229db0..000000000 --- a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch +++ /dev/null @@ -1,607 +0,0 @@ -From 217e3b6f4393926b8dcad841381527ef3fc808c2 Mon Sep 17 00:00:00 2001 -From: Jason Wu -Date: Sun, 10 Apr 2016 13:16:06 +1000 -Subject: [PATCH 2/3] clk: Add driver for axi_dynclk IP Core - -Add support for the axi_dynclk IP Core available from Digilent. This IP -core dynamically configures the clock resources inside a Xilinx FPGA to -generate a clock with a software programmable frequency. - -Upstream-Status: Pending - -Signed-off-by: Sam Bobrowicz -Signed-off-by: Jason Wu ---- - drivers/clk/Kconfig | 8 + - drivers/clk/Makefile | 1 + - drivers/clk/clk-dglnt-dynclk.c | 547 +++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 556 insertions(+) - create mode 100644 drivers/clk/clk-dglnt-dynclk.c - -diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig -index dccb111100..7fe65a702b 100644 ---- a/drivers/clk/Kconfig -+++ b/drivers/clk/Kconfig -@@ -148,6 +148,14 @@ config CLK_QORIQ - This adds the clock driver support for Freescale QorIQ platforms - using common clock framework. - -+config COMMON_CLK_DGLNT_DYNCLK -+ tristate "Digilent axi_dynclk Driver" -+ depends on ARCH_ZYNQ || MICROBLAZE -+ help -+ ---help--- -+ Support for the Digilent AXI Dynamic Clock core for Xilinx -+ FPGAs. -+ - config COMMON_CLK_XGENE - bool "Clock driver for APM XGene SoC" - default y -diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile -index 0760449dde..45ce97d053 100644 ---- a/drivers/clk/Makefile -+++ b/drivers/clk/Makefile -@@ -24,6 +24,7 @@ obj-$(CONFIG_COMMON_CLK_CDCE706) += clk-cdce706.o - obj-$(CONFIG_COMMON_CLK_CDCE925) += clk-cdce925.o - obj-$(CONFIG_ARCH_CLPS711X) += clk-clps711x.o - obj-$(CONFIG_COMMON_CLK_CS2000_CP) += clk-cs2000-cp.o -+obj-$(CONFIG_COMMON_CLK_DGLNT_DYNCLK) += clk-dglnt-dynclk.o - obj-$(CONFIG_ARCH_EFM32) += clk-efm32gg.o - obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o - obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o -diff --git a/drivers/clk/clk-dglnt-dynclk.c b/drivers/clk/clk-dglnt-dynclk.c -new file mode 100644 -index 0000000000..496ad5fc90 ---- /dev/null -+++ b/drivers/clk/clk-dglnt-dynclk.c -@@ -0,0 +1,547 @@ -+/* -+ * clk-dglnt-dynclk.c - Digilent AXI Dynamic Clock (axi_dynclk) Driver -+ * -+ * Copyright (C) 2015 Digilent -+ * Author: Sam Bobrowicz -+ * -+ * Reused code from clk-axi-clkgen.c, Copyright (C) 2012-2013 Analog Devices Inc. -+ * -+ * This software is licensed under the terms of the GNU General Public -+ * License version 2, as published by the Free Software Foundation, and -+ * may be copied, distributed, and modified under those terms. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define CLK_BIT_WEDGE 13 -+#define CLK_BIT_NOCOUNT 12 -+ -+/* This value is used to signal an error */ -+#define ERR_CLKCOUNTCALC 0xFFFFFFFF -+#define ERR_CLKDIVIDER (1 << CLK_BIT_WEDGE | 1 << CLK_BIT_NOCOUNT) -+ -+#define DYNCLK_DIV_1_REGMASK 0x1041 -+/* 25 MHz (125 KHz / 5) */ -+#define DYNCLK_DEFAULT_FREQ 125000 -+ -+#define MMCM_FREQ_VCOMIN 600000 -+#define MMCM_FREQ_VCOMAX 1200000 -+#define MMCM_FREQ_PFDMIN 10000 -+#define MMCM_FREQ_PFDMAX 450000 -+#define MMCM_FREQ_OUTMIN 4000 -+#define MMCM_FREQ_OUTMAX 800000 -+#define MMCM_DIV_MAX 106 -+#define MMCM_FB_MIN 2 -+#define MMCM_FB_MAX 64 -+#define MMCM_CLKDIV_MAX 128 -+#define MMCM_CLKDIV_MIN 1 -+ -+#define OFST_DISPLAY_CTRL 0x0 -+#define OFST_DISPLAY_STATUS 0x4 -+#define OFST_DISPLAY_CLK_L 0x8 -+#define OFST_DISPLAY_FB_L 0x0C -+#define OFST_DISPLAY_FB_H_CLK_H 0x10 -+#define OFST_DISPLAY_DIV 0x14 -+#define OFST_DISPLAY_LOCK_L 0x18 -+#define OFST_DISPLAY_FLTR_LOCK_H 0x1C -+ -+static const u64 lock_lookup[64] = { -+ 0b0011000110111110100011111010010000000001, -+ 0b0011000110111110100011111010010000000001, -+ 0b0100001000111110100011111010010000000001, -+ 0b0101101011111110100011111010010000000001, -+ 0b0111001110111110100011111010010000000001, -+ 0b1000110001111110100011111010010000000001, -+ 0b1001110011111110100011111010010000000001, -+ 0b1011010110111110100011111010010000000001, -+ 0b1100111001111110100011111010010000000001, -+ 0b1110011100111110100011111010010000000001, -+ 0b1111111111111000010011111010010000000001, -+ 0b1111111111110011100111111010010000000001, -+ 0b1111111111101110111011111010010000000001, -+ 0b1111111111101011110011111010010000000001, -+ 0b1111111111101000101011111010010000000001, -+ 0b1111111111100111000111111010010000000001, -+ 0b1111111111100011111111111010010000000001, -+ 0b1111111111100010011011111010010000000001, -+ 0b1111111111100000110111111010010000000001, -+ 0b1111111111011111010011111010010000000001, -+ 0b1111111111011101101111111010010000000001, -+ 0b1111111111011100001011111010010000000001, -+ 0b1111111111011010100111111010010000000001, -+ 0b1111111111011001000011111010010000000001, -+ 0b1111111111011001000011111010010000000001, -+ 0b1111111111010111011111111010010000000001, -+ 0b1111111111010101111011111010010000000001, -+ 0b1111111111010101111011111010010000000001, -+ 0b1111111111010100010111111010010000000001, -+ 0b1111111111010100010111111010010000000001, -+ 0b1111111111010010110011111010010000000001, -+ 0b1111111111010010110011111010010000000001, -+ 0b1111111111010010110011111010010000000001, -+ 0b1111111111010001001111111010010000000001, -+ 0b1111111111010001001111111010010000000001, -+ 0b1111111111010001001111111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001, -+ 0b1111111111001111101011111010010000000001 -+}; -+ -+static const u32 filter_lookup_low[64] = { -+ 0b0001011111, -+ 0b0001010111, -+ 0b0001111011, -+ 0b0001011011, -+ 0b0001101011, -+ 0b0001110011, -+ 0b0001110011, -+ 0b0001110011, -+ 0b0001110011, -+ 0b0001001011, -+ 0b0001001011, -+ 0b0001001011, -+ 0b0010110011, -+ 0b0001010011, -+ 0b0001010011, -+ 0b0001010011, -+ 0b0001010011, -+ 0b0001010011, -+ 0b0001010011, -+ 0b0001010011, -+ 0b0001010011, -+ 0b0001010011, -+ 0b0001010011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0001100011, -+ 0b0010010011, -+ 0b0010010011, -+ 0b0010010011, -+ 0b0010010011, -+ 0b0010010011, -+ 0b0010010011, -+ 0b0010010011, -+ 0b0010010011, -+ 0b0010010011, -+ 0b0010010011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011, -+ 0b0010100011 -+}; -+ -+struct dglnt_dynclk_reg; -+struct dglnt_dynclk_mode; -+struct dglnt_dynclk; -+ -+struct dglnt_dynclk_reg { -+ u32 clk0L; -+ u32 clkFBL; -+ u32 clkFBH_clk0H; -+ u32 divclk; -+ u32 lockL; -+ u32 fltr_lockH; -+}; -+ -+struct dglnt_dynclk_mode { -+ u32 freq; -+ u32 fbmult; -+ u32 clkdiv; -+ u32 maindiv; -+}; -+ -+struct dglnt_dynclk { -+ void __iomem *base; -+ struct clk_hw clk_hw; -+ unsigned long freq; -+}; -+ -+u32 dglnt_dynclk_divider(u32 divide) -+{ -+ u32 output = 0; -+ u32 highTime = 0; -+ u32 lowTime = 0; -+ -+ if ((divide < 1) || (divide > 128)) -+ return ERR_CLKDIVIDER; -+ -+ if (divide == 1) -+ return DYNCLK_DIV_1_REGMASK; -+ -+ highTime = divide / 2; -+ /* if divide is odd */ -+ if (divide & 0x1) { -+ lowTime = highTime + 1; -+ output = 1 << CLK_BIT_WEDGE; -+ } else { -+ lowTime = highTime; -+ } -+ -+ output |= 0x03F & lowTime; -+ output |= 0xFC0 & (highTime << 6); -+ return output; -+} -+ -+u32 dglnt_dynclk_count_calc(u32 divide) -+{ -+ u32 output = 0; -+ u32 divCalc = 0; -+ -+ divCalc = dglnt_dynclk_divider(divide); -+ if (divCalc == ERR_CLKDIVIDER) -+ output = ERR_CLKCOUNTCALC; -+ else -+ output = (0xFFF & divCalc) | ((divCalc << 10) & 0x00C00000); -+ return output; -+} -+ -+ -+int dglnt_dynclk_find_reg(struct dglnt_dynclk_reg *regValues, -+ struct dglnt_dynclk_mode *clkParams) -+{ -+ if ((clkParams->fbmult < 2) || clkParams->fbmult > 64) -+ return -EINVAL; -+ -+ regValues->clk0L = dglnt_dynclk_count_calc(clkParams->clkdiv); -+ if (regValues->clk0L == ERR_CLKCOUNTCALC) -+ return -EINVAL; -+ -+ regValues->clkFBL = dglnt_dynclk_count_calc(clkParams->fbmult); -+ if (regValues->clkFBL == ERR_CLKCOUNTCALC) -+ return -EINVAL; -+ -+ regValues->clkFBH_clk0H = 0; -+ -+ regValues->divclk = dglnt_dynclk_divider(clkParams->maindiv); -+ if (regValues->divclk == ERR_CLKDIVIDER) -+ return -EINVAL; -+ -+ regValues->lockL = (u32)(lock_lookup[clkParams->fbmult - 1] & -+ 0xFFFFFFFF); -+ -+ regValues->fltr_lockH = (u32)((lock_lookup[clkParams->fbmult - 1] >> -+ 32) & 0x000000FF); -+ regValues->fltr_lockH |= ((filter_lookup_low[clkParams->fbmult - 1] << -+ 16) & 0x03FF0000); -+ -+ return 0; -+} -+ -+void dglnt_dynclk_write_reg(struct dglnt_dynclk_reg *regValues, -+ void __iomem *baseaddr) -+{ -+ writel(regValues->clk0L, baseaddr + OFST_DISPLAY_CLK_L); -+ writel(regValues->clkFBL, baseaddr + OFST_DISPLAY_FB_L); -+ writel(regValues->clkFBH_clk0H, baseaddr + OFST_DISPLAY_FB_H_CLK_H); -+ writel(regValues->divclk, baseaddr + OFST_DISPLAY_DIV); -+ writel(regValues->lockL, baseaddr + OFST_DISPLAY_LOCK_L); -+ writel(regValues->fltr_lockH, baseaddr + OFST_DISPLAY_FLTR_LOCK_H); -+} -+ -+u32 dglnt_dynclk_find_mode(u32 freq, u32 parentFreq, -+ struct dglnt_dynclk_mode *bestPick) -+{ -+ u32 bestError = MMCM_FREQ_OUTMAX; -+ u32 curError; -+ u32 curClkMult; -+ u32 curFreq; -+ u32 divVal; -+ u32 curFb, curClkDiv; -+ u32 minFb = 0; -+ u32 maxFb = 0; -+ u32 curDiv = 1; -+ u32 maxDiv; -+ bool freq_found = false; -+ -+ bestPick->freq = 0; -+ if (parentFreq == 0) -+ return 0; -+ -+ /* minimum frequency is actually dictated by VCOmin */ -+ if (freq < MMCM_FREQ_OUTMIN) -+ freq = MMCM_FREQ_OUTMIN; -+ if (freq > MMCM_FREQ_OUTMAX) -+ freq = MMCM_FREQ_OUTMAX; -+ -+ if (parentFreq > MMCM_FREQ_PFDMAX) -+ curDiv = 2; -+ maxDiv = parentFreq / MMCM_FREQ_PFDMIN; -+ if (maxDiv > MMCM_DIV_MAX) -+ maxDiv = MMCM_DIV_MAX; -+ -+ while (curDiv <= maxDiv && !freq_found) { -+ minFb = curDiv * DIV_ROUND_UP(MMCM_FREQ_VCOMIN, parentFreq); -+ maxFb = curDiv * (MMCM_FREQ_VCOMAX / parentFreq); -+ if (maxFb > MMCM_FB_MAX) -+ maxFb = MMCM_FB_MAX; -+ if (minFb < MMCM_FB_MIN) -+ minFb = MMCM_FB_MIN; -+ -+ divVal = curDiv * freq; -+ /* -+ * This multiplier is used to find the best clkDiv value for -+ * each FB value -+ */ -+ curClkMult = ((parentFreq * 1000) + (divVal / 2)) / divVal; -+ -+ curFb = minFb; -+ while (curFb <= maxFb && !freq_found) { -+ curClkDiv = ((curClkMult * curFb) + 500) / 1000; -+ if (curClkDiv > MMCM_CLKDIV_MAX) -+ curClkDiv = MMCM_CLKDIV_MAX; -+ if (curClkDiv < MMCM_CLKDIV_MIN) -+ curClkDiv = MMCM_CLKDIV_MIN; -+ curFreq = (((parentFreq * curFb) / curDiv) / curClkDiv); -+ if (curFreq >= freq) -+ curError = curFreq - freq; -+ else -+ curError = freq - curFreq; -+ if (curError < bestError) { -+ bestError = curError; -+ bestPick->clkdiv = curClkDiv; -+ bestPick->fbmult = curFb; -+ bestPick->maindiv = curDiv; -+ bestPick->freq = curFreq; -+ } -+ if (!curError) -+ freq_found = true; -+ curFb++; -+ } -+ curDiv++; -+ } -+ return bestPick->freq; -+} -+ -+static struct dglnt_dynclk *clk_hw_to_dglnt_dynclk(struct clk_hw *clk_hw) -+{ -+ return container_of(clk_hw, struct dglnt_dynclk, clk_hw); -+} -+ -+ -+static int dglnt_dynclk_enable(struct clk_hw *clk_hw) -+{ -+ struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); -+ unsigned int clock_state; -+ -+ if (dglnt_dynclk->freq) { -+ writel(1, dglnt_dynclk->base + OFST_DISPLAY_CTRL); -+ do { -+ clock_state = readl(dglnt_dynclk->base + -+ OFST_DISPLAY_STATUS); -+ } while (!clock_state); -+ } -+ return 0; -+} -+ -+static void dglnt_dynclk_disable(struct clk_hw *clk_hw) -+{ -+ struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); -+ -+ writel(0, dglnt_dynclk->base + OFST_DISPLAY_CTRL); -+} -+ -+static int dglnt_dynclk_set_rate(struct clk_hw *clk_hw, -+ unsigned long rate, unsigned long parent_rate) -+{ -+ struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); -+ struct dglnt_dynclk_reg clkReg; -+ struct dglnt_dynclk_mode clkMode; -+ -+ if (parent_rate == 0 || rate == 0) -+ return -EINVAL; -+ if (rate == dglnt_dynclk->freq) -+ return 0; -+ -+ /* -+ * Convert from Hz to KHz, then multiply by five to account for -+ * BUFR division -+ */ -+ rate = (rate + 100) / 200; -+ /* convert from Hz to KHz */ -+ parent_rate = (parent_rate + 500) / 1000; -+ if (!dglnt_dynclk_find_mode(rate, parent_rate, &clkMode)) -+ return -EINVAL; -+ -+ /* -+ * Write to the PLL dynamic configuration registers to configure it -+ * with the calculated parameters. -+ */ -+ dglnt_dynclk_find_reg(&clkReg, &clkMode); -+ dglnt_dynclk_write_reg(&clkReg, dglnt_dynclk->base); -+ dglnt_dynclk->freq = clkMode.freq * 200; -+ dglnt_dynclk_disable(clk_hw); -+ dglnt_dynclk_enable(clk_hw); -+ -+ return 0; -+} -+ -+static long dglnt_dynclk_round_rate(struct clk_hw *hw, unsigned long rate, -+ unsigned long *parent_rate) -+{ -+ struct dglnt_dynclk_mode clkMode; -+ -+ dglnt_dynclk_find_mode(((rate + 100) / 200), -+ ((*parent_rate) + 500) / 1000, &clkMode); -+ -+ return (clkMode.freq * 200); -+} -+ -+static unsigned long dglnt_dynclk_recalc_rate(struct clk_hw *clk_hw, -+ unsigned long parent_rate) -+{ -+ struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); -+ -+ return dglnt_dynclk->freq; -+} -+ -+ -+static const struct clk_ops dglnt_dynclk_ops = { -+ .recalc_rate = dglnt_dynclk_recalc_rate, -+ .round_rate = dglnt_dynclk_round_rate, -+ .set_rate = dglnt_dynclk_set_rate, -+ .enable = dglnt_dynclk_enable, -+ .disable = dglnt_dynclk_disable, -+}; -+ -+static const struct of_device_id dglnt_dynclk_ids[] = { -+ { .compatible = "digilent,axi-dynclk", }, -+ { }, -+}; -+MODULE_DEVICE_TABLE(of, dglnt_dynclk_ids); -+ -+static int dglnt_dynclk_probe(struct platform_device *pdev) -+{ -+ const struct of_device_id *id; -+ struct dglnt_dynclk *dglnt_dynclk; -+ struct clk_init_data init; -+ const char *parent_name; -+ const char *clk_name; -+ struct resource *mem; -+ struct clk *clk; -+ -+ if (!pdev->dev.of_node) -+ return -ENODEV; -+ -+ id = of_match_node(dglnt_dynclk_ids, pdev->dev.of_node); -+ if (!id) -+ return -ENODEV; -+ -+ dglnt_dynclk = devm_kzalloc(&pdev->dev, sizeof(*dglnt_dynclk), -+ GFP_KERNEL); -+ if (!dglnt_dynclk) -+ return -ENOMEM; -+ -+ mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ dglnt_dynclk->base = devm_ioremap_resource(&pdev->dev, mem); -+ if (IS_ERR(dglnt_dynclk->base)) -+ return PTR_ERR(dglnt_dynclk->base); -+ -+ parent_name = of_clk_get_parent_name(pdev->dev.of_node, 0); -+ if (!parent_name) -+ return -EINVAL; -+ -+ clk_name = pdev->dev.of_node->name; -+ of_property_read_string(pdev->dev.of_node, "clock-output-names", -+ &clk_name); -+ -+ init.name = clk_name; -+ init.ops = &dglnt_dynclk_ops; -+ init.flags = 0; -+ init.parent_names = &parent_name; -+ init.num_parents = 1; -+ -+ dglnt_dynclk->freq = 0; -+ dglnt_dynclk_disable(&dglnt_dynclk->clk_hw); -+ -+ dglnt_dynclk->clk_hw.init = &init; -+ clk = devm_clk_register(&pdev->dev, &dglnt_dynclk->clk_hw); -+ if (IS_ERR(clk)) -+ return PTR_ERR(clk); -+ -+ return of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get, -+ clk); -+} -+ -+static int dglnt_dynclk_remove(struct platform_device *pdev) -+{ -+ of_clk_del_provider(pdev->dev.of_node); -+ -+ return 0; -+} -+ -+static struct platform_driver dglnt_dynclk_driver = { -+ .driver = { -+ .name = "dglnt-dynclk", -+ .owner = THIS_MODULE, -+ .of_match_table = dglnt_dynclk_ids, -+ }, -+ .probe = dglnt_dynclk_probe, -+ .remove = dglnt_dynclk_remove, -+}; -+module_platform_driver(dglnt_dynclk_driver); -+ -+MODULE_LICENSE("GPL v2"); -+MODULE_AUTHOR("Sam Bobrowicz "); -+MODULE_DESCRIPTION("CCF Driver for Digilent axi_dynclk IP Core"); --- -2.14.2 - diff --git a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch deleted file mode 100644 index a98d84c55..000000000 --- a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 1a18e2b514ae9e75145597ac509a87f656c976ba Mon Sep 17 00:00:00 2001 -From: Nathan Rossi -Date: Mon, 2 May 2016 23:46:42 +1000 -Subject: [PATCH 3/3] drm: xilinx: Fix DPMS transition to on - -Fix the issues where the VTC is reset (losing its timing config). - -Also fix the issue where the plane destroys its DMA descriptors and -marks the DMA channels as inactive but never recreates the descriptors -and never updates the active state when turning DPMS back on. - -Signed-off-by: Nathan Rossi -Upstream-Status: Pending [This is a workaround] ---- - drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | 1 - - drivers/gpu/drm/xilinx/xilinx_drm_plane.c | 3 ++- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c b/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c -index 631d35b921..93dbd4b58a 100644 ---- a/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c -+++ b/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c -@@ -88,7 +88,6 @@ static void xilinx_drm_crtc_dpms(struct drm_crtc *base_crtc, int dpms) - default: - if (crtc->vtc) { - xilinx_vtc_disable(crtc->vtc); -- xilinx_vtc_reset(crtc->vtc); - } - if (crtc->cresample) { - xilinx_cresample_disable(crtc->cresample); -diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_plane.c b/drivers/gpu/drm/xilinx/xilinx_drm_plane.c -index 6a248b72d4..d2518a4bdf 100644 ---- a/drivers/gpu/drm/xilinx/xilinx_drm_plane.c -+++ b/drivers/gpu/drm/xilinx/xilinx_drm_plane.c -@@ -140,7 +140,7 @@ void xilinx_drm_plane_commit(struct drm_plane *base_plane) - for (i = 0; i < MAX_NUM_SUB_PLANES; i++) { - struct xilinx_drm_plane_dma *dma = &plane->dma[i]; - -- if (dma->chan && dma->is_active) { -+ if (dma->chan) { - flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT; - desc = dmaengine_prep_interleaved_dma(dma->chan, - &dma->xt, -@@ -153,6 +153,7 @@ void xilinx_drm_plane_commit(struct drm_plane *base_plane) - dmaengine_submit(desc); - - dma_async_issue_pending(dma->chan); -+ dma->is_active = true; - } - } - } --- -2.14.2 - diff --git a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0004-minized-wifi-bluetooth.cfg b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0004-minized-wifi-bluetooth.cfg deleted file mode 100644 index f71e53abb..000000000 --- a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0004-minized-wifi-bluetooth.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# -# Bluetooth config -# -CONFIG_BT=y -CONFIG_BT_BREDR=y -CONFIG_BT_HS=y -CONFIG_BT_LE=y -CONFIG_BT_BCM=y -CONFIG_BT_HCIUART=y -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCM=y -CONFIG_BT_HIDP=y -CONFIG_CFG80211=y -CONFIG_CFG80211_DEFAULT_PS=y -CONFIG_CFG80211_CRDA_SUPPORT=y -CONFIG_BRCMUTIL=y -CONFIG_BRCMFMAC=y -CONFIG_BRCMFMAC_PROTO_BCDC=y -CONFIG_BRCMFMAC_SDIO=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_CMAC=y -CONFIG_CRYPTO_SHA256=y - -# -# Regulator config -# -CONFIG_REGMAP_IRQ=y -CONFIG_I2C_XILINX=y -CONFIG_MFD_DA9062=y -CONFIG_REGULATOR_DA9062=y - diff --git a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch new file mode 100644 index 000000000..660bc2182 --- /dev/null +++ b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch @@ -0,0 +1,305 @@ +From 21cc8144efdaa3cd8dbd7279f87b14fa3432fae4 Mon Sep 17 00:00:00 2001 +From: Jason Wu +Date: Sun, 10 Apr 2016 13:14:13 +1000 +Subject: [PATCH 1/3] drm: xilinx: Add encoder for Digilent boards + +Add the dglnt_encoder driver that enables DRM support for the VGA and +HDMI output ports found on many Digilent boards. + +Upstream-Status: Pending + +Signed-off-by: Sam Bobrowicz +Signed-off-by: Jason Wu +--- + .../bindings/drm/xilinx/dglnt_encoder.txt | 23 +++ + drivers/gpu/drm/xilinx/Kconfig | 6 + + drivers/gpu/drm/xilinx/Makefile | 1 + + drivers/gpu/drm/xilinx/dglnt_encoder.c | 217 +++++++++++++++++++++ + 4 files changed, 247 insertions(+) + create mode 100644 Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt + create mode 100644 drivers/gpu/drm/xilinx/dglnt_encoder.c + +diff --git a/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt +new file mode 100644 +index 0000000..242b24e +--- /dev/null ++++ b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt +@@ -0,0 +1,23 @@ ++Device-Tree bindings for Digilent DRM Encoder Slave ++ ++This driver provides support for VGA and HDMI outputs on Digilent FPGA boards. ++The VGA or HDMI port must be connected to a Xilinx display pipeline via an ++axi2vid IP core. ++ ++Required properties: ++ - compatible: Should be "digilent,drm-encoder". ++ ++Optional properties: ++ - dglnt,edid-i2c: The I2C device connected to the DDC bus on the video ++ connector. This is used to obtain the supported resolutions ++ of an attached monitor. If not defined, then a default ++ set of resolutions is used and the display will initialize ++ to 720p. Note most VGA connectors on Digilent boards do ++ not have the DDC bus routed out. ++ ++Example: ++ ++ encoder_0: digilent_encoder { ++ compatible = "digilent,drm-encoder"; ++ dglnt,edid-i2c = <&i2c1>; ++ }; +diff --git a/drivers/gpu/drm/xilinx/Kconfig b/drivers/gpu/drm/xilinx/Kconfig +index 57e18a9..d9ecff2 100644 +--- a/drivers/gpu/drm/xilinx/Kconfig ++++ b/drivers/gpu/drm/xilinx/Kconfig +@@ -33,6 +33,12 @@ config DRM_XILINX_DP_SUB + help + DRM driver for Xilinx Display Port Subsystem. + ++config DRM_DIGILENT_ENCODER ++ tristate "Digilent VGA/HDMI DRM Encoder Driver" ++ depends on DRM_XILINX ++ help ++ DRM slave encoder for Video-out on Digilent boards. ++ + config DRM_XILINX_DP_SUB_DEBUG_FS + bool "Xilinx DRM DPSUB debugfs" + depends on DEBUG_FS && DRM_XILINX_DP_SUB +diff --git a/drivers/gpu/drm/xilinx/Makefile b/drivers/gpu/drm/xilinx/Makefile +index 19bc154..c2717e40 100644 +--- a/drivers/gpu/drm/xilinx/Makefile ++++ b/drivers/gpu/drm/xilinx/Makefile +@@ -7,6 +7,7 @@ xilinx_drm-y := xilinx_drm_crtc.o xilinx_drm_connector.o xilinx_drm_drv.o \ + xilinx_drm_plane.o + xilinx_drm-y += xilinx_cresample.o xilinx_osd.o xilinx_rgb2yuv.o xilinx_vtc.o + ++obj-$(CONFIG_DRM_DIGILENT_ENCODER) += dglnt_encoder.o + obj-$(CONFIG_DRM_XILINX) += xilinx_drm.o + obj-$(CONFIG_DRM_XILINX_DP) += xilinx_drm_dp.o + obj-$(CONFIG_DRM_XILINX_DP_SUB) += xilinx_drm_dp_sub.o +diff --git a/drivers/gpu/drm/xilinx/dglnt_encoder.c b/drivers/gpu/drm/xilinx/dglnt_encoder.c +new file mode 100644 +index 0000000..cb9fc7d +--- /dev/null ++++ b/drivers/gpu/drm/xilinx/dglnt_encoder.c +@@ -0,0 +1,217 @@ ++/* ++ * dglnt_encoder.c - DRM slave encoder for Video-out on Digilent boards ++ * ++ * Copyright (C) 2015 Digilent ++ * Author: Sam Bobrowicz ++ * ++ * Based on udl_encoder.c and udl_connector.c, Copyright (C) 2012 Red Hat. ++ * Also based on xilinx_drm_dp.c, Copyright (C) 2014 Xilinx, Inc. ++ * ++ * This software is licensed under the terms of the GNU General Public ++ * License version 2, as published by the Free Software Foundation, and ++ * may be copied, distributed, and modified under those terms. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define DGLNT_ENC_MAX_FREQ 150000 ++#define DGLNT_ENC_MAX_H 1920 ++#define DGLNT_ENC_MAX_V 1080 ++#define DGLNT_ENC_PREF_H 1280 ++#define DGLNT_ENC_PREF_V 720 ++ ++struct dglnt_encoder { ++ struct drm_encoder *encoder; ++ struct i2c_adapter *i2c_bus; ++ bool i2c_present; ++}; ++ ++static inline struct dglnt_encoder *to_dglnt_encoder( ++ struct drm_encoder *encoder) ++{ ++ return to_encoder_slave(encoder)->slave_priv; ++} ++ ++static bool dglnt_mode_fixup(struct drm_encoder *encoder, ++ const struct drm_display_mode *mode, ++ struct drm_display_mode *adjusted_mode) ++{ ++ return true; ++} ++ ++static void dglnt_encoder_mode_set(struct drm_encoder *encoder, ++ struct drm_display_mode *mode, ++ struct drm_display_mode *adjusted_mode) ++{ ++} ++ ++static void ++dglnt_encoder_dpms(struct drm_encoder *encoder, int mode) ++{ ++} ++ ++static void dglnt_encoder_save(struct drm_encoder *encoder) ++{ ++} ++ ++static void dglnt_encoder_restore(struct drm_encoder *encoder) ++{ ++} ++ ++static int dglnt_encoder_mode_valid(struct drm_encoder *encoder, ++ struct drm_display_mode *mode) ++{ ++ if (mode && ++ !(mode->flags & ((DRM_MODE_FLAG_INTERLACE | ++ DRM_MODE_FLAG_DBLCLK) | DRM_MODE_FLAG_3D_MASK)) && ++ (mode->clock <= DGLNT_ENC_MAX_FREQ) && ++ (mode->hdisplay <= DGLNT_ENC_MAX_H) && ++ (mode->vdisplay <= DGLNT_ENC_MAX_V)) ++ return MODE_OK; ++ return MODE_BAD; ++} ++ ++static int dglnt_encoder_get_modes(struct drm_encoder *encoder, ++ struct drm_connector *connector) ++{ ++ struct dglnt_encoder *dglnt = to_dglnt_encoder(encoder); ++ struct edid *edid; ++ int num_modes = 0; ++ ++ if (dglnt->i2c_present) { ++ edid = drm_get_edid(connector, dglnt->i2c_bus); ++ drm_connector_update_edid_property(connector, edid); ++ if (edid) { ++ num_modes = drm_add_edid_modes(connector, edid); ++ kfree(edid); ++ } ++ } else { ++ num_modes = drm_add_modes_noedid(connector, DGLNT_ENC_MAX_H, ++ DGLNT_ENC_MAX_V); ++ drm_set_preferred_mode(connector, DGLNT_ENC_PREF_H, ++ DGLNT_ENC_PREF_V); ++ } ++ return num_modes; ++} ++ ++static enum drm_connector_status dglnt_encoder_detect( ++ struct drm_encoder *encoder, ++ struct drm_connector *connector) ++{ ++ struct dglnt_encoder *dglnt = to_dglnt_encoder(encoder); ++ ++ if (dglnt->i2c_present) { ++ if (drm_probe_ddc(dglnt->i2c_bus)) ++ return connector_status_connected; ++ return connector_status_disconnected; ++ } else ++ return connector_status_unknown; ++} ++ ++static struct drm_encoder_slave_funcs dglnt_encoder_slave_funcs = { ++ .dpms = dglnt_encoder_dpms, ++ .save = dglnt_encoder_save, ++ .restore = dglnt_encoder_restore, ++ .mode_fixup = dglnt_mode_fixup, ++ .mode_valid = dglnt_encoder_mode_valid, ++ .mode_set = dglnt_encoder_mode_set, ++ .detect = dglnt_encoder_detect, ++ .get_modes = dglnt_encoder_get_modes, ++}; ++ ++static int dglnt_encoder_encoder_init(struct platform_device *pdev, ++ struct drm_device *dev, ++ struct drm_encoder_slave *encoder) ++{ ++ struct dglnt_encoder *dglnt = platform_get_drvdata(pdev); ++ struct device_node *sub_node; ++ ++ encoder->slave_priv = dglnt; ++ encoder->slave_funcs = &dglnt_encoder_slave_funcs; ++ ++ dglnt->encoder = &encoder->base; ++ ++ /* get i2c adapter for edid */ ++ dglnt->i2c_present = false; ++ sub_node = of_parse_phandle(pdev->dev.of_node, "dglnt,edid-i2c", 0); ++ if (sub_node) { ++ dglnt->i2c_bus = of_find_i2c_adapter_by_node(sub_node); ++ if (!dglnt->i2c_bus) ++ DRM_INFO("failed to get the edid i2c adapter, using default modes\n"); ++ else ++ dglnt->i2c_present = true; ++ of_node_put(sub_node); ++ } ++ ++ return 0; ++} ++ ++static int dglnt_encoder_probe(struct platform_device *pdev) ++{ ++ struct dglnt_encoder *dglnt; ++ ++ dglnt = devm_kzalloc(&pdev->dev, sizeof(*dglnt), GFP_KERNEL); ++ if (!dglnt) ++ return -ENOMEM; ++ ++ platform_set_drvdata(pdev, dglnt); ++ ++ return 0; ++} ++ ++static int dglnt_encoder_remove(struct platform_device *pdev) ++{ ++ return 0; ++} ++ ++static const struct of_device_id dglnt_encoder_of_match[] = { ++ { .compatible = "digilent,drm-encoder", }, ++ { /* end of table */ }, ++}; ++MODULE_DEVICE_TABLE(of, dglnt_encoder_of_match); ++ ++static struct drm_platform_encoder_driver dglnt_encoder_driver = { ++ .platform_driver = { ++ .probe = dglnt_encoder_probe, ++ .remove = dglnt_encoder_remove, ++ .driver = { ++ .owner = THIS_MODULE, ++ .name = "dglnt-drm-enc", ++ .of_match_table = dglnt_encoder_of_match, ++ }, ++ }, ++ ++ .encoder_init = dglnt_encoder_encoder_init, ++}; ++ ++static int __init dglnt_encoder_init(void) ++{ ++ return platform_driver_register(&dglnt_encoder_driver.platform_driver); ++} ++ ++static void __exit dglnt_encoder_exit(void) ++{ ++ platform_driver_unregister(&dglnt_encoder_driver.platform_driver); ++} ++ ++module_init(dglnt_encoder_init); ++module_exit(dglnt_encoder_exit); ++ ++MODULE_AUTHOR("Digilent, Inc."); ++MODULE_DESCRIPTION("DRM slave encoder for Video-out on Digilent boards"); ++MODULE_LICENSE("GPL v2"); +-- +2.7.4 + diff --git a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch new file mode 100644 index 000000000..9b6229db0 --- /dev/null +++ b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch @@ -0,0 +1,607 @@ +From 217e3b6f4393926b8dcad841381527ef3fc808c2 Mon Sep 17 00:00:00 2001 +From: Jason Wu +Date: Sun, 10 Apr 2016 13:16:06 +1000 +Subject: [PATCH 2/3] clk: Add driver for axi_dynclk IP Core + +Add support for the axi_dynclk IP Core available from Digilent. This IP +core dynamically configures the clock resources inside a Xilinx FPGA to +generate a clock with a software programmable frequency. + +Upstream-Status: Pending + +Signed-off-by: Sam Bobrowicz +Signed-off-by: Jason Wu +--- + drivers/clk/Kconfig | 8 + + drivers/clk/Makefile | 1 + + drivers/clk/clk-dglnt-dynclk.c | 547 +++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 556 insertions(+) + create mode 100644 drivers/clk/clk-dglnt-dynclk.c + +diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig +index dccb111100..7fe65a702b 100644 +--- a/drivers/clk/Kconfig ++++ b/drivers/clk/Kconfig +@@ -148,6 +148,14 @@ config CLK_QORIQ + This adds the clock driver support for Freescale QorIQ platforms + using common clock framework. + ++config COMMON_CLK_DGLNT_DYNCLK ++ tristate "Digilent axi_dynclk Driver" ++ depends on ARCH_ZYNQ || MICROBLAZE ++ help ++ ---help--- ++ Support for the Digilent AXI Dynamic Clock core for Xilinx ++ FPGAs. ++ + config COMMON_CLK_XGENE + bool "Clock driver for APM XGene SoC" + default y +diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile +index 0760449dde..45ce97d053 100644 +--- a/drivers/clk/Makefile ++++ b/drivers/clk/Makefile +@@ -24,6 +24,7 @@ obj-$(CONFIG_COMMON_CLK_CDCE706) += clk-cdce706.o + obj-$(CONFIG_COMMON_CLK_CDCE925) += clk-cdce925.o + obj-$(CONFIG_ARCH_CLPS711X) += clk-clps711x.o + obj-$(CONFIG_COMMON_CLK_CS2000_CP) += clk-cs2000-cp.o ++obj-$(CONFIG_COMMON_CLK_DGLNT_DYNCLK) += clk-dglnt-dynclk.o + obj-$(CONFIG_ARCH_EFM32) += clk-efm32gg.o + obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o + obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o +diff --git a/drivers/clk/clk-dglnt-dynclk.c b/drivers/clk/clk-dglnt-dynclk.c +new file mode 100644 +index 0000000000..496ad5fc90 +--- /dev/null ++++ b/drivers/clk/clk-dglnt-dynclk.c +@@ -0,0 +1,547 @@ ++/* ++ * clk-dglnt-dynclk.c - Digilent AXI Dynamic Clock (axi_dynclk) Driver ++ * ++ * Copyright (C) 2015 Digilent ++ * Author: Sam Bobrowicz ++ * ++ * Reused code from clk-axi-clkgen.c, Copyright (C) 2012-2013 Analog Devices Inc. ++ * ++ * This software is licensed under the terms of the GNU General Public ++ * License version 2, as published by the Free Software Foundation, and ++ * may be copied, distributed, and modified under those terms. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define CLK_BIT_WEDGE 13 ++#define CLK_BIT_NOCOUNT 12 ++ ++/* This value is used to signal an error */ ++#define ERR_CLKCOUNTCALC 0xFFFFFFFF ++#define ERR_CLKDIVIDER (1 << CLK_BIT_WEDGE | 1 << CLK_BIT_NOCOUNT) ++ ++#define DYNCLK_DIV_1_REGMASK 0x1041 ++/* 25 MHz (125 KHz / 5) */ ++#define DYNCLK_DEFAULT_FREQ 125000 ++ ++#define MMCM_FREQ_VCOMIN 600000 ++#define MMCM_FREQ_VCOMAX 1200000 ++#define MMCM_FREQ_PFDMIN 10000 ++#define MMCM_FREQ_PFDMAX 450000 ++#define MMCM_FREQ_OUTMIN 4000 ++#define MMCM_FREQ_OUTMAX 800000 ++#define MMCM_DIV_MAX 106 ++#define MMCM_FB_MIN 2 ++#define MMCM_FB_MAX 64 ++#define MMCM_CLKDIV_MAX 128 ++#define MMCM_CLKDIV_MIN 1 ++ ++#define OFST_DISPLAY_CTRL 0x0 ++#define OFST_DISPLAY_STATUS 0x4 ++#define OFST_DISPLAY_CLK_L 0x8 ++#define OFST_DISPLAY_FB_L 0x0C ++#define OFST_DISPLAY_FB_H_CLK_H 0x10 ++#define OFST_DISPLAY_DIV 0x14 ++#define OFST_DISPLAY_LOCK_L 0x18 ++#define OFST_DISPLAY_FLTR_LOCK_H 0x1C ++ ++static const u64 lock_lookup[64] = { ++ 0b0011000110111110100011111010010000000001, ++ 0b0011000110111110100011111010010000000001, ++ 0b0100001000111110100011111010010000000001, ++ 0b0101101011111110100011111010010000000001, ++ 0b0111001110111110100011111010010000000001, ++ 0b1000110001111110100011111010010000000001, ++ 0b1001110011111110100011111010010000000001, ++ 0b1011010110111110100011111010010000000001, ++ 0b1100111001111110100011111010010000000001, ++ 0b1110011100111110100011111010010000000001, ++ 0b1111111111111000010011111010010000000001, ++ 0b1111111111110011100111111010010000000001, ++ 0b1111111111101110111011111010010000000001, ++ 0b1111111111101011110011111010010000000001, ++ 0b1111111111101000101011111010010000000001, ++ 0b1111111111100111000111111010010000000001, ++ 0b1111111111100011111111111010010000000001, ++ 0b1111111111100010011011111010010000000001, ++ 0b1111111111100000110111111010010000000001, ++ 0b1111111111011111010011111010010000000001, ++ 0b1111111111011101101111111010010000000001, ++ 0b1111111111011100001011111010010000000001, ++ 0b1111111111011010100111111010010000000001, ++ 0b1111111111011001000011111010010000000001, ++ 0b1111111111011001000011111010010000000001, ++ 0b1111111111010111011111111010010000000001, ++ 0b1111111111010101111011111010010000000001, ++ 0b1111111111010101111011111010010000000001, ++ 0b1111111111010100010111111010010000000001, ++ 0b1111111111010100010111111010010000000001, ++ 0b1111111111010010110011111010010000000001, ++ 0b1111111111010010110011111010010000000001, ++ 0b1111111111010010110011111010010000000001, ++ 0b1111111111010001001111111010010000000001, ++ 0b1111111111010001001111111010010000000001, ++ 0b1111111111010001001111111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001, ++ 0b1111111111001111101011111010010000000001 ++}; ++ ++static const u32 filter_lookup_low[64] = { ++ 0b0001011111, ++ 0b0001010111, ++ 0b0001111011, ++ 0b0001011011, ++ 0b0001101011, ++ 0b0001110011, ++ 0b0001110011, ++ 0b0001110011, ++ 0b0001110011, ++ 0b0001001011, ++ 0b0001001011, ++ 0b0001001011, ++ 0b0010110011, ++ 0b0001010011, ++ 0b0001010011, ++ 0b0001010011, ++ 0b0001010011, ++ 0b0001010011, ++ 0b0001010011, ++ 0b0001010011, ++ 0b0001010011, ++ 0b0001010011, ++ 0b0001010011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0001100011, ++ 0b0010010011, ++ 0b0010010011, ++ 0b0010010011, ++ 0b0010010011, ++ 0b0010010011, ++ 0b0010010011, ++ 0b0010010011, ++ 0b0010010011, ++ 0b0010010011, ++ 0b0010010011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011, ++ 0b0010100011 ++}; ++ ++struct dglnt_dynclk_reg; ++struct dglnt_dynclk_mode; ++struct dglnt_dynclk; ++ ++struct dglnt_dynclk_reg { ++ u32 clk0L; ++ u32 clkFBL; ++ u32 clkFBH_clk0H; ++ u32 divclk; ++ u32 lockL; ++ u32 fltr_lockH; ++}; ++ ++struct dglnt_dynclk_mode { ++ u32 freq; ++ u32 fbmult; ++ u32 clkdiv; ++ u32 maindiv; ++}; ++ ++struct dglnt_dynclk { ++ void __iomem *base; ++ struct clk_hw clk_hw; ++ unsigned long freq; ++}; ++ ++u32 dglnt_dynclk_divider(u32 divide) ++{ ++ u32 output = 0; ++ u32 highTime = 0; ++ u32 lowTime = 0; ++ ++ if ((divide < 1) || (divide > 128)) ++ return ERR_CLKDIVIDER; ++ ++ if (divide == 1) ++ return DYNCLK_DIV_1_REGMASK; ++ ++ highTime = divide / 2; ++ /* if divide is odd */ ++ if (divide & 0x1) { ++ lowTime = highTime + 1; ++ output = 1 << CLK_BIT_WEDGE; ++ } else { ++ lowTime = highTime; ++ } ++ ++ output |= 0x03F & lowTime; ++ output |= 0xFC0 & (highTime << 6); ++ return output; ++} ++ ++u32 dglnt_dynclk_count_calc(u32 divide) ++{ ++ u32 output = 0; ++ u32 divCalc = 0; ++ ++ divCalc = dglnt_dynclk_divider(divide); ++ if (divCalc == ERR_CLKDIVIDER) ++ output = ERR_CLKCOUNTCALC; ++ else ++ output = (0xFFF & divCalc) | ((divCalc << 10) & 0x00C00000); ++ return output; ++} ++ ++ ++int dglnt_dynclk_find_reg(struct dglnt_dynclk_reg *regValues, ++ struct dglnt_dynclk_mode *clkParams) ++{ ++ if ((clkParams->fbmult < 2) || clkParams->fbmult > 64) ++ return -EINVAL; ++ ++ regValues->clk0L = dglnt_dynclk_count_calc(clkParams->clkdiv); ++ if (regValues->clk0L == ERR_CLKCOUNTCALC) ++ return -EINVAL; ++ ++ regValues->clkFBL = dglnt_dynclk_count_calc(clkParams->fbmult); ++ if (regValues->clkFBL == ERR_CLKCOUNTCALC) ++ return -EINVAL; ++ ++ regValues->clkFBH_clk0H = 0; ++ ++ regValues->divclk = dglnt_dynclk_divider(clkParams->maindiv); ++ if (regValues->divclk == ERR_CLKDIVIDER) ++ return -EINVAL; ++ ++ regValues->lockL = (u32)(lock_lookup[clkParams->fbmult - 1] & ++ 0xFFFFFFFF); ++ ++ regValues->fltr_lockH = (u32)((lock_lookup[clkParams->fbmult - 1] >> ++ 32) & 0x000000FF); ++ regValues->fltr_lockH |= ((filter_lookup_low[clkParams->fbmult - 1] << ++ 16) & 0x03FF0000); ++ ++ return 0; ++} ++ ++void dglnt_dynclk_write_reg(struct dglnt_dynclk_reg *regValues, ++ void __iomem *baseaddr) ++{ ++ writel(regValues->clk0L, baseaddr + OFST_DISPLAY_CLK_L); ++ writel(regValues->clkFBL, baseaddr + OFST_DISPLAY_FB_L); ++ writel(regValues->clkFBH_clk0H, baseaddr + OFST_DISPLAY_FB_H_CLK_H); ++ writel(regValues->divclk, baseaddr + OFST_DISPLAY_DIV); ++ writel(regValues->lockL, baseaddr + OFST_DISPLAY_LOCK_L); ++ writel(regValues->fltr_lockH, baseaddr + OFST_DISPLAY_FLTR_LOCK_H); ++} ++ ++u32 dglnt_dynclk_find_mode(u32 freq, u32 parentFreq, ++ struct dglnt_dynclk_mode *bestPick) ++{ ++ u32 bestError = MMCM_FREQ_OUTMAX; ++ u32 curError; ++ u32 curClkMult; ++ u32 curFreq; ++ u32 divVal; ++ u32 curFb, curClkDiv; ++ u32 minFb = 0; ++ u32 maxFb = 0; ++ u32 curDiv = 1; ++ u32 maxDiv; ++ bool freq_found = false; ++ ++ bestPick->freq = 0; ++ if (parentFreq == 0) ++ return 0; ++ ++ /* minimum frequency is actually dictated by VCOmin */ ++ if (freq < MMCM_FREQ_OUTMIN) ++ freq = MMCM_FREQ_OUTMIN; ++ if (freq > MMCM_FREQ_OUTMAX) ++ freq = MMCM_FREQ_OUTMAX; ++ ++ if (parentFreq > MMCM_FREQ_PFDMAX) ++ curDiv = 2; ++ maxDiv = parentFreq / MMCM_FREQ_PFDMIN; ++ if (maxDiv > MMCM_DIV_MAX) ++ maxDiv = MMCM_DIV_MAX; ++ ++ while (curDiv <= maxDiv && !freq_found) { ++ minFb = curDiv * DIV_ROUND_UP(MMCM_FREQ_VCOMIN, parentFreq); ++ maxFb = curDiv * (MMCM_FREQ_VCOMAX / parentFreq); ++ if (maxFb > MMCM_FB_MAX) ++ maxFb = MMCM_FB_MAX; ++ if (minFb < MMCM_FB_MIN) ++ minFb = MMCM_FB_MIN; ++ ++ divVal = curDiv * freq; ++ /* ++ * This multiplier is used to find the best clkDiv value for ++ * each FB value ++ */ ++ curClkMult = ((parentFreq * 1000) + (divVal / 2)) / divVal; ++ ++ curFb = minFb; ++ while (curFb <= maxFb && !freq_found) { ++ curClkDiv = ((curClkMult * curFb) + 500) / 1000; ++ if (curClkDiv > MMCM_CLKDIV_MAX) ++ curClkDiv = MMCM_CLKDIV_MAX; ++ if (curClkDiv < MMCM_CLKDIV_MIN) ++ curClkDiv = MMCM_CLKDIV_MIN; ++ curFreq = (((parentFreq * curFb) / curDiv) / curClkDiv); ++ if (curFreq >= freq) ++ curError = curFreq - freq; ++ else ++ curError = freq - curFreq; ++ if (curError < bestError) { ++ bestError = curError; ++ bestPick->clkdiv = curClkDiv; ++ bestPick->fbmult = curFb; ++ bestPick->maindiv = curDiv; ++ bestPick->freq = curFreq; ++ } ++ if (!curError) ++ freq_found = true; ++ curFb++; ++ } ++ curDiv++; ++ } ++ return bestPick->freq; ++} ++ ++static struct dglnt_dynclk *clk_hw_to_dglnt_dynclk(struct clk_hw *clk_hw) ++{ ++ return container_of(clk_hw, struct dglnt_dynclk, clk_hw); ++} ++ ++ ++static int dglnt_dynclk_enable(struct clk_hw *clk_hw) ++{ ++ struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); ++ unsigned int clock_state; ++ ++ if (dglnt_dynclk->freq) { ++ writel(1, dglnt_dynclk->base + OFST_DISPLAY_CTRL); ++ do { ++ clock_state = readl(dglnt_dynclk->base + ++ OFST_DISPLAY_STATUS); ++ } while (!clock_state); ++ } ++ return 0; ++} ++ ++static void dglnt_dynclk_disable(struct clk_hw *clk_hw) ++{ ++ struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); ++ ++ writel(0, dglnt_dynclk->base + OFST_DISPLAY_CTRL); ++} ++ ++static int dglnt_dynclk_set_rate(struct clk_hw *clk_hw, ++ unsigned long rate, unsigned long parent_rate) ++{ ++ struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); ++ struct dglnt_dynclk_reg clkReg; ++ struct dglnt_dynclk_mode clkMode; ++ ++ if (parent_rate == 0 || rate == 0) ++ return -EINVAL; ++ if (rate == dglnt_dynclk->freq) ++ return 0; ++ ++ /* ++ * Convert from Hz to KHz, then multiply by five to account for ++ * BUFR division ++ */ ++ rate = (rate + 100) / 200; ++ /* convert from Hz to KHz */ ++ parent_rate = (parent_rate + 500) / 1000; ++ if (!dglnt_dynclk_find_mode(rate, parent_rate, &clkMode)) ++ return -EINVAL; ++ ++ /* ++ * Write to the PLL dynamic configuration registers to configure it ++ * with the calculated parameters. ++ */ ++ dglnt_dynclk_find_reg(&clkReg, &clkMode); ++ dglnt_dynclk_write_reg(&clkReg, dglnt_dynclk->base); ++ dglnt_dynclk->freq = clkMode.freq * 200; ++ dglnt_dynclk_disable(clk_hw); ++ dglnt_dynclk_enable(clk_hw); ++ ++ return 0; ++} ++ ++static long dglnt_dynclk_round_rate(struct clk_hw *hw, unsigned long rate, ++ unsigned long *parent_rate) ++{ ++ struct dglnt_dynclk_mode clkMode; ++ ++ dglnt_dynclk_find_mode(((rate + 100) / 200), ++ ((*parent_rate) + 500) / 1000, &clkMode); ++ ++ return (clkMode.freq * 200); ++} ++ ++static unsigned long dglnt_dynclk_recalc_rate(struct clk_hw *clk_hw, ++ unsigned long parent_rate) ++{ ++ struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); ++ ++ return dglnt_dynclk->freq; ++} ++ ++ ++static const struct clk_ops dglnt_dynclk_ops = { ++ .recalc_rate = dglnt_dynclk_recalc_rate, ++ .round_rate = dglnt_dynclk_round_rate, ++ .set_rate = dglnt_dynclk_set_rate, ++ .enable = dglnt_dynclk_enable, ++ .disable = dglnt_dynclk_disable, ++}; ++ ++static const struct of_device_id dglnt_dynclk_ids[] = { ++ { .compatible = "digilent,axi-dynclk", }, ++ { }, ++}; ++MODULE_DEVICE_TABLE(of, dglnt_dynclk_ids); ++ ++static int dglnt_dynclk_probe(struct platform_device *pdev) ++{ ++ const struct of_device_id *id; ++ struct dglnt_dynclk *dglnt_dynclk; ++ struct clk_init_data init; ++ const char *parent_name; ++ const char *clk_name; ++ struct resource *mem; ++ struct clk *clk; ++ ++ if (!pdev->dev.of_node) ++ return -ENODEV; ++ ++ id = of_match_node(dglnt_dynclk_ids, pdev->dev.of_node); ++ if (!id) ++ return -ENODEV; ++ ++ dglnt_dynclk = devm_kzalloc(&pdev->dev, sizeof(*dglnt_dynclk), ++ GFP_KERNEL); ++ if (!dglnt_dynclk) ++ return -ENOMEM; ++ ++ mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ dglnt_dynclk->base = devm_ioremap_resource(&pdev->dev, mem); ++ if (IS_ERR(dglnt_dynclk->base)) ++ return PTR_ERR(dglnt_dynclk->base); ++ ++ parent_name = of_clk_get_parent_name(pdev->dev.of_node, 0); ++ if (!parent_name) ++ return -EINVAL; ++ ++ clk_name = pdev->dev.of_node->name; ++ of_property_read_string(pdev->dev.of_node, "clock-output-names", ++ &clk_name); ++ ++ init.name = clk_name; ++ init.ops = &dglnt_dynclk_ops; ++ init.flags = 0; ++ init.parent_names = &parent_name; ++ init.num_parents = 1; ++ ++ dglnt_dynclk->freq = 0; ++ dglnt_dynclk_disable(&dglnt_dynclk->clk_hw); ++ ++ dglnt_dynclk->clk_hw.init = &init; ++ clk = devm_clk_register(&pdev->dev, &dglnt_dynclk->clk_hw); ++ if (IS_ERR(clk)) ++ return PTR_ERR(clk); ++ ++ return of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get, ++ clk); ++} ++ ++static int dglnt_dynclk_remove(struct platform_device *pdev) ++{ ++ of_clk_del_provider(pdev->dev.of_node); ++ ++ return 0; ++} ++ ++static struct platform_driver dglnt_dynclk_driver = { ++ .driver = { ++ .name = "dglnt-dynclk", ++ .owner = THIS_MODULE, ++ .of_match_table = dglnt_dynclk_ids, ++ }, ++ .probe = dglnt_dynclk_probe, ++ .remove = dglnt_dynclk_remove, ++}; ++module_platform_driver(dglnt_dynclk_driver); ++ ++MODULE_LICENSE("GPL v2"); ++MODULE_AUTHOR("Sam Bobrowicz "); ++MODULE_DESCRIPTION("CCF Driver for Digilent axi_dynclk IP Core"); +-- +2.14.2 + diff --git a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch new file mode 100644 index 000000000..a98d84c55 --- /dev/null +++ b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch @@ -0,0 +1,54 @@ +From 1a18e2b514ae9e75145597ac509a87f656c976ba Mon Sep 17 00:00:00 2001 +From: Nathan Rossi +Date: Mon, 2 May 2016 23:46:42 +1000 +Subject: [PATCH 3/3] drm: xilinx: Fix DPMS transition to on + +Fix the issues where the VTC is reset (losing its timing config). + +Also fix the issue where the plane destroys its DMA descriptors and +marks the DMA channels as inactive but never recreates the descriptors +and never updates the active state when turning DPMS back on. + +Signed-off-by: Nathan Rossi +Upstream-Status: Pending [This is a workaround] +--- + drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | 1 - + drivers/gpu/drm/xilinx/xilinx_drm_plane.c | 3 ++- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c b/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c +index 631d35b921..93dbd4b58a 100644 +--- a/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c ++++ b/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c +@@ -88,7 +88,6 @@ static void xilinx_drm_crtc_dpms(struct drm_crtc *base_crtc, int dpms) + default: + if (crtc->vtc) { + xilinx_vtc_disable(crtc->vtc); +- xilinx_vtc_reset(crtc->vtc); + } + if (crtc->cresample) { + xilinx_cresample_disable(crtc->cresample); +diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_plane.c b/drivers/gpu/drm/xilinx/xilinx_drm_plane.c +index 6a248b72d4..d2518a4bdf 100644 +--- a/drivers/gpu/drm/xilinx/xilinx_drm_plane.c ++++ b/drivers/gpu/drm/xilinx/xilinx_drm_plane.c +@@ -140,7 +140,7 @@ void xilinx_drm_plane_commit(struct drm_plane *base_plane) + for (i = 0; i < MAX_NUM_SUB_PLANES; i++) { + struct xilinx_drm_plane_dma *dma = &plane->dma[i]; + +- if (dma->chan && dma->is_active) { ++ if (dma->chan) { + flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT; + desc = dmaengine_prep_interleaved_dma(dma->chan, + &dma->xt, +@@ -153,6 +153,7 @@ void xilinx_drm_plane_commit(struct drm_plane *base_plane) + dmaengine_submit(desc); + + dma_async_issue_pending(dma->chan); ++ dma->is_active = true; + } + } + } +-- +2.14.2 + diff --git a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0004-minized-wifi-bluetooth.cfg b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0004-minized-wifi-bluetooth.cfg new file mode 100644 index 000000000..f71e53abb --- /dev/null +++ b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2020.1/0004-minized-wifi-bluetooth.cfg @@ -0,0 +1,33 @@ +# +# Bluetooth config +# +CONFIG_BT=y +CONFIG_BT_BREDR=y +CONFIG_BT_HS=y +CONFIG_BT_LE=y +CONFIG_BT_BCM=y +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCM=y +CONFIG_BT_HIDP=y +CONFIG_CFG80211=y +CONFIG_CFG80211_DEFAULT_PS=y +CONFIG_CFG80211_CRDA_SUPPORT=y +CONFIG_BRCMUTIL=y +CONFIG_BRCMFMAC=y +CONFIG_BRCMFMAC_PROTO_BCDC=y +CONFIG_BRCMFMAC_SDIO=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_CMAC=y +CONFIG_CRYPTO_SHA256=y + +# +# Regulator config +# +CONFIG_REGMAP_IRQ=y +CONFIG_I2C_XILINX=y +CONFIG_MFD_DA9062=y +CONFIG_REGULATOR_DA9062=y + diff --git a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2019.1.bbappend b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2019.1.bbappend deleted file mode 100644 index 535fbb264..000000000 --- a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2019.1.bbappend +++ /dev/null @@ -1,9 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/linux-xlnx:" - -SRC_URI_append_zybo-linux-bd-zynq7 = " \ - file://0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch \ - file://0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch \ - file://0003-drm-xilinx-Fix-DPMS-transition-to-on.patch \ - " - -SRC_URI_append_minized-zynq7 = " file://0004-minized-wifi-bluetooth.cfg" diff --git a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2020.1.bbappend b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2020.1.bbappend new file mode 100644 index 000000000..535fbb264 --- /dev/null +++ b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2020.1.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-xlnx:" + +SRC_URI_append_zybo-linux-bd-zynq7 = " \ + file://0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch \ + file://0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch \ + file://0003-drm-xilinx-Fix-DPMS-transition-to-on.patch \ + " + +SRC_URI_append_minized-zynq7 = " file://0004-minized-wifi-bluetooth.cfg" -- cgit v1.2.3