| 17 | | The following product families support UART: |
| 18 | | * Venice: |
| 19 | | - IMX8M UART |
| 20 | | - Uses Exar SP335EER1-L Transceiver with the following ESD protection: |
| 21 | | - 15kV IEC 61000-4-2 Air Gap Discharge |
| 22 | | - 8kV IEC 61000-4-2 Contact Discharge |
| 23 | | - 15kV Human Body Model (HBM) |
| 24 | | - Up to 4Mbd relative to a 1.875MHz clock with 7 or 8 bit data, 1 or 2 stop, programable parity |
| 25 | | - Note SP33E RS232 transceiver limit is 1Mbd |
| 26 | | - drivers/tty/serial/imx.c |
| 27 | | |
| 37 | | || Catalina || GW920x || UART1 || ttymxc0 || Shared between console: 3.3V TTL and RS232 J16 ^^^1^^^ || |
| 38 | | || || || UART2 || ttymxc1 || RS232 J16 and RS232/RS485(J16) ^^^1^^^ || |
| 39 | | || || || UART3 || ttymxc2 || GPS (optional) || |
| 40 | | || || || UART4 || ttymxc3 || Not used || |
| 41 | | || || || UART5 || ttymxc4 || FSA || |
| 42 | | || || || UART8 || ttymxc7 || 3.3V TTL J19 || |
| | 26 | || Catalina || GW940x || UART1 || ttyLP0 || Shared between console: 3.3V TTL J15 and RS232 J13 ^^^1^^^ || |
| | 27 | || || || UART2 || ttyLP1 || RS232/RS485(J13) ^^^1^^^ || |
| | 28 | || || || UART3 || ttyLP2 || GPS (optional) || |
| | 29 | || || || UART5 || ttyLP4 || FSA2 || |
| | 30 | || || || UART8 || ttyLP5 || 3.3V TTL J17 || |
| | 31 | || || GW920x || UART1 || ttyLP0 || Shared between console: 3.3V TTL J23 and RS232 J16 ^^^1^^^ || |
| | 32 | || || || UART2 || ttyLP1 || RS232 J16 and RS232/RS485(J16) ^^^1^^^ || |
| | 33 | || || || UART3 || ttyLP2 || GPS (optional) || |
| | 34 | || || || UART5 || ttyLP4 || FSA2 || |
| | 35 | || || || UART8 || ttyLP5 || 3.3V TTL J19 || |
| | 369 | [=#catalina] |
| | 370 | === Catalina |
| | 371 | The Catalina GW92xx/GW94xx support the following: |
| | 372 | * 2x RS232 TX/RX (default configuration requiring no dt overlay) |
| | 373 | * 1x RS232 TX/RX/RTS/CTS (uses rs232-rts dt overlay) |
| | 374 | * 1x RS485 (half duplex) (uses rs485 dt overlay) |
| | 375 | * 1x RS422 (full duplex) (uses rs422 dt overlay) |
| | 376 | |
| | 377 | The RS232/RS422/RS485 drivers differ per baseboard: |
| | 378 | * GW9200 uses a [http://dev.gateworks.com/datasheets/sp335e.pdf MaxLinear SP335E] RS-232/RS-485/RS-422 transceiver |
| | 379 | - 15kV IEC 61000-4-2 Air Gap Discharge |
| | 380 | - 8kV IEC 61000-4-2 Contact Discharge |
| | 381 | - 15kV Human Body Model (HBM) |
| | 382 | - Up to 4Mbd relative to a 1.875MHz clock with 7 or 8 bit data, 1 or 2 stop, programable parity |
| | 383 | - Note SP33E RS232 transceiver limit is 1Mbd |
| | 384 | * GW9400 uses a discrete MAX3243E RS232 transceiver, and two SP3078 RS422/RS485 transceivers: |
| | 385 | * !MaxLinear MAX3243E: |
| | 386 | - 15kV IEC 61000-4-2 Air Gap Discharge |
| | 387 | - 8kV IEC 61000-4-2 Contact Discharge |
| | 388 | - 15kV Human Body Model (HBM) |
| | 389 | - 500kbit/s max transmit rate (the IMX95 LPUART has a max rate of 8Mbps) |
| | 390 | * !MaxLinear SP3078E: |
| | 391 | - 15kV IEC 61000-4-2 Air Gap Discharge |
| | 392 | - 8kV IEC 61000-4-2 Contact Discharge |
| | 393 | - 15kV Human Body Model (HBM) |
| | 394 | - 16Mbps max rate (the IMX95 LPUART has a max rate of 8Mbps) |
| | 395 | |
| | 396 | Catalina boards use the IMX95 LPUART. The Linux driver used is drivers/tty/serial/fsl_lpuart.c via CONFIG_SERIAL_FSL_LPUART. |
| | 397 | |
| | 398 | For these boards a device-tree fragment is used to configure the kernel appropriately for the mode you desire if you want something other than the default of 2x RS232 2-wire serial: |
| | 399 | * RS232-full-handshake: |
| | 400 | {{{#!bash |
| | 401 | setenv fdt_overlays "${fdt_base}-rs232-rts.dtb"; saveenv |
| | 402 | }}} |
| | 403 | * RS485 (half duplex): |
| | 404 | {{{#!bash |
| | 405 | setenv fdt_overlays "${fdt_base}-rs485.dtb"; saveenv |
| | 406 | }}} |
| | 407 | * RS422 (full duplex): |
| | 408 | {{{#!bash |
| | 409 | setenv fdt_overlays "${fdt_base}-rs422.dtb"; saveenv |
| | 410 | }}} |
| | 411 | |
| | 412 | If using RS485/RS422 there is on-board 120ohm termination across the differential pairs that can be configured by setting the 'uart_term'. By default this is set high in u-boot but can be altered: |
| | 413 | * uboot: |
| | 414 | {{{#!bash |
| | 415 | gpio clr uart_term # drive low to disable termination |
| | 416 | }}} |
| | 417 | * linux: |
| | 418 | {{{#!bash |
| | 419 | root@catalina:~# gpioget uart_term |
| | 420 | "uart_term"=active |
| | 421 | root@catalina:~# grep uart_term /sys/kernel/debug/gpio |
| | 422 | gpio-11 (uart_term ) |
| | 423 | root@catalina:~# gpioset uart_term=0 & |
| | 424 | [1] 2628 |
| | 425 | root@catalina:~# grep uart_term /sys/kernel/debug/gpio |
| | 426 | gpio-11 (uart_term |gpioset ) out lo |
| | 427 | }}} |
| | 428 | - using gpioset to drive the signal low permanently will not allow reading it back via gpioset because its in-use, but /sys/kernel/debug/gpio will show its state |
| | 429 | - gpioset will drive the signal until the process is terminated so you run it in the background to keep it driven |
| | 430 | |
| | 431 | |