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>
// enable OE of level shifter
if (gpio_request_one(DS_GPIO_OE,
// 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,
printk("Error setting GPIO OE\n");
if (gpio_request_one(DS_GPIO_UART_ENA,
// enable OE of level shifter
if (gpio_request_one(DS_GPIO_OE2,
// 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");
}
printk("Error setting GPIO OE2\n");
}