Changes between Version 41 and Version 42 of serial


Ignore:
Timestamp:
11/12/2026 10:28:00 PM (3 hours ago)
Author:
Tim Harvey
Comment:

add gw9400 details and update catalina rs485/rs422

Legend:

Unmodified
Added
Removed
Modified
  • serial

    v41 v42  
    1515[=#hardware]
    1616== Hardware Support
    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 
    2817
    2918See [#notes below] for more product-specific details
    … …  
    3524The following table describes the various on-board UARTs for standard Gateworks products. Please consult the board specific hardware user manual for additional details:
    3625||= Family =||= Board =||= HW Dev =|| SW Dev =||= Function         =||
    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 ||
    4336|| VeniceFLEX  || GW810x || UART1    || ttymxc0 || GPS (optional), J6 TTL optional, requires hardware mod resistors ||
    4437||          ||         || UART2    || ttymxc1 || Shared between console: 3.3V TTL and RS232 J9 ^^^1^^^ ||
    … …  
    239232The following table and sections below provides per-board details of RS485:
    240233||= Family  =||= Board                 =||= TXEN  =||= Transceiver =||= Termination =||= Fail-Safe Bias =||= Notes =||
    241 || Catalina    || GW920x   || RTS  || [https://www.exar.com/ds/sp335e.pdf SP335E] || software selectable via 'rs485_term' gpio || included || TIOCSRS485 support ||
     234|| Catalina    || GW940x   || RTS  || MAX3243E/SP3078E || software config via 'rs485_term' gpio || included || TIOCSRS485 support ||
     235||             || GW920x   || RTS  || [https://www.exar.com/ds/sp335e.pdf SP335E] || software config via 'rs485_term' gpio || included || TIOCSRS485 support ||
    242236|| Venice    || GW720x / GW730x / GW740x    || RTS  || [https://www.exar.com/ds/sp335e.pdf SP335E] || software selectable via 'rs485_term' gpio || included || TIOCSRS485 support ||
    243237|| ||
    … …  
    281275
    282276
    283 [=#venice-rs485]
     277=== Catalina
     278Software can enable RS485 at boot via device-tree.
     279
     280See [#catalina below]
     281
     282
    284283=== Venice
    285 
    286 Software must enable RS485 at boot via device-tree.
     284Software can enable RS485 at boot via device-tree.
    287285
    288286See [#venice below]
    289 
    290 
    291 
    292 
    293287
    294288
    … …  
    301295Code Examples:
    302296 * ANSI-C:
    303  * '''Note the below code is not required for Venice, as it is handled in the device tree'''
     297 * '''Note the below code is not required for Catalina / Venice, as it is handled in the device tree'''
    304298{{{#!c
    305299        #include <linux/serial.h>
    … …  
    373367
    374368
     369[=#catalina]
     370=== Catalina
     371The 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
     377The 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
     396Catalina boards use the IMX95 LPUART. The Linux driver used is drivers/tty/serial/fsl_lpuart.c via CONFIG_SERIAL_FSL_LPUART.
     397
     398For 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
     401setenv fdt_overlays "${fdt_base}-rs232-rts.dtb"; saveenv
     402}}}
     403 * RS485 (half duplex):
     404{{{#!bash
     405setenv fdt_overlays "${fdt_base}-rs485.dtb"; saveenv
     406}}}
     407 * RS422 (full duplex):
     408{{{#!bash
     409setenv fdt_overlays "${fdt_base}-rs422.dtb"; saveenv
     410}}}
     411
     412If 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
     415gpio clr uart_term # drive low to disable termination
     416}}}
     417 * linux:
     418{{{#!bash
     419root@catalina:~# gpioget uart_term
     420"uart_term"=active
     421root@catalina:~# grep uart_term /sys/kernel/debug/gpio
     422 gpio-11  (uart_term           )
     423root@catalina:~# gpioset uart_term=0 &
     424[1] 2628
     425root@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
    375432[=#venice]
    376433=== Venice
     434Venice boards use the IMX8M_UART. The Linux driver used is drivers/tty/serial/imx.c via CONFIG_SERIAL_IMX.
     435
    377436Most Venice products have a flexible [http://dev.gateworks.com/datasheets/sp335e.pdf MaxLinear SP335E] RS-232/RS-485/RS-422 transceiver which is software configurable. For these boards a device-tree fragment is used to configure the kernel appropriately for the mode you desire:
    378437 * 2x RS232 TX/RX (default configuration requiring no dt overlay)
    … …  
    380439 * 1x RS485 (half duplex) (uses rs485 dt overlay)
    381440 * 1x RS422 (full duplex) (uses rs422 dt overlay)
     441
     442SP335 transceiver details:
     443 - 15kV IEC 61000-4-2 Air Gap Discharge
     444 - 8kV IEC 61000-4-2 Contact Discharge
     445 - 15kV Human Body Model (HBM)
     446 - Up to 4Mbd relative to a 1.875MHz clock with 7 or 8 bit data, 1 or 2 stop, programable parity
     447 - Note SP33E RS232 transceiver limit is 1Mbd (the IMX8M UART has a max rate of 4Mbps)
    382448
    383449''' WARNING ''' Some Venice models such as the GW73xx have the default Linux serial console being output to the same UART that a RS485 might be using. Thus, it is critical to disable the Linux serial console with the console variable in u-boot. Please note that when doing this, it is critical to first enable something like ssh to access the board over the network.