iMX8QM: assign all 4 serial/LPUARTS to A cores - Linux

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

iMX8QM: assign all 4 serial/LPUARTS to A cores - Linux

1,853件の閲覧回数
dry
Senior Contributor I

I have some stock devtree image on Linux side as provided, with only 2 LPUARTs enabled for Linux side, to A cores.

Now, I want 4 to Linux, and I've enabled them in the devtree , compiled, booted. ..But, still only 2 are usable, seems no effect / still cannot use other 2 serial.

Tried to map all 5, still same story, cannot use that extra 5th one.

I'm not starting / using M cores, so they un-used.

dry_0-1663631862931.pngdry_1-1663631900569.png

# Eg. testing:
 stty -F /dev/ttyLP[1-4] 115200 cs8 -cstopb -parenb
 while true;  do echo HELLO1 > /dev/ttyLP1; echo HELLO2 > /dev/ttyLP2 ; echo HELLO3 > /dev/ttyLP3;  echo HELLO4 > /dev/ttyLP4;  sleep 1; done

 

Only  LP1 comes through, other ones are silent. 

So, does this have to do anything with that "secure" firmware stuff..? How to re-assign at least 2 extra LPUARts to Linux ... ?  (away from M4s).

As far as DTS goes, all I did is changed status from disabled to ok:

serial@5a060000 {
		compatible = "fsl,imx8qm-lpuart";
		reg = <0x00 0x5a060000 0x00 0x1000>;
		interrupts = <0x00 0x159 0x04>;
		interrupt-parent = <0xae>;
		clocks = <0x03 0x72 0x03 0x70>;
		clock-names = "per\0ipg";
		assigned-clocks = <0x03 0x72>;
		assigned-clock-rates = <0x4c4b400>;
		power-domains = <0xcd>;
		status = "okay";
		pinctrl-names = "default";
		pinctrl-0 = <0xce>;
	};

	serial@5a070000 {
		compatible = "fsl,imx8qm-lpuart";
		reg = <0x00 0x5a070000 0x00 0x1000>;
		interrupts = <0x00 0x15a 0x04>;
		interrupt-parent = <0xae>;
		clocks = <0x03 0x75 0x03 0x73>;
		clock-names = "per\0ipg";
		assigned-clocks = <0x03 0x75>;
		assigned-clock-rates = <0x4c4b400>;
		power-domains = <0xcf>;
		dma-names = "tx\0rx";
		dmas = <0xc2 0x0f 0x00 0x00 0xc2 0x0e 0x00 0x01>;
		status = "okay";
		pinctrl-names = "default";
		pinctrl-0 = <0xd0>;
	};

	serial@5a080000 {
		compatible = "fsl,imx8qm-lpuart";
		reg = <0x00 0x5a080000 0x00 0x1000>;
		interrupts = <0x00 0x15b 0x04>;
		interrupt-parent = <0xae>;
		clocks = <0x03 0x78 0x03 0x76>;
		clock-names = "per\0ipg";
		assigned-clocks = <0x03 0x78>;
		assigned-clock-rates = <0x4c4b400>;
		power-domains = <0xd1>;
		dma-names = "tx\0rx";
		dmas = <0xc2 0x11 0x00 0x00 0xc2 0x10 0x00 0x01>;
		status = "okay";
	};

	serial@5a090000 {
		compatible = "fsl,imx8qm-lpuart";
		reg = <0x00 0x5a090000 0x00 0x1000>;
		interrupts = <0x00 0x15c 0x04>;
		interrupt-parent = <0xae>;
		clocks = <0x03 0x7b 0x03 0x79>;
		clock-names = "per\0ipg";
		assigned-clocks = <0x03 0x7b>;
		assigned-clock-rates = <0x4c4b400>;
		power-domains = <0xd2>;
		dma-names = "tx\0rx";
		dmas = <0xc2 0x13 0x00 0x00 0xc2 0x12 0x00 0x01>;
		status = "okay";
	};

	serial@5a0a0000 {
		compatible = "fsl,imx8qm-lpuart";
		reg = <0x00 0x5a0a0000 0x00 0x1000>;
		interrupts = <0x00 0x15d 0x04>;
		interrupt-parent = <0xae>;
		clocks = <0x03 0x7f 0x03 0x7c>;
		clock-names = "per\0ipg";
		assigned-clocks = <0x03 0x7f>;
		assigned-clock-rates = <0x4c4b400>;
		power-domains = <0xd3>;
		dma-names = "tx\0rx";
		dmas = <0xc2 0x15 0x00 0x00 0xc2 0x14 0x00 0x01>;
		status = "okay";
	};

 

