mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
This new firmware provided by E-CON, starts ar1335 sensor streaming at 100fps for mode0. Bug 4111978 Change-Id: I2ba6aa3a2aec23c24319995224880e2fc24ca8ac Signed-off-by: Ankur Pawar <ankurp@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2941192 Reviewed-by: Praveen AC <pac@nvidia.com> Reviewed-by: Addarsh Srivastava <addarshs@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
98 lines
2.0 KiB
C
98 lines
2.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* Copyright (c) 2017-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */
|
|
/* Copyright (c) 2022, e-con Systems. All rights reserved. */
|
|
/*
|
|
* mcu_firmware.h - ar1335 mcu firmware
|
|
*/
|
|
|
|
#ifndef _MCU_FIRMWARE_H
|
|
#define _MCU_FIRMWARE_H
|
|
|
|
/* Local Defines */
|
|
#define MAX_BUF_LEN 2048
|
|
|
|
#define MAX_PAGES 512
|
|
#define TOTAL_PAGES 1536
|
|
#define NUM_ERASE_CYCLES (TOTAL_PAGES / MAX_PAGES)
|
|
|
|
#define FLASH_START_ADDRESS 0x08000000
|
|
#define FLASH_SIZE 192*1024
|
|
#define FLASH_READ_LEN 256
|
|
|
|
#define CR 13 /* Carriage return */
|
|
#define LF 10 /* Line feed */
|
|
|
|
/* MCU Buffer size increased - Fix for loading menu based controls */
|
|
#define MCU_BUFFER_SIZE 1024
|
|
|
|
/* TODO: Only necessary commands added */
|
|
enum _i2c_cmds
|
|
{
|
|
BL_GET_VERSION = 0x01,
|
|
BL_GO = 0x21,
|
|
BL_READ_MEM = 0x11,
|
|
BL_WRITE_MEM = 0x31,
|
|
BL_WRITE_MEM_NS = 0x32,
|
|
BL_ERASE_MEM = 0x44,
|
|
BL_ERASE_MEM_NS = 0x45,
|
|
};
|
|
|
|
enum _i2c_resp
|
|
{
|
|
RESP_ACK = 0x79,
|
|
RESP_NACK = 0x1F,
|
|
RESP_BUSY = 0x76,
|
|
};
|
|
|
|
enum
|
|
{
|
|
NUM_LANES_1 = 0x01,
|
|
NUM_LANES_2 = 0x02,
|
|
NUM_LANES_3 = 0x02,
|
|
NUM_LANES_4 = 0x04,
|
|
NUM_LANES_UNKWN = 0xFF,
|
|
};
|
|
|
|
enum _ihex_rectype
|
|
{
|
|
/* Normal data */
|
|
REC_TYPE_DATA = 0x00,
|
|
/* End of File */
|
|
REC_TYPE_EOF = 0x01,
|
|
|
|
/* Extended Segment Address */
|
|
REC_TYPE_ESA = 0x02,
|
|
/* Start Segment Address */
|
|
REC_TYPE_SSA = 0x03,
|
|
|
|
/* Extended Linear Address */
|
|
REC_TYPE_ELA = 0x04,
|
|
/* Start Linear Address */
|
|
REC_TYPE_SLA = 0x05,
|
|
};
|
|
|
|
typedef struct __attribute__ ((packed)) _ihex_rec {
|
|
unsigned char datasize;
|
|
unsigned short int addr;
|
|
unsigned char rectype;
|
|
unsigned char recdata[];
|
|
} IHEX_RECORD;
|
|
|
|
static unsigned int g_bload_flashaddr;
|
|
|
|
static uint8_t *fw_version;
|
|
|
|
/* MCU communication variables */
|
|
static unsigned char mc_data[MCU_BUFFER_SIZE];
|
|
static unsigned char mc_ret_data[MCU_BUFFER_SIZE];
|
|
|
|
/* Buffer to Send Bootloader CMDs */
|
|
static unsigned char g_bload_buf[MAX_BUF_LEN] = { 0 };
|
|
|
|
static unsigned short int g_bload_crc16;
|
|
|
|
static const char g_mcu_fw_buf[] =
|
|
#include "e-CAM130_CUOAGX_mcu_fw.bin"
|
|
;
|
|
#endif //_MCU_FIRMWARE_H
|