OpenWRT (RT5350) enables two serial ports

Source: Internet
Author: User

OpenWRT (RT5350) By default enables a serial port (Uartlite), as the console port, another serial port (UARTF) and Gpio multiplexing.

In the process of finding data, it was found that the concept of device tree was used in the new kernel, and DTS files were used to describe all the resources of the Soc.

For the RT5350 platform, there are several system-related configuration files:

1, ~/openwrt/build_dir/target-mispel_24kec+dsp_musl-1.1.10/linux-ramips_rt305x/linux-3.10.49/arch/mips/ralink/ Rt305x.c

2, ~/openwrt/build_dir/target-mispel_24kec+dsp_musl-1.1.10/linux-ramips_rt305x/linux-3.10.49/drivers/pinctrl/ Pinctrl-rt2880.c

3, ~/openwrt/target/linux/ramips/dts/rt5350.dtsi

4, ~/openwrt/target/linux/ramips/dts/mpra2.dts

Two C files are mainly for the hardware platform related interface register definition, and the DTS file is closely related to the addition of debugging information is tracked, do not need to modify.

Two DTS files are mainly on the interface configuration, such as the system start output serial port settings, Gpio port, SPI,I2C interface settings;

The following begins to configure the serial port to enable two serial ports: (Key modification in two DTS files)

1, Mpra2.dts will state_default from the following content:

Gpio {ralink,group = "i²c", "Jtag", "Rgmii", "Mdio", "uartf"; ralink,function = "Gpio";};

Modified to:

Gpio {ralink,group = "i²c", "Jtag", "Rgmii", "mdio"; ralink,function = "Gpio";}; uartf {ralink,group = "uartf"; ralink,function = "Gpio uartf";};

2. Comment out all the contents of the last Gpio_export of the file in Mpra2.dts.

3, Rt5350.dtsi need to modify Bootargs so that Uartlite still as the console:

(Before opening uartf, Uartlite for ttyS0 as the console, after opening the uartf, Uartf becomes ttys0,uartlite into ttyS1)

chosen {Bootargs = "console=ttys1,57600";};

4, Rt5350.dtsi release [email protected] Status = "disabled";

Status = "Disabled";

At this point, two serial ports enable to complete!

OpenWRT (RT5350) enables two serial ports

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.