]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: imx8ulp_evk: call the handshake with M33
authorYe Li <ye.li@nxp.com>
Wed, 6 Apr 2022 06:30:23 +0000 (14:30 +0800)
committerStefano Babic <sbabic@denx.de>
Tue, 12 Apr 2022 15:33:57 +0000 (17:33 +0200)
If M33 handshake is successful, TPM and DSI panel MUX setting is
done by M33, no need to set them.
If handshake is failed or M33 is not booted, continue the TPM
and DSI panel MUX setting

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
board/freescale/imx8ulp_evk/imx8ulp_evk.c

index 1502e4dbb663c21dfa464ccd52e2cc5d1be1b569..b61a4cfbe8dcaf3d69a855f2839aadb919802f0b 100644 (file)
@@ -101,10 +101,18 @@ void mipi_dsi_panel_backlight(void)
 
 int board_init(void)
 {
+       int sync = -ENODEV;
+
        if (IS_ENABLED(CONFIG_FEC_MXC))
                setup_fec();
 
-       if (IS_ENABLED(CONFIG_DM_VIDEO)) {
+       if (m33_image_booted()) {
+               sync = m33_image_handshake(1000);
+               printf("M33 Sync: %s\n", sync ? "Timeout" : "OK");
+       }
+
+       /* When sync with M33 is failed, use local driver to set for video */
+       if (sync != 0 && IS_ENABLED(CONFIG_DM_VIDEO)) {
                mipi_dsi_mux_panel();
                mipi_dsi_panel_backlight();
        }