Hi all,
I am working on an verdin i.MX95 19x19 EVK and trying to enable LPUART3 in the device tree. After my changes, the kernel panics during boot.
Device tree changes
diff --git a/arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts b/arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts
index 4aa2d000df8b..55d660ce38aa 100644
--- a/arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts
@@ -570,6 +570,12 @@ &lpuart1 {
status = "okay";
};
+&lpuart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ status = "okay";
+};
+
&lpuart5 {
/* BT */
pinctrl-names = "default";
@@ -980,6 +986,13 @@ IMX95_PAD_UART1_TXD__AONMIX_TOP_LPUART1_TX 0x31e
>;
};
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ IMX95_PAD_ENET1_RD0__LPUART3_RX 0x31e
+ IMX95_PAD_ENET1_TD0__LPUART3_TX 0x31e
+ >;
+ };
+
pinctrl_uart5: uart5grp {
fsl,pins = <
IMX95_PAD_DAP_TDO_TRACESWO__LPUART5_TX 0x31e
Boot Logs
[ 2.234704] /soc/bus@42000000/i2c@426d0000/tcpc@52/connector: Fixed dependency cycle(s) with /soc/phy@4c1f0040
[ 2.244734] i2c i2c-6: LPI2C adapter registered
[ 2.250234] adp5585 1-0034: error -EIO: Failed to read device ID
[ 2.256064] adp5585 1-0034: probe with driver adp5585 failed with error -5
[ 2.262925] i2c i2c-1: LPI2C adapter registered
[ 2.268342] imx8mq-usb-phy 4c1f0040.phy: supply vbus not found, using dummy regulator
[ 2.281775] /soc/bridge@4b0d0000/channel@0: Fixed dependency cycle(s) with /soc/syscon@4b010000/bridge@8
[ 2.291122] /soc/syscon@4b0c0000/ldb@4/channel@0: Fixed dependency cycle(s) with /soc/syscon@4b010000/bridge@8
[ 2.301094] /soc/syscon@4b010000/bridge@8: Fixed dependency cycle(s) with /soc/syscon@4b0c0000/ldb@4/channel@0
[ 2.310967] /soc/syscon@4b010000/bridge@8: Fixed dependency cycle(s) with /soc/bridge@4b0d0000/channel@0
[ 2.321873] /soc/syscon@4b0c0000/ldb@4/channel@0: Fixed dependency cycle(s) with /lvds0_panel
[ 2.330249] /soc/syscon@4b0c0000/ldb@4/channel@0: Fixed dependency cycle(s) with /soc/syscon@4b010000/bridge@8
[ 2.342922] scmi-pinctrl-imx scmi_dev.8: Error set config -13
[ 2.348464] scmi-pinctrl-imx scmi_dev.8: pin_config_set op failed for pin 56
[ 2.355438] fsl-lpuart 42570000.serial: Error applying setting, reverse things back
[ 2.363245] Internal error: synchronous external abort: 0000000096000010 [#1] PREEMPT SMP
[ 2.371199] Modules linked in:
[ 2.374234] CPU: 0 UID: 0 PID: 60 Comm: kworker/u24:3 Not tainted 6.12.20-lts-next-gdfaf2136deb2-dirty #1
[ 2.383764] Hardware name: NXP i.MX95 19X19 board (DT)
[ 2.388879] Workqueue: events_unbound deferred_probe_work_func
[ 2.394685] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 2.401611] pc : lpuart_probe+0x55c/0x630
[ 2.405598] lr : lpuart_probe+0x33c/0x630
[ 2.409591] sp : ffff800083083b20
[ 2.412884] x29: ffff800083083b30 x28: 0000000000000000 x27: 0000000000000000
[ 2.419991] x26: ffff000080b4c240 x25: 0000000000000000 x24: ffff800080876bf0
[ 2.427091] x23: ffff8000822d9bc8 x22: ffff000080208410 x21: ffff000080208400
[ 2.434198] x20: 0000000000000000 x19: ffff00008177a880 x18: ffffffffffffffff
[ 2.441304] x17: ffff0000815ee000 x16: ffff0000815ede00 x15: 0000000000000002
[ 2.448411] x14: ffffffffffffffff x13: ffff0000807bc580 x12: 0000000000000001
[ 2.455518] x11: 000000008bb15db4 x10: 0000000000000a90 x9 : ffff800083083830
[ 2.462624] x8 : ffff0003fdf58c80 x7 : 1000000000000104 x6 : 0000000000000002
[ 2.469731] x5 : 1000000000000004 x4 : ffff0000807bc500 x3 : 0000000000000000
[ 2.476838] x2 : ffff800082400278 x1 : 0000000000000003 x0 : ffff8000825c3018
[ 2.483951] Call trace:
[ 2.486378] lpuart_probe+0x55c/0x630
[ 2.490018] platform_probe+0x68/0xc8
[ 2.493651] really_probe+0xbc/0x29c
[ 2.497205] __driver_probe_device+0x78/0x12c
[ 2.501538] driver_probe_device+0x3c/0x15c
[ 2.505698] __device_attach_driver+0xb8/0x134
[ 2.510118] bus_for_each_drv+0x88/0xe8
[ 2.513931] __device_attach+0xa0/0x190
[ 2.517744] device_initial_probe+0x14/0x20
[ 2.521904] bus_probe_device+0xac/0xb0
[ 2.525718] deferred_probe_work_func+0x80/0xb8
[ 2.530224] process_one_work+0x148/0x28c
[ 2.534211] worker_thread+0x2c8/0x3d0
[ 2.537938] kthread+0x110/0x114
[ 2.541144] ret_from_fork+0x10/0x20
[ 2.544707] Code: f9411260 97fbe006 17ffff17 91002000 (b940001a)
[ 2.550772] ---[ end trace 0000000000000000 ]---
Question
Thanks!
解決済! 解決策の投稿を見る。
Hi,
The LPUART3 is assigned for M7 in scmi. Need to modify https://github.com/nxp-imx/imx-sm/blob/master/configs/mx95evk.cfg#L373 , remove this line from M7 resources.
LPUART3 OWNER, test
And try to add below line in A55 resources.
PERLPI_LPUART3 ALL
Best Regards,
Zhiming
Hi,
The LPUART3 is assigned for M7 in scmi. Need to modify https://github.com/nxp-imx/imx-sm/blob/master/configs/mx95evk.cfg#L373 , remove this line from M7 resources.
LPUART3 OWNER, test
And try to add below line in A55 resources.
PERLPI_LPUART3 ALL
Best Regards,
Zhiming
Thank you @Zhiming_Liu; The solution you provided worked. I did the following changes in the imx-system-manager code related to lpuart3 along with my device tree changes and build a new yocto image. ttyLP2 was in the /dev/ and I also used it in my application and was also running successfully.
Changes in imx-system-manager code:
--- a/configs/mx95evk.cfg
+++ b/configs/mx95evk.cfg
@@ -370,7 +370,6 @@ LPIT1 OWNER
LPTMR1 OWNER
LPTMR2 OWNER
LPTPM1 OWNER
-LPUART3 OWNER, test
MSGINTR1 OWNER
MSGINTR2 OWNER
MU5_A OWNER
@@ -477,6 +476,7 @@ PERLPI_GPIO3 ALL
PERLPI_GPIO4 ALL
PERLPI_GPIO5 ALL
PERLPI_LPUART1 ALL
+PERLPI_LPUART3 ALL
PERLPI_LPUART4 ALL
PERLPI_LPUART5 ALL
PERLPI_LPUART6 ALL
@@ -760,6 +760,7 @@ LPTPM4 OWNER
LPTPM5 OWNER
LPTPM6 OWNER
LPUART1 OWNER
+LPUART3 OWNER
LPUART4 OWNER
LPUART5 OWNER
LPUART6 OWNER
my /dev directory
root@imx95:~# ls -al /dev/ttyLP2
crw-rw---- 1 root dialout 241, 2 Sep 7 14:30 /dev/ttyLP2
root@imx95:~# dmesg | grep ttyLP2
[ 2.426195] 42570000.serial: ttyLP2 at MMIO 0x42570010 (irq = 141, base_baud = 1500000) is a FSL_LPUART