RT5350 openwrt將ttyS1修改為控制埠,ttyS0為普通串列埠
預設的rt5350.dtsi配置檔案是將擴充套件串列埠ttyS1狀態給禁用的,需要把狀態改為okey,如下:
[email protected] {
compatible = "ralink,rt5350-uart", "ralink,rt2880-uart",
"ns16550a";
reg = <0x500 0x100>;
resets = <&rstctrl 12>;
reset-names = "uart";
interrupt-parent = <&intc>;
interrupts = <5>;
reg-shift = <2>;
pinctrl-names = "default";
pinctrl-0 = <&uartf_pins>;
status = "okay"; //由"disabled"改為"okay"
};
2、將rt5350.dtsi檔案的除錯串列埠改為ttyS1,具體如下:
chosen {
bootargs = "console=ttyS1,57600"; //將ttyS0改為ttyS1
};
3、修改openwrt/trunk/target/linux/ramips/dts/MPRA2.dts這個配置檔案:
預設MPRA2.dts這個配置檔案將擴充套件串列埠ttyS1的相應引腳設定為GPIO模式了,需要更改為串列埠模式。
把設定中GPIO模式下的uartf去掉,如下:
pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "i2c", "jtag", "rgmii", "mdio"; //
將"uartf"去掉
ralink,function = "gpio";
};
};
};