diff options
| author | Tom Rini <[email protected]> | 2022-06-28 11:10:23 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-06-28 11:10:23 -0400 |
| commit | b75fd37037bcca8a5e86f1648e8fb4e97cba345a (patch) | |
| tree | c6cf81c6dd0371ad54fa32deb2685a4f2356ae30 /arch | |
| parent | bfa9306e140c136e43d0efc9574991db46ad8c9e (diff) | |
| parent | b5023254b88a67fcbca913e212e3401dea521fc9 (diff) | |
Merge tag 'u-boot-imx-20220628' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Fixes for 2022.07
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/12541
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi | 17 | ||||
| -rw-r--r-- | arch/arm/mach-imx/imx8m/Kconfig | 3 | ||||
| -rw-r--r-- | arch/arm/mach-imx/imx8m/soc.c | 49 | ||||
| -rw-r--r-- | arch/arm/mach-imx/mx6/ddr.c | 13 |
4 files changed, 80 insertions, 2 deletions
diff --git a/arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi b/arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi index 4eadcc9899e..8cd3b23793c 100644 --- a/arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi @@ -25,6 +25,23 @@ }; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + + &i2c1 { u-boot,dm-spl; u-boot,dm-pre-reloc; diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig index ef8518c06bd..09b9d5603d0 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig @@ -107,6 +107,9 @@ config TARGET_KONTRON_MX8MM select IMX8MM select SUPPORT_SPL select IMX8M_LPDDR4 + select FSL_CAAM + select ARCH_MISC_INIT + select SPL_CRYPTO if SPL config TARGET_IMX8MN_BSH_SMM_S2 bool "imx8mn-bsh-smm-s2" diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 59335356b57..e4e56079cf3 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -1203,6 +1203,48 @@ static int cleanup_nodes_for_efi(void *blob) return 0; } +static int fixup_thermal_trips(void *blob, const char *name) +{ + int minc, maxc; + int node, trip; + + node = fdt_path_offset(blob, "/thermal-zones"); + if (node < 0) + return node; + + node = fdt_subnode_offset(blob, node, name); + if (node < 0) + return node; + + node = fdt_subnode_offset(blob, node, "trips"); + if (node < 0) + return node; + + get_cpu_temp_grade(&minc, &maxc); + + fdt_for_each_subnode(trip, blob, node) { + const char *type; + int temp, ret; + + type = fdt_getprop(blob, trip, "type", NULL); + if (!type) + continue; + + temp = 0; + if (!strcmp(type, "critical")) + temp = 1000 * maxc; + else if (!strcmp(type, "passive")) + temp = 1000 * (maxc - 10); + if (temp) { + ret = fdt_setprop_u32(blob, trip, "temperature", temp); + if (ret) + return ret; + } + } + + return 0; +} + int ft_system_setup(void *blob, struct bd_info *bd) { #ifdef CONFIG_IMX8MQ @@ -1345,6 +1387,13 @@ usb_modify_speed: #endif cleanup_nodes_for_efi(blob); + + if (fixup_thermal_trips(blob, "cpu-thermal")) + printf("Failed to update cpu-thermal trip(s)"); + if (IS_ENABLED(CONFIG_IMX8MP) && + fixup_thermal_trips(blob, "soc-thermal")) + printf("Failed to update soc-thermal trip(s)"); + return 0; } #endif diff --git a/arch/arm/mach-imx/mx6/ddr.c b/arch/arm/mach-imx/mx6/ddr.c index 73a637c42d6..3c87c577737 100644 --- a/arch/arm/mach-imx/mx6/ddr.c +++ b/arch/arm/mach-imx/mx6/ddr.c @@ -1469,8 +1469,17 @@ void mx6_ddr3_cfg(const struct mx6_ddr_sysinfo *sysinfo, MMDC1(mprddqby3dl, 0x33333333); } - /* MMDC Termination: rtt_nom:2 RZQ/2(120ohm), rtt_nom:1 RZQ/4(60ohm) */ - val = (sysinfo->rtt_nom == 2) ? 0x00011117 : 0x00022227; + /* + * MMDC Termination: rtt_nom:2 RZQ/2(120ohm), + * rtt_nom:1 RZQ/4(60ohm), + * rtt_nom:0 Disabled + */ + if (sysinfo->rtt_nom == 0) + val = 0x00000000; + else if (sysinfo->rtt_nom == 2) + val = 0x00011117; + else + val = 0x00022227; mmdc0->mpodtctrl = val; if (sysinfo->dsize > 1) MMDC1(mpodtctrl, val); |
