This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] PROCESSOR-SDK-AM335X:PRU-ICSS 未生成接收中断

Guru**** 633805 points
Other Parts Discussed in Thread: AM3357
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1100875/processor-sdk-am335x-no-receive-interrupt-generated-by-the-pru-icss

器件型号:PROCESSOR-SDK-AM335X
主题中讨论的其他器件:AM3357

您好!

基于 BeagleBone 和 Sitara AM3357的定制板有问题。
此问题涉及配置为双 EMAC 模式(2个附加以太网接口)的 PRU。

到目前为止、我的主板已与此 Linux 内核5.4完美配合:

分支:5.4

内核5.4的设备树如下所示:

#include "am33xx.dtsi"

	/* Dual mac ethernet application node on icss */
	pruss_eth {
		compatible = "ti,am3359-prueth";
		prus = <&pru0>, <&pru1>;
		firmware-name = "ti-pruss/am335x-pru0-prueth-fw.elf",
				"ti-pruss/am335x-pru1-prueth-fw.elf";
		sram = <&ocmcram>;
		interrupt-parent = <&pruss_intc>;
		syscon = <&scm_conf>;
		mii-rt = <&pruss_mii_rt>;
		iep = <&pruss_iep>;
		pinctrl-names = "default";
		pinctrl-0 = <&pruss_eth_default>;

		pruss_emac0: mii0 {
			phy-handle = <&pruss_eth0_phy>;
			phy-mode = "mii";
			interrupts = <20>, <22>;
			interrupt-names = "rx", "tx";
			// Filled in by cm macid
			local-mac-address = [00 00 00 00 00 00];
		};
		pruss_emac1: mii1 {
			phy-handle = <&pruss_eth1_phy>;
			phy-mode = "mii";
			interrupts = <21>, <23>;
			interrupt-names = "rx", "tx";
			// Filled in by cm macid
			local-mac-address = [00 00 00 00 00 00];
		};
	};

我必须将 Linux 内核升级到分支5.10
因此、我只需使用分支5.10而不是5.4来升级内核。
我还按如下方式调整了器件树:

#include "am33xx.dtsi"

	/* Dual mac ethernet application node on icss */
	pruss_eth {
		compatible = "ti,am3359-prueth";
		ti,prus = <&pru0>, <&pru1>;
		sram = <&ocmcram>;
		interrupt-parent = <&pruss_intc>;
		syscon = <&scm_conf>;
		mii-rt = <&pruss_mii_rt>;
		iep = <&pruss_iep>;
		pinctrl-names = "default";
		pinctrl-0 = <&pruss_eth_default>;

		pruss_emac0: mii0 {
			phy-handle = <&pruss_eth0_phy>;
			phy-mode = "mii";
			interrupts = <20 2 2>;
			interrupt-names = "rx";
			// Filled in by cm macid
			local-mac-address = [00 00 00 00 00 00];
		};
		pruss_emac1: mii1 {
			phy-handle = <&pruss_eth1_phy>;
			phy-mode = "mii";
			interrupts = <21 3 3>;
			interrupt-names = "rx";
			// Filled in by cm macid
			local-mac-address = [00 00 00 00 00 00];
		};
	};

该主板现在使用此内核5.10 (5.10.109-ti-r45)进行引导。 PRU 似乎已正确加载:

[    5.423003] remoteproc remoteproc0: 4a334000.pru is available
[    5.430454] remoteproc remoteproc1: 4a338000.pru is available
[    5.495547] davinci_mdio 4a332400.mdio: phy[1]: device 4a332400.mdio:01, driver TI DP83822
[    5.503927] davinci_mdio 4a332400.mdio: phy[3]: device 4a332400.mdio:03, driver TI DP83822
[    5.515831] prueth pruss_eth: could not get ptp tx irq. Skipping PTP support
[    5.522987] prueth pruss_eth: could not get hsr ptp tx irq. Skipping PTP support
[    5.530595] prueth pruss_eth: port 1: CM MAC addr: 0c:1c:57:f6:24:c1
[    5.571619] prueth pruss_eth: could not get ptp tx irq. Skipping PTP support
[    5.578758] prueth pruss_eth: could not get hsr ptp tx irq. Skipping PTP support
[    5.586404] prueth pruss_eth: port 2: CM MAC addr: 0c:1c:57:f6:24:c2
[    5.622686] prueth pruss_eth: TI PRU ethernet driver initialized: dual EMAC mode
[    8.365810] remoteproc remoteproc0: powering up 4a334000.pru
[    8.410743] remoteproc remoteproc0: Booting fw image ti-pruss/am335x-pru0-prueth-fw.elf, size 7432
[    8.480460] remoteproc remoteproc0: unsupported resource 5
[    8.535570] remoteproc remoteproc0: remote processor 4a334000.pru is now up
[    8.624477] net ethernet-mii0: started
[    9.051609] remoteproc remoteproc1: powering up 4a338000.pru
[    9.156561] remoteproc remoteproc1: Booting fw image ti-pruss/am335x-pru1-prueth-fw.elf, size 7344
[    9.221244] remoteproc remoteproc1: unsupported resource 5
[    9.285041] remoteproc remoteproc1: remote processor 4a338000.pru is now up
[    9.381515] net ethernet-mii1: started

在这两个以太网接口中的一个接口上启动 DHCP 客户端时、我的 DHCP 服务器会收到 DHCP 发现请求并发回 DHCP 服务。 这意味着发送按预期工作。
但我没有收到来自 PRU 的任何中断:
myname@myhost:~$ cat /proc/interrupts
CPU0

 63:          0  pruss-intc  20 Level     mii0
 64:          0  pruss-intc  21 Level     mii1

这意味着 PRU 不会对 IP 通信进行捕捉。
问题是:
是否有人已经使用 BeagleBone 中的内核5.10成功配置了以太网模式的 PRU
存储库?

非常感谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    已使用最新 SDK 修复!
    PROCESSOR-SDK-LINUX-AM335X
    版本:08.02.00.24发布日期:2022年5月19日

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Laurent、

    对延迟答复表示歉意。 很高兴听到 AM335x SDK 8.2 (为未来的读者构建于 Linux 内核5.10上)解决了这个问题! 感谢您对解决方案的响应。

    供参考、一般而言、我们只能在这些论坛上支持 TI 软件版本。 如果对其他组的软件版本有疑问(例如、BeagleBone 社区围绕 PRU 进行了大量出色的工作)、您将获得这些组的更好支持。

    此致、
    Nick