模块: EC20CEFAG
芯片: MDM9607
linux version:
Linux mdm9607-perf 3.18.20 #1 PREEMPT Wed Oct 10 14:47:50 CST 2018 armv7l GNU/Linux
前提摘要:有个TBOX客户,在使用串口接收车机端can数据的时候,发现串口接收数据老是出错。波特率是460800,已经是很高的速率了,但是还是不够,最后把串口改成高速串口解决了这个问题。
修改说明:
1.修改文件mdm9607.dtsi,如下:
将下面:
blsp1_uart2: serial@78b0000 {
compatible = "qcom,msm-lsuart-v14";
reg = <0x78b0000 0x200>;
interrupts = <0 108 0>;
clock-names = "core_clk", "iface_clk";
clocks = <&clock_gcc clk_gcc_blsp1_uart2_apps_clk>,
<&clock_gcc clk_gcc_blsp1_ahb_clk>;
qcom,msm-bus,name = "blsp1_uart2";
qcom,msm-bus,num-cases = <2>;
qcom,msm-bus,num-paths = <1>;
qcom,msm-bus,vectors-KBps =
<86 512 0 0>,
<86 512 500 800>;
status = "ok";
}
改为:
blsp1_uart2: uart@78b0000 {
compatible = "qcom,msm-hsuart-v14";
reg = <0x78b0000 0x200>,
<0x7884000 0x2b000>;
reg-names = "core_mem", "bam_mem";
interrupt-names = "core_irq", "bam_irq";
#address-cells = <0>;
interrupt-parent = <&blsp1_uart2>;
interrupts = <0 1>;
#interrupt-cells = <1>;
interrupt-map-mask = <0xffffffff>;
interrupt-map = <0 &intc 0 108 0
1 &intc 0 238 0>;
qcom,bam-tx-ep-pipe-index = <2>;
qcom,bam-rx-ep-pipe-index = <3>;
qcom,master-id = <86>;
clock-names = "core_clk", "iface_clk";
clocks = <&clock_gcc clk_gcc_blsp1_uart2_apps_clk>,
<&clock_gcc clk_gcc_blsp1_ahb_clk>;
pinctrl-names = "sleep", "default";
pinctrl-0 = <&blsp1_uart2_sleep>;
pinctrl-1 = <&blsp1_uart2_active>;
qcom,msm-bus,name = "blsp1_uart2";
qcom,msm-bus,num-cases = <2>;
qcom,msm-bus,num-paths = <1>;
qcom,msm-bus,vectors-KBps =
<86 512 0 0>,
<86 512 500 800>;
status = "ok";
};
2.修改文件mdm9607-mtp.dtsi,如下:
将下面:
&blsp1_uart2 {
status = "ok"; //if need, user can enable by themselves
pinctrl-names ="sleep", "default";
pinctrl-0 = <&blsp1_uart2_sleep>;
pinctrl-1 = <&blsp1_uart2_active>;
};
改为:
&blsp1_uart2 {
status = "ok"; //if need, user can enable by themselves
};
3.修改文件mdm9607.dtsi,添加如下语句:
aliases {
/* smdtty devices */
smd7 = &smdtty_data1;
smd8 = &smdtty_data4;
smd9 = &smdtty_data2;
/*smd11 = &smdtty_data11;*/ /*modified by max.tang@20160118. del Data11 from APP to be used by second USB AT port*/
smd21 = &smdtty_data21;
smd36 = &smdtty_loopback;
+ /* uart device */
+ uart0 = &blsp1_uart3; //main uart
+ uart1 = &blsp1_uart2;
/* spi device */
/*spi1 = &spi_1;*///2016-01-19, comment out by jun.wu, remove spi from device tree
spi6 = &spi_6;
i2c2 = &i2c_2;
i2c4 = &i2c_4; //add zahi.song
sdhc2 = &sdhc_2; /* SDC2 SD card slot */
};
注意:修改完后, blsp1_uart2 对应的设备是/dev/ttyHS1