Firefly开源社区
标题:
RK3308内核使能串口1后PC给它发送数据会echo回传,板子给PC发数据正常,求指点
[打印本页]
作者:
luffycheung
时间:
2019-10-31 10:25
标题:
RK3308内核使能串口1后PC给它发送数据会echo回传,板子给PC发数据正常,求指点
使能uart1在板级DTS文件rk3308-roc-cc-dmic-pdm_emmc.dts里添加以下代码:
&fiq_debugger {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&uart2m0_xfer>;
};
&uart1 {
status = "okay";
};
复制代码
编译下载后内核打印错误信息如下:
[ 0.381267] Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled
[ 0.383212] rockchip-pinctrl pinctrl: pin gpio1-22 already requested by fiq-debugger; cannot claim for ff0b0000.serial
[ 0.383250] rockchip-pinctrl pinctrl: pin-54 (ff0b0000.serial) status -22
[ 0.383268] rockchip-pinctrl pinctrl: could not request pin 54 (gpio1-22) from group uart1-cts on device rockchip-pinctrl
[ 0.383283] dw-apb-uart ff0b0000.serial: Error applying setting, reverse things back
[ 0.383719] ff0b0000.serial: ttyS1 at MMIO 0xff0b0000 (irq = 12, base_baud = 5078125) is a 16550A
[ 0.384785] ff0e0000.serial: ttyS4 at MMIO 0xff0e0000 (irq = 13, base_baud = 5078125) is a 16550A
[ 0.386688] [drm] Initialized drm 1.1.0 20060810
复制代码
UART SDK文档里说:
设备正常注册就是以上log,如果pinctrl跟其他驱动有冲突的话,会报pinctrl配置失败的log。
我这有冲突的话,该怎么修改呢,求解答
作者:
luffycheung
时间:
2019-10-31 13:49
本帖最后由 luffycheung 于 2019-10-31 13:50 编辑
已解决。
打印pinctr错误--> uart1需要重写pinctrl选项,去掉cts和rts。
echo回传现象 --> 由于rk3308终端下执行了cat /dev/ttyS1命令所至。重启rk3308后pc串口软件下发数据正常。
最终dts配置如下,也使能了uart0:
&fiq_debugger {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&uart2m0_xfer>;
};
&uart0 {
status = "okay";
};
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_xfer>;
status = "okay";
};
复制代码
欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/)
Powered by Discuz! X3.1