Board: i.MX8MPlus, RM67199
BSP: uboot 2022.04, linux-6.1.1-1.0.1
In uboot, you need comment the video_link_shut_down and dm_remove_devices_flags in announce_and_cleanup function.
#if defined(CONFIG_VIDEO_LINK)
//video_link_shut_down();
#endif
board_quiesce_devices();
printf("\nStarting kernel ...%s\n\n", fake ?
"(fake run for tracing)" : "");
/*
* Call remove function of all devices with a removal flag set.
* This may be useful for last-stage operations, like cancelling
* of DMA operation or releasing device internal buffers.
*/
// #ifndef CONFIG_POWER_DOMAIN
// dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL | DM_REMOVE_NON_VITAL);
// /* Remove all active vital devices next */
// dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);
// #endif
cleanup_before_linux();
}
After doing this, the uboot logo will not be cleaned before Linux PM framework.
You need add CONFIG_LOGO=n into defconfig file to disable kernel logo.
Please add below code into the beginning of imx_pgc_power_down function
if ((strcmp(genpd->name, "mipi-phy1") == 0) ||
(strcmp(genpd->name, "mediamix") == 0))
{
return 0;
}
Please modify imx_lcdifv3_runtime_resume function like this. The imx_lcdifv3_runtime_resume function will be called two times, thus the lcdif will be reset two times.We can let it only reset last time,which before the rootfs mount.
bool rst = false; //////////////////////////////
static int imx_lcdifv3_runtime_resume(struct device *dev)
{
int ret = 0;
struct lcdifv3_soc *lcdifv3 = dev_get_drvdata(dev);
if (unlikely(!atomic_read(&lcdifv3->rpm_suspended))) {
dev_warn(lcdifv3->dev, "Unbalanced %s!\n", __func__);
return 0;
}
if (!atomic_dec_and_test(&lcdifv3->rpm_suspended))
return 0;
/* set LCDIF QoS and cache */
if (of_device_is_compatible(dev->of_node, "fsl,imx93-lcdif"))
regmap_write(lcdifv3->gpr, 0xc, 0x3712);
request_bus_freq(BUS_FREQ_HIGH);
ret = lcdifv3_enable_clocks(lcdifv3);
if (ret) {
release_bus_freq(BUS_FREQ_HIGH);
return ret;
}
//////////////////////////////
if (rst)
{
/* clear sw_reset */
writel(CTRL_SW_RESET, lcdifv3->base + LCDIFV3_CTRL_CLR);
rst = false;
}
rst = true;
//////////////////////////////
/* enable plane FIFO panic */
lcdifv3_enable_plane_panic(lcdifv3);
return ret;
}
The uboot logo will be cleaned at log "imx-drm 1.0.0 20120507 for display-subsystem on minor 1".
The boot time of systemd service on evk is very long. For weston.service, it needs 3 seconds.
From log here we test, the pcie and ethernet probe after drm system also cost about 1 second. If you want to reduce the boot time of other modules, you can try to reduce the system service and disable pcie/ethernet drivers if you don't need them.
[ 2.505616] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1
[ 2.620324] imx6q-pcie 33800000.pcie: iATU unroll: enabled
[ 2.620335] imx6q-pcie 33800000.pcie: iATU regions: 4 ob, 4 ib, align 64K, limit 16G
[ 2.720689] imx6q-pcie 33800000.pcie: PCIe Gen.1 x1 link up
[ 2.820996] imx6q-pcie 33800000.pcie: PCIe Gen.2 x1 link up
[ 2.821003] imx6q-pcie 33800000.pcie: Link up, Gen2
[ 2.821010] imx6q-pcie 33800000.pcie: PCIe Gen.2 x1 link up
[ 2.821112] imx6q-pcie 33800000.pcie: PCI host bridge to bus 0000:00
[ 2.821119] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 2.821126] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 2.821133] pci_bus 0000:00: root bus resource [mem 0x18000000-0x1fefffff]
[ 2.821161] pci 0000:00:00.0: [16c3:abcd] type 01 class 0x060400
[ 2.821176] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[ 2.821187] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
[ 2.821232] pci 0000:00:00.0: supports D1
[ 2.821237] pci 0000:00:00.0: PME# supported from D0 D1 D3hot D3cold
[ 2.824664] pci 0000:01:00.0: [1b4b:2b42] type 00 class 0x020000
[ 2.824725] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
[ 2.824761] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x000fffff 64bit pref]
[ 2.825066] pci 0000:01:00.0: supports D1 D2
[ 2.825072] pci 0000:01:00.0: PME# supported from D0 D1 D3hot D3cold
[ 2.835499] pci 0000:00:00.0: BAR 0: assigned [mem 0x18000000-0x180fffff]
[ 2.835511] pci 0000:00:00.0: BAR 15: assigned [mem 0x18100000-0x182fffff pref]
[ 2.835519] pci 0000:00:00.0: BAR 6: assigned [mem 0x18300000-0x1830ffff pref]
[ 2.835530] pci 0000:01:00.0: BAR 0: assigned [mem 0x18100000-0x181fffff 64bit pref]
[ 2.835561] pci 0000:01:00.0: BAR 2: assigned [mem 0x18200000-0x182fffff 64bit pref]
[ 2.835590] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 2.835598] pci 0000:00:00.0: bridge window [mem 0x18100000-0x182fffff pref]
[ 2.835899] pcieport 0000:00:00.0: PME: Signaling with IRQ 218
[ 2.897767] Console: switching to colour frame buffer device 135x120
[ 3.098361] imx-drm display-subsystem: [drm] fb0: imx-drmdrmfb frame buffer device
[ 3.111239] pps pps0: new PPS source ptp0
[ 3.316650] fec 30be0000.ethernet eth0: registered PHC device 0
[ 3.323645] imx-dwmac 30bf0000.ethernet: IRQ eth_lpi not found
[ 3.329593] imx-dwmac 30bf0000.ethernet: force_sf_dma_mode is ignored if force_thresh_dma_mode is set.
[ 3.340074] imx-dwmac 30bf0000.ethernet: User ID: 0x10, Synopsys ID: 0x51
[ 3.346883] imx-dwmac 30bf0000.ethernet: DWMAC4/5
[ 3.351684] imx-dwmac 30bf0000.ethernet: DMA HW capability register supported
[ 3.358825] imx-dwmac 30bf0000.ethernet: RX Checksum Offload Engine supported
[ 3.365966] imx-dwmac 30bf0000.ethernet: Wake-Up On Lan supported
[ 3.372113] imx-dwmac 30bf0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 3.379778] imx-dwmac 30bf0000.ethernet: Enabled L3L4 Flow TC (entries=8)
[ 3.386573] imx-dwmac 30bf0000.ethernet: Enabled RFS Flow TC (entries=10)
[ 3.393373] imx-dwmac 30bf0000.ethernet: Enabling HW TC (entries=256, max_off=256)
[ 3.400950] imx-dwmac 30bf0000.ethernet: Using 34 bits DMA width
[ 3.608045] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[ 3.613580] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
[ 3.621621] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220fe6d hci version 0x110 quirks 0x0000002001010010
[ 3.631059] xhci-hcd xhci-hcd.1.auto: irq 226, io mem 0x38200000
[ 3.637197] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[ 3.642698] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
[ 3.650365] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[ 3.657695] hub 1-0:1.0: USB hub found
[ 3.661473] hub 1-0:1.0: 1 port detected
[ 3.665669] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 3.674445] hub 2-0:1.0: USB hub found
[ 3.678220] hub 2-0:1.0: 1 port detected
[ 3.683428] imx-cpufreq-dt imx-cpufreq-dt: cpu speed grade 7 mkt segment 2 supported-hw 0x80 0x4
[ 3.693184] Hot alarm is canceled. GPU3D clock will return to 64/64
[ 3.702683] sdhci-esdhc-imx 30b50000.mmc: Got CD GPIO
[ 3.703346] mxc-mipi-csi2-sam 32e40000.csi: supply mipi-phy not found, using dummy regulator
[ 3.716645] : mipi_csis_imx8mp_phy_reset, No remote pad found!
[ 3.722602] mxc-mipi-csi2-sam 32e40000.csi: lanes: 2, hs_settle: 13, clk_settle: 2, wclk: 1, freq: 500000000
[ 3.739353] mmc1: SDHCI controller on 30b50000.mmc [30b50000.mmc] using ADMA
[ 3.752018] isi-m2m 32e00000.isi:m2m_device: Register m2m success for ISI.0
[ 3.759172] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 3.768303] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 3.787598] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 3.795171] ALSA device list:
[ 3.796227] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[ 3.799186] No soundcards found.
[ 3.819630] EXT4-fs (mmcblk2p2): mounted filesystem with ordered data mode. Quota mode: none.
[ 3.828212] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 3.834944] devtmpfs: mounted