Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions src/snagrecover/templates/ambarella-cv22.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Ambarella CV22 recovery configuration
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very different from what any of the current template files look like.

I'm not against improvements to the template file format, but I don't want them mixed in with this SoC support series.

I've made a few comments below in case you want to submit a future series to make these improvements, but please don't include them in this series. For now, you should just include your firmware section and leave out the rest.


# Device identification
vid: 0x1b8e # Ambarella vendor ID
pid: 0xc022 # CV22 product ID

# Recovery protocol
protocol: amba
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is information about some internal details of the snagrecover code, it shouldn't be included in the user interface.


# Required firmware files
firmware:
# DRAM initialization script
dram_script:
path: cv22_lpddr4_408MHz.ads
description: DRAM initialization script for CV22 LPDDR4 at 408MHz
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice to have a description here, but it's also repetitive, as this information is already given in the fw_binaries docs. I don't have a definitive opinion about this yet.


# Bootloader binary
bootloader:
path: cv22_bld_linux_emmc.bin
description: CV22 bootloader for Linux eMMC boot

# Recovery steps
steps:
- name: Initialize DRAM
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with this is that it's documentation for how snagrecover works internally. So if the recovery process or the nomenclature evolves at some point, we'll have to keep this template up to date as well.

Moreover, the user ideally shouldn't have to worry about these details.

action: initialize_dram
description: Initialize device DRAM using ADS script

- name: Load bootloader
action: load_bootloader
description: Load bootloader to device memory

- name: Flash firmware
action: flash_firmware
description: Flash firmware image to device
args:
firmware: firmware.bin # Firmware image to flash

# Recovery flow description
description: |
Recovery process for Ambarella CV22 devices:
1. Device enters USB recovery mode
2. Initialize DRAM using ADS script
3. Load bootloader to memory
4. Flash firmware image
5. Device boots from flashed firmware

# Additional notes
notes: |
- Ensure device is in USB recovery mode before starting
- DRAM script and bootloader files must be in firmware directory
- Firmware image should be compatible with CV22
Loading