Commit 58047c6c1b34133acdde0ce579dd1899bcb05876

Authored by Eric Lee
1 parent 94d5945021

Make changes for hardware rev. 00E0

Showing 5 changed files with 2 additions and 77 deletions Inline Diff

recipes-bsp/imx-atf/imx-atf/imx8m-atf-ddr-timing.patch
1 diff --git a/plat/imx/common/include/dram.h b/plat/imx/common/include/dram.h File was deleted
2 index bf0b384..8b5f90c 100644
3 --- a/plat/imx/common/include/dram.h
4 +++ b/plat/imx/common/include/dram.h
5 @@ -41,6 +41,8 @@ struct dram_cfg_param {
6 };
7
8 struct dram_timing_info {
9 + /* ddrphy firmware offset */
10 + unsigned int ddrphy_fw_offset;
11 /* umctl2 config */
12 struct dram_cfg_param *ddrc_cfg;
13 unsigned int ddrc_cfg_num;
14 1 diff --git a/plat/imx/common/include/dram.h b/plat/imx/common/include/dram.h
recipes-bsp/imx-atf/imx-atf/imx8m-atf-fix-derate-enable.patch
1 diff --git a/plat/imx/common/imx8m/lpddr4_dvfs.c b/plat/imx/common/imx8m/lpddr4_dvfs.c File was deleted
2 index b3ea27b..b19bada 100644
3 --- a/plat/imx/common/imx8m/lpddr4_dvfs.c
4 +++ b/plat/imx/common/imx8m/lpddr4_dvfs.c
5 @@ -20,6 +20,7 @@ void lpddr4_swffc(struct dram_info *info, unsigned int init_fsp,
6 unsigned int mr, emr, emr2, emr3;
7 unsigned int mr11, mr12, mr22, mr14;
8 unsigned int tmp;
9 + unsigned int derate_backup[3];
10
11 /* 1. program targetd UMCTL2_REGS_FREQ1/2/3,already done, skip it. */
12
13 @@ -109,14 +110,17 @@ void lpddr4_swffc(struct dram_info *info, unsigned int init_fsp,
14
15 /* 10. Disable automatic derating: derate_enable */
16 tmp= mmio_read_32(DDRC_DERATEEN(0));
17 + derate_backup[0] = tmp;
18 tmp &= ~0x1;
19 mmio_write_32(DDRC_DERATEEN(0), tmp);
20
21 tmp= mmio_read_32(DDRC_FREQ1_DERATEEN(0));
22 + derate_backup[1] = tmp;
23 tmp &= ~0x1;
24 mmio_write_32(DDRC_FREQ1_DERATEEN(0), tmp);
25
26 tmp= mmio_read_32(DDRC_FREQ2_DERATEEN(0));
27 + derate_backup[2] = tmp;
28 tmp &= ~0x1;
29 mmio_write_32(DDRC_FREQ2_DERATEEN(0), tmp);
30
31 @@ -346,10 +350,9 @@ void lpddr4_swffc(struct dram_info *info, unsigned int init_fsp,
32 mmio_write_32(DDRC_ZQCTL0(0), tmp);
33 }
34
35 - /* 40. re-emable automatic derating: derate_enable */
36 - tmp= mmio_read_32(DDRC_DERATEEN(0));
37 - tmp &= 0xFFFFFFFE;
38 - mmio_write_32(DDRC_DERATEEN(0), tmp);
39 + mmio_write_32(DDRC_DERATEEN(0), derate_backup[0]);
40 + mmio_write_32(DDRC_FREQ1_DERATEEN(0), derate_backup[1]);
41 + mmio_write_32(DDRC_FREQ2_DERATEEN(0), derate_backup[2]);
42
43 /* 41. write 1 to PCTRL.port_en */
44 mmio_write_32(DDRC_PCTRL_0(0), 0x1);
45 diff --git a/plat/imx/common/imx8m/lpddr4_retention.c b/plat/imx/common/imx8m/lpddr4_retention.c
46 index 8cc44c8..9cdca3d 100644
47 --- a/plat/imx/common/imx8m/lpddr4_retention.c
48 +++ b/plat/imx/common/imx8m/lpddr4_retention.c
49 @@ -250,7 +250,6 @@ void lpddr4_exit_retention(void)
50 INFO("wait STAT to normal state\n");
51 }
52
53 - mmio_write_32(DDRC_DERATEEN(0), 0x00000302);
54
55 mmio_write_32(DDRC_PCTRL_0(0), 0x00000001);
56 /* dis_auto-refresh is set to 0 */
57 1 diff --git a/plat/imx/common/imx8m/lpddr4_dvfs.c b/plat/imx/common/imx8m/lpddr4_dvfs.c
recipes-bsp/imx-atf/imx-atf_2.0.bbappend
1 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" File was deleted
2
3 SRC_URI_append = " \
4 file://imx8m-atf-ddr-timing.patch \
5 file://imx8m-atf-fix-derate-enable.patch \
6 "
7 1 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
recipes-bsp/u-boot/u-boot-smarcimx8m_2019.04.bb
1 # Copyright (C) 2013-2016 Freescale Semiconductor 1 # Copyright (C) 2013-2016 Freescale Semiconductor
2 # Copyright 2017-2019 NXP 2 # Copyright 2017-2019 NXP
3 3
4 DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards." 4 DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards."
5 require recipes-bsp/u-boot/u-boot-common.inc 5 require recipes-bsp/u-boot/u-boot-common.inc
6 require recipes-bsp/u-boot/u-boot.inc 6 require recipes-bsp/u-boot/u-boot.inc
7 inherit pythonnative 7 inherit pythonnative
8 8
9 PROVIDES += "u-boot" 9 PROVIDES += "u-boot"
10 DEPENDS_append = " python dtc-native" 10 DEPENDS_append = " python dtc-native"
11 11
12 LICENSE = "GPLv2+" 12 LICENSE = "GPLv2+"
13 LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" 13 LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
14 14
15 UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh" 15 UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh"
16 SRCBRANCH = "smarc_8m-imx_v2019.04_4.19.35_1.1.0" 16 SRCBRANCH = "smarc_8m-imx_v2019.04_4.19.35_1.1.0"
17 SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}" 17 SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}"
18 SRCREV = "f7cc15046cf48b28161cc164cd36c7c0813dc39f" 18 SRCREV = "98ddf5324018cd67bc8c65e706b1c9ba23b53533"
19 19
20 S = "${WORKDIR}/git" 20 S = "${WORKDIR}/git"
21 21
22 inherit fsl-u-boot-localversion 22 inherit fsl-u-boot-localversion
23 23
24 LOCALVERSION ?= "-${SRCBRANCH}" 24 LOCALVERSION ?= "-${SRCBRANCH}"
25 25
26 BOOT_TOOLS = "imx-boot-tools" 26 BOOT_TOOLS = "imx-boot-tools"
27 27
28 do_deploy_append_mx8m () { 28 do_deploy_append_mx8m () {
29 # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8mq-XX.dtb for mkimage to generate boot binary 29 # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8mq-XX.dtb for mkimage to generate boot binary
30 if [ -n "${UBOOT_CONFIG}" ] 30 if [ -n "${UBOOT_CONFIG}" ]
31 then 31 then
32 for config in ${UBOOT_MACHINE}; do 32 for config in ${UBOOT_MACHINE}; do
33 i=$(expr $i + 1); 33 i=$(expr $i + 1);
34 for type in ${UBOOT_CONFIG}; do 34 for type in ${UBOOT_CONFIG}; do
35 j=$(expr $j + 1); 35 j=$(expr $j + 1);
36 if [ $j -eq $i ] 36 if [ $j -eq $i ]
37 then 37 then
38 install -d ${DEPLOYDIR}/${BOOT_TOOLS} 38 install -d ${DEPLOYDIR}/${BOOT_TOOLS}
39 install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} 39 install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
40 install -m 0777 ${B}/${config}/tools/mkimage ${DEPLOYDIR}/${BOOT_TOOLS}/mkimage_uboot 40 install -m 0777 ${B}/${config}/tools/mkimage ${DEPLOYDIR}/${BOOT_TOOLS}/mkimage_uboot
41 install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} 41 install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG}
42 fi 42 fi
43 done 43 done
44 unset j 44 unset j
45 done 45 done
46 unset i 46 unset i
47 fi 47 fi
48 48
49 } 49 }
50 50
51 PACKAGE_ARCH = "${MACHINE_ARCH}" 51 PACKAGE_ARCH = "${MACHINE_ARCH}"
52 COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" 52 COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
53 53
54 UBOOT_NAME_mx6 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" 54 UBOOT_NAME_mx6 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
55 UBOOT_NAME_mx7 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" 55 UBOOT_NAME_mx7 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
56 UBOOT_NAME_mx8 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" 56 UBOOT_NAME_mx8 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
57 57
recipes-kernel/linux/linux-smarcimx8m_4.19.35.bb
1 # Copyright (C) 2013-2016 Freescale Semiconductor 1 # Copyright (C) 2013-2016 Freescale Semiconductor
2 # Copyright 2017 NXP 2 # Copyright 2017 NXP
3 # Copyright 2018-2019 Embedian, Inc. 3 # Copyright 2018-2019 Embedian, Inc.
4 # Released under the MIT license (see COPYING.MIT for the terms) 4 # Released under the MIT license (see COPYING.MIT for the terms)
5 5
6 SUMMARY = "Linux kernel provided and supported by Embedian" 6 SUMMARY = "Linux kernel provided and supported by Embedian"
7 DESCRIPTION = "Linux kernel provided and supported by Embedian (based on the kernel imx_4.19.35_1.1.0 provided by NXP) \ 7 DESCRIPTION = "Linux kernel provided and supported by Embedian (based on the kernel imx_4.19.35_1.1.0 provided by NXP) \
8 with focus on i.MX Family SOMs. It includes support for many IPs such as GPU, VPU and IPU." 8 with focus on i.MX Family SOMs. It includes support for many IPs such as GPU, VPU and IPU."
9 9
10 require recipes-kernel/linux/linux-imx.inc 10 require recipes-kernel/linux/linux-imx.inc
11 11
12 LICENSE = "GPLv2" 12 LICENSE = "GPLv2"
13 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" 13 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
14 DEPENDS += "lzop-native bc-native" 14 DEPENDS += "lzop-native bc-native"
15 15
16 DEFAULT_PREFERENCE = "1" 16 DEFAULT_PREFERENCE = "1"
17 17
18 SRCBRANCH = "smarc_8m_imx_4.19.35_1.1.0" 18 SRCBRANCH = "smarc_8m_imx_4.19.35_1.1.0"
19 19
20 LOCALVERSION = "-${SRCBRANCH}" 20 LOCALVERSION = "-${SRCBRANCH}"
21 KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/smarcimx8m_defconfig" 21 KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/smarcimx8m_defconfig"
22 DEFAULT_DTB = "fsl-smarcimx8mq" 22 DEFAULT_DTB = "fsl-smarcimx8mq"
23 23
24 KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git" 24 KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git"
25 SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}" 25 SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}"
26 SRCREV = "5f714b4332c239ffedb4958085c952ba8fe93aca" 26 SRCREV = "da41c6f782cba0fac48938cbd4497806c7fbbedb"
27 27
28 S = "${WORKDIR}/git" 28 S = "${WORKDIR}/git"
29 29
30 addtask copy_defconfig after do_patch before do_preconfigure 30 addtask copy_defconfig after do_patch before do_preconfigure
31 do_copy_defconfig () { 31 do_copy_defconfig () {
32 cp ${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig 32 cp ${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig
33 } 33 }
34 34
35 COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" 35 COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
36 EXTRA_OEMAKE_append_mx8 = " ARCH=arm64" 36 EXTRA_OEMAKE_append_mx8 = " ARCH=arm64"
37 37