/*
 * Copyright 2021 Xiaotian Cui <xtcui@analogixsemi.com>
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#pragma once

#include <fwupdplugin.h>

#define ANX_BB_TRANSACTION_TIMEOUT 5000 /* ms */
#define BILLBOARD_CLASS		   0x11
#define BILLBOARD_SUBCLASS	   0x00
#define BILLBOARD_PROTOCOL	   0x00
#define BILLBOARD_MAX_PACKET_SIZE  64
#define OCM_FLASH_SIZE		   0x18000
#define SECURE_OCM_TX_SIZE	   0x3000
#define SECURE_OCM_RX_SIZE	   0x3000
#define CUSTOM_FLASH_SIZE	   (4 * FU_KB)

#define FLASH_OCM_ADDR	    0x1000
#define FLASH_TXFW_ADDR	    0x31000
#define FLASH_RXFW_ADDR	    0x34000
#define FLASH_CUSTOM_ADDR   0x38000
#define OCM_FW_VERSION_ADDR 0x14FF0
