Skip to content

Commit

Permalink
[u-boot, linux] update linux to 5.8.1 and u-boot to v2020.07, closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
rroohhh committed Aug 23, 2020
1 parent fac6572 commit 7cf7039
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 112 deletions.
2 changes: 2 additions & 0 deletions boot/sdboot.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
load mmc 0 0x2000000 uEnv.txt && env import -t 0x2000000 $filesize && boot

14 changes: 10 additions & 4 deletions makefiles/host/bootfs.mk
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ARCH = arm

LINUX_VERSION = v5.2.14
LINUX_VERSION = v5.8.1
LINUX_SOURCE = build/linux-$(LINUX_VERSION).git

UBOOT_VERSION = v2019.07
UBOOT_VERSION = v2020.07
UBOOT_SOURCE = build/u-boot-$(UBOOT_VERSION).git

build/boot.fs/.install_stamp: $(LINUX_SOURCE)/arch/arm/boot/zImage $(UBOOT_SOURCE)/u-boot.img $(UBOOT_SOURCE)/spl/boot.bin build/boot.fs/devicetree.dtb \
boot/axiom-$(DEVICE)/uEnv.txt build/boot.fs/devicetree.dts
boot/axiom-$(DEVICE)/uEnv.txt build/boot.fs/devicetree.dts build/boot.fs/boot.scr
mkdir -p $(@D)

