Merge tag 'u-boot-imx-20230905' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Fixes for release ----------------- - imx9: fix DRAM calculation - thermal: fixes - fixed for DM, DH and Gateworks boards CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/17639
This commit is contained in:
@@ -244,7 +244,7 @@ int dram_init(void)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* rom_pointer[1] contains the size of TEE occupies */
|
/* rom_pointer[1] contains the size of TEE occupies */
|
||||||
if (!IS_ENABLED(CONFIG_ARMV8_PSCI) && rom_pointer[1])
|
if (!IS_ENABLED(CONFIG_ARMV8_PSCI) && !IS_ENABLED(CONFIG_SPL_BUILD) && rom_pointer[1])
|
||||||
gd->ram_size = sdram_size - rom_pointer[1];
|
gd->ram_size = sdram_size - rom_pointer[1];
|
||||||
else
|
else
|
||||||
gd->ram_size = sdram_size;
|
gd->ram_size = sdram_size;
|
||||||
@@ -273,7 +273,7 @@ int dram_init_banksize(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gd->bd->bi_dram[bank].start = PHYS_SDRAM;
|
gd->bd->bi_dram[bank].start = PHYS_SDRAM;
|
||||||
if (!IS_ENABLED(CONFIG_ARMV8_PSCI) && rom_pointer[1]) {
|
if (!IS_ENABLED(CONFIG_ARMV8_PSCI) && !IS_ENABLED(CONFIG_SPL_BUILD) && rom_pointer[1]) {
|
||||||
phys_addr_t optee_start = (phys_addr_t)rom_pointer[0];
|
phys_addr_t optee_start = (phys_addr_t)rom_pointer[0];
|
||||||
phys_size_t optee_size = (size_t)rom_pointer[1];
|
phys_size_t optee_size = (size_t)rom_pointer[1];
|
||||||
|
|
||||||
@@ -318,7 +318,8 @@ phys_size_t get_effective_memsize(void)
|
|||||||
sdram_b1_size = sdram_size;
|
sdram_b1_size = sdram_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IS_ENABLED(CONFIG_ARMV8_PSCI) && rom_pointer[1]) {
|
if (!IS_ENABLED(CONFIG_ARMV8_PSCI) && !IS_ENABLED(CONFIG_SPL_BUILD) &&
|
||||||
|
rom_pointer[1]) {
|
||||||
/* We will relocate u-boot to Top of dram1. Tee position has two cases:
|
/* We will relocate u-boot to Top of dram1. Tee position has two cases:
|
||||||
* 1. At the top of dram1, Then return the size removed optee size.
|
* 1. At the top of dram1, Then return the size removed optee size.
|
||||||
* 2. In the middle of dram1, return the size of dram1.
|
* 2. In the middle of dram1, return the size of dram1.
|
||||||
|
@@ -361,7 +361,7 @@ int dram_init(void)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* rom_pointer[1] contains the size of TEE occupies */
|
/* rom_pointer[1] contains the size of TEE occupies */
|
||||||
if (rom_pointer[1])
|
if (!IS_ENABLED(CONFIG_SPL_BUILD) && rom_pointer[1])
|
||||||
gd->ram_size = sdram_size - rom_pointer[1];
|
gd->ram_size = sdram_size - rom_pointer[1];
|
||||||
else
|
else
|
||||||
gd->ram_size = sdram_size;
|
gd->ram_size = sdram_size;
|
||||||
@@ -390,7 +390,7 @@ int dram_init_banksize(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gd->bd->bi_dram[bank].start = PHYS_SDRAM;
|
gd->bd->bi_dram[bank].start = PHYS_SDRAM;
|
||||||
if (rom_pointer[1]) {
|
if (!IS_ENABLED(CONFIG_SPL_BUILD) && rom_pointer[1]) {
|
||||||
phys_addr_t optee_start = (phys_addr_t)rom_pointer[0];
|
phys_addr_t optee_start = (phys_addr_t)rom_pointer[0];
|
||||||
phys_size_t optee_size = (size_t)rom_pointer[1];
|
phys_size_t optee_size = (size_t)rom_pointer[1];
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@ phys_size_t get_effective_memsize(void)
|
|||||||
else
|
else
|
||||||
sdram_b1_size = sdram_size;
|
sdram_b1_size = sdram_size;
|
||||||
|
|
||||||
if (rom_pointer[1]) {
|
if (!IS_ENABLED(CONFIG_SPL_BUILD) && rom_pointer[1]) {
|
||||||
/* We will relocate u-boot to top of dram1. TEE position has two cases:
|
/* We will relocate u-boot to top of dram1. TEE position has two cases:
|
||||||
* 1. At the top of dram1, Then return the size removed optee size.
|
* 1. At the top of dram1, Then return the size removed optee size.
|
||||||
* 2. In the middle of dram1, return the size of dram1.
|
* 2. In the middle of dram1, return the size of dram1.
|
||||||
|
@@ -37,7 +37,6 @@ CONFIG_FIT_VERBOSE=y
|
|||||||
CONFIG_SPL_FIT=y
|
CONFIG_SPL_FIT=y
|
||||||
CONFIG_DISTRO_DEFAULTS=y
|
CONFIG_DISTRO_DEFAULTS=y
|
||||||
CONFIG_BOOTDELAY=3
|
CONFIG_BOOTDELAY=3
|
||||||
# CONFIG_USE_BOOTCOMMAND is not set
|
|
||||||
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
|
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
|
||||||
CONFIG_SYS_SPL_MALLOC=y
|
CONFIG_SYS_SPL_MALLOC=y
|
||||||
CONFIG_SPL_SPI_LOAD=y
|
CONFIG_SPL_SPI_LOAD=y
|
||||||
|
@@ -5,7 +5,7 @@ CONFIG_SYS_MALLOC_LEN=0x1000000
|
|||||||
CONFIG_SPL_GPIO=y
|
CONFIG_SPL_GPIO=y
|
||||||
CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||||
CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||||
CONFIG_NR_DRAM_BANKS=1
|
CONFIG_NR_DRAM_BANKS=2
|
||||||
CONFIG_SF_DEFAULT_SPEED=50000000
|
CONFIG_SF_DEFAULT_SPEED=50000000
|
||||||
CONFIG_ENV_SIZE=0x40000
|
CONFIG_ENV_SIZE=0x40000
|
||||||
CONFIG_ENV_OFFSET=0xFFFC0000
|
CONFIG_ENV_OFFSET=0xFFFC0000
|
||||||
@@ -157,7 +157,6 @@ CONFIG_SPL_CLK_COMPOSITE_CCF=y
|
|||||||
CONFIG_CLK_COMPOSITE_CCF=y
|
CONFIG_CLK_COMPOSITE_CCF=y
|
||||||
CONFIG_SPL_CLK_IMX8MM=y
|
CONFIG_SPL_CLK_IMX8MM=y
|
||||||
CONFIG_CLK_IMX8MM=y
|
CONFIG_CLK_IMX8MM=y
|
||||||
CONFIG_SAVED_DRAM_TIMING_BASE=0x40000000
|
|
||||||
CONFIG_DFU_TFTP=y
|
CONFIG_DFU_TFTP=y
|
||||||
CONFIG_DFU_TIMEOUT=y
|
CONFIG_DFU_TIMEOUT=y
|
||||||
CONFIG_DFU_MMC=y
|
CONFIG_DFU_MMC=y
|
||||||
|
@@ -104,6 +104,7 @@ CONFIG_SPL_SYSRESET=y
|
|||||||
CONFIG_SYSRESET_PSCI=y
|
CONFIG_SYSRESET_PSCI=y
|
||||||
CONFIG_SYSRESET_WATCHDOG=y
|
CONFIG_SYSRESET_WATCHDOG=y
|
||||||
CONFIG_DM_THERMAL=y
|
CONFIG_DM_THERMAL=y
|
||||||
|
CONFIG_IMX_TMU=y
|
||||||
CONFIG_USB=y
|
CONFIG_USB=y
|
||||||
CONFIG_SPL_USB_HOST=y
|
CONFIG_SPL_USB_HOST=y
|
||||||
CONFIG_USB_EHCI_HCD=y
|
CONFIG_USB_EHCI_HCD=y
|
||||||
|
@@ -75,7 +75,7 @@ CONFIG_CMD_EXT4_WRITE=y
|
|||||||
# CONFIG_SPL_EFI_PARTITION is not set
|
# CONFIG_SPL_EFI_PARTITION is not set
|
||||||
CONFIG_OF_CONTROL=y
|
CONFIG_OF_CONTROL=y
|
||||||
CONFIG_SPL_OF_CONTROL=y
|
CONFIG_SPL_OF_CONTROL=y
|
||||||
CONFIG_OF_LIST="imx8mm-venice imx8mm-venice-gw71xx-0x imx8mm-venice-gw72xx-0x imx8mm-venice-gw73xx-0x imx8mm-venice-gw7901 imx8mm-venice-gw7902 imx8mm-venice-gw7903"
|
CONFIG_OF_LIST="imx8mm-venice imx8mm-venice-gw71xx-0x imx8mm-venice-gw72xx-0x imx8mm-venice-gw73xx-0x imx8mm-venice-gw7901 imx8mm-venice-gw7902 imx8mm-venice-gw7903 imx8mm-venice-gw7904"
|
||||||
CONFIG_ENV_IS_IN_MMC=y
|
CONFIG_ENV_IS_IN_MMC=y
|
||||||
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||||
CONFIG_SYS_MMC_ENV_DEV=2
|
CONFIG_SYS_MMC_ENV_DEV=2
|
||||||
|
@@ -164,7 +164,6 @@ CONFIG_SPL_CLK_COMPOSITE_CCF=y
|
|||||||
CONFIG_CLK_COMPOSITE_CCF=y
|
CONFIG_CLK_COMPOSITE_CCF=y
|
||||||
CONFIG_SPL_CLK_IMX8MP=y
|
CONFIG_SPL_CLK_IMX8MP=y
|
||||||
CONFIG_CLK_IMX8MP=y
|
CONFIG_CLK_IMX8MP=y
|
||||||
CONFIG_SAVED_DRAM_TIMING_BASE=0x40000000
|
|
||||||
CONFIG_DFU_TFTP=y
|
CONFIG_DFU_TFTP=y
|
||||||
CONFIG_DFU_TIMEOUT=y
|
CONFIG_DFU_TIMEOUT=y
|
||||||
CONFIG_DFU_MMC=y
|
CONFIG_DFU_MMC=y
|
||||||
|
@@ -160,7 +160,6 @@ CONFIG_SPL_CLK_COMPOSITE_CCF=y
|
|||||||
CONFIG_CLK_COMPOSITE_CCF=y
|
CONFIG_CLK_COMPOSITE_CCF=y
|
||||||
CONFIG_SPL_CLK_IMX8MP=y
|
CONFIG_SPL_CLK_IMX8MP=y
|
||||||
CONFIG_CLK_IMX8MP=y
|
CONFIG_CLK_IMX8MP=y
|
||||||
CONFIG_SAVED_DRAM_TIMING_BASE=0x40000000
|
|
||||||
CONFIG_DFU_TFTP=y
|
CONFIG_DFU_TFTP=y
|
||||||
CONFIG_DFU_TIMEOUT=y
|
CONFIG_DFU_TIMEOUT=y
|
||||||
CONFIG_DFU_MMC=y
|
CONFIG_DFU_MMC=y
|
||||||
|
@@ -161,7 +161,6 @@ CONFIG_SPL_CLK_COMPOSITE_CCF=y
|
|||||||
CONFIG_CLK_COMPOSITE_CCF=y
|
CONFIG_CLK_COMPOSITE_CCF=y
|
||||||
CONFIG_SPL_CLK_IMX8MP=y
|
CONFIG_SPL_CLK_IMX8MP=y
|
||||||
CONFIG_CLK_IMX8MP=y
|
CONFIG_CLK_IMX8MP=y
|
||||||
CONFIG_SAVED_DRAM_TIMING_BASE=0x40000000
|
|
||||||
CONFIG_DFU_TFTP=y
|
CONFIG_DFU_TFTP=y
|
||||||
CONFIG_DFU_TIMEOUT=y
|
CONFIG_DFU_TIMEOUT=y
|
||||||
CONFIG_DFU_MMC=y
|
CONFIG_DFU_MMC=y
|
||||||
|
@@ -37,6 +37,7 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||||||
#define TER_ADC_PD 0x40000000
|
#define TER_ADC_PD 0x40000000
|
||||||
#define TER_ALPF 0x3
|
#define TER_ALPF 0x3
|
||||||
|
|
||||||
|
#define IMX_TMU_POLLING_DELAY_MS 5000
|
||||||
/*
|
/*
|
||||||
* i.MX TMU Registers
|
* i.MX TMU Registers
|
||||||
*/
|
*/
|
||||||
@@ -237,8 +238,8 @@ int imx_tmu_get_temp(struct udevice *dev, int *temp)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
while (cpu_tmp >= pdata->alert) {
|
while (cpu_tmp >= pdata->alert) {
|
||||||
dev_info(dev, "CPU Temperature (%dC) has beyond alert (%dC), close to critical (%dC) waiting...\n",
|
dev_crit(dev, "CPU Temperature (%dC) is beyond alert (%dC), close to critical (%dC) waiting...\n",
|
||||||
cpu_tmp, pdata->alert, pdata->critical);
|
cpu_tmp / 1000, pdata->alert / 1000, pdata->critical / 1000);
|
||||||
mdelay(pdata->polling_delay);
|
mdelay(pdata->polling_delay);
|
||||||
ret = read_temperature(dev, &cpu_tmp);
|
ret = read_temperature(dev, &cpu_tmp);
|
||||||
if (ret)
|
if (ret)
|
||||||
@@ -574,6 +575,8 @@ static int imx_tmu_parse_fdt(struct udevice *dev)
|
|||||||
|
|
||||||
dev_dbg(dev, "%s\n", __func__);
|
dev_dbg(dev, "%s\n", __func__);
|
||||||
|
|
||||||
|
pdata->polling_delay = IMX_TMU_POLLING_DELAY_MS;
|
||||||
|
|
||||||
if (pdata->zone_node) {
|
if (pdata->zone_node) {
|
||||||
pdata->regs = (union tmu_regs *)dev_read_addr_ptr(dev);
|
pdata->regs = (union tmu_regs *)dev_read_addr_ptr(dev);
|
||||||
|
|
||||||
@@ -602,7 +605,8 @@ static int imx_tmu_parse_fdt(struct udevice *dev)
|
|||||||
|
|
||||||
dev_dbg(dev, "args.args_count %d, id %d\n", args.args_count, pdata->id);
|
dev_dbg(dev, "args.args_count %d, id %d\n", args.args_count, pdata->id);
|
||||||
|
|
||||||
pdata->polling_delay = dev_read_u32_default(dev, "polling-delay", 1000);
|
pdata->polling_delay = dev_read_u32_default(dev, "polling-delay",
|
||||||
|
IMX_TMU_POLLING_DELAY_MS);
|
||||||
|
|
||||||
trips_np = ofnode_path("/thermal-zones/cpu-thermal/trips");
|
trips_np = ofnode_path("/thermal-zones/cpu-thermal/trips");
|
||||||
ofnode_for_each_subnode(trips_np, trips_np) {
|
ofnode_for_each_subnode(trips_np, trips_np) {
|
||||||
|
Reference in New Issue
Block a user