Changes between Initial Version and Version 1 of newport/bootloader

02/08/2018 01:15:54 AM (3 years ago)
Tim Harvey

moved from newport page


  • newport/bootloader

    v1 v1  
     4= Newport U-Boot Bootloader =
     5Gateworks supports the U-Boot Bootloader for the Newport product family. We provide pre-built firmware images (see [wiki:newport#firmware here]) as well as source for building and/or modifying it yourself.
     7One of the primary features of the Bootloader is to provide access to the {{{hwconfig}}} environment variable that the firmware uses for initial board configuration on power-up.
     10== hwconfig ==
     11The U-Boot Bootloader by convention provides a {{{hwconfig}}} environment variable which is used by the boot firmware (before U-Boot is loaded and executed) to configure board options at power-up. These options can include things such as:
     12 * miniPCIe socket functions (ie PCIe vs mSATA vs USB3.0)
     13 * serial configuration (ie RS232 vs RS485)
     16=== hwconfig: miniPCIe Socket Configuration ===
     17Newport board model socket options:
     18 * GW630x:
     19   - J9: PCIe
     20   - J10: PCIe or SATA
     21   - J11: PCIe or USB3.0
     23Note that USB2.0 is routed to all three miniPCIe sockets always but as USB3.0 shares signals with PCIe you must choose between PCIe and USB3 on sockets that support USB3.
     25You can get/set the {{{hwconfig}}} variable within the U-Boot bootloader but you must reboot the board for it to take effect as the variable is acted upon in the Secondary Program Loader (SPL).
     28 * GW630x:
     29  - J10 PCIe, J11 PCIe (default)
     31setenv hwconfig 'j10:pcie;j11:pcie'; saveenv
     33  - J10 mSATA, J11 USB3.0
     35setenv hwconfig 'j10:sata;j11:usb3'; saveenv
     37  - J9/J10 disabled, J11 PCIe
     39setenv hwconfig 'j9:disabled;j10:disabled;j11:pcie'; saveenv
     42'''Note that {{{hwconfig}}} is also used for serial configuration so care should be taken to preserve that configuration if used'''
     45=== hwconfig: serial Configuration ===
     46Many boards in the Newport product family provide a 5-pin off-board serial connector that provides the following options:
     47- 1x RS485 FD (UART2)
     48- 1x RS485 HD (UART2)
     49- 1x RS232 w/ hardware flow control (UART2)
     50- 2x RS232 w/o hardware flow control (UART2/UART3)
     52By default 2x RS232 with no flow control is enabled. To configure a different option use the {{{hwconfig}}} U-Boot env variable. The {{{mode}}} property of the {{{serial}}} option defines the initial configuration of the serial port(s). If RS485 is selected by the {{{mode}}} property the {{{term}}} property will select whether or not on-board termination is enabled.
     54The {{{mode}}} property can have the following values:
     55 * rs232 - 2x RS232 (UART2/UART3) without hardware flow control (default if not specified)
     56 * rs232_dtr - RS232 (UART2) with hardware flow control
     57 * rs485_hd - RS485 half-duplex
     58 * rs485_fd - RS485 full-duplex
     61 * enable RS485 half duplex no on-board termination
     63setenv hwconfig "serial:mode=rs485_hd,term=no"; saveenv
     65 * enable RS485 full duplex with on-board termination
     67setenv hwconfig "serial:mode=rs485_fd,term=yes"; saveenv
     69* enable RS232 with hardware flow-control:
     71setenv hwconfig "serial:mode=rs232_dtr"; saveenv
     75'''Note that {{{hwconfig}}} is also used for serial configuration so care should be taken to preserve that configuration if used'''