Changes between Initial Version and Version 1 of newport/bootloader


Ignore:
Timestamp:
02/08/2018 01:15:54 AM (6 years ago)
Author:
Tim Harvey
Comment:

moved from newport page

Legend:

Unmodified
Added
Removed
Modified
  • newport/bootloader

    v1 v1  
     1[[PageOutline]]
     2
     3[=#bootloader]
     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.
     6
     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.
     8
     9[=#hwconfig]
     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)
     14
     15[=#socketconfig]
     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
     22
     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.
     24
     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).
     26
     27Examples:
     28 * GW630x:
     29  - J10 PCIe, J11 PCIe (default)
     30{{{#!bash
     31setenv hwconfig 'j10:pcie;j11:pcie'; saveenv
     32}}}
     33  - J10 mSATA, J11 USB3.0
     34{{{#!bash
     35setenv hwconfig 'j10:sata;j11:usb3'; saveenv
     36}}}
     37  - J9/J10 disabled, J11 PCIe
     38{{{#!bash
     39setenv hwconfig 'j9:disabled;j10:disabled;j11:pcie'; saveenv
     40}}}
     41
     42'''Note that {{{hwconfig}}} is also used for serial configuration so care should be taken to preserve that configuration if used'''
     43
     44[=#serialconfig]
     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)
     51
     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.
     53
     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
     59
     60Examples:
     61 * enable RS485 half duplex no on-board termination
     62{{{#!bash
     63setenv hwconfig "serial:mode=rs485_hd,term=no"; saveenv
     64}}}
     65 * enable RS485 full duplex with on-board termination
     66{{{#!bash
     67setenv hwconfig "serial:mode=rs485_fd,term=yes"; saveenv
     68}}}
     69* enable RS232 with hardware flow-control:
     70{{{#!bash
     71setenv hwconfig "serial:mode=rs232_dtr"; saveenv
     72}}}
     73
     74
     75'''Note that {{{hwconfig}}} is also used for serial configuration so care should be taken to preserve that configuration if used'''