ifeq ($(DEVICE),micro)
Expand Down Expand Up @@ -51,6 +51,7 @@ $(LINUX_SOURCE)/arch/arm/boot/zImage: boot/kernel.config $(LINUX_SOURCE)
# u-boot
U_BOOT_MAKE = $(MAKE) -C $(UBOOT_SOURCE) CROSS_COMPILE=$(CROSS) ARCH=$(ARCH)
U_BOOT_PATCHES = $(wildcard patches/u-boot/*.patch)
$(UBOOT_SOURCE)/.config: export DEVICE_TREE = $(U_BOOT_DEVICE_TREE)
$(UBOOT_SOURCE)/.config: $(U_BOOT_PATCHES)
@mkdir -p $(@D)
rm -rf $(@D)
Expand All @@ -61,17 +62,22 @@ $(UBOOT_SOURCE)/.config: $(U_BOOT_PATCHES)
touch $(@D)/.scmversion

# configure u-boot
+$(U_BOOT_MAKE) $(U_BOOT_DEFCONFIG)
+$(U_BOOT_MAKE) xilinx_zynq_virt_defconfig
touch $@

$(UBOOT_SOURCE)/u-boot.img: export DEVICE_TREE = $(U_BOOT_DEVICE_TREE)
$(UBOOT_SOURCE)/u-boot.img: $(UBOOT_SOURCE)/.config
+$(U_BOOT_MAKE) u-boot.img
touch $@

$(UBOOT_SOURCE)/spl/boot.bin: export DEVICE_TREE = $(U_BOOT_DEVICE_TREE)
$(UBOOT_SOURCE)/spl/boot.bin: $(UBOOT_SOURCE)/.config $(UBOOT_SOURCE)/u-boot.img
+$(U_BOOT_MAKE) spl/boot.bin
touch $@

build/boot.fs/boot.scr: boot/sdboot.cmd $(UBOOT_SOURCE)/spl/boot.bin
./$(UBOOT_SOURCE)/tools/mkimage -c none -A arm -T script -d $< $@

build/boot.fs/devicetree.dtb: boot/axiom-$(DEVICE)/devicetree.dts
@mkdir -p $(@D)
dtc -@ -I dts -O dtb -o $@ $<
Expand Down
2 changes: 1 addition & 1 deletion makefiles/host/config/beta.mk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
U_BOOT_DEFCONFIG = zynq_microzed_defconfig
U_BOOT_DEVICE_TREE = zynq-microzed
2 changes: 1 addition & 1 deletion makefiles/host/config/micro.mk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
U_BOOT_DEFCONFIG = zynq_z_turn_lite_defconfig
U_BOOT_DEVICE_TREE = zynq-z-turn-lite
15 changes: 6 additions & 9 deletions patches/linux/add-ulpi-phy-for-zynq-style-USB-vbus-control.patch
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,15 @@ index a43c49369..0f7f6eb16 100644
struct usb_phy *
otg_ulpi_create(struct usb_phy_io_ops *ops,
unsigned int flags)
@@ -262,6 +293,7 @@ otg_ulpi_create(struct usb_phy_io_ops *ops,
phy->io_ops = ops;
phy->otg = otg;
phy->init = ulpi_init;
@@ -262,3 +293,4 @@ static void otg_ulpi_init(struct usb_phy *phy, struct usb_otg *otg,
+ phy->set_vbus = usbphy_set_vbus;

otg->usb_phy = phy;
otg->set_host = ulpi_set_host;
@@ -271,3 +303,70 @@ otg_ulpi_create(struct usb_phy_io_ops *ops,
@@ -271,2 +303,70 @@ devm_otg_ulpi_create(struct device *dev,
}
EXPORT_SYMBOL_GPL(otg_ulpi_create);

EXPORT_SYMBOL_GPL(devm_otg_ulpi_create);
+
+static int ulpi_phy_probe(struct platform_device *pdev)
+{
+ struct device_node *np = pdev->dev.of_node;
Expand Down Expand Up @@ -183,11 +180,11 @@ index 63758c399..be9aaf54e 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -60,7 +60,8 @@ struct ci_hdrc_platform_data {
#define CI_HDRC_OVERRIDE_RX_BURST BIT(11)
#define CI_HDRC_OVERRIDE_PHY_CONTROL BIT(12) /* Glue layer manages phy */
#define CI_HDRC_REQUIRES_ALIGNED_DMA BIT(13)
#define CI_HDRC_IMX_IS_HSIC BIT(14)
+#define CI_HDRC_PHY_VBUS_CONTROL BIT(15)
#define CI_HDRC_PMQOS BIT(15)
+#define CI_HDRC_PHY_VBUS_CONTROL BIT(16)
enum usb_dr_mode dr_mode;
#define CI_HDRC_CONTROLLER_RESET_EVENT 0
#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1
23 changes: 0 additions & 23 deletions patches/u-boot/microzed_changes.patch

This file was deleted.

100 changes: 26 additions & 74 deletions patches/u-boot/z_turn_lite_support.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 0e2ffdb87f..28edad53c8 100644
index 9900b442..5018ac9d 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -185,6 +185,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += \
@@ -248,6 +248,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += \
zynq-cse-qspi-single.dtb \
zynq-dlc20-rev1.0.dtb \
zynq-microzed.dtb \
Expand All @@ -12,7 +12,7 @@ index 0e2ffdb87f..28edad53c8 100644
zynq-syzygy-hub.dtb \
diff --git a/arch/arm/dts/zynq-z-turn-lite.dts b/arch/arm/dts/zynq-z-turn-lite.dts
new file mode 100644
index 0000000000..52dac527e6
index 00000000..52dac527
--- /dev/null
+++ b/arch/arm/dts/zynq-z-turn-lite.dts
@@ -0,0 +1,71 @@
Expand Down Expand Up @@ -89,7 +89,7 @@ index 0000000000..52dac527e6
+};
diff --git a/board/xilinx/zynq/zynq-z-turn-lite/ps7_init_gpl.c b/board/xilinx/zynq/zynq-z-turn-lite/ps7_init_gpl.c
new file mode 100644
index 0000000000..8721b4f5bb
index 00000000..8721b4f5
--- /dev/null
+++ b/board/xilinx/zynq/zynq-z-turn-lite/ps7_init_gpl.c
@@ -0,0 +1,12120 @@
Expand Down Expand Up @@ -12213,74 +12213,26 @@ index 0000000000..8721b4f5bb
+
+
+
diff --git a/configs/zynq_z_turn_lite_defconfig b/configs/zynq_z_turn_lite_defconfig
new file mode 100644
index 0000000000..1ba547527f
--- /dev/null
+++ b/configs/zynq_z_turn_lite_defconfig
@@ -0,0 +1,65 @@
+CONFIG_ARM=y
+CONFIG_ARCH_ZYNQ=y
+CONFIG_SYS_TEXT_BASE=0x4000000
+CONFIG_SPL=y
+CONFIG_SPL_STACK_R_ADDR=0x200000
+CONFIG_DISTRO_DEFAULTS=y
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
+CONFIG_BOOTDELAY=0
+CONFIG_SPL_STACK_R=y
diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/xilinx_zynq_virt_defconfig
index 5da7440a..e2db1d49 100644
--- a/configs/xilinx_zynq_virt_defconfig
+++ b/configs/xilinx_zynq_virt_defconfig
@@ -18,7 +18,7 @@ CONFIG_LEGACY_IMAGE_FORMAT=y
CONFIG_USE_PREBOOT=y
CONFIG_SPL_STACK_R=y
CONFIG_SPL_FPGA_SUPPORT=y
-CONFIG_SPL_OS_BOOT=y
+CONFIG_SPL_PAYLOAD="u-boot.img"
+CONFIG_SPL_SPI_LOAD=y
+CONFIG_SYS_PROMPT="Zynq> "
+CONFIG_CMD_THOR_DOWNLOAD=y
+CONFIG_CMD_DFU=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_FPGA_LOADBP=y
+CONFIG_CMD_FPGA_LOADFS=y
+CONFIG_CMD_FPGA_LOADMK=y
+CONFIG_CMD_FPGA_LOADP=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_TFTPPUT=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_DEFAULT_DEVICE_TREE="zynq-z-turn-lite"
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_DFU_MMC=y
+CONFIG_DFU_RAM=y
+CONFIG_FPGA_XILINX=y
+CONFIG_FPGA_ZYNQPL=y
+CONFIG_DM_GPIO=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ZYNQ=y
+CONFIG_SPI_FLASH=y
+CONFIG_SF_DEFAULT_SPEED=30000000
+CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_PHY_MARVELL=y
+CONFIG_PHY_REALTEK=y
+CONFIG_PHY_XILINX=y
+CONFIG_MII=y
+CONFIG_ZYNQ_GEM=y
+CONFIG_ZYNQ_SERIAL=y
+CONFIG_ZYNQ_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_ULPI_VIEWPORT=y
+CONFIG_USB_ULPI=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="Xilinx"
+CONFIG_USB_GADGET_VENDOR_NUM=0x03FD
+CONFIG_USB_GADGET_PRODUCT_NUM=0x0300
+CONFIG_CI_UDC=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_USB_FUNCTION_THOR=y
CONFIG_SPL_SPI_LOAD=y
# CONFIG_BOOTM_NETBSD is not set
CONFIG_CMD_IMLS=y
@@ -46,8 +46,7 @@ CONFIG_CMD_MTDPARTS_SPREAD=y
CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y
CONFIG_CMD_UBI=y
CONFIG_DEFAULT_DEVICE_TREE="zynq-zc706"
-CONFIG_OF_LIST="zynq-zc702 zynq-zc706 zynq-zc770-xm010 zynq-zc770-xm011 zynq-zc770-xm011-x16 zynq-zc770-xm012 zynq-zc770-xm013 zynq-cc108 zynq-microzed zynq-minized zynq-picozed zynq-zed zynq-zturn zynq-zybo zynq-zybo-z7 zynq-dlc20-rev1.0"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_OF_LIST="zynq-zc702 zynq-zc706 zynq-zc770-xm010 zynq-zc770-xm011 zynq-zc770-xm011-x16 zynq-zc770-xm012 zynq-zc770-xm013 zynq-cc108 zynq-microzed zynq-minized zynq-picozed zynq-zed zynq-zturn zynq-zybo zynq-zybo-z7 zynq-dlc20-rev1.0 zynq-z-turn-lite"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_NETCONSOLE=y

0 comments on commit 7cf7039

Please sign in to comment.