Hi everybody!
We have an application that uses RS-485 and we decided to use the OMAP UART implementation, but it doesn't seems to work with Cubieboard A10. We tried to enable in userspace, by calling ioctl and also via dts file.
ioctl (C code):
------------------------
...
if (ioctl (fd, TIOCGRS485, &rs485conf) < 0) { printf("Error: TIOCGRS485 ioctl not supported.\n"); }
/* Enable RS-485 mode: */ rs485conf.flags |= SER_RS485_ENABLED; /* Set rts/txen delay before send, if needed: (in microseconds) */ rs485conf.delay_rts_before_send = 0; /* Set rts/txen delay after send, if needed: (in microseconds) */ rs485conf.delay_rts_after_send = 0; if (ioctl (fd, TIOCSRS485, &rs485conf) < 0) { printf("Error: TIOCSRS485 ioctl not supported.\n"); <---------- Always get this error message! }
...
dts file:
-----
serial@01c28c00 { compatible = "snps,dw-apb-uart"; reg = <0x1c28c00 0x400>; interrupts = <0x4>; reg-shift = <0x2>; reg-io-width = <0x4>; clocks = <0x30 0x13>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&uart3_pins>;
/* No extra delay after/before transmissions */
rs485-rts-delay = <0 0>;
/* GPIO pin PG8 for data direction */
rts-gpio = <0xC8>;
/* Enable RS-485 */
linux,rs485-enabled-at-boot-time;
};
Does anyone knows what could be wrong or if the Cubie doesn't support this feature ?
Thank you,
Bruna