MT7688/28 Set 3 serial port

Source: Internet
Author: User

Original http://blog.chinaunix.net/uid-22547469-id-5091963.html

Category: LINUX

Need to clean up the idea of the solution.
Background: Dragon Boat Festival, did not go home, the object to go to class, leaving me on the nest Room drive, in fact, can go out to stroll Park.
Let's talk about the system environment: VirtualBox, Ubuntu15.04@64bit
OpenWrt version: Chaos calmer 15.05-rc2
Hardware board: MT7688,64MB DDR2,8MB SPI FLASH, a treasure LH7688
The problem solved: MT7688 The remaining two serial port can not communicate, the other UART2 port is still in analog pad mode.
Not to be continued ....
All right, take some time to replenish the whole.
The first step is to change DTS because the default Mt7628an.dts is missing Uart1 and uart2 configurations.

The second step is to increase the Pinctrl information.

Step three, modify arch/mips/ralink/mt7620.c
First of all, see Perst,wdt are wrong, by the way change them.

Prom_soc_init,add This code to fix Agpio_mode: (otherwise uart2 or network level)

After this change, the net mouth only left Lan0, personal feel not enough, and not to do the router.
Step fourth, modify the file drivers/pinctrl/pinmux_rt2880.c
Analysis
Line317,pinmux_map_to_setting,group is a group of each pin that is pinmux registered, and Groups[i] is all the PIN group groups that can be seen in mt7620.c. Here to match, that is, polling again, but there is a problem, Num_groups has been passed in 1, which led to 357 lines for the loop always loop. The problem is that the get_function_groups function is num_groups.
So what's really going to change is drivers/pinctrl/pinmux-rt2880.c.

Why change to 15, because MT7620.C saw 15 groups.
By the way, the last serious problem, please make kernel_menuconfig find device Drivers---->character devices----->serial Drivers--->number of 8250/16550 serial ports to register at runtime. Changed from 2 to 3. Next, 3 serial ports are up.
By the way, the last serious problem, please make kernel_menuconfig find device Drivers---->character devices----->serial Drivers--->number of 8250/16550 serial ports to register at runtime. Changed from 2 to 3. After this modification, the 3 serial ports are up.

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.