How to access LS1021a via UART after flashing uboot

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

How to access LS1021a via UART after flashing uboot

1,157 Views
jiye
Contributor V

Hi,

I have a standalone ls1021a and boot source is eMMC.

I followed the steps in AN5184 and

pastedImage_1.png

Before I start the flash, I hard strapped the cfg_rcw_src[0:8] to hard coded mode which is 9a in my case

after I successfully flash the uboot into the eMMC, I then hard strapping to the eMMC of the cfg_rcw_src[0:8].

I want to verify if i can see the uboot so I use a FTDI connector to the UART_SIN and UART_SOUT, I assumed this is how it's done on the Evaluation board. But I did not see anything from the serial port.

pastedImage_9.png

Do i need to some port mapping in the uboot or do I need to do some RCW configuration to make the P2,P1 in the picture above to the LPUART1 mode?

Labels (1)
8 Replies

938 Views
Pavel
NXP Employee
NXP Employee

There is the following on my screen:

pastedImage_3.png

Do you see the ls1021atwr.h.zip file?

Have a great day,
Pavel Chubakov

0 Kudos

937 Views
Pavel
NXP Employee
NXP Employee

See attached file.

Is there "#define CONFIG_LPUART" in your .h file.

Have a great day,
Pavel Chubakov

0 Kudos

937 Views
jiye
Contributor V

yes it does.

I dont see where is the attached file.

0 Kudos

937 Views
Pavel
NXP Employee
NXP Employee

Is there "CONFIG_LPUART" in u-boot configuration file for the TWR-LS1021a board (/include/configs/ ls1021atwr.h).

See the Section 7.10.1 of SDK 2.0-1703 documentation.

Have a great day,
Pavel Chubakov

0 Kudos

937 Views
jiye
Contributor V

(1) can you take a look at my ls1021atwr_sdcard_ifc_defconfig file under u-boot/configs ? specially the ones I highlighted.

===================================================================

CONFIG_ARM=y
CONFIG_TARGET_LS1021ATWR=y
CONFIG_SYS_TEXT_BASE=0x82000000
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL=y
CONFIG_AHCI=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT".------------> should I add "LPUART"
CONFIG_SD_BOOT=y
CONFIG_BOOTDELAY=3
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0" ------------------>SHOULD I change to "ttyLP0"

Should I add:

CONFIG_DM_SERIAL =y

CONFIG_FSL_LPUART=Y
CONFIG_SILENT_CONSOLE=y
# CONFIG_CONSOLE_MUX is not set
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
CONFIG_MISC_INIT_R=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xe8
CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_I2C_SUPPORT=y
CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
CONFIG_SPL_WATCHDOG_SUPPORT=y
CONFIG_CMD_IMLS=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_MEMTEST=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_BMP=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="ls1021a-twr-duart"------------------>SHOULD I change to "ls1021a-twr-lpuart"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_DM=y
CONFIG_SATA_CEVA=y
CONFIG_FSL_CAAM=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_SYS_FLASH_CFI=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_MII=y
CONFIG_TSEC_ENET=y
CONFIG_PCI=y
CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y


CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_VIDEO_FSL_DCU_FB=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set

========================================

(2) Who controls where the uboot information to be printed during the start up of the board like shown below before loading the kernel? Printing uboot information and kernel loading are handled separately I assume?


pastedImage_2.png

(3)Also when I edited the ls1021atwr_boot.scr file under the /boot partition

from console=ttyS0,115200 to console=ttySLP0,115200 after reboot it crashed I am not sure if I am allowed to do like this since after I rebuild the uboot I found out that the console=ttyS0 is still not LP0 even tho in the uboot environment the console=ttyLP0

937 Views
Pavel
NXP Employee
NXP Employee

Usually DUART of the LS1021a is used as console.

See the Section 2.18 of the TWR-LS1021a board Reference Manual:

https://www.nxp.com/webapp/Download?colCode=TWR-LS1021ARM

 

See the Section 7.2.7 of LSDK 1909 User Guide about using LPUART on the LS1021a board:

https://docs.nxp.com/bundle/GUID-1441E561-3EAD-47FD-A50D-72E1A4E4D69E/page/GUID-38B02850-872C-4567-8...

 

See also the Section 4.4.4.11 Od SDK 2.0-1703 documentation about LPUART using as console:

https://docs.nxp.com/bundle/GUID-39A0A446-70E5-4ED7-A580-E7508B61A5F1/page/GUID-30F66DE6-BAD0-4ED6-A...

Have a great day,
Pavel Chubakov

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

937 Views
jiye
Contributor V

Hi Pavel,

Now I am able print system information at LPUART1 port. But the uboot printing information (before kernel starts to get load).  Things like this below:

pastedImage_1.png

These information are still printed from default serial port. How to make these information print from LPUART1 as well?

0 Kudos

937 Views
jiye
Contributor V

Hi Pavel,

I can only see ls1021atwr lpuart for nor flash I did not see any for sd card version. What should I do to have a sd card version

pastedImage_1.png

should I still add

pastedImage_1.png

into my sdcard_qspi_deconfig and recompile the kernel?

0 Kudos