IMX8QM U-BOOT AND KERNEL UART CONSOLE CHANGE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8QM U-BOOT AND KERNEL UART CONSOLE CHANGE

345 Views
HAKANAYDN
Contributor III

Hi,

I want to change u-boot debug console from UART1 to UART4 for imx8qm. What changes do I do ? 

I applied the below changes in u-boot but it didnt work.

 

chosen {
bootargs = "console=ttyLP4,115200 earlycon";//
stdout-path = &lpuart4;////
};
 
pinctrl_lpuart4: lpuart4grp {
fsl,pins = <
SC_P_M40_GPIO0_00_DMA_UART4_RX 0x06000020
SC_P_M40_GPIO0_01_DMA_UART4_TX 0x06000020
>;
};
 
&lpuart4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpuart4>;
status = "okay";
};
 
 
#define UART_PAD_CTRL ( (SC_PAD_CONFIG_OUT_IN << PADRING_CONFIG_SHIFT) | (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) \
| (SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT) | (SC_PAD_28FDSOI_PS_PU << PADRING_PULL_SHIFT))
 
 
 
static iomux_cfg_t uart4_pads[] = {
SC_P_M40_GPIO0_00 | MUX_MODE_ALT(2) | MUX_PAD_CTRL(UART_PAD_CTRL),//
SC_P_M40_GPIO0_01 | MUX_MODE_ALT(2) | MUX_PAD_CTRL(UART_PAD_CTRL),//
};
 
static void setup_iomux_uart(void)
{
//imx8_iomux_setup_multiple_pads(uart0_pads, ARRAY_SIZE(uart0_pads));
imx8_iomux_setup_multiple_pads(uart4_pads, ARRAY_SIZE(uart4_pads));//
}
 
int board_early_init_f(void)
{
sc_pm_clock_rate_t rate = SC_80MHZ;
int ret;
 
/* When start u-boot in XEN VM, directly return */
if (IS_ENABLED(CONFIG_XEN)) {
writel(0xF53535F5, (void __iomem *)0x80000000);
return 0;
}
 
/* Set UART3 clock root to 80 MHz and enable it */
ret = sc_pm_setup_uart(SC_R_UART_4, rate);
if (ret)
return ret;
 
setup_iomux_uart();
 
return 0;
}
 
void board_quiesce_devices(void)
{
const char *power_on_devices[] = {
"dma_lpuart4","PD_UART4_RX","PD_UART4_TX"
};
 
imx8_power_off_pd_devices(power_on_devices, ARRAY_SIZE(power_on_devices));
}

 

 

 

0 Kudos
6 Replies

298 Views
HAKANAYDN
Contributor III

 Hı, Thank you for reply. 

How can I compile scfw on yocto and change uart1 to uart4 for imx8qm. And then how can I flash the imx8qm. 

0 Kudos

292 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @HAKANAYDN 

Refer this to compile scfw firmware on Ubuntu, not yocto.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/System-Controller-Firmware-101-Getting-s...

 

Then find and replace scfw_tcm.bin in Yocto.

240 Views
HAKANAYDN
Contributor III

Hi,

Where do I fix inside source code of scfw in order to change from uart1 to uart4 for console ? After I apply it, do I need to do something inside kernel, uboot and dts files ? After I compiled scfw file, how can I combine u-boot.bin both of them ? How can I flash ?

0 Kudos

197 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

You should refer the knowledge base :https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/System-Controller-Firmware-101-Resource-...

Zhiming_Liu_0-1717378891549.png

after I apply it, do I need to do something inside kernel, uboot and dts files ?

-->Yes, you need configure uboot and kernel serial index in dts.

 

After I compiled scfw file, how can I combine u-boot.bin both of them ? How can I flash ?

-->Please refer 4.5.13 How to build imx-boot image by using imx-mkimage in this guide.

https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf

0 Kudos

173 Views
HAKANAYDN
Contributor III

Hi,

I applied the patch file into imx-sc-firmware (https://github.com/varigit/imx-sc-firmware) and then I compiled imx-sc-firmware, u-boot and imx-boot. My aim is to change console uart1 to uart4. But It didnt work.  is my patch file correct ? are there anything to be changed in system control firmware ? 

0 Kudos