Changes between Version 130 and Version 131 of gsc


Ignore:
Timestamp:
10/10/2025 04:01:59 PM (4 days ago)
Author:
Tim Harvey
Comment:

updates the gsc firmware update section; cleanup, and provide instructions on unbinding Linux drivers prior to using gsc_update

Legend:

Unmodified
Added
Removed
Modified
  • gsc

    v130 v131  
    13821382[=#firmware]
    13831383= GSC Updates =
    1384 From time to time, there may be updates to this firmware in order to provide new features.
     1384From time to time, there may be updates to this firmware in order to provide new features or fixes.
    13851385
    13861386GSC Firmware Downloads:
    13871387 * [http://dev.gateworks.com/venice/images Venice Product Family]
    1388   * GW71xx-0x board, GW72xx-0x board, GW73xx-0x board uses gsc_7000.txt
    1389   * GW71xx-2x board, GW72xx-2x board, GW73xx-2x board uses gsc_7020.txt
     1388  * [https://dev.gateworks.com/venice/images/gsc_7000.txt gsc_70xx.txt] for boards with a SoM (GW71xx, GW72xx, GW73xx, GW75xx_ use
     1389  * [https://dev.gateworks.com/venice/images/gsc_7400.txt gsc_740x.txt] for GW740x
    13901390 * [http://dev.gateworks.com/newport/images Newport Product Family]
    13911391 * [http://dev.gateworks.com/ventana/images Ventana Product Family]
    13921392
    13931393There are two options for updating the GSC firmware:
    1394  * Option 1 (Preferred and Recommended): JTAG from a host Linux PC via the Linux jtag_usb application found [http://dev.gateworks.com/jtag here]:
    1395   * JTAG in it's entirety is explained [wiki:jtag_instructions here]
    1396   * '''Note''' Virtual Machines, or VMs are known to have issues using the jtag_usb tool / software
    1397   * '''All Venice boards using the i.MX8M Plus processor need a USB cable plugged in between the SBC and the host system. This is in addition the the GW16099 JTAG Dongle'
    1398 {{{
    1399 #!bash
    1400 jtag_usbv4 -m <firmware.txt>  ;# update GSC firmware image
    1401 jtag_usbv4 -x <firmware.txt>  ;# verify GSC firmware image
    1402 }}}
    1403 
    1404  * Option 2 (note, option 1 is preferred): Linux running on the target board using the {{{gsc_update}}} application which is present in the various Gateworks BSP's (source [https://github.com/Gateworks/gsc_update here])
    1405   * Note, this update could take several minutes, do not allow power loss during this time
    1406   * Note, please reboot the board after the flashing is complete
    1407   * NOTE: This command will likely spew pca953x 0-0023: failed reading register: -6 messages, ignore these messages and let the programming complete. Do not cut power until command is finished.
    1408 {{{
    1409 #!bash
     1394 * [#jtag via JTAG]
     1395 * [#gsc_update gsc_update userspace application] (running on Gateworks board at runtime under a Linux OS)
     1396
     1397Important notes:
     1398 * '''both programming methods are not able to verify the firmware image is appropriate for your board; take care to select the correct image'''
     1399 * '''Any failure to program, or programming the wrong firmware could result in your board not booting and require reprogramming via [#jtag JTAG]'''
     1400 * '''after re-programming the GSC will revert some of its configuration just as if the coin-cell battery had been removed and replaced (see [#firmware-reset firmware-reset] for details)'''
     1401
     1402
     1403[=#jtag]
     1404== JTAG programing GSC firmware
     1405You can use JTAG with the Gateworks JTAG adapter via {{{jtag_usbv4}}}  to program the GSC firmware using a host Linux PC - see [wiki:jtag_instructions here] for details on JTAG programming.
     1406
     1407'''Note that Venice boards using the i.MX8M Plus processor need a USB cable plugged in between the SBC and the host system for {{{jtag_usbv4}}} to work (in addition the the GW16099 JTAG Dongle)'''
     1408
     1409Example usage:
     1410{{{#!bash
     1411jtag_usbv4 -m <firmware.txt> # update GSC firmware image
     1412jtag_usbv4 -x <firmware.txt> # verify GSC firmware image
     1413}}}
     1414
     1415
     1416[=#gsc_update]
     1417== gsc_update userspace application
     1418You can use the {{{gsc_update}}} userspace application to update the GSC firmware on a running board. Note that this is not as safe as using [#jtag JTAG] above as if power is lost during the operation you will not be able to boot the board until you use [#jtag JTAG] to reprogram the GSC firmware.
     1419
     1420While the {{{gsc_update}}} aplication is included in the pre-built Gateworks BSP's you can find the source[https://github.com/Gateworks/gsc_update here])
     1421
     1422Important Notes:
     1423 * '''this update should take about 30 seconds; do not allow power loss during this time (or you will have to reprogram the GSC using JTAG as above)'''
     1424 * '''please reboot the board after the flashing is complete'''
     1425 * '''any applications or kernel drivers that access the GSC slave devices will receive errors thus need to be halted or unbound before the update to avoid driver I/O failures causing kernel messages and excessive programming time (see below)'''
     1426
     1427Example usage:
     1428{{{#!bash
     1429# unbind standard drivers that use the GSC slaves
     1430echo "gpio-keys" > /sys/bus/platform/drivers/gpio-keys/unbind # uses 0-0023 pca953x thus must be unbound first
     1431echo "0-0020" > /sys/bus/i2c/drivers/gateworks-gsc/unbind # will unbind the pca953x and gsc-hwmon driver as well
     1432echo "0-0050" > /sys/bus/i2c/drivers/at24/unbind
     1433echo "0-0051" > /sys/bus/i2c/drivers/at24/unbind
     1434echo "0-0052" > /sys/bus/i2c/drivers/at24/unbind
     1435echo "0-0053" > /sys/bus/i2c/drivers/at24/unbind
     1436echo "0-0068" > /sys/bus/i2c/drivers/rtc-ds1672/unbind
     1437# update the GSC firmware
    14101438gsc_update -f <firmware.txt>
    1411 #NOTE: This command will likely spew pca953x 0-0023: failed reading register: -6 messages
    1412 #ignore these messages and let the programming complete. Do not cut power until command is finished.
    1413 }}}
    1414 
    1415 An example of a successful gsc_update flashing:
    1416 {{{
    1417 
     1439}}}
     1440  * An example of a successful gsc_update flashing:
     1441{{{#!bash
    14181442# gsc_update -f gsc_7000.txt
    14191443Gateworks GSC Updater v1.6
     
    14341458MSP Prg B9  100%
    14351459R1:0x00
    1436 
    1437 }}}
    1438 Notes:
    1439  * GSC firmware images can be found with the pre-built firmware images for the various product families
    1440  * using the {{{gsc_update}}} method, there is no validity checking of the firmware file (for transfer errors or for product ID) - updating an invalid image will require you to use the linux jtag_usbv4 application and a JTAG dongle to re-program (via {{{./jtag_usbv4 -m gsp_firmware.txt}}}). Care should be taken to make sure you are updating a valid image meant for your target board. To verify the firmware update completed properly you can query the GSC firmware version register:
    1441 {{{
    1442 #!bash
    1443 i2cget -f -y 0 0x20 14
    1444 }}}
    1445  * after re-programming the GSC will revert some of its configuration just as if the coin-cell battery had been removed and replaced (see [#firmware-reset firmware-reset] for details)
     1460}}}
    14461461
    14471462