How to enable UART2 in Linux on LX2160A?

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

How to enable UART2 in Linux on LX2160A?

Jump to solution
860 Views
ZhaoZheng1
Contributor II

Hi,

I'd like to enable both UART1 and UARAT2 in Linux on LX2160A.
kernel version: 5.15.71

configuration in dts, it seems ok.

ZhaoZheng1_0-1760084260244.png

Check UART control register, UART2 has not been enabled.
root@localhost:~# devmem2 0x21d0030 32
0x00000300
root@localhost:~# devmem2 0x21c0030 32
0x00000B01

May i have your comments?
Many thanks!

Zhao

Tags (2)
0 Kudos
Reply
1 Solution
793 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please try below patch

https://patchwork.ozlabs.org/project/uboot/cover/1607490724-6447-1-git-send-email-vabhav.sharma@oss....

Then enable CONFIG_SERIAL_PROBE_ALL=y in lx2160ardb_tfa_defconfig after applying this patch.

View solution in original post

0 Kudos
Reply
9 Replies
251 Views
kenli
NXP Employee
NXP Employee

Dear Zhaozhao,
The fsl-lx2160a.dtsi was added through an out-of-tree patch from my customer in 2023 and was merged into our branch in 2024; it is now fully supported.
Commit reference: git show 8b4a8708d37c1174f6a8ee0b8c78ad78c89df8e4

Best regards
0 Kudos
Reply
221 Views
ZhaoZheng1
Contributor II

Hi Ken,

Thanks for your kindly support.

 

Regards,

Zhao

0 Kudos
Reply
828 Views
ZhaoZheng1
Contributor II

BTW, I have a trial to modify the register of UARTCR to enable UART2, still not working..

0 Kudos
Reply
794 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please try below patch

https://patchwork.ozlabs.org/project/uboot/cover/1607490724-6447-1-git-send-email-vabhav.sharma@oss....

Then enable CONFIG_SERIAL_PROBE_ALL=y in lx2160ardb_tfa_defconfig after applying this patch.

0 Kudos
Reply
790 Views
ZhaoZheng1
Contributor II

Hi Yiping,

Thanks for your great help.

I checked the patch, it's about u-boot.
Does it mean enable UART2 in Linux should probe all UARTs in u-boot?

 

Thanks,

Zhao

0 Kudos
Reply
786 Views
yipingwang
NXP TechSupport
NXP TechSupport

Yes, you need to apply this patch in u-boot. Then check UART1 and UART2 in Linux.

0 Kudos
Reply
784 Views
ZhaoZheng1
Contributor II

That's make sense.

I just checked the patch already integrated into u-boot mainline at least in LF-5.15.y.


0 Kudos
Reply
773 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please enable CONFIG_SERIAL_PROBE_ALL=y in lx2160ardb_tfa_defconfig after applying this patch.

We have verified this method in LSDK 21.08.

0 Kudos
Reply
750 Views
ZhaoZheng1
Contributor II

Thanks a lot, Yiping.

 

Regards,

Zhao

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2183703%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20to%20enable%20UART2%20in%20Linux%20on%20LX2160A%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2183703%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI'd%20like%20to%20enable%20both%20UART1%20and%20UARAT2%20in%20Linux%20on%20LX2160A.%3CBR%20%2F%3Ekernel%20version%3A%205.15.71%3C%2FP%3E%3CP%3Econfiguration%20in%20dts%2C%20it%20seems%20ok.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ZhaoZheng1_0-1760084260244.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ZhaoZheng1_0-1760084260244.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F360219i5951F55088BF18B4%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ZhaoZheng1_0-1760084260244.png%22%20alt%3D%22ZhaoZheng1_0-1760084260244.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ECheck%20UART%20control%20register%2C%20UART2%20has%20not%20been%20enabled.%3CBR%20%2F%3E%3CSPAN%3Eroot%40localhost%3A~%23%20devmem2%200x21d0030%2032%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E0x00000300%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Eroot%40localhost%3A~%23%20devmem2%200x21c0030%2032%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E0x00000B01%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3EMay%20i%20have%20your%20comments%3F%3CBR%20%2F%3EMany%20thanks!%3C%2FP%3E%3CP%3EZhao%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2204826%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20enable%20UART2%20in%20Linux%20on%20LX2160A%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2204826%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Ken%2C%3C%2FP%3E%3CP%3EThanks%20for%20your%20kindly%20support.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EZhao%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2204653%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20enable%20UART2%20in%20Linux%20on%20LX2160A%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2204653%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EDear%20Zhaozhao%2C%3CBR%20%2F%3E%3CSPAN%3EThe%20fsl-lx2160a.dtsi%20was%20added%20through%20an%20out-of-tree%20patch%20from%20my%20customer%20in%202023%20and%20was%20merged%20into%20our%20branch%20in%202024%3B%20it%20is%20now%20fully%20supported.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ECommit%20reference%3A%20git%20show%208b4a8708d37c1174f6a8ee0b8c78ad78c89df8e4%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2184621%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20enable%20UART2%20in%20Linux%20on%20LX2160A%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2184621%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks%20a%20lot%2C%20Yiping.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EZhao%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2184460%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20enable%20UART2%20in%20Linux%20on%20LX2160A%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2184460%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EPlease%20enable%20CONFIG_SERIAL_PROBE_ALL%3Dy%20in%20lx2160ardb_tfa_defconfig%26nbsp%3Bafter%20applying%20this%20patch.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EWe%20have%20verified%20this%20method%20in%20LSDK%2021.08.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2184452%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20enable%20UART2%20in%20Linux%20on%20LX2160A%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2184452%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThat's%20make%20sense.%3C%2FP%3E%3CP%3EI%20just%20checked%20the%20patch%20already%20integrated%20into%20u-boot%20mainline%20at%20least%20in%20LF-5.15.y.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2184450%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20enable%20UART2%20in%20Linux%20on%20LX2160A%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2184450%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYes%2C%20you%20need%20to%20apply%20this%20patch%20in%20u-boot.%20Then%20check%20UART1%20and%20UART2%20in%20Linux.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2184448%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20enable%20UART2%20in%20Linux%20on%20LX2160A%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2184448%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Yiping%2C%3C%2FP%3E%3CP%3EThanks%20for%20your%20great%20help.%3C%2FP%3E%3CP%3EI%20checked%20the%20patch%2C%20it's%20about%20u-boot.%3CBR%20%2F%3EDoes%20it%20mean%20enable%20UART2%20in%20Linux%20should%20probe%20all%20UARTs%20in%20u-boot%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EZhao%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2184440%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20enable%20UART2%20in%20Linux%20on%20LX2160A%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2184440%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EPlease%20try%20below%20patch%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Fuboot%2Fcover%2F1607490724-6447-1-git-send-email-vabhav.sharma%40oss.nxp.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Fuboot%2Fcover%2F1607490724-6447-1-git-send-email-vabhav.sharma%40oss.nxp.com%2F%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EThen%20enable%20CONFIG_SERIAL_PROBE_ALL%3Dy%20in%20lx2160ardb_tfa_defconfig%26nbsp%3Bafter%20applying%20this%20patch.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2184256%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20enable%20UART2%20in%20Linux%20on%20LX2160A%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2184256%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EBTW%2C%20I%20have%20a%20trial%20to%20modify%20the%20register%20of%26nbsp%3BUARTCR%20to%20enable%20UART2%2C%20still%20not%20working..%3C%2FP%3E%3C%2FLINGO-BODY%3E