imx: Use livetree API and cleanup
Subsystems (5)
v2 cover imx: Use livetree API and cleanup
This is a misc patchset mainly for supporting livetree API for i.MX9 and cleanup get_imx_type. While working on this patchset, there are a few minor other updates
Patch 1: IMX_TMU depends on DM_THERMAL, so imply DM_THERMAL to make sure
IMX_TMU is selected.
Patch 2: Update imx952 gpio reg.
Patch 3-6: Cleanup get_imx_type
Patch 7: Update ddr firmware name
Patch 8-13: Enable OF_LIVE for i.MX9 and i.MX8M_EVK. With OF_LIVE, boot time could be saved.
CI build pass
More information could be found in patch commit log.
---
Changes in v2:
- Rebased to address conflicts
- Invoke get_reset_reason in arch_misc_init(), since imx8_cpu.c not supports printing reset reason.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Peng Fan (13):
imx8m: Imply DM_THERMAL
imx952: Update gpio node regs
imx9: scmi: Drop get_imx_type
imx8ulp: cleanup get_imx_type
imx7ulp: cleanup get_imx_type
imx: Guard print_cpuinfo with !CONFIG_IS_ENABLED(CPU)
imx8m: dts: Update ddr firmware name
serial: lpuart: Use livetree API for fdt access
gpio: imx_rgpio2p: Use dev_read_addr_index
misc: ele: Use dev_read_addr
imx9: soc: Use livetree API for fdt access
imx8m_evk: Select OF_LIVE
imx9: Select OF_LIVE
arch/arm/dts/imx8mm-u-boot.dtsi | 8 ++-- arch/arm/dts/imx8mn-u-boot.dtsi | 8 ++-- arch/arm/dts/imx8mq-u-boot.dtsi | 8 ++-- arch/arm/dts/imx952-u-boot.dtsi | 8 ---- arch/arm/mach-imx/cpu.c | 60 +-------------------------- arch/arm/mach-imx/imx8m/Kconfig | 1 + arch/arm/mach-imx/imx8m/soc.c | 30 ++++++++++++++ arch/arm/mach-imx/imx8ulp/soc.c | 8 +--- arch/arm/mach-imx/imx9/Kconfig | 1 + arch/arm/mach-imx/imx9/scmi/common.h | 4 -- arch/arm/mach-imx/imx9/scmi/soc.c | 10 ----- arch/arm/mach-imx/imx9/soc.c | 10 +++-- arch/arm/mach-imx/mx7ulp/soc.c | 8 +--- configs/imx8mm-cl-iot-gate-optee_defconfig | 1 - configs/imx8mm-cl-iot-gate_defconfig | 1 - configs/imx8mm-icore-mx8mm-ctouch2_defconfig | 1 - configs/imx8mm-icore-mx8mm-edimm2.2_defconfig | 1 - configs/imx8mm-mx8menlo_defconfig | 1 - configs/imx8mm-phygate-tauri-l_defconfig | 1 - configs/imx8mm_beacon_defconfig | 1 - configs/imx8mm_beacon_fspi_defconfig | 1 - configs/imx8mm_evk_defconfig | 2 +- configs/imx8mm_evk_fspi_defconfig | 2 +- configs/imx8mm_phg_defconfig | 1 - configs/imx8mm_venice_defconfig | 1 - configs/imx8mn_beacon_2g_defconfig | 1 - configs/imx8mn_beacon_defconfig | 1 - configs/imx8mn_beacon_fspi_defconfig | 1 - configs/imx8mn_ddr4_evk_defconfig | 2 +- configs/imx8mn_evk_defconfig | 2 +- configs/imx8mn_venice_defconfig | 1 - configs/imx8mp-libra-fpsc_defconfig | 1 - configs/imx8mp_beacon_defconfig | 1 - configs/imx8mp_evk_defconfig | 1 + configs/imx8mp_rsb3720a1_4G_defconfig | 1 - configs/imx8mp_rsb3720a1_6G_defconfig | 1 - configs/imx8mp_venice_defconfig | 1 - configs/imx8mq_cm_defconfig | 1 - configs/imx8mq_evk_defconfig | 2 +- configs/imx8mq_phanbell_defconfig | 1 - configs/imx8mq_reform2_defconfig | 1 - configs/kontron-sl-mx8mm_defconfig | 1 - configs/kontron_pitx_imx8m_defconfig | 1 - configs/librem5_defconfig | 1 - configs/phycore-imx8mm_defconfig | 1 - configs/phycore-imx8mp_defconfig | 1 - configs/pico-imx8mq_defconfig | 1 - configs/toradex-smarc-imx8mp_defconfig | 1 - configs/verdin-imx8mm_defconfig | 1 - configs/verdin-imx8mp_defconfig | 1 - drivers/gpio/imx_rgpio2p.c | 4 +- drivers/misc/imx_ele/ele_mu.c | 2 +- drivers/serial/serial_lpuart.c | 15 ++++--- 53 files changed, 70 insertions(+), 157 deletions(-)
---
base-commit: dee0168d5771df98740d91f44dc5d56a4ac171a9
change-id: 20260521-imx-misc-1d83a9cfe0ce
Best regards,
Signature · 1 line
Peng Fan <[email protected]>
PATCH v2 1/13 imx8m: Imply DM_THERMAL
From: Peng Fan <[email protected]>
CONFIG_IMX_TMU depends on CONFIG_DM_THERMAL, so when selecting IMX_TMU, DM_THERMAL should also be selected.
Update i.MX8M based defconfigs.
--- arch/arm/mach-imx/imx8m/Kconfig | 1 + configs/imx8mm-cl-iot-gate-optee_defconfig | 1 - configs/imx8mm-cl-iot-gate_defconfig | 1 - configs/imx8mm-icore-mx8mm-ctouch2_defconfig | 1 - configs/imx8mm-icore-mx8mm-edimm2.2_defconfig | 1 - configs/imx8mm-mx8menlo_defconfig | 1 - configs/imx8mm-phygate-tauri-l_defconfig | 1 - configs/imx8mm_beacon_defconfig | 1 - configs/imx8mm_beacon_fspi_defconfig | 1 - configs/imx8mm_evk_defconfig | 1 - configs/imx8mm_evk_fspi_defconfig | 1 - configs/imx8mm_phg_defconfig | 1 - configs/imx8mm_venice_defconfig | 1 - configs/imx8mn_beacon_2g_defconfig | 1 - configs/imx8mn_beacon_defconfig | 1 - configs/imx8mn_beacon_fspi_defconfig | 1 - configs/imx8mn_ddr4_evk_defconfig | 1 - configs/imx8mn_evk_defconfig | 1 - configs/imx8mn_venice_defconfig | 1 - configs/imx8mp-libra-fpsc_defconfig | 1 - configs/imx8mp_beacon_defconfig | 1 - configs/imx8mp_rsb3720a1_4G_defconfig | 1 - configs/imx8mp_rsb3720a1_6G_defconfig | 1 - configs/imx8mp_venice_defconfig | 1 - configs/imx8mq_cm_defconfig | 1 - configs/imx8mq_evk_defconfig | 1 - configs/imx8mq_phanbell_defconfig | 1 - configs/imx8mq_reform2_defconfig | 1 - configs/kontron-sl-mx8mm_defconfig | 1 - configs/kontron_pitx_imx8m_defconfig | 1 - configs/librem5_defconfig | 1 - configs/phycore-imx8mm_defconfig | 1 - configs/phycore-imx8mp_defconfig | 1 - configs/pico-imx8mq_defconfig | 1 - configs/toradex-smarc-imx8mp_defconfig | 1 - configs/verdin-imx8mm_defconfig | 1 - configs/verdin-imx8mp_defconfig | 1 - 37 files changed, 1 insertion(+), 36 deletions(-)
arch/arm/mach-imx/imx8m/Kconfig +1 -0
@@ -10,6 +10,7 @@ config IMX8M select ARMV8_CRYPTO imply CPU imply CPU_IMX + imply DM_THERMAL imply IMX_TMU config IMX8MQ
configs/imx8mm-cl-iot-gate-optee_defconfig +0 -1
@@ -136,7 +136,6 @@ CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_TEE=y CONFIG_OPTEE=y -CONFIG_DM_THERMAL=y CONFIG_TPM2_TIS_SPI=y CONFIG_TPM2_FTPM_TEE=y CONFIG_USB=y
configs/imx8mm-cl-iot-gate_defconfig +0 -1
@@ -139,7 +139,6 @@ CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_TEE=y CONFIG_OPTEE=y -CONFIG_DM_THERMAL=y CONFIG_TPM2_TIS_SPI=y CONFIG_TPM2_FTPM_TEE=y CONFIG_USB=y
configs/imx8mm-icore-mx8mm-ctouch2_defconfig +0 -1
@@ -88,4 +88,3 @@ CONFIG_MXC_UART=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y -CONFIG_DM_THERMAL=y
configs/imx8mm-icore-mx8mm-edimm2.2_defconfig +0 -1
@@ -88,4 +88,3 @@ CONFIG_MXC_UART=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y -CONFIG_DM_THERMAL=y
configs/imx8mm-mx8menlo_defconfig +0 -1
@@ -149,7 +149,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_SPL_USB_HOST=y CONFIG_USB_EHCI_HCD=y
configs/imx8mm-phygate-tauri-l_defconfig +0 -1
@@ -105,5 +105,4 @@ CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_TEE=y CONFIG_OPTEE=y -CONFIG_DM_THERMAL=y CONFIG_IMX_WATCHDOG=y
configs/imx8mm_beacon_defconfig +0 -1
@@ -135,7 +135,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_SPL_USB_HOST=y CONFIG_USB_EHCI_HCD=y
configs/imx8mm_beacon_fspi_defconfig +0 -1
@@ -133,7 +133,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_SPL_USB_HOST=y CONFIG_USB_EHCI_HCD=y
configs/imx8mm_evk_defconfig +0 -1
@@ -120,7 +120,6 @@ CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_TEE=y CONFIG_OPTEE=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_SPL_USB_HOST=y CONFIG_USB_EHCI_HCD=y
configs/imx8mm_evk_fspi_defconfig +0 -1
@@ -107,7 +107,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_IMX_WATCHDOG=y CONFIG_FSPI_CONF_HEADER=y CONFIG_FSPI_CONF_FILE="fspi_header.bin"
configs/imx8mm_phg_defconfig +0 -1
@@ -103,7 +103,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_SPL_USB_HOST=y CONFIG_USB_EHCI_HCD=y
configs/imx8mm_venice_defconfig +0 -1
@@ -157,7 +157,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y # CONFIG_TPM_V1 is not set CONFIG_TPM2_TIS_SPI=y CONFIG_USB=y
configs/imx8mn_beacon_2g_defconfig +0 -1
@@ -131,7 +131,6 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_SYSRESET=y CONFIG_SYSRESET_PSCI=y -CONFIG_DM_THERMAL=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set CONFIG_USB_EHCI_HCD=y
configs/imx8mn_beacon_defconfig +0 -1
@@ -138,7 +138,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set CONFIG_USB_EHCI_HCD=y
configs/imx8mn_beacon_fspi_defconfig +0 -1
@@ -137,7 +137,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set CONFIG_USB_EHCI_HCD=y
configs/imx8mn_ddr4_evk_defconfig +0 -1
@@ -97,7 +97,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set CONFIG_USB_EHCI_HCD=y
configs/imx8mn_evk_defconfig +0 -1
@@ -126,6 +126,5 @@ CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_TEE=y CONFIG_OPTEE=y -CONFIG_DM_THERMAL=y CONFIG_IMX_WATCHDOG=y CONFIG_SHA384=y
configs/imx8mn_venice_defconfig +0 -1
@@ -152,7 +152,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y # CONFIG_TPM_V1 is not set CONFIG_TPM2_TIS_SPI=y CONFIG_USB=y
configs/imx8mp-libra-fpsc_defconfig +0 -1
@@ -156,7 +156,6 @@ CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_TEE=y CONFIG_OPTEE=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y
configs/imx8mp_beacon_defconfig +0 -1
@@ -152,7 +152,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_TPM2_TIS_SPI=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set
configs/imx8mp_rsb3720a1_4G_defconfig +0 -1
@@ -159,7 +159,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_IMX_WATCHDOG=y
configs/imx8mp_rsb3720a1_6G_defconfig +0 -1
@@ -160,7 +160,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_IMX_WATCHDOG=y
configs/imx8mp_venice_defconfig +0 -1
@@ -157,7 +157,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y # CONFIG_TPM_V1 is not set CONFIG_TPM2_TIS_SPI=y CONFIG_USB=y
configs/imx8mq_cm_defconfig +0 -1
@@ -94,6 +94,5 @@ CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_FSL_QSPI=y -CONFIG_DM_THERMAL=y CONFIG_IMX_WATCHDOG=y CONFIG_WDT=y
configs/imx8mq_evk_defconfig +0 -1
@@ -107,7 +107,6 @@ CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y CONFIG_TEE=y CONFIG_OPTEE=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y
configs/imx8mq_phanbell_defconfig +0 -1
@@ -93,4 +93,3 @@ CONFIG_DM_REGULATOR_GPIO=y CONFIG_SPL_DM_REGULATOR_GPIO=y CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y -CONFIG_DM_THERMAL=y
configs/imx8mq_reform2_defconfig +0 -1
@@ -93,7 +93,6 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y
configs/kontron-sl-mx8mm_defconfig +0 -1
@@ -192,7 +192,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_SPL_USB_HOST=y CONFIG_USB_EHCI_HCD=y
configs/kontron_pitx_imx8m_defconfig +0 -1
@@ -106,7 +106,6 @@ CONFIG_DM_RTC=y CONFIG_RTC_RV8803=y CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y
configs/librem5_defconfig +0 -1
@@ -130,7 +130,6 @@ CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_MXC_SPI=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y
configs/phycore-imx8mm_defconfig +0 -1
@@ -131,5 +131,4 @@ CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_TEE=y CONFIG_OPTEE=y -CONFIG_DM_THERMAL=y CONFIG_IMX_WATCHDOG=y
configs/phycore-imx8mp_defconfig +0 -1
@@ -162,7 +162,6 @@ CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_TEE=y CONFIG_OPTEE=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y
configs/pico-imx8mq_defconfig +0 -1
@@ -91,4 +91,3 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y -CONFIG_DM_THERMAL=y
configs/toradex-smarc-imx8mp_defconfig +0 -1
@@ -160,7 +160,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set CONFIG_DM_USB_GADGET=y
configs/verdin-imx8mm_defconfig +0 -1
@@ -145,7 +145,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_SPL_USB_HOST=y CONFIG_USB_EHCI_HCD=y
configs/verdin-imx8mp_defconfig +0 -1
@@ -162,7 +162,6 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y -CONFIG_DM_THERMAL=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set CONFIG_DM_USB_GADGET=y
Signature · 1 line
2.51.0
Re: [PATCH v2 01/13] imx8m: Imply DM_THERMAL
Quoted 8 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
CONFIG_IMX_TMUdepends onCONFIG_DM_THERMAL, so when selectingIMX_TMU,DM_THERMALshould also be selected.Update i.MX8M based defconfigs.
Signed-off-by Peng Fan <[email protected]>
PATCH v2 2/13 imx952: Update gpio node regs
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Same to 85319b2e672 ("board: toradex: smarc-imx95: remove gpio1 reg"), there is no need to use dual base for i.MX952 gpio, so drop the U-Boot specific reg changes.
--- arch/arm/dts/imx952-u-boot.dtsi | 8 -------- 1 file changed, 8 deletions(-)
arch/arm/dts/imx952-u-boot.dtsi +0 -8
@@ -181,12 +181,7 @@ bootph-all; }; -&gpio1 { - reg = <0 0x47400000 0 0x1000>, <0 0x47400040 0 0x40>; -}; - &gpio2 { - reg = <0 0x43810000 0 0x1000>, <0 0x43810040 0 0x40>; bootph-pre-ram; /* * Use one SPL/U-Boot for mx952evk and mx952evkrpmsg, since GPIO2
@@ -196,17 +191,14 @@ }; &gpio3 { - reg = <0 0x43820000 0 0x1000>, <0 0x43820040 0 0x40>; bootph-pre-ram; }; &gpio4 { - reg = <0 0x43840000 0 0x1000>, <0 0x43840040 0 0x40>; bootph-pre-ram; }; &gpio5 { - reg = <0 0x43850000 0 0x1000>, <0 0x43850040 0 0x40>; bootph-pre-ram; };
Signature · 1 line
2.51.0
PATCH v2 3/13 imx9: scmi: Drop get_imx_type
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
There is no user of get_imx_type() for i.MX9 SCMI platform, and cpu information is handled by cpu driver, so drop get_imx_type().
--- arch/arm/mach-imx/imx9/scmi/common.h | 4 ---- arch/arm/mach-imx/imx9/scmi/soc.c | 10 ---------- 2 files changed, 14 deletions(-)
arch/arm/mach-imx/imx9/scmi/common.h +0 -4
@@ -32,10 +32,6 @@#define IMX952_CLK_24M IMX952_CLK_OSC24M#endif -#define IMX_PLAT_STR__ (plat) # plat -#define IMX_PLAT_STR_ (IMX_PLAT ) IMX_PLAT_STR__(IMX_PLAT) -#define IMX_PLAT_STR IMX_PLAT_STR_(IMX_PLAT) -#define SCMI_CLK__ (plat, clk) IMX ## plat ## _CLK_ ## clk#define SCMI_CLK_ (plat, clk) SCMI_CLK__(plat, clk)#define SCMI_CLK (clk) SCMI_CLK_(IMX_PLAT, clk)
arch/arm/mach-imx/imx9/scmi/soc.c +0 -10
@@ -715,16 +715,6 @@ int get_reset_reason(bool sys, bool lm)return 0 ; } -const char *get_imx_type (u32 imxtype) -{ -switch (imxtype) { -case SCMI_CPU : -return IMX_PLAT_STR ; -default : -return "??" ; - } -} -void build_info (void ) {u32 fw_version, sha1, res =0 , status;
Signature · 1 line
2.51.0
PATCH v2 4/13 imx8ulp: cleanup get_imx_type
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
There is only one SoC and no external user of get_imx_type for i.MX8ULP, so directly embed the string in print_cpuinfo and drop get_imx_type().
--- arch/arm/mach-imx/imx8ulp/soc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
arch/arm/mach-imx/imx8ulp/soc.c +1 -7
@@ -254,11 +254,6 @@ static char *get_reset_cause(char *ret) }#if defined(CONFIG_DISPLAY_CPUINFO ) -const char *get_imx_type (u32 imxtype) -{ -return "8ULP" ; -} -int print_cpuinfo (void ) {u32 cpurev;
@@ -266,8 +261,7 @@ int print_cpuinfo(void) cpurev =get_cpu_rev (); -printf ("CPU: i.MX%s rev%d.%d at %d MHz\n" , -get_imx_type ((cpurev &0xFF000 ) >>12 ), +printf ("CPU: i.MX8ULP rev%d.%d at %d MHz\n" , (cpurev &0x000F0 ) >>4 , (cpurev &0x0000F ) >>0 ,mxc_get_clock (MXC_ARM_CLK ) /1000000 );
Signature · 1 line
2.51.0
PATCH v2 5/13 imx7ulp: cleanup get_imx_type
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
There is only one SoC and no external user of get_imx_type for i.MX7ULP, so directly embed the string in print_cpuinfo and drop get_imx_type().
--- arch/arm/mach-imx/mx7ulp/soc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
arch/arm/mach-imx/mx7ulp/soc.c +1 -7
@@ -259,11 +259,6 @@ void reset_cpu(void)#endif #if defined(CONFIG_DISPLAY_CPUINFO ) -const char *get_imx_type (u32 imxtype) -{ -return "7ULP" ; -} -int print_cpuinfo (void ) {u32 cpurev;
@@ -271,8 +266,7 @@ int print_cpuinfo(void) cpurev =get_cpu_rev (); -printf ("CPU: Freescale i.MX%s rev%d.%d at %d MHz\n" , -get_imx_type ((cpurev &0xFF000 ) >>12 ), +printf ("CPU: Freescale i.MX7ULP rev%d.%d at %d MHz\n" , (cpurev &0x000F0 ) >>4 , (cpurev &0x0000F ) >>0 ,mxc_get_clock (MXC_ARM_CLK ) /1000000 );
Signature · 1 line
2.51.0
PATCH v2 6/13 imx: Guard print_cpuinfo with !CONFIG_IS_ENABLED(CPU)
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
When CONFIG_CPU is enabled, print_cpuinfo is defined in common/board_f.c with static property. However in imx cpu.c, print_cpuinfo is not a local function, so guard it with !CONFIG_IS_ENABLED(CPU).
And all i.MX8M boards has CONFIG_CPU and CONFIG_CPU_IMX set, so remove the dead code.
However legacy print_cpuinfo also print reset reason, to keep reset reason printed as before, export get_reset_reason() and invoke it at arch_misc_init().
--- arch/arm/mach-imx/cpu.c | 60 +------------------------------------------ arch/arm/mach-imx/imx8m/soc.c | 30 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 59 deletions(-)
arch/arm/mach-imx/cpu.c +1 -59
@@ -47,7 +47,7 @@ u32 get_imx_reset_cause(void)return reset_cause; } -#if defined(CONFIG_DISPLAY_CPUINFO ) && !defined(CONFIG_XPL_BUILD ) +#if defined(CONFIG_DISPLAY_CPUINFO ) && !defined(CONFIG_XPL_BUILD ) && !CONFIG_IS_ENABLED (CPU )static char *get_reset_cause (void ) {switch (get_imx_reset_cause ()) {
@@ -75,11 +75,6 @@ static char *get_reset_cause(void)return "WDOG4" ;case 0x00200 :return "TEMPSENSE" ; -#elif defined(CONFIG_IMX8M ) -case 0x00100 : -return "WDOG2" ; -case 0x00200 : -return "TEMPSENSE" ;#else case 0x00100 :return "TEMPSENSE" ;
@@ -90,63 +85,10 @@ static char *get_reset_cause(void)return "unknown reset" ; } } -#endif - -#if defined(CONFIG_DISPLAY_CPUINFO ) && !defined(CONFIG_XPL_BUILD )const char *get_imx_type (u32 imxtype) {switch (imxtype) { -case MXC_CPU_IMX8MP : -return "8MP[8]" ;/* Quad-core version of the imx8mp */ -case MXC_CPU_IMX8MPD2 : -return "8MP Dual[2]" ;/* Dual-core version of the imx8mp, low cost industrial & HMI */ -case MXC_CPU_IMX8MPD : -return "8MP Dual[3]" ;/* Dual-core version of the imx8mp */ -case MXC_CPU_IMX8MPL : -return "8MP Lite[4]" ;/* Quad-core Lite version of the imx8mp */ -case MXC_CPU_IMX8MP5 : -return "8MP[5]" ;/* Quad-core version of the imx8mp, low cost industrial & HMI */ -case MXC_CPU_IMX8MP6 : -return "8MP[6]" ;/* Quad-core version of the imx8mp, NPU fused */ -case MXC_CPU_IMX8MPUL : -return "8MP UltraLite" ;/* Quad-core UltraLite version of the imx8mp */ -case MXC_CPU_IMX8MN : -return "8MNano Quad" ;/* Quad-core version */ -case MXC_CPU_IMX8MND : -return "8MNano Dual" ;/* Dual-core version */ -case MXC_CPU_IMX8MNS : -return "8MNano Solo" ;/* Single-core version */ -case MXC_CPU_IMX8MNL : -return "8MNano QuadLite" ;/* Quad-core Lite version */ -case MXC_CPU_IMX8MNDL : -return "8MNano DualLite" ;/* Dual-core Lite version */ -case MXC_CPU_IMX8MNSL : -return "8MNano SoloLite" ;/* Single-core Lite version of the imx8mn */ -case MXC_CPU_IMX8MNUQ : -return "8MNano UltraLite Quad" ;/* Quad-core UltraLite version of the imx8mn */ -case MXC_CPU_IMX8MNUD : -return "8MNano UltraLite Dual" ;/* Dual-core UltraLite version of the imx8mn */ -case MXC_CPU_IMX8MNUS : -return "8MNano UltraLite Solo" ;/* Single-core UltraLite version of the imx8mn */ -case MXC_CPU_IMX8MM : -return "8MMQ" ;/* Quad-core version of the imx8mm */ -case MXC_CPU_IMX8MML : -return "8MMQL" ;/* Quad-core Lite version of the imx8mm */ -case MXC_CPU_IMX8MMD : -return "8MMD" ;/* Dual-core version of the imx8mm */ -case MXC_CPU_IMX8MMDL : -return "8MMDL" ;/* Dual-core Lite version of the imx8mm */ -case MXC_CPU_IMX8MMS : -return "8MMS" ;/* Single-core version of the imx8mm */ -case MXC_CPU_IMX8MMSL : -return "8MMSL" ;/* Single-core Lite version of the imx8mm */ -case MXC_CPU_IMX8MQ : -return "8MQ" ;/* Quad-core version of the imx8mq */ -case MXC_CPU_IMX8MQL : -return "8MQLite" ;/* Quad-core Lite version of the imx8mq */ -case MXC_CPU_IMX8MD : -return "8MD" ;/* Dual-core version of the imx8mq */ case MXC_CPU_MX7S :return "7S" ;/* Single-core version of the mx7 */ case MXC_CPU_MX7D :
arch/arm/mach-imx/imx8m/soc.c +30 -0
@@ -1480,6 +1480,33 @@ void reset_cpu(void)#endif #if IS_ENABLED (CONFIG_ARCH_MISC_INIT ) +static char *get_reset_cause (void ) +{ +switch (get_imx_reset_cause ()) { +case 0x00001 : +case 0x00011 : +return "POR" ; +case 0x00004 : +return "CSU" ; +case 0x00008 : +return "IPP USER" ; +case 0x00010 : +return "WDOG" ; +case 0x00020 : +return "JTAG HIGH-Z" ; +case 0x00040 : +return "JTAG SW" ; +case 0x00080 : +return "WDOG3" ; +case 0x00100 : +return "WDOG2" ; +case 0x00200 : +return "TEMPSENSE" ; +default : +return "unknown reset" ; + } +} +int arch_misc_init (void ) {if (IS_ENABLED (CONFIG_FSL_CAAM )) {
@@ -1491,6 +1518,9 @@ int arch_misc_init(void) printf("Failed to initialize caam_jr: %d\n", ret); } +if (IS_ENABLED (CONFIG_XPL_BUILD )) +printf ("Reset cause: %s\n" ,get_reset_cause ()); +return 0 ; }#endif
Signature · 1 line
2.51.0
PATCH v2 7/13 imx8m: dts: Update ddr firmware name
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Update to latest ddr firmware name, otherwise user may use legacy ddr firmware from linux-firmware-imx release.
--- arch/arm/dts/imx8mm-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mn-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mq-u-boot.dtsi | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-)
arch/arm/dts/imx8mm-u-boot.dtsi +4 -4
@@ -85,25 +85,25 @@ }; ddr-1d-imem-fw { - filename = "lpddr4_pmu_train_1d_imem.bin"; + filename = "lpddr4_pmu_train_1d_imem_202006.bin"; align-end = <4>; type = "blob-ext"; }; ddr-1d-dmem-fw { - filename = "lpddr4_pmu_train_1d_dmem.bin"; + filename = "lpddr4_pmu_train_1d_dmem_202006.bin"; align-end = <4>; type = "blob-ext"; }; ddr-2d-imem-fw { - filename = "lpddr4_pmu_train_2d_imem.bin"; + filename = "lpddr4_pmu_train_2d_imem_202006.bin"; align-end = <4>; type = "blob-ext"; }; ddr-2d-dmem-fw { - filename = "lpddr4_pmu_train_2d_dmem.bin"; + filename = "lpddr4_pmu_train_2d_dmem_202006.bin"; align-end = <4>; type = "blob-ext"; };
arch/arm/dts/imx8mn-u-boot.dtsi +4 -4
@@ -140,7 +140,7 @@ ddr-1d-imem-fw { #ifdef CONFIG_IMX8M_LPDDR4 - filename = "lpddr4_pmu_train_1d_imem.bin"; + filename = "lpddr4_pmu_train_1d_imem_202006.bin"; #elif CONFIG_IMX8M_DDR4 filename = "ddr4_imem_1d_201810.bin"; #else
@@ -152,7 +152,7 @@ ddr-1d-dmem-fw { #ifdef CONFIG_IMX8M_LPDDR4 - filename = "lpddr4_pmu_train_1d_dmem.bin"; + filename = "lpddr4_pmu_train_1d_dmem_202006.bin"; #elif CONFIG_IMX8M_DDR4 filename = "ddr4_dmem_1d_201810.bin"; #else
@@ -165,7 +165,7 @@ #if defined(CONFIG_IMX8M_LPDDR4) || defined(CONFIG_IMX8M_DDR4) ddr-2d-imem-fw { #ifdef CONFIG_IMX8M_LPDDR4 - filename = "lpddr4_pmu_train_2d_imem.bin"; + filename = "lpddr4_pmu_train_2d_imem_202006.bin"; #else filename = "ddr4_imem_2d_201810.bin"; #endif
@@ -175,7 +175,7 @@ ddr-2d-dmem-fw { #ifdef CONFIG_IMX8M_LPDDR4 - filename = "lpddr4_pmu_train_2d_dmem.bin"; + filename = "lpddr4_pmu_train_2d_dmem_202006.bin"; #else filename = "ddr4_dmem_2d_201810.bin"; #endif
arch/arm/dts/imx8mq-u-boot.dtsi +4 -4
@@ -96,25 +96,25 @@ }; ddr-1d-imem-fw { - filename = "lpddr4_pmu_train_1d_imem.bin"; + filename = "lpddr4_pmu_train_1d_imem_202006.bin"; align-end = <4>; type = "blob-ext"; }; ddr-1d-dmem-fw { - filename = "lpddr4_pmu_train_1d_dmem.bin"; + filename = "lpddr4_pmu_train_1d_dmem_202006.bin"; align-end = <4>; type = "blob-ext"; }; ddr-2d-imem-fw { - filename = "lpddr4_pmu_train_2d_imem.bin"; + filename = "lpddr4_pmu_train_2d_imem_202006.bin"; align-end = <4>; type = "blob-ext"; }; ddr-2d-dmem-fw { - filename = "lpddr4_pmu_train_2d_dmem.bin"; + filename = "lpddr4_pmu_train_2d_dmem_202006.bin"; align-end = <4>; type = "blob-ext"; };
Signature · 1 line
2.51.0
PATCH v2 8/13 serial: lpuart: Use livetree API for fdt access
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Use livetree API, otherwise driver will fail to read properties from the device tree when OF_LIVE is enabled.
--- drivers/serial/serial_lpuart.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
drivers/serial/serial_lpuart.c +7 -8
@@ -523,8 +523,7 @@ static int lpuart_serial_probe(struct udevice *dev)static int lpuart_serial_of_to_plat (struct udevice *dev) {struct lpuart_serial_plat *plat =dev_get_plat (dev); -const void *blob = gd->fdt_blob; -int node =dev_of_offset (dev); +ofnode node =dev_ofnode (dev);fdt_addr_t addr; addr =dev_read_addr (dev);
@@ -534,18 +533,18 @@ static int lpuart_serial_of_to_plat(struct udevice *dev) plat->reg = (void *)addr; plat->flags =dev_get_driver_data (dev); -if (fdtdec_get_bool (blob, node,"little-endian" )) +if (ofnode_read_bool (node,"little-endian" )) plat->flags &= ~LPUART_FLAG_REGMAP_ENDIAN_BIG ; -if (!fdt_node_check_compatible (blob, node,"fsl,ls1021a-lpuart" )) +if (ofnode_device_is_compatible (node,"fsl,ls1021a-lpuart" )) plat->devtype =DEV_LS1021A ; -else if (!fdt_node_check_compatible (blob, node,"fsl,imx7ulp-lpuart" )) +else if (ofnode_device_is_compatible (node,"fsl,imx7ulp-lpuart" )) plat->devtype =DEV_MX7ULP ; -else if (!fdt_node_check_compatible (blob, node,"fsl,vf610-lpuart" )) +else if (ofnode_device_is_compatible (node,"fsl,vf610-lpuart" )) plat->devtype =DEV_VF610 ; -else if (!fdt_node_check_compatible (blob, node,"fsl,imx8qm-lpuart" )) +else if (ofnode_device_is_compatible (node,"fsl,imx8qm-lpuart" )) plat->devtype =DEV_IMX8 ; -else if (!fdt_node_check_compatible (blob, node,"fsl,imxrt-lpuart" )) +else if (ofnode_device_is_compatible (node,"fsl,imxrt-lpuart" )) plat->devtype =DEV_IMXRT ;return 0 ;
Signature · 1 line
2.51.0
PATCH v2 9/13 gpio: imx_rgpio2p: Use dev_read_addr_index
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Use dev_read_addr_index which supports livetree API, otherwise driver will fail to get addr when OF_LIVE is enabled.
--- drivers/gpio/imx_rgpio2p.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/imx_rgpio2p.c +2 -2
@@ -194,11 +194,11 @@ static int imx_rgpio2p_bind(struct udevice *dev) dual_base = true;if (dual_base) { - addr =devfdt_get_addr_index (dev,1 ); + addr =dev_read_addr_index (dev,1 );if (addr ==FDT_ADDR_T_NONE )return -EINVAL ; }else { - addr =devfdt_get_addr_index (dev,0 ); + addr =dev_read_addr_index (dev,0 );if (addr ==FDT_ADDR_T_NONE )return -EINVAL ;
Signature · 1 line
2.51.0
PATCH v2 10/13 misc: ele: Use dev_read_addr
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Use dev_read_addr which supports livetree API, otherwise driver will fail to get addr when OF_LIVE is enabled.
--- drivers/misc/imx_ele/ele_mu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/imx_ele/ele_mu.c +1 -1
@@ -209,7 +209,7 @@ static int imx8ulp_mu_probe(struct udevice *dev)debug ("%s(dev=%p) (priv=%p)\n" , __func__, dev, priv); - addr =devfdt_get_addr (dev); + addr =dev_read_addr (dev);if (addr ==FDT_ADDR_T_NONE )return -EINVAL ;
Signature · 1 line
2.51.0
PATCH v2 11/13 imx9: soc: Use livetree API for fdt access
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Use livetree API, otherwise it will fail to read properties from the device tree when OF_LIVE is enabled.
--- arch/arm/mach-imx/imx9/soc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
arch/arm/mach-imx/imx9/soc.c +7 -3
@@ -21,6 +21,7 @@#include <asm/armv8/mmu.h> #include <dm/device.h> #include <dm/device_compat.h> +#include <dm/ofnode.h> #include <dm/uclass.h> #include <env.h> #include <env_internal.h>
@@ -738,13 +739,16 @@ int arch_cpu_init(void)int imx9_probe_mu (void ) {struct udevice *devp; -int node, ret; +ofnode node; +int ret;u32 res;struct ele_get_info_data info; - node =fdt_node_offset_by_compatible (gd->fdt_blob,-1 ,"fsl,imx93-mu-s4" ); + node =ofnode_by_compatible (ofnode_null (),"fsl,imx93-mu-s4" ); +if (!ofnode_valid (node)) +return -ENODEV ; - ret =uclass_get_device_by_of_offset (UCLASS_MISC , node, &devp); + ret =uclass_get_device_by_ofnode (UCLASS_MISC , node, &devp);if (ret)return ret;
Signature · 1 line
2.51.0
PATCH v2 12/13 imx8m_evk: Select OF_LIVE
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Enable the live DT to reduce the DT parsing time.
Test data on i.MX8MP shows that boot time is decreased by ~%6
--- configs/imx8mm_evk_defconfig | 1 + configs/imx8mm_evk_fspi_defconfig | 1 + configs/imx8mn_ddr4_evk_defconfig | 1 + configs/imx8mn_evk_defconfig | 1 + configs/imx8mp_evk_defconfig | 1 + configs/imx8mq_evk_defconfig | 1 + 6 files changed, 6 insertions(+)
configs/imx8mm_evk_defconfig +1 -0
@@ -71,6 +71,7 @@ CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT4_WRITE=y CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_RELOC_GD_ENV_ADDR=y
configs/imx8mm_evk_fspi_defconfig +1 -0
@@ -59,6 +59,7 @@ CONFIG_CMD_CACHE=y CONFIG_CMD_REGULATOR=y CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_RELOC_GD_ENV_ADDR=y
configs/imx8mn_ddr4_evk_defconfig +1 -0
@@ -62,6 +62,7 @@ CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT4_WRITE=y CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_REDUNDANT=y
configs/imx8mn_evk_defconfig +1 -0
@@ -80,6 +80,7 @@ CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT4_WRITE=y CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_REDUNDANT=y
configs/imx8mp_evk_defconfig +1 -0
@@ -75,6 +75,7 @@ CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT4_WRITE=y CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_REDUNDANT=y
configs/imx8mq_evk_defconfig +1 -0
@@ -70,6 +70,7 @@ CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT4_WRITE=y CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_REDUNDANT=y
Signature · 1 line
2.51.0
PATCH v2 13/13 imx9: Select OF_LIVE
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Enable the live DT to reduce the DT parsing time.
Test data on i.MX95-EVK:
Before:
Accumulated time:
26,205 dm_spl
483,991 dm_f
22,977 dm_r
After:
Accumulated time:
26,229 dm_spl
484,772 dm_f
2,667 of_live
1,003 dm_r--- arch/arm/mach-imx/imx9/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-imx/imx9/Kconfig +1 -0
@@ -14,6 +14,7 @@ config IMX9 select HAS_CAAM select ROM_UNIFIED_SECTIONS imply IMX_TMU + imply OF_LIVE config IMX93 bool
Signature · 1 line
2.51.0