Comments (6)
Thanks frank.
The GPIO is supported in current code(dts), but the uart0,1 and 3 are not added in dts, if we need them, please add the following lines to mt7623.dtsi and rebuild the kernel.
uart0: serial@11002000 {
compatible = "mediatek,mt7623-uart",
"mediatek,mt6577-uart";
reg = <0 0x11002000 0 0x400>;
interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART0_SEL>,
<&pericfg CLK_PERI_UART0>;
clock-names = "baud", "bus";
status = "disabled";
};
uart1: serial@11003000 {
compatible = "mediatek,mt7623-uart",
"mediatek,mt6577-uart";
reg = <0 0x11003000 0 0x400>;
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART1_SEL>,
<&pericfg CLK_PERI_UART1>;
clock-names = "baud", "bus";
status = "disabled";
};
uart3: serial@11005000 {
compatible = "mediatek,mt7623-uart",
"mediatek,mt6577-uart";
reg = <0 0x11005000 0 0x400>;
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART3_SEL>,
<&pericfg CLK_PERI_UART3>;
clock-names = "baud", "bus";
status = "disabled";
};
from bpi-r2-bsp.
I'd like to close this ticket, is it okay? @frank-w
from bpi-r2-bsp.
I'd like to enanle at least 1 uart additionally to log-port. Are there Problems if it's enabled?
are the other gpio working?
from bpi-r2-bsp.
All GPIO-s are working fine, there is a script to control GPIO:
SYS_FILE=/sys/devices/platform/1000b000.pinctrl/mt_gpio
mt_gpio_mode()
{
pin=$1
mode=$2
if [ ! -f ${SYS_FILE} ]; then
exit 1
fi
echo "mode $pin
return 0
}
mt_gpio_dir()
{
pin=$1
dir=$2
if [ "x${dir}" == "xout" ]; then
dir_val=1
else
dir_val=0
fi
if [ ! -f ${SYS_FILE} ]; then
exit 1
fi
echo "dir $pin
return 0
}
mt_gpio_out()
{
pin=$1
out=$2
if [ ! -f ${SYS_FILE} ]; then
exit 1
fi
echo "out $pin
return 0
}
mt_gpio_in()
{
pin=$1
if [ ! -f ${SYS_FILE} ]; then
exit 1
fi
echo "start
result=cat ${SYS_FILE} | grep "$1"
if [ "x${result}" == "x" ]; then
echo "can't get $pin status"
exit 2
fi
pin_val=echo ${result} | awk -F ' |-' '{print $5}'
if [ ${pin_val} == "0" ] ; then
return 0
else
return 1
fi
return 0
}
For GPIO22/GPIO23/GPIO24, we need to set EINTx_BOND_DIS to 1.
from bpi-r2-bsp.
Thx for the info,hoping wiringpi will be ported too
is there any Problem,when enabling uart0/1/3?
In your dtsi-code it seems that every uart need 1 SPI-port. On https://bananapi.gitbooks.io/banana-pi-bpi-r2-open-source-smart-router/content/bpi-r2-gpio-pin-define.html i see only 1 uart (which is it) not affecting any other protocol
Regards frank
from bpi-r2-bsp.
looked in shematics (page 19)...Uart1 seems to be the gpio-uart (pin 8+10), uart0 is pin 11+13 ( gpio 17+27 not shown as uart). i have not found uart3 yet
from bpi-r2-bsp.
Related Issues (20)
- MT7623 preloader source code HOT 3
- powerdown not working HOT 9
- GPIO not working HOT 24
- build.sh complete with logging HOT 3
- uart0/1 TX not working HOT 1
- Bug in init of ethernet driver? HOT 3
- is it i2s or i2c? HOT 3
- unable to disable tx-checksum-ipv4 for both eth0 and eth1 HOT 3
- Using 4G module with R2 will occur DNS error in some usage scenarios HOT 2
- dkpg error on Linux Kernel version syntax
- mt6625l using major-device-number from spi
- Environment of u-boot won't save in sd cart when boot from external sd card. HOT 3
- [uboot] uenv.txt is not loaded before display bootmenu
- kernel compilation failed HOT 5
- Kernel compilation failed (configuration multimedia support on module instead of builded in)
- USB3.0 (XHCI) Limited Problem
- GE Port Could not support 10Mb and 100Mb, just only support 1Gb HOT 2
- What's the maximum size for the SD card HOT 2
- Preloader's uboot load size HOT 2
- otg not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bpi-r2-bsp.