If there is a Proper document / guide that you actually have created describing how to re-assign these , please share the link. 

I'll take a forum howto post also happily ...

0 件の賞賛
返信
8 返答(返信)

1,841件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

If you enable uart in dts, you need also enable it in SCFW.

0 件の賞賛
返信

1,819件の閲覧回数
dry
Senior Contributor I

@Zhiming_Liu 

I would appreciate a more detailed if not direct show-where reply .

 - Where exactly in SCFW?  I got a SCFW kit, and I see that you can build it with no further partitioning build (i.e with no alt flag set when mkimage);  That should then, not partition anything beyond minimal, am I wrong?

 - Can this  (that is, assign all LPUARTS ) be enabled in U-boot , post SCFW..?   If a COM maker forgot to give me their SCFW port sources, but only binaries..  Can I move all the LPUARTS then from other domains/partitions to Ax domain?

I have tried building my own SCFW using iMX8QM SoC and mek board variant, and that by itself loads and starts, and I also can combine it with the Yocto's built U-boot, But,  beyond that, the kernel built does NOT boot , it's stuck in early stages.

I'm assuming that whatever magic the COM' maker is doing in SCFW might be, the reason, but the last visible trace is Loading kernel... and from past experience this is early stage boot stuck without even initial early console traces.

If I can just move what I need to the A domain (or boot partition its' called I think,,)from U-boot, do you have example of how to do this?

I'm stuck on this , with millions of sources, tons of NXP guides, and different firmware imx "tools", yet I cannot move past this configuration stage and start doing what I need.

0 件の賞賛
返信

1,794件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Can this  (that is, assign all LPUARTS ) be enabled in U-boot , post SCFW..?

--> No, all resource reassign should be done in SCFW

I'm assuming that whatever magic the COM' maker is doing in SCFW might be, the reason, but the last visible trace is Loading kernel... and from past experience this is early stage boot stuck without even initial early console traces.

-->This is possible,but SCFW will be loaded before uboot.Please check the SCFW version.

Please refer Modifying default configuration in below link.

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

 

0 件の賞賛
返信

1,786件の閲覧回数
dry
Senior Contributor I

@Zhiming_Liu 

Yes, i have had this guide, and as I tried to explain: I have built SCFW locally, for an iMX8QM mek board, and loaded it on my target COM . That stars, and I get SCFW debug console, but....It's not based on sources and the board port by the COM vendor I'm using, and their board..

Combining this build of my SCFW and the U-boot,  it gets flashed/loaded, but,  as I explained, it gets suck somewhere after U-boot loaded kernel into memory and tries to start it .. No further useful info.

Is there something that Linux kernel would be looking at specifically from SCFW at boot time ...?

0 件の賞賛
返信

1,782件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @dry 

Can you share the boot log?

0 件の賞賛
返信

1,780件の閲覧回数
dry
Senior Contributor I

Hi @Zhiming_Liu 

Well the log is ends , as I noted, and "loading kernel....".   

As I wrote,  U-boot loads picks up kernel and devtree, and then tries to run it and that's it nothing more.  Stuck.

I can send screenshot but this is it.

So this happens with with

[  My build of SCFW + U-boot build as came from Yocto distro + Kernel from same distro  ]

where, boot image I package with imx boot tool, and uploaded with uuu . As mentioned, that uploads and boots, except kernel.

Now, original full boot files/image, as comes from Yocto distro, and the binary form build as COM maker provided (the binary SCFW I have, no source for it ...)

[ COM maker build of SCFW + U-boot + Kernel as from Yocto ]

this programs and runs.

 

So, I cannot combine my build of SCFW with rest ...why.

タグ(1)
0 件の賞賛
返信

1,776件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Maybe the kernel image is damaged when you only flash uboot.You can try to upload your boot image and wic roofts together.

0 件の賞賛
返信

1,830件の閲覧回数
dry
Senior Contributor I

@Zhiming_Liu :

Ok, so I need change & build that. I'm into checking it and the docs for it.

 

0 件の賞賛
返信