LS1043a U-Boot LPUART Peripheral

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

LS1043a U-Boot LPUART Peripheral

1,928 Views
zach_ferree
Contributor I

How do I Enable LPUART's 1 and 2 so I can use them to talk to some peripherals in U-Boot.

I tried enabling the Freescale LPUART support in my defconfig using make menuconfig but now I get compile errors saying that I have undefined references to devfdt_get_addr so i tried enabling fdt_serial and updating my .dts to enable the lpuarts but i am still getting the same build errors with no change.

Labels (1)
Tags (2)
0 Kudos
14 Replies

1,648 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Zach Ferree,

Please refer to configs/ls1043aqds_lpuart_defconfig

Please define the following in u-boot configuration file.

CONFIG_FSL_LPUART=y

CONFIG_SYS_EXTRA_OPTIONS="LPUART"

CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-lpuart"

For dts configuration, please refer to arch/arm/dts/fsl-ls1043a-qds-lpuart.dts

/dts-v1/;

#include "fsl-ls1043a-qds.dtsi"

 

/ {

       chosen {

               stdout-path = &lpuart0;

       };

};

Thanks,

Yiping

 

0 Kudos

1,648 Views
zach_ferree
Contributor I

yipingwang

I did what you suggested and I am still getting the following compile time error.

"build/workspace/sources/u-boot-qoriq/drivers/serial/serial_lpuart.c:417: undefined reference to `devfdt_get_addr'"

do you have any sugesstions on how to fix this?

do I need to enable FDT_SERIAL in the defconfig? am I missing a dependency in one of my .conf files?

0 Kudos

1,648 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Zach Ferree,

Which version LSDK are you using now? Would you please send your modified configuration file

to me to do more verification?

Thanks,

Yiping

0 Kudos

1,648 Views
zach_ferree
Contributor I

Yiping,

I am using 19.04 of the LSDK

see attached for the modified copy of the defconfig I am using

0 Kudos

1,648 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Zach Ferree,

      Is it possible to use NOR flash u-boot? If yes, please create u-boot configuration file based on the attached configuration file.

Thanks,

Yiping

0 Kudos

1,648 Views
zach_ferree
Contributor I

Yiping,

Unfortunately I am unable to use NOR flash as I am developing a board with only MMC.

Do you think the issue has to do with using UART0 as the serial interface with the SYS_NS16550 driver along side the FSL_LPUART driver?

Do you know if the SYS_NS16550 driver is using the device tree model or the older model?

Thanks,

Zach

0 Kudos

1,648 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Zach,

SYS_NS16550 driver is used , if enable CONFIG_SPL_SERIAL_SUPPORT in the configuration file.

Thanks,

Yiping

0 Kudos

1,644 Views
zach_ferree
Contributor I

Yiping,

I am still having issues compiling with that enabled.

The compiler error I am getting is

"u-boot-qoriq/drivers/serial/serial_lpuart.c:417: undefined reference to `devfdt_get_addr'"

I believe this to be a linker error, do you know how to verify that the compiler is using the correct "built-in.o" files when linking?

devfdt_get_addr is defined in drivers/core/fdtaddr.c and that is always compiled according to drivers/core/Makefile.

Thanks,

Zach

0 Kudos

1,648 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Zach,

Please define the following options in u-boot configuration file.

CONFIG_FSL_LPUART=y
CONFIG_SPL_DM=y
CONFIG_SPL_OF_LIBFDT=y
CONFIG_SPL_OF_CONTROL=y

Thanks,

Yiping

0 Kudos

1,648 Views
zach_ferree
Contributor I

Yiping,

Adding the config items you listed to my configuration caused the following compile time error

"/u-boot-qoriq/env/mmc.c:42: undefined reference to `blk_get_device_by_str'"

taking a look at what file has the definition for blk_get_device_by_str  i found that it was disk/part.c

in order to get that compiling into the image i need to define CONFIG_PARTITIONS in my defconfig, the odd part is that it is already in my defconfig and i was able to confirm that it was getting compiled by adding a "#error"  right above the definition of blk_get_device_by_str. so there is some issue where it is getting built but the linker is unable to link it.

Any suggestions?

thanks,

Zach

0 Kudos

1,648 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Zach,

Please disable CONFIG_SPL_OF_CONTROL=y in u-boot configuration file.

Thanks,

Yiping

0 Kudos

1,648 Views
zach_ferree
Contributor I

yipingwang‌,

do you have anything else for me to try to get the ability to use the lpuart's while having UART0 as my console?

Thanks,

Zach

0 Kudos

1,648 Views
zach_ferree
Contributor I

Yiping,

I disabled CONFIG_SPL_OF_CONTROL in my u-boot configuration file.

i get an undefined reference error of the following "u-boot-qoriq/drivers/mmc/fsl_esdhc.c:1390: undefined reference to `fdtdec_get_int'"

Taking a look at the Makefile in the lib folder it should be either the CONFIG_FIT or the CONFIG_SPL_OF_CONTROL define that makes fdtdec_common.c get compiled. CONFIG_FIT will do it only if CONFIG_SPL_BUILD is not defined, I do not have CONFIG_SPL_BUILD defined in my defconfig so it should be compiling fdtdec_common.

putting in a #error does cause a compile time error so it is getting compiled but it seems to not be getting linked.

Thanks,

Zach

0 Kudos

1,648 Views
zach_ferree
Contributor I

In this case i am not using lpuart0 as stdout, i am using it to communicate with a peripheral device, does that change anything?

0 Kudos