On 5 March 2018 at 07:24, <tos...@gmail.com> wrote: > From: Anton Gerasimov <anton.gerasi...@openmailbox.org>
Including this in meta-xilinx-bsp would be fine since it is a generally available board and low cost as well. However I am not sure it would be worth including if it relies on adding support with patches. It would be best if those parts were upstreamed to U-Boot/Linux first then adding the patches as backports if required. > > --- > meta-xilinx-bsp/conf/machine/zturn-zynq7.conf | 34 + > .../recipes-bsp/platform-init/platform-init.bb | 1 + > .../platform-init/zturn-zynq7/ps7_init_gpl.c | 13170 > +++++++++++++++++++ > .../platform-init/zturn-zynq7/ps7_init_gpl.h | 137 + > .../0001-Add-device-tree-for-z-turn-board.patch | 170 + > .../recipes-kernel/linux/linux-xlnx.inc | 2 + > 6 files changed, 13514 insertions(+) > create mode 100644 meta-xilinx-bsp/conf/machine/zturn-zynq7.conf > create mode 100644 > meta-xilinx-bsp/recipes-bsp/platform-init/platform-init/zturn-zynq7/ps7_init_gpl.c > create mode 100644 > meta-xilinx-bsp/recipes-bsp/platform-init/platform-init/zturn-zynq7/ps7_init_gpl.h > create mode 100644 > meta-xilinx-bsp/recipes-kernel/linux/files/0001-Add-device-tree-for-z-turn-board.patch > > diff --git a/meta-xilinx-bsp/conf/machine/zturn-zynq7.conf > b/meta-xilinx-bsp/conf/machine/zturn-zynq7.conf > new file mode 100644 > index 0000000..edac836 > --- /dev/null > +++ b/meta-xilinx-bsp/conf/machine/zturn-zynq7.conf > @@ -0,0 +1,34 @@ > +#@TYPE: Machine > +#@NAME: zybo-zynq7 > +#@DESCRIPTION: Machine support for ZYBO. > +# > +# For details on the ZYBO board: > +# https://www.digilentinc.com/Products/Detail.cfm?Prod=ZYBO > +# Make sure to update this documentation. And to add the board to the list in the README. > + > +require conf/machine/include/tune-zynq.inc > +require conf/machine/include/machine-xilinx-default.inc > +require conf/machine/include/machine-xilinx-board.inc > + > +MACHINE_FEATURES = "ext2 vfat usbhost usbgadget" > + > +# u-boot configuration > +PREFERRED_PROVIDER_virtual/bootloader = "u-boot" > +UBOOT_MACHINE = "zynq_z_turn_config" > +SPL_BINARY = "spl/boot.bin" > + > +EXTRA_IMAGEDEPENDS += " \ > + u-boot-zynq-uenv \ > + virtual/boot-bin \ > + " > + > +SERIAL_CONSOLE = "115200 ttyPS0" > + > +KERNEL_DEVICETREE = "zynq-zturn-myir.dtb" > + > +IMAGE_BOOT_FILES += " \ > + boot.bin \ > + ${KERNEL_IMAGETYPE}-zynq-zturn.dtb \ This mismatches the KERNEL_DEVICETREE. > + uEnv.txt \ > + " > + > diff --git a/meta-xilinx-bsp/recipes-bsp/platform-init/platform-init.bb > b/meta-xilinx-bsp/recipes-bsp/platform-init/platform-init.bb > index 32509b0..808d816 100644 > --- a/meta-xilinx-bsp/recipes-bsp/platform-init/platform-init.bb > +++ b/meta-xilinx-bsp/recipes-bsp/platform-init/platform-init.bb > @@ -11,6 +11,7 @@ inherit xilinx-platform-init > > COMPATIBLE_MACHINE = "$^" > COMPATIBLE_MACHINE_picozed-zynq7 = "picozed-zynq7" > +COMPATIBLE_MACHINE_zturn-zynq7 = "zturn-zynq7" > > LICENSE = "GPLv2+" > LIC_FILES_CHKSUM = > "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" > diff --git > a/meta-xilinx-bsp/recipes-bsp/platform-init/platform-init/zturn-zynq7/ps7_init_gpl.c > > b/meta-xilinx-bsp/recipes-bsp/platform-init/platform-init/zturn-zynq7/ps7_init_gpl.c > new file mode 100644 > index 0000000..cc09898 > --- /dev/null > +++ > b/meta-xilinx-bsp/recipes-bsp/platform-init/platform-init/zturn-zynq7/ps7_init_gpl.c Please submit this to be included in U-Boot. You will likely want to clean up the file so its smaller and similar to the existing ps7_init_gpl.c files in the U-Boot source. It appears that Alexander Graf intended to submit this part but I don't see any patches on the U-Boot patchwork. https://patchwork.ozlabs.org/patch/783430/ <-- trimmed--> > diff --git > a/meta-xilinx-bsp/recipes-kernel/linux/files/0001-Add-device-tree-for-z-turn-board.patch > > b/meta-xilinx-bsp/recipes-kernel/linux/files/0001-Add-device-tree-for-z-turn-board.patch > new file mode 100644 > index 0000000..fe00e6c > --- /dev/null > +++ > b/meta-xilinx-bsp/recipes-kernel/linux/files/0001-Add-device-tree-for-z-turn-board.patch > @@ -0,0 +1,170 @@ > +From 1db3fb1c6103ce8c2836f9e42a8799efaea8cf0d Mon Sep 17 00:00:00 2001 > +From: Anton Gerasimov <anton.gerasi...@openmailbox.org> > +Date: Sun, 4 Mar 2018 17:53:00 +0100 > +Subject: [PATCH] Add device tree for z-turn board > + > +--- > + arch/arm/boot/dts/zynq-zturn-myir.dts | 151 > ++++++++++++++++++++++++++++++++++ > + 1 file changed, 151 insertions(+) > + create mode 100644 arch/arm/boot/dts/zynq-zturn-myir.dts > + > +diff --git a/arch/arm/boot/dts/zynq-zturn-myir.dts > b/arch/arm/boot/dts/zynq-zturn-myir.dts > +new file mode 100644 > +index 000000000000..8648d9cacaa5 > +--- /dev/null > ++++ b/arch/arm/boot/dts/zynq-zturn-myir.dts > +@@ -0,0 +1,151 @@ > ++/* > ++ * Copyright (C) 2015 Andrea Merello <adnrea.mere...@gmail.com> andrea.mere...@gmail.com > ++ * > ++ * Based on zynq-zed.dts which is: > ++ * Copyright (C) 2011 - 2014 Xilinx > ++ * Copyright (C) 2012 National Instruments Corp. > ++ * > ++ * 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. Please submit this upstream. Make sure to CC the original author. Regards, Nathan > ++ */ > ++/dts-v1/; > ++/include/ "zynq-7000.dtsi" > ++ > ++/ { > ++ model = "Zynq Z-Turn MYIR Board"; > ++ compatible = "xlnx,zynq-7000"; > ++ > ++ aliases { > ++ ethernet0 = &gem0; > ++ serial0 = &uart1; > ++ serial1 = &uart0; > ++ }; > ++ > ++ memory { > ++ device_type = "memory"; > ++ reg = <0x0 0x40000000>; > ++ }; > ++ > ++ chosen { > ++ bootargs = "console=ttyPS0,115200 earlyprintk > root=/dev/mmcblk0p2 rootwait"; > ++ }; > ++ > ++ gpio-leds { > ++ compatible = "gpio-leds"; > ++ led_r { > ++ label = "led_r"; > ++ gpios = <&gpio0 0x72 0x1>; > ++ default-state = "on"; > ++ linux,default-trigger = "heartbeat"; > ++ }; > ++ > ++ led_g { > ++ label = "led_g"; > ++ gpios = <&gpio0 0x73 0x1>; > ++ default-state = "on"; > ++ linux,default-trigger = "heartbeat"; > ++ }; > ++ > ++ led_b { > ++ label = "led_b"; > ++ gpios = <&gpio0 0x74 0x1>; > ++ default-state = "on"; > ++ linux,default-trigger = "heartbeat"; > ++ }; > ++ > ++ usr_led1 { > ++ label = "usr_led1"; > ++ gpios = <&gpio0 0x0 0x1>; > ++ default-state = "off"; > ++ linux,default-trigger = "none"; > ++ }; > ++ > ++ usr_led2 { > ++ label = "usr_led2"; > ++ gpios = <&gpio0 0x9 0x1>; > ++ default-state = "off"; > ++ linux,default-trigger = "none"; > ++ }; > ++ }; > ++ > ++ gpio-beep { > ++ compatible = "gpio-beeper"; > ++ label = "pl-beep"; > ++ gpios = <&gpio0 0x75 0x0>; > ++ }; > ++ > ++ gpio-keys { > ++ compatible = "gpio-keys"; > ++ #address-cells = <0x1>; > ++ #size-cells = <0x0>; > ++ autorepeat; > ++ K1 { > ++ label = "K1"; > ++ gpios = <&gpio0 0x32 0x1>; > ++ linux,code = <0x66>; > ++ gpio-key,wakeup; > ++ autorepeat; > ++ }; > ++ }; > ++}; > ++ > ++&clkc { > ++ ps-clk-frequency = <33333333>; > ++ fclk-enable = <0xf>; > ++}; > ++ > ++&gem0 { > ++ status = "okay"; > ++ phy-mode = "rgmii-id"; > ++ phy-handle = <ðernet_phy>; > ++ > ++ ethernet_phy: ethernet-phy@0 { > ++ reg = <0x0>; > ++ }; > ++}; > ++ > ++&sdhci0 { > ++ status = "okay"; > ++}; > ++ > ++&uart0 { > ++ status = "okay"; > ++}; > ++ > ++&uart1 { > ++ status = "okay"; > ++}; > ++ > ++&usb0 { > ++ status = "okay"; > ++ dr_mode = "host"; > ++}; > ++ > ++&can0 { > ++ status = "okay"; > ++}; > ++ > ++&i2c0 { > ++ status = "okay"; > ++ clock-frequency = <400000>; > ++ > ++ stlm75@49 { > ++ status = "okay"; > ++ compatible = "lm75"; > ++ reg = <0x49>; > ++ }; > ++ > ++ adxl345@53 { > ++ compatible = "adi,adxl34x", "adxl34x"; > ++ reg = <0x53>; > ++ interrupt-parent = <&intc>; > ++ interrupts = <0x0 0x1e 0x4>; > ++ }; > ++}; > ++ > +-- > +2.16.2 > + > diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc > b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc > index e040e93..cc0435a 100644 > --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc > +++ b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc > @@ -42,3 +42,5 @@ SRC_URI_append = " > file://xilinx-kmeta;type=kmeta;name=xilinx-kmeta;destsuffix=x > # MicroBlaze BSP fragments > KERNEL_FEATURES_append_kc705-microblazeel = " > bsp/kc705-microblazeel/kc705-microblazeel.scc" > > +# Patch for z-turn board > +SRC_URI_append = " file://0001-Add-device-tree-for-z-turn-board.patch" > -- > 2.16.2 > > -- > _______________________________________________ > meta-xilinx mailing list > meta-xilinx@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-xilinx -- _______________________________________________ meta-xilinx mailing list meta-xilinx@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-xilinx