diff options
author | Edoardo Scaglia <edoardo.87@gmail.com> | 2019-02-01 16:43:46 +0100 |
---|---|---|
committer | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2019-02-08 17:27:47 +0100 |
commit | 077253dd666a30ae5231c3748222d4b5b138593d (patch) | |
tree | f0641d5b445ad56e09121cb030507528b636e99e /target/linux | |
parent | 07e6ce4606474643cf4e8fee355b9126eb55c962 (diff) | |
download | openwrt-077253dd666a30ae5231c3748222d4b5b138593d.tar.gz openwrt-077253dd666a30ae5231c3748222d4b5b138593d.tar.bz2 openwrt-077253dd666a30ae5231c3748222d4b5b138593d.zip |
ar71xx: fix Arduino Yun enabling of level shifters outputs
As show in Arduino Yun schematic [1] GPIO 21 and 22 are connected to
output enable pin (OE) of two NTB01xx level shifters.
NTB01xx datasheets [2] [3] states that OE pin are active-high
therefore we should initialize GPIO 21 (DS_GPIO_OE) and GPIO 22
(DS_GPIO_OE2) accordingly to actually enable level shifters outputs.
[1] https://www.arduino.cc/en/uploads/Main/arduino-Yun-schematic.pdf
[2] https://www.nxp.com/docs/en/data-sheet/NTB0102.pdf
[3] https://www.nxp.com/docs/en/data-sheet/NTB0104.pdf
Signed-off-by: Edoardo Scaglia <edoardo.87@gmail.com>
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c index 5873248edf..e92f68f490 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c @@ -141,7 +141,7 @@ static void __init ds_setup(void) // enable OE of level shifter if (gpio_request_one(DS_GPIO_OE, - GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED, "OE-1") != 0) + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, "OE-1") != 0) printk("Error setting GPIO OE\n"); if (gpio_request_one(DS_GPIO_UART_ENA, @@ -150,7 +150,7 @@ static void __init ds_setup(void) // enable OE of level shifter if (gpio_request_one(DS_GPIO_OE2, - GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED, "OE-2") != 0) + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, "OE-2") != 0) printk("Error setting GPIO OE2\n"); } |