163 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3====================4iosm devlink support5====================6 7This document describes the devlink features implemented by the ``iosm``8device driver.9 10Parameters11==========12 13The ``iosm`` driver implements the following driver-specific parameters.14 15.. list-table:: Driver-specific parameters implemented16 :widths: 5 5 5 8517 18 * - Name19 - Type20 - Mode21 - Description22 * - ``erase_full_flash``23 - u824 - runtime25 - erase_full_flash parameter is used to check if full erase is required for26 the device during firmware flashing.27 If set, Full nand erase command will be sent to the device. By default,28 only conditional erase support is enabled.29 30 31Flash Update32============33 34The ``iosm`` driver implements support for flash update using the35``devlink-flash`` interface.36 37It supports updating the device flash using a combined flash image which contains38the Bootloader images and other modem software images.39 40The driver uses DEVLINK_SUPPORT_FLASH_UPDATE_COMPONENT to identify type of41firmware image that need to be flashed as requested by user space application.42Supported firmware image types.43 44.. list-table:: Firmware Image types45 :widths: 15 8546 47 * - Name48 - Description49 * - ``PSI RAM``50 - Primary Signed Image51 * - ``EBL``52 - External Bootloader53 * - ``FLS``54 - Modem Software Image55 56PSI RAM and EBL are the RAM images which are injected to the device when the57device is in BOOT ROM stage. Once this is successful, the actual modem firmware58image is flashed to the device. The modem software image contains multiple files59each having one secure bin file and at least one Loadmap/Region file. For flashing60these files, appropriate commands are sent to the modem device along with the61data required for flashing. The data like region count and address of each region62has to be passed to the driver using the devlink param command.63 64If the device has to be fully erased before firmware flashing, user application65need to set the erase_full_flash parameter using devlink param command.66By default, conditional erase feature is supported.67 68Flash Commands:69===============701) When modem is in Boot ROM stage, user can use below command to inject PSI RAM71image using devlink flash command.72 73$ devlink dev flash pci/0000:02:00.0 file <PSI_RAM_File_name>74 752) If user want to do a full erase, below command need to be issued to set the76erase full flash param (To be set only if full erase required).77 78$ devlink dev param set pci/0000:02:00.0 name erase_full_flash value true cmode runtime79 803) Inject EBL after the modem is in PSI stage.81 82$ devlink dev flash pci/0000:02:00.0 file <EBL_File_name>83 844) Once EBL is injected successfully, then the actual firmware flashing takes85place. Below is the sequence of commands used for each of the firmware images.86 87a) Flash secure bin file.88 89$ devlink dev flash pci/0000:02:00.0 file <Secure_bin_file_name>90 91b) Flashing the Loadmap/Region file92 93$ devlink dev flash pci/0000:02:00.0 file <Load_map_file_name>94 95Regions96=======97 98The ``iosm`` driver supports dumping the coredump logs.99 100In case a firmware encounters an exception, a snapshot will be taken by the101driver. Following regions are accessed for device internal data.102 103.. list-table:: Regions implemented104 :widths: 15 85105 106 * - Name107 - Description108 * - ``report.json``109 - The summary of exception details logged as part of this region.110 * - ``coredump.fcd``111 - This region contains the details related to the exception occurred in the112 device (RAM dump).113 * - ``cdd.log``114 - This region contains the logs related to the modem CDD driver.115 * - ``eeprom.bin``116 - This region contains the eeprom logs.117 * - ``bootcore_trace.bin``118 - This region contains the current instance of bootloader logs.119 * - ``bootcore_prev_trace.bin``120 - This region contains the previous instance of bootloader logs.121 122 123Region commands124===============125 126$ devlink region show127 128$ devlink region new pci/0000:02:00.0/report.json129 130$ devlink region dump pci/0000:02:00.0/report.json snapshot 0131 132$ devlink region del pci/0000:02:00.0/report.json snapshot 0133 134$ devlink region new pci/0000:02:00.0/coredump.fcd135 136$ devlink region dump pci/0000:02:00.0/coredump.fcd snapshot 1137 138$ devlink region del pci/0000:02:00.0/coredump.fcd snapshot 1139 140$ devlink region new pci/0000:02:00.0/cdd.log141 142$ devlink region dump pci/0000:02:00.0/cdd.log snapshot 2143 144$ devlink region del pci/0000:02:00.0/cdd.log snapshot 2145 146$ devlink region new pci/0000:02:00.0/eeprom.bin147 148$ devlink region dump pci/0000:02:00.0/eeprom.bin snapshot 3149 150$ devlink region del pci/0000:02:00.0/eeprom.bin snapshot 3151 152$ devlink region new pci/0000:02:00.0/bootcore_trace.bin153 154$ devlink region dump pci/0000:02:00.0/bootcore_trace.bin snapshot 4155 156$ devlink region del pci/0000:02:00.0/bootcore_trace.bin snapshot 4157 158$ devlink region new pci/0000:02:00.0/bootcore_prev_trace.bin159 160$ devlink region dump pci/0000:02:00.0/bootcore_prev_trace.bin snapshot 5161 162$ devlink region del pci/0000:02:00.0/bootcore_prev_trace.bin snapshot 5163