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.

[参考译文] AM625:从器件树中启用 UART5

Guru**** 2471920 points


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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1467183/am625-enabling-uart5-from-device-tree

器件型号:AM625

工具与软件:

我使用的是 AM62B-P1入门套件 EVM。 我想启用 UART5:J3 40引脚连接器、其中第8个(E15_TxD)和第10个(C15_RxD)。

k3-am625-sk.dtb:编译到 a.dts 文件并进行如下修改:

pinctrl@f4000 {
引导全部;
Compatible ="ti、am654-padconf"、"pinctrl-single";
REG =<0x00 0xf4000 0x00 0x2ac>;
#pinctrl-cells =<0x01>;
pinctrl-single、register-width =<0x20>;
pinctrl-single、function-mask =<0xffffff>;
interrupts =<0x00 0x62 0x04>;
中断控制器;
#interrupt-Cells =<0x01>;
phandle =<0x1a>;

main-uart0-default-pins{
引导全部;
pinctrl-single、pins =<0x1c8 0x50000 0x1cc 0x10000>;
phandle =<0x19>;
};

main-uart1-default-pins{
bootph-pre-ram;
pinctrl-single、pins =<0x194 0x50002 0x198 0x10002 0x1ac 0x50002 0x1b0 0x10002>;
phandle =<0x1b>;
};

MAIN_uart5_DEFAULT_PINS:MAIN-uart5-DEFAULT-PINS{
引导全部;
pinctrl-single、pins =<0x1d8 0x50002 0x1dc 0x10002>;
phandle =<0xdf>;
};
...
串行@2850000{
Compatible ="ti、am64-uart"、"ti、am654-uart";
REG =<0x00 0x2850000 0x00 0x100>;
Interrupts =<0x00 0xb7 0x04>;
电源域=<0x02 0x9C 0x01>;
Clocks =<0x03 0x9C 0x00>;
时钟名称="fclk";
状态="正常";
pinctrl-names ="默认值";
pinctrl-0 =<&MAIN_UART5_DEFAULT_PINS>;
phandle =<0x84>;
};
...
别名{
SERIAL2 ="/bus@f0000/serial@2800000";
serial5 ="/bus@f0000/serial@2850000";
mmc0 ="/bus@f0000/mmc@fa10000";
mmc1 ="/bus@f0000/mmc@fa00000";
mmc2 ="/bus@f0000/mmc@fa20000";
spi0 ="/bus@f0000/bus@fc0000000/spi@fc40000";
Ethernet0 ="/bus@f0000/Ethernet@8000000/Ethernet-ports/port@1";
Ethernet1 ="/bus@f0000/Ethernet@8000000/Ethernet-ports/port@2";
USB0 ="/bus@f0000/Dwc3-usb@f900000/usb@31000000";
USB1 ="/bus@f0000/Dwc3-usb@f910000/usb@31100000";
};

我得到了

root@am62xx-evm:/boot/dtb/ti dmesg | grep ttyS5
[ 1.435909] 2850000.serial: ttyS5在 MMIO 0x2850000 (IRQ = 240、BASE_BAUD = 3000000)上是8250
root@am62xx-evm:/boot/dtb/ti echo "hello">/dev/ttyS5
root@am62xx-evm:/boot/dtb/ti echo "hello">/dev/ttyS2
你好
root@am62xx-evm:/boot/dtb/ti


我已经物理地短接了8和10个引脚并进行了回波测试、但没有返回任何结果。 我不是很清楚问题是什么。 我看到 UART5在开启、但当我进行环回测试时、它无法使用不同的 波特率。


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

    在此基础上、我已将 MUX_MODE 设置为0x50001和0x10001、并且还尝试了所有其他选项、但仍然相同;无回波。

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

    尊敬的 FNU:

    基于此、我已将 Mux_mode 设置为0x50001和0x10001、

    更改为模式1后、devicetre 中的 Pinmux 会是什么?

    请附上完整的 Linux 启动日志。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    root@am62xx-evm:/boot/dtb/ti echo "hello">/dev/ttyS5
    root@am62xx-evm:/boot/dtb/ti echo "hello">/dev/ttyS2
    你好
    root@am62xx-evm:/boot/dtb/ti #

    我也不理解环路测试是什么。 请解释一下。