mt7620a expand serial port
There are two files to be modified:
mt7620a.dtsi
h1>
Enter /home/ihid/chaos_calmer/target/linux/ramips/dts/mt7620a.dtsi
pinctrl {
state_default: pinctrl0 {
< br /> gpio {
ralink,group ="i2c","uartf";
ralink,function ="gpio";
} ;
};
};
Remove uartf.
MT7620a.dtsi
Enter /home/ihid/chaos_calmer/target/linux/ramips/dts/MT7620a.dtsi
< pre>chosen {
bootargs =”console=ttyS0,57600″;
};
Change this ttyS0 to ttyS1 because of the serial port driver After getting up, ttyS0 is used to expand the serial port. Select ttyS0 when opening the serial port
[email protected] {
compatible ="ralink,mt7620a-uart","ralink,rt2880-uart", "ns16550a";
reg = <0x500 0x100>;
resets = <&rstctrl12>;
reset-names ="uart";
interrupt-parent =<&intc>;
interrupts = <5>;
reg-shift = <2>;
status ="disabled";
status= “disabled”; Change to:
pinctrl-names = "default";
pinctrl-0 = <&uartf_gpio_pins>;
status = "ok";
< p> That is, comment out or delete the sentence status = “disabled”;, plus the sentence that the default serial port driver is not loaded.
pcm_i2s_pins: pcm_i2s {
pcm_i2s {
ralink,group ="uartf";
ralink,function =" pcm i2s";
};
};
uartf_gpio_pins: uartf_gpio {
uartf_gpio {
ralink,group ="uartf";
ralink,function ="gpio uartf";
};
here ralink, The value of function is changed to uartf.