Skip to content
  • Raja Mani's avatar
    ath10k: incorporate qca4019 cal data download sequence · 3d9195ea
    Raja Mani authored
    
    
    qca4019 calibration data is stored in the host memory and it's mandatory
    to download it even before reading board id and chip id from the target.
    Also, there is a need to execute otp (download and run) twice, one after
    cal data download and another one after board data download.
    
    Existing cal data file name 'cal-<bus>-<id>.bin' and device tree entry
    'qcom,ath10k-calibration-data' used in ath10k has assumption that it
    carries other data (like board data) also along with the calibration data.
    But, qca4019 cal data contains pure calibration data (doesn't include
    any other info). So, using existing same cal file name and DT entry
    in qca4019 case would alter the purpose of it. To avoid this, new cal
    file name 'pre-cal-<bus>-<id>.bin' and new device tree entry name
    'qcom,ath10k-pre-calibration-data are introduced.
    
    Overall qca4019's firmware download sequence would look like,
    
       1) Download cal data (either from a file or device tree entry)
          at the address specified by target in the host interest area
          member "hi_board_data".
    
       2) Download otp and run with 0x10 (PARAM_GET_EEPROM_BOARD_ID)
          as a argument.
    
          At this point, otp will take back up of downloaded cal data
          content in another location in the target and return valid
          board id and chip id to the host.
    
       3) Download board data at the address specified by target
          in host interest area member "hi_board_data".
    
       4) Download otp and run with 0x10000 (PARAM_FLASH_SECTION_ALL) as
          a argument.
    
          Now otp will apply cal data content from it's backup on top
          of board data download in step 3 and prepare final data base.
    
       5) Download code swap and athwlan binary content.
    
    Above sequences are implemented (step 1 to step 4) in the name of
    pre calibration configuration.
    
    Signed-off-by: default avatarRaja Mani <rmani@qti.qualcomm.com>
    Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
    3d9195ea