Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
367c2d5d6e | ||
|
|
3ce9141e30 | ||
|
|
5a97b358be | ||
|
|
482a8e4d67 | ||
|
|
54fe65bed8 | ||
|
|
1c549990e3 | ||
|
|
3f8cccb92a | ||
|
|
57b75dd8ed | ||
|
|
1515f983ee | ||
|
|
917130bc1a | ||
|
|
28fb71704f | ||
|
|
0589d9bde9 | ||
|
|
c570cb3124 | ||
|
|
e7baf6e580 | ||
|
|
dd7654c55d | ||
|
|
26ea83f1f5 |
BIN
docs/sw/Xos 环境搭建-ubuntu2024_2022.pdf
Executable file
BIN
docs/sw/Xos 环境搭建-ubuntu2024_2022.pdf
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -60,6 +60,7 @@ struct down_info{
|
||||
uint total_len;
|
||||
uint status;
|
||||
int comp_status;
|
||||
int media_type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
#define IMG_INVALID 0xFFFFFFFF
|
||||
|
||||
#define SPL_DOWN_ADDR 0x40500000
|
||||
#define SPL_DOWN_ADDR 0x40100000
|
||||
#define SPL_LOAD_ADDR 0x27000000
|
||||
#define SPL_NAND_LOCATION_OFFS (0 << 11)
|
||||
#define SPL_NOR_LOCATION_OFFS (0 << 10)
|
||||
@ -21,7 +21,7 @@
|
||||
#define SPL_MAX_SIZE 0x80000
|
||||
#define HEADER_LEN 0x400
|
||||
|
||||
#define UBOOT_DOWN_ADDR 0x40500000
|
||||
#define UBOOT_DOWN_ADDR 0x40100000
|
||||
#define UBOOT_LOAD_ADDR 0x41600000
|
||||
#define UBOOT_NAND_LOCATION_OFFS (128 << 11)
|
||||
#define UBOOT_NOR_LOCATION_OFFS (32 << 10)
|
||||
@ -29,9 +29,9 @@
|
||||
#define UBOOT_SDIO1_LOCATION_OFFS (1024 << 10)
|
||||
#define UBOOT_MAX_SIZE 0x100000
|
||||
|
||||
#define KERNEL_DOWN_ADDR 0x40500000
|
||||
#define KERNEL_DOWN_ADDR 0x40100000
|
||||
#define KERNEL_LOAD_ADDR 0x40008000
|
||||
#define KERNEL_NAND_LOCATION_OFFS (8192 << 11)
|
||||
#define KERNEL_NAND_LOCATION_OFFS 0x1100000
|
||||
#define KERNEL_NOR_LOCATION_OFFS (1024 << 10)
|
||||
#define KERNEL_EMMC_LOCATION_OFFS (6144 << 10)
|
||||
#define KERNEL_SDIO1_LOCATION_OFFS (2048 << 10)
|
||||
@ -91,25 +91,25 @@
|
||||
#define VDSP_SDIO1_LOCATION_OFFS (2048 << 10)
|
||||
#define VDSP_MAX_SIZE 0x2000000
|
||||
|
||||
#define SYSTEM_DOWN_ADDR 0x46000000
|
||||
#define SYSTEM_DOWN_ADDR 0x40100000
|
||||
#define SYSTEM_LOAD_ADDR 0x30010000
|
||||
#define SYSTEM_NAND_LOCATION_OFFS (10752 << 11) // 1500000
|
||||
#define SYSTEM_NAND_LOCATION_OFFS 0x1900000
|
||||
#define SYSTEM_NOR_LOCATION_OFFS (64 << 10)
|
||||
#define SYSTEM_EMMC_LOCATION_OFFS (64 << 10)
|
||||
#define SYSTEM_SDIO1_LOCATION_OFFS (64 << 10)
|
||||
#define SYSTEM_MAX_SIZE 0x1800000
|
||||
|
||||
#define ROOTFS_DOWN_ADDR 0x46000000
|
||||
#define ROOTFS_DOWN_ADDR 0x40100000
|
||||
#define ROOTFS_LOAD_ADDR 0x30010000
|
||||
#define ROOTFS_NAND_LOCATION_OFFS (23040 << 11) // 2D00000
|
||||
#define ROOTFS_NAND_LOCATION_OFFS 0x3300000
|
||||
#define ROOTFS_NOR_LOCATION_OFFS (5120 << 10)
|
||||
#define ROOTFS_EMMC_LOCATION_OFFS (64 << 10)
|
||||
#define ROOTFS_SDIO1_LOCATION_OFFS (64 << 10)
|
||||
#define ROOTFS_MAX_SIZE 0x600000
|
||||
|
||||
#define DATA_DOWN_ADDR 0x46000000
|
||||
#define DATA_DOWN_ADDR 0x40100000
|
||||
#define DATA_LOAD_ADDR 0x30010000
|
||||
#define DATA_NAND_LOCATION_OFFS (26112 << 11) // 3300000
|
||||
#define DATA_NAND_LOCATION_OFFS 0x3d00000
|
||||
#define DATA_NOR_LOCATION_OFFS (15360 << 10)
|
||||
#define DATA_EMMC_LOCATION_OFFS (64 << 10)
|
||||
#define DATA_SDIO1_LOCATION_OFFS (64 << 10)
|
||||
|
||||
@ -54,6 +54,7 @@ void usb_down_continue(struct down_info *);
|
||||
void usb_down_finish(struct down_info *);
|
||||
void usb_down_execute(struct down_info *);
|
||||
void usb_xch_baudrate(struct down_info *);
|
||||
void usb_down_comp_info(struct down_info *info);
|
||||
void usb_boot(void);
|
||||
void usb_send_ack(u16 ack);
|
||||
|
||||
|
||||
@ -49,6 +49,7 @@ const usb_pfunc usb_pftbl[] =
|
||||
usb_down_finish,
|
||||
usb_down_execute,
|
||||
usb_xch_baudrate,
|
||||
usb_down_comp_info,
|
||||
};
|
||||
const u16 usb_func_list[] =
|
||||
{
|
||||
@ -58,6 +59,7 @@ const u16 usb_func_list[] =
|
||||
USB_FUNC_FINISH,
|
||||
USB_FUNC_EXEC,
|
||||
USB_FUNC_XCH,
|
||||
USB_FUNC_COMP_INFO,
|
||||
};
|
||||
|
||||
void usb_down_connect(struct down_info *info)
|
||||
@ -71,16 +73,23 @@ void usb_down_connect(struct down_info *info)
|
||||
void usb_down_start(struct down_info *info)
|
||||
{
|
||||
|
||||
int id_media=0;
|
||||
if(info->status != USB_STATUS_CONNECTED)
|
||||
return;
|
||||
|
||||
#ifdef CONFIG_SDL_BUILD
|
||||
info->imageid = swab32(*((uint *)&info->rcv[4]));
|
||||
id_media = swab32(*((uint *)&info->rcv[4]));
|
||||
info->imageid = (id_media>>16) & 0xff;
|
||||
printf("info->imageid = 0x%lx\r\n", info->imageid);
|
||||
info->media_type = id_media & 0xff;
|
||||
printf("info->media_type = 0x%x\r\n", info->media_type);
|
||||
info->address = MapTbl[info->imageid].downaddr;
|
||||
printf("info->address = 0x%lx\r\n", info->address);
|
||||
#else
|
||||
info->address = swab32(*((uint *)&info->rcv[4]));
|
||||
#endif
|
||||
info->total_len = swab32(*((u32 *)&info->rcv[8]));
|
||||
printf("info->total_len = 0x%x\r\n", info->total_len);
|
||||
info->cur_len = 0;
|
||||
|
||||
if(info->total_len > DownLoad_Max_Size)
|
||||
@ -96,11 +105,14 @@ void usb_down_continue(struct down_info *info)
|
||||
{
|
||||
u16 len;
|
||||
|
||||
printf("usb_down_continue\r\n");
|
||||
if(info->status != USB_STATUS_CONTINUE)
|
||||
return;
|
||||
len = swab16(*((u16 *)&info->rcv[2]));
|
||||
printf("len = 0x%x\r\n", len);
|
||||
info->cur_len += len;
|
||||
|
||||
printf("info->cur_len = 0x%x\r\n", info->cur_len);
|
||||
if(info->cur_len <= DownLoad_Max_Size)
|
||||
{
|
||||
memcpy((void *)info->address,&(info->rcv[4]),len);
|
||||
@ -114,6 +126,7 @@ void usb_down_continue(struct down_info *info)
|
||||
void usb_down_finish(struct down_info *info)
|
||||
{
|
||||
|
||||
printf("usb_down_finish\r\n");
|
||||
if(info->status != USB_STATUS_CONTINUE)
|
||||
return;
|
||||
if(info->total_len == info->cur_len)
|
||||
@ -124,7 +137,15 @@ void usb_down_finish(struct down_info *info)
|
||||
else
|
||||
usb_send_ack(USB_PTC_NACK);
|
||||
}
|
||||
|
||||
|
||||
void usb_down_comp_info(struct down_info *info)
|
||||
{
|
||||
if(!info->comp_status)
|
||||
usb_complete_info(INFO_OK);
|
||||
else
|
||||
usb_complete_info(INFO_OTHER);
|
||||
}
|
||||
|
||||
void usb_down_execute(struct down_info *info)
|
||||
{
|
||||
u32 addr = 0;
|
||||
@ -291,6 +312,7 @@ void usb_boot(void)
|
||||
u32 func;
|
||||
u8 idx = 0;
|
||||
#ifdef CONFIG_SDL_BUILD
|
||||
printf("usb_boot,d_info.status = %d\r\n", d_info.status);
|
||||
while(d_info.status != USB_STATUS_FINISH)
|
||||
#else
|
||||
while(d_info.status != USB_STATUS_EXECUTE)
|
||||
@ -300,6 +322,7 @@ void usb_boot(void)
|
||||
usb_rcv_data(d_info.rcv);
|
||||
ret = usb_crc_check(d_info.rcv);
|
||||
func = (d_info.rcv[0] << 8) + d_info.rcv[1];
|
||||
printf("func = 0x%x\r\n", func);
|
||||
ret &= usb_lookfor_func(func, &idx);
|
||||
if(ret == false)
|
||||
{
|
||||
|
||||
@ -172,6 +172,7 @@ obj-y += mc/lcm_module/lcm_mipi_ek79007.o
|
||||
obj-y += mc/lcm_module/lcm_mipi_st7701s.o
|
||||
obj-$(CONFIG_QUA_LOGO_MIPI_HX8729) += mc/lcm_module/lcm_mipi_qua_hx8729_qfh24004.o
|
||||
obj-$(CONFIG_QUA_LOGO_MIPI_JD9365D) += mc/lcm_module/lcm_mipi_qua_jd9365d_jlm101b021.o
|
||||
obj-$(CONFIG_QUA_LOGO_MIPI_ER88577B) += mc/lcm_module/lcm_mipi_qua_er88577b_6hc1017b7e.o
|
||||
obj-$(CONFIG_QUA_LOGO_RGB_EK79001H) += mc/lcm_module/lcm_rgb_qua_ek79001h_tg78550b3_24bits.o
|
||||
obj-y += mc/lcm_module/mol_lcm_module.o
|
||||
|
||||
|
||||
@ -0,0 +1,744 @@
|
||||
#include "include/mol_lcm_local.h"
|
||||
#include "include/dsi_com_param.h"
|
||||
#include "include/mol_lcm.h"
|
||||
|
||||
#define LCM_WIDTH 800
|
||||
#define LCM_HEIGHT 1280
|
||||
#define LCM_DEBUG 1
|
||||
|
||||
const lcm_cfg_t qua_lcm_mipi_er88577b_6hc1017b7e_info;
|
||||
|
||||
|
||||
// static dsi_setting_tab_t __er88577b_6hc1017b7e_init_setting[] = {
|
||||
// {DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xE0,0xAB,0xBA}},
|
||||
// {DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xE1,0xBA,0xAB}},
|
||||
|
||||
// {DSI_DI_END_OF_TABLE, 0x00, {0x00}}
|
||||
// };
|
||||
|
||||
static dsi_setting_tab_t qua_lcm_mipi_er88577b_6hc1017b7e_init_setting[] = {
|
||||
#if 0
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xE0,0xAB,0xBA}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xE1,0xBA,0xAB}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x07, {0x05,0x00, 0xB1,0x10,0x01,0x47,0xFF}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x09, {0x07,0x00, 0xB2,0x0C,0x14,0x04,0x50,0x50,0x14}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x06, {0x04,0x00, 0xB3,0x56,0x53,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x06, {0x04,0x00, 0xB4,0x33,0x30,0x04}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0A, {0x08,0x00, 0xB6,0xB0,0x00,0x00,0x10,0x00,0x10,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x08, {0x06,0x00, 0xB8,0x05,0x12,0x29,0x49,0x48}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x29, {0x27,0x00, 0xB9,0x7C,0x65,0x55,0x49,0x46,0x36,0x3B,0x24,0x3D,0x3C,0x3D,0x5C,0x4C,0x55,0x47,0x46,0x39,0x26,0x06,0x7C,0x65,0x55,0x49,0x46,0x36,0x3B,0x24,0x3D,0x3C,0x3D,0x5C,0x4C,0x55,0x47,0x46,0x39,0x26,0x06}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x13, {0x11,0x00, 0xC0,0xFF,0x87,0x12,0x34,0x44,0x44,0x44,0x44,0x98,0x04,0x98,0x04,0x0F,0x00,0x00,0xC1}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0D, {0x0B,0x00, 0xC1,0x54,0x94,0x02,0x85,0x9F,0x00,0x7F,0x00,0x54,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0F, {0x0D,0x00, 0xC2,0x17,0x09,0x08,0x89,0x08,0x11,0x22,0x20,0x44,0xFF,0x18,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x19, {0x17,0x00, 0xC3,0x86,0x46,0x05,0x05,0x1C,0x1C,0x1D,0x1D,0x02,0x1F,0x1F,0x1E,0x1E,0x0F,0x0F,0x0D,0x0D,0x13,0x13,0x11,0x11,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x19, {0x17,0x00, 0xC4,0x07,0x07,0x04,0x04,0x1C,0x1C,0x1D,0x1D,0x02,0x1F,0x1F,0x1E,0x1E,0x0E,0x0E,0x0C,0x0C,0x12,0x12,0x10,0x10,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xC6,0x2A,0x2A}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x09, {0x07,0x00, 0xC8,0x21,0x00,0x31,0x42,0x34,0x16}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xCA,0xCB,0x43}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0B, {0x09,0x00, 0xCD,0x0E,0x4B,0x4B,0x20,0x19,0x6B,0x06,0xB3}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x07, {0x05,0x00, 0xD2,0xE1,0x2B,0x38,0x08}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0E, {0x0C,0x00, 0xD4,0x00,0x01,0x00,0x0E,0x04,0x44,0x08,0x10,0x00,0x00,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0B, {0x09,0x00, 0xE6,0x80,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x08, {0x06,0x00, 0xF0,0x12,0x03,0x20,0x00,0xFF}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x04, {0x02,0x00, 0xF3,0x00}},
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 1, {0x11}},
|
||||
{DSI_DI_DELAY, 120, {0x00}},
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 1, {0x29}},
|
||||
{DSI_DI_DELAY, 20, {0x00}},
|
||||
{DSI_DI_END_OF_TABLE, 0x00, {0x00}}
|
||||
#endif
|
||||
|
||||
|
||||
#if 1
|
||||
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00,0xE0,0xAB,0xBA}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00,0xE1,0xBA,0xAB}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x07, {0x05,0x00,0xB1,0x10,0x01,0x47,0xFF}},
|
||||
//{DSI_DI_DCS_WRITE_LONG, 0x07, {0x05,0x00,0xB1,0x11,0x01,0x47,0xFF}}, //BIST
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x09, {0x07,0x00,0xB2,0x0C,0x14,0x04,0x50,0x50,0x14}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x06, {0x04,0x00,0xB3,0x56,0x53,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x06, {0x04,0x00,0xB4,0x33,0x30,0x04}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0A, {0x08,0x00,0xB6,0xB0,0x00,0x00,0x10,0x00,0x10,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x08, {0x06,0x00,0xB8,0x05,0x12,0x29,0x49,0x48}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x29, {0x27,0x00,0xB9,0x7C,0x61,0x4F,0x42,0x3E,0x2D,0x31,0x1A,0x33,0x33,0x33,0x52,0x40,0x47,0x38,0x34,0x26,0x0E,0x06,0x7C,0x61,0x4F,0x42,0x3E,0x2D,0x31,0x1A,0x33,0x33,0x33,0x52,0x40,0x47,0x38,0x34,0x26,0x0E,0x06}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x13, {0x11,0x00,0xC0,0xCC,0x76,0x12,0x34,0x44,0x44,0x44,0x44,0x98,0x04,0x98,0x04,0x0F,0x00,0x00,0xC1}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0D, {0x0B,0x00,0xC1,0x54,0x94,0x02,0x85,0x9F,0x00,0x6F,0x00,0x54,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0F, {0x0D,0x00,0xC2,0x17,0x09,0x08,0x89,0x08,0x11,0x22,0x20,0x44,0xFF,0x18,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x19, {0x17,0x00,0xC3,0x87,0x47,0x05,0x05,0x1C,0x1C,0x1D,0x1D,0x02,0x1E,0x1E,0x1F,0x1F,0x0F,0x0F,0x0D,0x0D,0x13,0x13,0x11,0x11,0x24}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x19, {0x17,0x00,0xC4,0x06,0x06,0x04,0x04,0x1C,0x1C,0x1D,0x1D,0x02,0x1E,0x1E,0x1F,0x1F,0x0E,0x0E,0x0C,0x0C,0x12,0x12,0x10,0x10,0x24}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00,0xC6,0x2A,0x2A}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x09, {0x07,0x00,0xC8,0x21,0x00,0x31,0x42,0x34,0x16}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00,0xCA,0xCB,0x43}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0B, {0x09,0x00,0xCD,0x0E,0x4B,0x4B,0x20,0x19,0x6B,0x06,0xB3}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x07, {0x05,0x00,0xD2,0xE1,0x2B,0x38,0x08}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0E, {0x0C,0x00,0xD4,0x00,0x01,0x00,0x0E,0x04,0x44,0x08,0x10,0x00,0x00,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0B, {0x09,0x00,0xE6,0x80,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x08, {0x06,0x00,0xF0,0x12,0x03,0x20,0x00,0xFF}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x04, {0x02,0x00, 0xF3,0x00}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 1, {0x11}},
|
||||
{DSI_DI_DELAY, 120, },
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 1, {0x29}},
|
||||
{DSI_DI_DELAY, 20, },
|
||||
{DSI_DI_END_OF_TABLE, 0x00, {0}}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xE0,0xAB,0xBA}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xE1,0xBA,0xAB}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x06, {0x04,0x00, 0xE7,0x00,0x00,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x07, {0x05,0x00, 0xB1,0x10,0x01,0x7F,0x18}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x08, {0x06,0x00, 0xB2,0x0C,0x10,0x04,0x50,0x50,0x14}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x06, {0x04,0x00, 0xB3,0x56,0xD3,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x06, {0x04,0x00, 0xB4,0x33,0x30,0x04}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0A, {0x08,0x00, 0xB6,0xB0,0x00,0x00,0x10,0x00,0x10,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x08, {0x06,0x00, 0xB8,0x05,0x12,0x29,0x49,0x48}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x29, {0x27,0x00, 0xB9,0x7C,0x64,0x53,0x48,0x45,0x38,0x3E,0x27,0x41,0x40,0x40,0x5E,0x4E,0x57,0x49,0x47,0x3B,0x2A,0x06,0x7C,0x64,0x53,0x48,0x45,0x38,0x3E,0x27,0x41,0x40,0x40,0x5E,0x4E,0x57,0x49,0x47,0x3B,0x2A,0x06}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x13, {0x11,0x00, 0xC0,0x32,0x45,0xB4,0x54,0x66,0x66,0x44,0x44,0x80,0x04,0x7C,0x04,0x3F,0x00,0x00,0xC1}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0D, {0x0B,0x00, 0xC1,0x34,0x94,0x02,0x8F,0x80,0x00,0x7C,0x00,0x54,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0F, {0x0D,0x00, 0xC2,0x33,0x09,0x08,0x89,0x08,0x11,0x22,0x20,0x44,0xBB,0x18,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x19, {0x17,0x00, 0xC3,0xA4,0x64,0x08,0x07,0x06,0x13,0x12,0x11,0x10,0x0F,0x0E,0x0D,0x0C,0x04,0x05,0x02,0x02,0x02,0x02,0x02,0x02,0x24}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x19, {0x17,0x00, 0xC4,0x24,0x24,0x08,0x07,0x06,0x13,0x12,0x11,0x10,0x0F,0x0E,0x0D,0x0C,0x04,0x05,0x02,0x02,0x02,0x02,0x02,0x02,0x02}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xC6,0x40,0x40}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x09, {0x07,0x00, 0xC8,0x21,0x00,0x31,0x42,0x34,0x16}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xCA,0xCB,0x43}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0B, {0x09,0x00, 0xCD,0x0E,0x6E,0x6E,0x22,0x19,0x6B,0x06,0xB3}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x07, {0x05,0x00, 0xD2,0xE1,0x2B,0x38,0x08}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0E, {0x0C,0x00, 0xD4,0x00,0x01,0x00,0x0E,0x04,0x44,0x08,0x10,0x00,0x00,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0B, {0x09,0x00, 0xE6,0x80,0x09,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x08, {0x06,0x00, 0xF0,0x12,0x03,0x20,0x00,0xFF}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x04, {0x02,0x00, 0xF3,0x00}},
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 1, {0x11}},
|
||||
{DSI_DI_DELAY, 120, {0x00}},
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 1, {0x29}},
|
||||
{DSI_DI_DELAY, 20, {0x00}},
|
||||
{DSI_DI_END_OF_TABLE, 0x00, {0x00}}
|
||||
#endif
|
||||
|
||||
|
||||
#if 0
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x01, 0x00}},
|
||||
{DSI_DI_DELAY, 30, {0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0xE0, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0xE1, 0x93}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0xE2, 0x65}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0xE3, 0xF8}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x80, 0x01}}, //{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x80, 0x01}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0xE0, 0x01}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x00, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x01, 0x48}}, // 0x3B,0X41~0X48
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x0C, 0x74}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x17, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x18, 0xAF}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x19, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x1A, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x1B, 0xAF}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x1C, 0x00}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x35, 0x26}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x37, 0x09}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x38, 0x04}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x39, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x3A, 0x01}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x3C, 0x78}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x3D, 0xFF}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x3E, 0xFF}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x3F, 0x7F}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x40, 0x06}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x41, 0xA0}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x42, 0x81}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x43, 0x14}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x44, 0x23}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x45, 0x28}},
|
||||
|
||||
//{DSI_DI_GENERIC_WRITE_1_PARAM, 2,{0x4A,0x35}}, //bist mode
|
||||
//{DSI_DI_GENERIC_WRITE_1_PARAM, 2,{0x4B,0x04}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x55, 0x02}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x57, 0x69}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x59, 0x0A}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x5A, 0x2A}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x5B, 0x17}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x5D, 0x7F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x5E, 0x69}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x5F, 0x59}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x60, 0x4C}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x61, 0x47}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x62, 0x39}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x63, 0x3B}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x64, 0x24}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x65, 0x3D}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x66, 0x3C}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x67, 0x3C}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x68, 0x5A}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x69, 0x46}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x6A, 0x4A}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x6B, 0x43}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x6C, 0x46}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x6D, 0x20}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x6E, 0x0F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x6F, 0x00}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x70, 0x7F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x71, 0x69}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x72, 0x59}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x73, 0x4C}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x74, 0x47}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x75, 0x39}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x76, 0x3B}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x77, 0x24}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x78, 0x3D}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x79, 0x3C}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x7A, 0x3C}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x7B, 0x5A}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x7C, 0x46}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x7D, 0x4A}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x7E, 0x43}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x7F, 0x46}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x80, 0x20}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x81, 0x0F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x82, 0x00}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0xE0, 0x02}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x00, 0x42}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x01, 0x42}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x02, 0x40}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x03, 0x40}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x04, 0x5E}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x05, 0x5E}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x06, 0x5F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x07, 0x5F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x08, 0x5F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x09, 0x57}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x0A, 0x57}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x0B, 0x77}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x0C, 0x77}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x0D, 0x47}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x0E, 0x47}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x0F, 0x45}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x10, 0x45}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x11, 0x4B}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x12, 0x4B}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x13, 0x49}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x14, 0x49}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x15, 0x5F}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x16, 0x41}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x17, 0x41}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x18, 0x40}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x19, 0x40}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x1A, 0x5E}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x1B, 0x5E}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x1C, 0x5F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x1D, 0x5F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x1E, 0x5F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x1F, 0x57}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x20, 0x57}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x21, 0x77}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x22, 0x77}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x23, 0x46}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x24, 0x46}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x25, 0x44}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x26, 0x44}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x27, 0x4A}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x28, 0x4A}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x29, 0x48}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x2A, 0x48}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x2B, 0x5F}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x2C, 0x01}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x2D, 0x01}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x2E, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x2F, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x30, 0x1F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x31, 0x1F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x32, 0x1E}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x33, 0x1E}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x34, 0x1F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x35, 0x17}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x36, 0x17}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x37, 0x37}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x38, 0x37}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x39, 0x08}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x3A, 0x08}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x3B, 0x0A}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x3C, 0x0A}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x3D, 0x04}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x3E, 0x04}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x3F, 0x06}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x40, 0x06}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x41, 0x1F}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x42, 0x02}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x43, 0x02}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x44, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x45, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x46, 0x1F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x47, 0x1F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x48, 0x1E}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x49, 0x1E}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x4A, 0x1F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x4B, 0x17}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x4C, 0x17}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x4D, 0x37}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x4E, 0x37}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x4F, 0x09}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x50, 0x09}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x51, 0x0B}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x52, 0x0B}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x53, 0x05}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x54, 0x05}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x55, 0x07}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x56, 0x07}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x57, 0x1F}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x58, 0x40}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x5B, 0x30}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x5C, 0x16}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x5D, 0x34}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x5E, 0x05}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x5F, 0x02}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x63, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x64, 0x6A}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x67, 0x73}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x68, 0x1D}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x69, 0x08}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x6A, 0x6A}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x6B, 0x08}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x6C, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x6D, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x6E, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x6F, 0x88}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x75, 0xFF}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x77, 0xDD}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x78, 0x3F}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x79, 0x15}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x7A, 0x17}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x7D, 0x14}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x7E, 0x82}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0xE0, 0x04}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x00, 0x0E}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x02, 0xB3}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x09, 0x61}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x0E, 0x48}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x36, 0x49}}, //mark
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x37, 0x58}}, //mark
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0xE0, 0x00}},
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0xE6, 0x02}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0xE7, 0x0C}},
|
||||
|
||||
#ifdef CONFIG_QUA_LOGO_MIPI_JD9365D_FLIP_H_V
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x36, 0x03}},
|
||||
#endif
|
||||
{DSI_DI_GENERIC_WRITE_0_PARAM, 1, {0x11}},
|
||||
{DSI_DI_DELAY, 240, {0x00}},
|
||||
|
||||
/* bist mode */
|
||||
//{DSI_DI_DELAY, 254, {0x00}},
|
||||
//{DSI_DI_DELAY, 254, {0x00}},
|
||||
//{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0xE0, 0x01}},
|
||||
//{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x4A, 0xB0}}, // bist
|
||||
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0xE0, 0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_0_PARAM, 1, {0x29}},
|
||||
{DSI_DI_DELAY, 5, {0x00}},
|
||||
{DSI_DI_GENERIC_WRITE_1_PARAM, 2, {0x35, 0x00}},
|
||||
{DSI_DI_END_OF_TABLE, 0x00, {0x00}}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#ifdef CONFIG_QUA_LOGO_MIPI_ER88577B_PWR_CTRL
|
||||
static int32_t _pwron_1st_exited_flag = 0;
|
||||
static int32_t _pwron_2nd_exited_flag = 0;
|
||||
static int32_t qua_lcm_mipi_er88577b_PowerOn(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printf("%s e\n",__FUNCTION__);
|
||||
printf("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
lcmHandle->lcm_id = lcmHandle->lcm_probe.lcm_id;
|
||||
|
||||
if((lcmHandle->lcm_probe.lcm_id == 0 && _pwron_1st_exited_flag == 0) ||
|
||||
(lcmHandle->lcm_probe.lcm_id == 1 && _pwron_2nd_exited_flag == 0)) {
|
||||
printf("%s:%d lcmHandle->lcm_id=%d\n",__func__,__LINE__, lcmHandle->lcm_id);
|
||||
extern int qua_lcm_mipi_er88577b_hrst(int lcm_id);
|
||||
qua_lcm_mipi_er88577b_hrst(lcmHandle->lcm_probe.lcm_id);
|
||||
}
|
||||
|
||||
if(lcmHandle->lcm_probe.lcm_id == 0) _pwron_1st_exited_flag = 1;
|
||||
if(lcmHandle->lcm_probe.lcm_id == 1) _pwron_2nd_exited_flag = 1;
|
||||
printf("%s:%d - 01\n",__func__,__LINE__);
|
||||
|
||||
extern int qua_lcm_mipi_er88577b_bkl(void);
|
||||
qua_lcm_mipi_er88577b_bkl();
|
||||
|
||||
|
||||
ops->ctrl_fun.mipi.bus_init((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
|
||||
#if LCM_DEBUG
|
||||
printf("%s x\n",__FUNCTION__);
|
||||
#endif
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t _identify_1st_exited_flag = 0;
|
||||
static int32_t _identify_2nd_exited_flag = 0;
|
||||
static int32_t _identify_lcm_idenfy_flag = 0;
|
||||
static int32_t _identify_lcm_idenfy_virt = 0;
|
||||
extern int qua_lcm_mipi_er88577b_rst(int lcm_id);
|
||||
extern void qua_set_lcm_bootargs(int value);
|
||||
extern uint32_t dsi_mipi_get_err_code(void);
|
||||
|
||||
static int qua_lcm_mipi_er88577b_identify_entity(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
uint8_t read_buf[4] = {0};
|
||||
int count = 3;
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
printf("%s e\n",__FUNCTION__);
|
||||
|
||||
|
||||
return 0;
|
||||
lcmHandle->lcm_id = lcmHandle->lcm_probe.lcm_id;
|
||||
// rtn = ops->ctrl_fun.mipi.push_tab(lcmHandle->lcm_id, __er88577b_6hc1017b7e_init_setting, ARRAY_SIZE(__er88577b_6hc1017b7e_init_setting));
|
||||
// if(rtn) {
|
||||
// printf("%s push_table failed.\n", __func__);
|
||||
// }
|
||||
while(count){
|
||||
rtn = ops->ctrl_fun.mipi.dcs_read(lcmHandle->lcm_probe.lcm_id, DSI_DI_DCS_READ_0_PARAM, 0x04, 1, read_buf);
|
||||
printf("%s %d: 0x%x 0x%x 0x%x\n",__func__, lcmHandle->lcm_probe.lcm_id, read_buf[0], read_buf[1], read_buf[2]);
|
||||
if (rtn) {
|
||||
printf("%s dcs_read id failed.\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
// if(read_buf[0] == 0x93 || (read_buf[0] == 0xE8 && read_buf[1] == 0x85 && read_buf[2] == 0x76)) {
|
||||
// printf("%s identify sucess.\n", __func__);
|
||||
// _identify_lcm_idenfy_flag |= (1 << lcmHandle->lcm_probe.lcm_id);
|
||||
// qua_set_lcm_bootargs(_identify_lcm_idenfy_flag);
|
||||
// return 0;
|
||||
// }
|
||||
rtn = ops->ctrl_fun.mipi.dcs_read(lcmHandle->lcm_probe.lcm_id, DSI_DI_DCS_READ_0_PARAM, 0xC6, 1, read_buf);
|
||||
printf("%s %d: 0x%x 0x%x 0x%x\n",__func__, lcmHandle->lcm_probe.lcm_id, read_buf[0], read_buf[1], read_buf[2]);
|
||||
if (rtn) {
|
||||
printf("%s dcs_read id failed.\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ops->delayMs(2);
|
||||
|
||||
count--;
|
||||
if (count == 0) {
|
||||
printf("%s identify timeout failed.\n", __func__);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_identify(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printf("%s:%d\n", __func__, __LINE__);
|
||||
#endif
|
||||
lcmHandle->lcm_id = lcmHandle->lcm_probe.lcm_id;
|
||||
|
||||
if(lcmHandle->lcm_probe.lcm_id == 0 && _identify_1st_exited_flag) return 0;
|
||||
if(lcmHandle->lcm_probe.lcm_id == 1 && _identify_2nd_exited_flag) return 0;
|
||||
|
||||
if(lcmHandle->lcm_probe.lcm_id == 0) _identify_1st_exited_flag = 1;
|
||||
if(lcmHandle->lcm_probe.lcm_id == 1) _identify_2nd_exited_flag = 1;
|
||||
|
||||
/* first identify */
|
||||
rtn = qua_lcm_mipi_er88577b_identify_entity(param, ops);
|
||||
_identify_lcm_idenfy_virt |= (1 << lcmHandle->lcm_probe.lcm_id);
|
||||
qua_set_lcm_bootargs(_identify_lcm_idenfy_virt);
|
||||
if(rtn) {
|
||||
printf("%s identify_entity failed.\n", __func__);
|
||||
goto __err_exit;
|
||||
}
|
||||
|
||||
printf("%s:%d\n", __func__, __LINE__);
|
||||
return 0;
|
||||
|
||||
// /* second identify */
|
||||
// __err_srst:
|
||||
// rtn = ops->ctrl_fun.mipi.push_tab(lcmHandle->lcm_id, lcm_mipi_jd9365d_swrst_setting, ARRAY_SIZE(lcm_mipi_jd9365d_swrst_setting));
|
||||
// if(rtn) {
|
||||
// printf("%s push_table failed.\n", __func__);
|
||||
// goto __err_hrst;
|
||||
// }
|
||||
|
||||
// rtn = qua_lcm_mipi_er88577b_identify_entity(param, ops);
|
||||
// if(rtn) {
|
||||
// printf("%s identify_entity failed.\n", __func__);
|
||||
// goto __err_hrst;
|
||||
// }
|
||||
// return 0;
|
||||
|
||||
// /* third identify */
|
||||
// __err_hrst:
|
||||
// qua_lcm_mipi_er88577b_rst(lcmHandle->lcm_probe.lcm_id);
|
||||
// ops->ctrl_fun.mipi.bus_deinit((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
// ops->ctrl_fun.mipi.bus_init((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
// rtn = qua_lcm_mipi_er88577b_identify_entity(param, ops);
|
||||
// if(rtn) {
|
||||
// printf("%s identify_entity failed.\n", __func__);
|
||||
// goto __err_frst;
|
||||
// }
|
||||
// return 0;
|
||||
|
||||
// /* fourth identify */
|
||||
// __err_frst:
|
||||
// qua_lcm_mipi_er88577b_rst(lcmHandle->lcm_probe.lcm_id);
|
||||
// ops->ctrl_fun.mipi.bus_deinit((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
// ops->ctrl_fun.mipi.bus_init((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
// rtn = ops->ctrl_fun.mipi.push_tab(lcmHandle->lcm_id, lcm_mipi_jd9365d_swrst_setting, ARRAY_SIZE(lcm_mipi_jd9365d_swrst_setting));
|
||||
// rtn = qua_lcm_mipi_er88577b_identify_entity(param, ops);
|
||||
// if(rtn) {
|
||||
// printf("%s identify_entity failed.\n", __func__);
|
||||
// goto __err_exit;
|
||||
// }
|
||||
// return 0;
|
||||
|
||||
__err_exit:
|
||||
ops->ctrl_fun.mipi.bus_deinit((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
ops->ctrl_fun.mipi.bus_init((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
//ops->ctrl_fun.mipi.push_tab(lcmHandle->lcm_id, qua_lcm_mipi_er88577b_6hc1017b7e_init_setting, ARRAY_SIZE(qua_lcm_mipi_er88577b_6hc1017b7e_init_setting));
|
||||
return 0;
|
||||
}
|
||||
#else /*CONFIG_QUA_LOGO_MIPI_ER88577B_PWR_CTRL*/
|
||||
static int32_t qua_lcm_mipi_er88577b_PowerOn(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printf("%s e\n",__func__);
|
||||
#endif
|
||||
|
||||
extern int qua_lcm_mipi_er88577b_bkl(void);
|
||||
qua_lcm_mipi_er88577b_bkl();
|
||||
|
||||
ops->ctrl_fun.mipi.bus_init((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
#if LCM_DEBUG
|
||||
printf("%s x\n",__func__);
|
||||
#endif
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_identify(void * param, lcm_ops *ops)
|
||||
{
|
||||
#if LCM_DEBUG
|
||||
printf("%s e\n",__func__);
|
||||
#endif
|
||||
|
||||
#if LCM_DEBUG
|
||||
printf("%s x\n",__func__);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif /*CONFIG_QUA_LOGO_MIPI_ER88577B_PWR_CTRL*/
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_PowerOff(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printf("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
ops->ctrl_fun.mipi.bus_deinit((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
#if LCM_DEBUG
|
||||
printf("%s\n",__func__);
|
||||
#endif
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_deinit(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printf("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
rtn = qua_lcm_mipi_er88577b_PowerOff(param, ops);
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_init(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printf("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
printf("%s lcm_id:%d\n",__FUNCTION__,lcmHandle->lcm_id);
|
||||
#endif
|
||||
|
||||
rtn = ops->ctrl_fun.mipi.push_tab(lcmHandle->lcm_id, qua_lcm_mipi_er88577b_6hc1017b7e_init_setting, ARRAY_SIZE(qua_lcm_mipi_er88577b_6hc1017b7e_init_setting));
|
||||
#if LCM_DEBUG
|
||||
printf("%s rtn %d\n",__func__,rtn);
|
||||
#endif
|
||||
return rtn;
|
||||
|
||||
|
||||
#ifdef CONFIG_QUA_LOGO_MIPI_ER88577B_PWR_CTRL
|
||||
/* Check the 2nd lcm initial error code and identify flag
|
||||
** And just assume that the first screen must be existed.
|
||||
*/
|
||||
if ((lcmHandle->lcm_id == 1) && ((_identify_lcm_idenfy_flag & 2) == 0)) {
|
||||
int lcm = 3, err = 0;
|
||||
|
||||
err = dsi_mipi_get_err_code();
|
||||
if (err & 2) lcm = 1;
|
||||
printf("%s err=%d lcm=%d\n",__func__,err,lcm);
|
||||
qua_set_lcm_bootargs(lcm);
|
||||
}
|
||||
#endif
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_suspend(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printf("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
ops->ctrl_fun.mipi.bus_deinit((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_resume(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printf("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
ops->ctrl_fun.mipi.bus_init((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
|
||||
//rtn = dsi_push_table(lcm_mipi_JD9365D_sleep_out_setting, ARRAY_SIZE(lcm_mipi_JD9365D_sleep_out_setting));
|
||||
return rtn;
|
||||
}
|
||||
|
||||
lcm_module_fun qua_lcm_mipi_er88577b_ctrl =
|
||||
{
|
||||
.poweron = qua_lcm_mipi_er88577b_PowerOn,
|
||||
.poweroff = qua_lcm_mipi_er88577b_PowerOff,
|
||||
.identify = qua_lcm_mipi_er88577b_identify,
|
||||
.init = qua_lcm_mipi_er88577b_init,
|
||||
.suspend = qua_lcm_mipi_er88577b_suspend,
|
||||
.resume = qua_lcm_mipi_er88577b_resume,
|
||||
.deinit = qua_lcm_mipi_er88577b_deinit,
|
||||
};
|
||||
|
||||
static lcm_display_sync_info_t qua_lcm_mipi_er88577b_dp_info =
|
||||
{
|
||||
.hor_sync_active = 20,
|
||||
.hor_back_porch = 80,
|
||||
.hor_active_pixel = LCM_WIDTH,
|
||||
.hor_front_porch = 80,
|
||||
|
||||
.ver_sync_active = 4,
|
||||
.ver_back_porch = 12,
|
||||
.ver_active_line = LCM_HEIGHT,
|
||||
.ver_front_porch = 20,
|
||||
};
|
||||
|
||||
static dsi_timing_t qua_lcm_mipi_er88577b_timing =
|
||||
{
|
||||
/*clk lane timing cfg*/
|
||||
.clane.mode = 1,
|
||||
.clane.lp11 = 0,
|
||||
.clane.lp01 = 16,
|
||||
.clane.zero = 0x22,
|
||||
.clane.prepare = 0x7,
|
||||
.clane.pre = 0x4,
|
||||
.clane.post = 0x10,
|
||||
.clane.trail = 0x9,
|
||||
.clane.inittime = 0x10,
|
||||
.clane.exit = 0x10,
|
||||
/*data lane timing cfg*/
|
||||
.dlane.mode = 1,
|
||||
.dlane.lp11 = 0,
|
||||
.dlane.lp01 = 0x10,
|
||||
.dlane.zero = 13,
|
||||
.dlane.prepare = 6,
|
||||
.dlane.trail = 10,
|
||||
.dlane.inittime = 16,
|
||||
.dlane.exit = 16,
|
||||
/*data lane0 read timing cfg*/
|
||||
.read.mode = 1,
|
||||
.read.tago = 67,
|
||||
.read.tasure = 25,
|
||||
.read.taget = 84,
|
||||
/*clk cfg*/
|
||||
.clk = {
|
||||
.vou.mode = 1,
|
||||
.vou.sel = 0x3,
|
||||
.vou.div = 0,
|
||||
|
||||
.mif.mode = 1,
|
||||
.mif.pll_doubler = 0,
|
||||
.mif.pll_div_s = 1,
|
||||
.mif.pll_n = 0,
|
||||
.mif.pll_kint = 3254779,
|
||||
.mif.pll_nint = 71,
|
||||
.mif.pixelclk_div = 12,
|
||||
.mif.pll_pdiv = 1,
|
||||
.mif.dhd_div = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static lcm_mipi_info qua_lcm_mipi_er88577b_mipi_info =
|
||||
{
|
||||
.work_mode = DSI_VIDEO_MODE,
|
||||
.lane_num = DSI_TWO_LANE,
|
||||
.format = DSI_RGB888,
|
||||
.packet_size = 256,
|
||||
.timing = (void *)&qua_lcm_mipi_er88577b_timing,
|
||||
};
|
||||
|
||||
const lcm_cfg_t qua_lcm_mipi_er88577b_6hc1017b7e_info =
|
||||
{
|
||||
.verder_name = VENDER_NAME,
|
||||
.name = "qua_dsi_800_1280_60_er88577b_6hc1017b7e",
|
||||
.width = LCM_WIDTH,
|
||||
.height = LCM_HEIGHT,
|
||||
.type = LCM_TYPE_MIPI, /*mcu, rgb, mipi*/
|
||||
.fps = 60,
|
||||
.direction = LCM_DIRECT_NORMAL,
|
||||
.dp_sync = &qua_lcm_mipi_er88577b_dp_info,
|
||||
.infor = {
|
||||
.mipi = &qua_lcm_mipi_er88577b_mipi_info,
|
||||
},
|
||||
.fun = &qua_lcm_mipi_er88577b_ctrl,
|
||||
};
|
||||
@ -25,7 +25,7 @@ extern lcm_cfg_t s_lcm_mipi_ek79007_info;
|
||||
extern lcm_cfg_t s_lcm_mipi_st7701s_info;
|
||||
extern lcm_cfg_t qua_lcm_mipi_jd9365d_jlm101b021_info;
|
||||
extern lcm_cfg_t qua_lcm_mipi_hx8729_qfh24004_info;
|
||||
|
||||
extern lcm_cfg_t qua_lcm_mipi_er88577b_6hc1017b7e_info;
|
||||
/*rgb lcm*/
|
||||
extern lcm_cfg_t s_lcm_rgb_at070tn94_info;
|
||||
extern lcm_cfg_t s_lcm_rgb18_at070tn94_info;
|
||||
@ -56,6 +56,10 @@ lcm_cfg_t *lcm_main_tab[] = {
|
||||
&qua_lcm_rgb_ek79001h_tg78550b3_24bits_info,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_QUA_LOGO_MIPI_ER88577B
|
||||
&qua_lcm_mipi_er88577b_6hc1017b7e_info,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_QUA_LOGO_MORE
|
||||
/*mipi lcm*/
|
||||
&s_lcm_mipi_ek79007_info,
|
||||
@ -90,6 +94,10 @@ lcm_cfg_t *lcm_sub_tab[] = {
|
||||
&qua_lcm_rgb_ek79001h_tg78550b3_24bits_info,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_QUA_LOGO_MIPI_ER88577B
|
||||
&qua_lcm_mipi_er88577b_6hc1017b7e_info,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_QUA_LOGO_MORE
|
||||
/*mipi lcm*/
|
||||
&s_lcm_mipi_st7701s_info,
|
||||
|
||||
@ -4,6 +4,20 @@ config QUA_LOGO
|
||||
help
|
||||
This enables qua logo.
|
||||
|
||||
config QUA_LOGO_MIPI_ER88577B
|
||||
bool "qua logo mipi er88577b 800x1280"
|
||||
depends on QUA_LOGO
|
||||
default n if QUA_LOGO
|
||||
help
|
||||
This enables qua logo mipi er88577b 800x1280.
|
||||
|
||||
config QUA_LOGO_MIPI_ER88577B_PWR_CTRL
|
||||
bool "qua logo mipi er88577b power on timing ctrl"
|
||||
depends on QUA_LOGO
|
||||
default n if QUA_LOGO
|
||||
help
|
||||
This enables qua logo mipi er88577b power on timing ctrl.
|
||||
|
||||
config QUA_LOGO_MIPI_JD9365D
|
||||
bool "qua logo mipi jd9365d 800x1280"
|
||||
depends on QUA_LOGO
|
||||
|
||||
@ -9,3 +9,4 @@ obj-$(CONFIG_QUA_LOGO_PART) += resource_img.o
|
||||
obj-$(CONFIG_QUA_LOGO_MIPI_JD9365D) += qua_logo_mipi_jd9365d.o
|
||||
obj-$(CONFIG_QUA_LOGO_RGB_EK79001H) += qua_logo_rgb_ek79001h.o
|
||||
obj-$(CONFIG_QUA_LOGO_MIPI_HX8729) += qua_logo_mipi_hx8729.o
|
||||
obj-$(CONFIG_QUA_LOGO_MIPI_ER88577B) += qua_logo_mipi_er88577b.o
|
||||
|
||||
@ -9,11 +9,6 @@
|
||||
#include <common.h>
|
||||
|
||||
void qua_boot_logo(void) {
|
||||
#ifdef CONFIG_QUA_LOGO_MIPI_HX8729
|
||||
extern void qua_boot_logo_hx8729(void);
|
||||
qua_boot_logo_hx8729();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_QUA_LOGO_MIPI_JD9365D
|
||||
extern void qua_boot_logo_jd9365d(void);
|
||||
qua_boot_logo_jd9365d();
|
||||
@ -25,4 +20,14 @@ void qua_boot_logo(void) {
|
||||
extern void qua_boot_logo_ek79001h(void);
|
||||
qua_boot_logo_ek79001h();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_QUA_LOGO_MIPI_ER88577B
|
||||
extern void qua_boot_logo_er88577b(void);
|
||||
qua_boot_logo_er88577b();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_QUA_LOGO_MIPI_ER88577B
|
||||
extern void qua_boot_logo_er88577b(void);
|
||||
qua_boot_logo_er88577b();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -0,0 +1,444 @@
|
||||
/*
|
||||
#
|
||||
# Copyright (c) Quaming Intelligent Technology Co., Ltd.
|
||||
# (C) Copyright 2002-2006 All Rights Reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include "resource_img.h"
|
||||
#include "udisk_flash.h"
|
||||
#include "mach/molchip_gpio.h"
|
||||
|
||||
#define ALIGN_UP(x, a) ((x+a-1)&(~(a-1)))
|
||||
|
||||
#define LCM_W 800
|
||||
#define LCM_H 1280
|
||||
#define LOGO_W 800 //dhd0 only support 1024x600
|
||||
#define LOGO_H 1280
|
||||
#define JPG_ADDR 0x43A00000
|
||||
#define Y_ADDR_1 0x43B00000
|
||||
#define UV_ADDR_1 0x43C00000
|
||||
#define Y_ADDR_2 0x43D00000 //(LOGO_YADDR0) //(0x43D00000) //MMZ END ADDR 0x44000000
|
||||
#define UV_ADDR_2 0x43E00000 //(LOGO_CADDR0) //(0x43D00000 + (ALIGN_UP(JPG_W, 16) * ALIGN_UP(JPG_H, 16))) //JPEG DEC MUST ALIGN 16
|
||||
#define LOGO_NAME_1 "logo_0.jpg"
|
||||
#define LOGO_NAME_2 "logo_1.jpg"
|
||||
#define LOGO_UPDATE "logo_update.jpg"
|
||||
#define LOGO_DEFAULT "default.jpg"
|
||||
#define LOGO_LANDS_1 "logo_lands_0.jpg"
|
||||
#define LOGO_LANDS_2 "logo_lands_1.jpg"
|
||||
|
||||
typedef enum {
|
||||
VOU_DEV_IDX_DHD = 0,
|
||||
VOU_DEV_IDX_DHD1,
|
||||
VOU_DEV_IDX_DSD,
|
||||
VOU_DEV_IDX_NUM,
|
||||
} vou_dev_idx_e;
|
||||
|
||||
extern unsigned int JPEG_WaitIRQ(void);
|
||||
extern unsigned int JPEG_WaitIRQ_Timeout(void);
|
||||
extern void fast_osd(int type, int x, int y, int w, int h, uint32_t y_addr, uint32_t uv_addr, int pw, int pp, int ph);
|
||||
extern void fast_osd_by_id(int id, int type, int x, int y, int w, int h, uint32_t y_addr, uint32_t uv_addr, int pw, int pp, int ph);
|
||||
extern void hw_jpeg_dec(unsigned int jpg_addr, unsigned int jpg_size, unsigned int luma_addr, unsigned int chroma_addr);
|
||||
|
||||
#ifdef CONFIG_QUA_LOGO_PART
|
||||
static int show_jpeg_from_part(int id, const char *name, unsigned int y_addr, unsigned int uv_addr)
|
||||
{
|
||||
int jpg_size = 0;
|
||||
unsigned int logo_width = LOGO_W;
|
||||
unsigned int logo_height = LOGO_H;
|
||||
|
||||
jpg_size = mc_read_resource_file((void*)JPG_ADDR, name, 0, 0);
|
||||
if (jpg_size > 0) {
|
||||
hw_jpeg_dec(JPG_ADDR, jpg_size, y_addr, uv_addr);
|
||||
if (!JPEG_WaitIRQ_Timeout()) {
|
||||
fast_osd_by_id(id, 1, (LCM_W - logo_width) / 2, (LCM_H - logo_height) / 2, logo_width, logo_height, y_addr, uv_addr, logo_width, logo_width, logo_height);
|
||||
printf("show %s done !\n", name);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
printf("show %s failed !\n", name);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int show_jpeg_welcome(int id, unsigned int y_addr, unsigned int uv_addr)
|
||||
{
|
||||
extern const __attribute__((aligned(64))) unsigned int logo_jpg_welcome_w320h160_map[];
|
||||
int jpg_size = 11752; //_binary_logo_jpg_end - _binary_logo_jpg_start;
|
||||
uint32_t jpg_addr = (unsigned int)&logo_jpg_welcome_w320h160_map;
|
||||
unsigned int logo_width = 320;
|
||||
unsigned int logo_height = 160;
|
||||
|
||||
hw_jpeg_dec(jpg_addr, jpg_size, y_addr, uv_addr);
|
||||
if (!JPEG_WaitIRQ_Timeout()) {
|
||||
fast_osd_by_id(id, 1, (LCM_W - logo_width) / 2, (LCM_H - logo_height) / 2, logo_width, logo_height, y_addr, uv_addr, logo_width, logo_width, logo_height);
|
||||
printf("show welcome done !\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
printf("show welcome failed !\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
void display_logo_id(int id, const char *logo_name) {
|
||||
char name[20] = {0};
|
||||
uint32_t y_addr = 0;
|
||||
uint32_t uv_addr = 0;
|
||||
|
||||
if (id == VOU_DEV_IDX_DHD) {
|
||||
y_addr = Y_ADDR_1;
|
||||
uv_addr = UV_ADDR_1;
|
||||
strcpy(name, LOGO_NAME_1);
|
||||
} else if (id == VOU_DEV_IDX_DHD1) {
|
||||
y_addr = Y_ADDR_2;
|
||||
uv_addr = UV_ADDR_2;
|
||||
strcpy(name, LOGO_NAME_2);
|
||||
}
|
||||
#ifdef CONFIG_UBOOT_XKPHOTO
|
||||
isFlashMode();
|
||||
|
||||
// landscape mode
|
||||
if (env_get_ulong("landscape", 10, 0) == 1) {
|
||||
strcpy(name, LOGO_LANDS_1);
|
||||
}
|
||||
#else
|
||||
if (!isFlashMode()) {
|
||||
strcpy(name, LOGO_UPDATE);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (logo_name) {
|
||||
strcpy(name, logo_name);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_QUA_LOGO_PART
|
||||
// display jpeg from logo partition
|
||||
if (show_jpeg_from_part(id, name, y_addr, uv_addr) == 0) {
|
||||
return;
|
||||
}
|
||||
// if logo_0.jpg or logo_1.jpg data is corrupted, display default.jpg
|
||||
if (show_jpeg_from_part(id, LOGO_DEFAULT, y_addr, uv_addr) == 0) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
show_jpeg_welcome(id, y_addr, uv_addr);
|
||||
}
|
||||
|
||||
void display_logo_id_addr(int id, const char * jpg_addr, const char * jpg_size) {
|
||||
uint32_t y_addr = 0;
|
||||
uint32_t uv_addr = 0;
|
||||
|
||||
if (id == VOU_DEV_IDX_DHD) {
|
||||
y_addr = Y_ADDR_1;
|
||||
uv_addr = UV_ADDR_1;
|
||||
} else if (id == VOU_DEV_IDX_DHD1) {
|
||||
y_addr = Y_ADDR_2;
|
||||
uv_addr = UV_ADDR_2;
|
||||
}
|
||||
|
||||
hw_jpeg_dec(simple_strtoul(jpg_addr, NULL, 16), simple_strtoul(jpg_size, NULL, 16), y_addr, uv_addr);
|
||||
if (!JPEG_WaitIRQ_Timeout()) {
|
||||
fast_osd_by_id(id, 1, (LCM_W - LOGO_W) / 2, (LCM_H - LOGO_H) / 2, LOGO_W, LOGO_H, y_addr, uv_addr, LOGO_W, LOGO_W, LOGO_H);
|
||||
printf("show jpg logo done !\n");
|
||||
return;
|
||||
}
|
||||
|
||||
printf("show jpg logo failed !\n");
|
||||
}
|
||||
|
||||
void qua_boot_logo_er88577b(void) {
|
||||
display_logo_id(VOU_DEV_IDX_DHD, NULL);
|
||||
#if defined(CONFIG_QUA_LCM_2ND_SCR)
|
||||
display_logo_id(VOU_DEV_IDX_DHD1, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
int gpio_direction_output(unsigned char pin, gpio_output_mode mode);
|
||||
int gpio_direction_input(unsigned char pin);
|
||||
int gpio_get_value(unsigned char pin);
|
||||
int gpio_set_value(unsigned char pin, gpio_output_mode mode);
|
||||
int gpio_request(unsigned gpio, const char *label);
|
||||
|
||||
extern void qua_writel(uint32_t value, uint32_t addr);
|
||||
extern uint32_t qua_readl(uint32_t addr);
|
||||
|
||||
#ifdef CONFIG_UBOOT_XKPHOTO
|
||||
#define REG_PIN_MUX_BASE 0x10200000
|
||||
#define REG_LCD_DE_PIN 0x64
|
||||
#define REG_LCD_HS_PIN 0x68
|
||||
#define REG_LCD_VS_PIN 0x6C
|
||||
#define REG_LCD_D0_PIN 0x74
|
||||
#define REG_LCD_D1_PIN 0x78
|
||||
#define REG_LCD_BL_PIN 0xb0
|
||||
|
||||
#define REG_PIN_DRV_BASE 0x0B100000
|
||||
#define REG_LCD_DE_DRV 0x28
|
||||
#define REG_LCD_HS_DRV 0x2C
|
||||
#define REG_LCD_VS_DRV 0x30
|
||||
#define REG_LCD_D0_DRV 0x38
|
||||
#define REG_LCD_D1_DRV 0x3C
|
||||
|
||||
#define GPIO_NUM_INDEX(x,y) (8*x + y)
|
||||
#define GPIO_NUM_LCD_DE GPIO_NUM_INDEX(3,3)
|
||||
#define GPIO_NUM_LCD_HS GPIO_NUM_INDEX(3,4)
|
||||
#define GPIO_NUM_LCD_VS GPIO_NUM_INDEX(3,5)
|
||||
#define GPIO_NUM_LCD_D0 GPIO_NUM_INDEX(3,7)
|
||||
#define GPIO_NUM_LCD_D1 GPIO_NUM_INDEX(4,0)
|
||||
#define GPIO_NUM_LCD_BL GPIO_NUM_INDEX(5,6)
|
||||
#else
|
||||
#define REG_PIN_MUX_BASE 0x10200000
|
||||
#define REG_LCD_DE_PIN 0x64
|
||||
#define REG_LCD_HS_PIN 0x68
|
||||
#define REG_LCD_VS_PIN 0x6C
|
||||
#define REG_LCD_D0_PIN 0x74
|
||||
#define REG_LCD_D1_PIN 0x78
|
||||
#define REG_LCD_BL_PIN 0xec
|
||||
|
||||
#define REG_PIN_DRV_BASE 0x0B100000
|
||||
#define REG_LCD_DE_DRV 0x28
|
||||
#define REG_LCD_HS_DRV 0x2C
|
||||
#define REG_LCD_VS_DRV 0x30
|
||||
#define REG_LCD_D0_DRV 0x38
|
||||
#define REG_LCD_D1_DRV 0x3C
|
||||
|
||||
#define GPIO_NUM_INDEX(x,y) (8*x + y)
|
||||
#define GPIO_NUM_LCD_DE GPIO_NUM_INDEX(3,3)
|
||||
#define GPIO_NUM_LCD_HS GPIO_NUM_INDEX(3,4)
|
||||
#define GPIO_NUM_LCD_VS GPIO_NUM_INDEX(3,5)
|
||||
#define GPIO_NUM_LCD_D0 GPIO_NUM_INDEX(3,7)
|
||||
#define GPIO_NUM_LCD_D1 GPIO_NUM_INDEX(4,0)
|
||||
#define GPIO_NUM_LCD_BL GPIO_NUM_INDEX(0,5)
|
||||
#endif
|
||||
|
||||
#define PIN_MUX_GPIO_ENABLE (1)
|
||||
static void __qua_lcm_mipi_er88577b_hrst(unsigned int vci_pin_reg_oft, unsigned int rst_pin_reg_oft,
|
||||
unsigned int vci_pin_gpio_num, unsigned int rst_pin_gpio_num)
|
||||
{
|
||||
unsigned int pmux_reg = (unsigned int)REG_PIN_MUX_BASE;
|
||||
printf("%s e\n", __func__);
|
||||
/* power on rst timing gpio */
|
||||
qua_writel(PIN_MUX_GPIO_ENABLE, pmux_reg + rst_pin_reg_oft);
|
||||
gpio_request(rst_pin_gpio_num, "rst_gpio");
|
||||
gpio_direction_output(rst_pin_gpio_num, 0);
|
||||
gpio_set_value(rst_pin_gpio_num, 0);
|
||||
|
||||
/* power on vci timing gpio, 0: on, 1: off */
|
||||
qua_writel(PIN_MUX_GPIO_ENABLE, pmux_reg + vci_pin_reg_oft);
|
||||
gpio_request(vci_pin_gpio_num, "vci_gpio");
|
||||
gpio_direction_output(vci_pin_gpio_num, 1);
|
||||
gpio_set_value(vci_pin_gpio_num, 1);
|
||||
mdelay(500);
|
||||
gpio_set_value(vci_pin_gpio_num, 0);
|
||||
mdelay(10);
|
||||
|
||||
#if 1
|
||||
/* power on rst timing */
|
||||
gpio_set_value(rst_pin_gpio_num, 1);
|
||||
mdelay(10);
|
||||
gpio_set_value(rst_pin_gpio_num, 0);
|
||||
mdelay(10);
|
||||
gpio_set_value(rst_pin_gpio_num, 1);
|
||||
mdelay(120);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* power on rst timing */
|
||||
gpio_set_value(rst_pin_gpio_num, 1);
|
||||
mdelay(10);
|
||||
gpio_set_value(rst_pin_gpio_num, 0);
|
||||
mdelay(20);
|
||||
gpio_set_value(rst_pin_gpio_num, 1);
|
||||
mdelay(10);
|
||||
#endif
|
||||
|
||||
/* power backlight gpio enable, 0x102000ec */
|
||||
qua_writel(PIN_MUX_GPIO_ENABLE, pmux_reg + REG_LCD_BL_PIN);
|
||||
gpio_request(GPIO_NUM_LCD_BL, "bkl_gpio");
|
||||
gpio_direction_output(GPIO_NUM_LCD_BL, 1);
|
||||
gpio_set_value(GPIO_NUM_LCD_BL, 1);
|
||||
|
||||
// gpio_free(rst_pin_gpio_num);
|
||||
// gpio_free(vci_pin_gpio_num);
|
||||
printf("%s x\n", __func__);
|
||||
}
|
||||
|
||||
int qua_lcm_mipi_er88577b_hrst(int lcm_id)
|
||||
{
|
||||
printf("%s e\n", __func__);
|
||||
printf("%s lcm_id=%d\n", __func__, lcm_id);
|
||||
if(lcm_id == 0)
|
||||
__qua_lcm_mipi_er88577b_hrst(REG_LCD_D0_PIN, REG_LCD_DE_PIN, GPIO_NUM_LCD_D0, GPIO_NUM_LCD_DE);
|
||||
|
||||
if(lcm_id == 1)
|
||||
__qua_lcm_mipi_er88577b_hrst(REG_LCD_D1_PIN, REG_LCD_HS_PIN, GPIO_NUM_LCD_D1, GPIO_NUM_LCD_HS);
|
||||
printf("%s x\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __qua_lcm_mipi_er88577b_rst(unsigned int rst_pin_reg_oft, unsigned int rst_pin_gpio_num)
|
||||
{
|
||||
unsigned int pmux_reg = (unsigned int)REG_PIN_MUX_BASE;
|
||||
printf("%s e\n", __func__);
|
||||
/* power on rst timing gpio */
|
||||
qua_writel(PIN_MUX_GPIO_ENABLE, pmux_reg + rst_pin_reg_oft);
|
||||
gpio_request(rst_pin_gpio_num, "rst_gpio");
|
||||
gpio_direction_output(rst_pin_gpio_num, 1);
|
||||
gpio_set_value(rst_pin_gpio_num, 0);
|
||||
mdelay(10);
|
||||
/* power on rst timing */
|
||||
gpio_set_value(rst_pin_gpio_num, 1);
|
||||
mdelay(10);
|
||||
gpio_set_value(rst_pin_gpio_num, 0);
|
||||
mdelay(20);
|
||||
gpio_set_value(rst_pin_gpio_num, 1);
|
||||
mdelay(10);
|
||||
|
||||
// gpio_free(rst_pin_gpio_num);
|
||||
// gpio_free(vci_pin_gpio_num);
|
||||
printf("%s x\n", __func__);
|
||||
}
|
||||
|
||||
int qua_lcm_mipi_er88577b_rst(int lcm_id)
|
||||
{
|
||||
printf("%s e\n", __func__);
|
||||
printf("%s lcm_id=%d\n", __func__, lcm_id);
|
||||
if(lcm_id == 0)
|
||||
__qua_lcm_mipi_er88577b_rst(REG_LCD_DE_PIN, GPIO_NUM_LCD_DE);
|
||||
|
||||
if(lcm_id == 1)
|
||||
__qua_lcm_mipi_er88577b_rst(REG_LCD_HS_PIN, GPIO_NUM_LCD_HS);
|
||||
printf("%s x\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int qua_lcm_mipi_er88577b_bkl(void)
|
||||
{
|
||||
unsigned int pmux_reg = (unsigned int)REG_PIN_MUX_BASE;
|
||||
// printf("%s e\n", __func__);
|
||||
/* power backlight gpio enable, 0x102000b0 */
|
||||
qua_writel(PIN_MUX_GPIO_ENABLE, pmux_reg + REG_LCD_BL_PIN);
|
||||
gpio_request(GPIO_NUM_LCD_BL, "bkl_gpio");
|
||||
gpio_direction_output(GPIO_NUM_LCD_BL, 1);
|
||||
gpio_set_value(GPIO_NUM_LCD_BL, 1);
|
||||
|
||||
// printf("%s x\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
#if 0
|
||||
int qua_lcm_mipi_er88577b_hrst(int lcm_id)
|
||||
{
|
||||
// int rtn = 0, val = 0, tmp = 0, _v = 0, i = 0, count = 3;
|
||||
// volatile unsigned int *pdrv_reg = (volatile unsigned int *)_vpdrvbase;
|
||||
volatile unsigned int *pmux_reg = (volatile unsigned int *)REG_PIN_MUX_BASE;
|
||||
|
||||
if(lcm_id == 0)
|
||||
{
|
||||
/* power on vci timing gpio3_7 */
|
||||
qua_writel(1, (unsigned int)pmux_reg + REG_LCD_D0_PIN);
|
||||
qua_gpio_request(GPIO_NUM_LCD_D0, 0);
|
||||
qua_gpio_direction_output(GPIO_NUM_LCD_D0, 1);
|
||||
qua_gpio_set_value(GPIO_NUM_LCD_D0, 1);
|
||||
qua_gpio_set_value(GPIO_NUM_LCD_D0, 0);
|
||||
mdelay(5);
|
||||
|
||||
/* power on rst timing gpio3_3 */
|
||||
qua_writel(1, (unsigned int)pmux_reg + REG_LCD_DE_PIN);
|
||||
// tmp = qua_readl((unsigned int)pdrv_reg + REG_LCD_DE_DRV);
|
||||
// printf("%s LCD_DE drv = 0x%x\n", __func__, tmp);
|
||||
// _v = ((tmp & 0xf0) | 0x04);
|
||||
// qua_writel(_v, (unsigned int)pdrv_reg + REG_LCD_DE_DRV);
|
||||
|
||||
qua_gpio_request(GPIO_NUM_LCD_DE, 0);
|
||||
qua_gpio_direction_output(GPIO_NUM_LCD_DE, 1);
|
||||
qua_gpio_set_value(GPIO_NUM_LCD_DE, 1);
|
||||
qua_gpio_set_value(GPIO_NUM_LCD_DE, 0);
|
||||
mdelay(5);
|
||||
qua_gpio_set_value(GPIO_NUM_LCD_DE, 1);
|
||||
mdelay(5);
|
||||
printf("%s gpio3_3 \n", __func__);
|
||||
|
||||
// printf("%s gpio3_3 val = 0x%x\n", __func__, val);
|
||||
// qua_writel(tmp, (unsigned int)pdrv_reg + REG_LCD_DE_DRV);
|
||||
qua_gpio_free(GPIO_NUM_LCD_DE);
|
||||
qua_gpio_free(GPIO_NUM_LCD_D0);
|
||||
}
|
||||
|
||||
if(lcm_id == 1)
|
||||
{
|
||||
/* power on vci timing gpio4_0 */
|
||||
qua_writel(1, (unsigned int)pmux_reg + REG_LCD_D1_PIN);
|
||||
qua_gpio_request(GPIO_NUM_LCD_D1, 0);
|
||||
qua_gpio_direction_output(GPIO_NUM_LCD_D1, 1);
|
||||
qua_gpio_set_value(GPIO_NUM_LCD_D1, 1);
|
||||
qua_gpio_set_value(GPIO_NUM_LCD_D1, 0);
|
||||
mdelay(5);
|
||||
|
||||
/* power on rst timing gpio3_4 */
|
||||
qua_writel(1, (unsigned int)pmux_reg + REG_LCD_HS_PIN);
|
||||
// tmp = qua_readl((unsigned int)pdrv_reg + REG_LCD_VS_DRV);
|
||||
// printf("%s LCD_VS drv = 0x%x\n", __func__, tmp);
|
||||
// _v = ((tmp & 0xf0) | 0x04);
|
||||
// qua_writel(_v, (unsigned int)pdrv_reg + REG_LCD_VS_DRV);
|
||||
|
||||
qua_gpio_request(GPIO_NUM_LCD_HS, 0);
|
||||
qua_gpio_direction_output(GPIO_NUM_LCD_HS, 1);
|
||||
|
||||
qua_gpio_set_value(GPIO_NUM_LCD_HS, 1);
|
||||
// do{
|
||||
qua_gpio_set_value(GPIO_NUM_LCD_HS, 0);
|
||||
mdelay(5);
|
||||
qua_gpio_set_value(GPIO_NUM_LCD_HS, 1);
|
||||
mdelay(5);
|
||||
printf("%s gpio3_4 \n", __func__);
|
||||
// while(1);
|
||||
|
||||
// }while(1);
|
||||
// printf("%s gpio3_4 val = 0x%x\n", __func__, val);
|
||||
|
||||
// qua_writel(tmp, (unsigned int)pdrv_reg + REG_LCD_VS_DRV);
|
||||
qua_gpio_free(GPIO_NUM_LCD_HS);
|
||||
qua_gpio_free(GPIO_NUM_LCD_D1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int show_qua_boot_logo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
{
|
||||
if (argc != 2 && argc != 3)
|
||||
goto usage;
|
||||
|
||||
// 传入logo分区中logo图片的名称
|
||||
if (argc == 2) {
|
||||
display_logo_id(VOU_DEV_IDX_DHD, argv[1]);
|
||||
#if defined(CONFIG_QUA_LCM_2ND_SCR)
|
||||
display_logo_id(VOU_DEV_IDX_DHD1, argv[1]);
|
||||
#endif
|
||||
}
|
||||
|
||||
// logo图片已读取到ddr中,传入ddr的地址和logo图片大小
|
||||
if (argc == 3) {
|
||||
display_logo_id_addr(VOU_DEV_IDX_DHD, argv[1], argv[2]);
|
||||
#if defined(CONFIG_QUA_LCM_2ND_SCR)
|
||||
display_logo_id_addr(VOU_DEV_IDX_DHD1, argv[1], argv[2]);
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
usage:
|
||||
printf("Usage: qua_logo %s\n", cmdtp->usage);
|
||||
return 1;
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
qua_logo, 3, 0, show_qua_boot_logo,
|
||||
"show qua boot logo",
|
||||
"show qua boot logo"
|
||||
);
|
||||
@ -87,7 +87,7 @@ int spi_nand_program_image(u32 dest, u32 len, u8 *buf)
|
||||
u32 length = (64<<11);
|
||||
u8 *buf_tmp;
|
||||
|
||||
buf_tmp = buf + 0x500000;
|
||||
buf_tmp = buf + 0x1800000;
|
||||
|
||||
mtd = get_nand_dev_by_index(0);
|
||||
chip = mtd_to_nand(mtd);
|
||||
@ -211,17 +211,17 @@ void board_init_r(gd_t *gd, ulong dest_addr)
|
||||
{
|
||||
if(strap_sts & 0x1){ //uart download
|
||||
uart_boot(uart_port);
|
||||
d_info = get_cur_downinfo();
|
||||
}
|
||||
else{
|
||||
usb_boot();
|
||||
if(strap_sts & 0x2) //boot1 0: nor 1:nand
|
||||
d_info = get_cur_downinfo();
|
||||
if(d_info->media_type == 0x2)
|
||||
nvm_mod = BOOT_DEVICE_NAND ;
|
||||
else
|
||||
nvm_mod = BOOT_DEVICE_NOR;
|
||||
}
|
||||
|
||||
d_info = get_cur_downinfo();
|
||||
|
||||
switch(nvm_mod)
|
||||
{
|
||||
case BOOT_DEVICE_NAND:
|
||||
|
||||
@ -122,7 +122,9 @@ CONFIG_CMD_BLINKLED=y
|
||||
CONFIG_LED_INDICATOR_FOR_FLASH=y
|
||||
CONFIG_LED_INDICATOR_GPIO=39
|
||||
CONFIG_QUA_LOGO=y
|
||||
CONFIG_QUA_LOGO_MIPI_JD9365D=y
|
||||
CONFIG_QUA_LOGO_MIPI_JD9365D_PWR_CTRL=y
|
||||
#CONFIG_QUA_LOGO_MIPI_JD9365D=y
|
||||
#CONFIG_QUA_LOGO_MIPI_JD9365D_PWR_CTRL=y
|
||||
CONFIG_QUA_LOGO_MIPI_ER88577B=y
|
||||
CONFIG_QUA_LOGO_MIPI_ER88577B_PWR_CTRL=y
|
||||
CONFIG_QUA_LCM_FASTBOOT=y
|
||||
CONFIG_UBOOT_MOTO_LD=y
|
||||
|
||||
@ -17,7 +17,7 @@ CONFIG_TPL_SYS_MALLOC_F_LEN=0x400
|
||||
CONFIG_SPI_BOOT=y
|
||||
CONFIG_BOOTDELAY=0
|
||||
CONFIG_USE_BOOTARGS=y
|
||||
CONFIG_BOOTARGS="quiet mtdswap.partitions=10 ubi.mtd=9 ubi.mtd=11 ubi.mtd=12 root=ubi1:rootfs init=/init rootfstype=ubifs mem=38M earlycon console=ttyS0,115200 mtdparts=spi_nfc:128k@0(boot-spl),128k@128k(boot-env),768k@256k(boot-uboot),1m@1m(logo),1m@2m(padding),1m@3m(misc),3m@4m(recovery),10m@7m(recovery-rootfs),8m@17m(boot),20m@25m(system),6m@45m(swapfile),10m@51m(rootfs),6m@61m(data),-@67m(usrdata)"
|
||||
CONFIG_BOOTARGS="quiet mtdswap.partitions=10 ubi.mtd=9 ubi.mtd=11 ubi.mtd=12 root=ubi1:rootfs init=/init rootfstype=ubifs mem=38M earlycon console=ttyS0,115200 mtdparts=spi_nfc:128k@0(boot-spl),128k@128k(boot-env),768k@256k(boot-uboot),1m@1m(logo),1m@2m(padding),1m@3m(misc),3m@4m(recovery),10m@7m(recovery-rootfs),4m@17m(boot),18m@21m(system),6m@39m(swapfile),12m@45m(rootfs),6m@57m(data),-@63m(usrdata)"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_BOARD_EARLY_INIT_F=y
|
||||
@ -80,7 +80,7 @@ CONFIG_MTD=y
|
||||
CONFIG_MTD_DEVICE=y
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
CONFIG_CMD_MTDPARTS=y
|
||||
CONFIG_MTDPARTS_DEFAULT="mtdparts=spi_nfc:128k@0(boot-spl),128k@128k(boot-env),768k@256k(boot-uboot),1m@1m(logo),1m@2m(padding),1m@3m(misc),3m@4m(recovery),10m@7m(recovery-rootfs),8m@17m(boot),20m@25m(system),6m@45m(swapfile),10m@51m(rootfs),6m@61m(data),-@67m(usrdata)"
|
||||
CONFIG_MTDPARTS_DEFAULT="mtdparts=spi_nfc:128k@0(boot-spl),128k@128k(boot-env),768k@256k(boot-uboot),1m@1m(logo),1m@2m(padding),1m@3m(misc),3m@4m(recovery),10m@7m(recovery-rootfs),4m@17m(boot),18m@21m(system),6m@39m(swapfile),12m@45m(rootfs),6m@57m(data),-@63m(usrdata)"
|
||||
CONFIG_MTDIDS_DEFAULT="nand0=spi_nfc"
|
||||
CONFIG_CMD_LZMADEC=y
|
||||
# CONFIG_CMD_UNZIP=y
|
||||
@ -122,7 +122,9 @@ CONFIG_CMD_BLINKLED=y
|
||||
CONFIG_LED_INDICATOR_FOR_FLASH=y
|
||||
CONFIG_LED_INDICATOR_GPIO=39
|
||||
CONFIG_QUA_LOGO=y
|
||||
CONFIG_QUA_LOGO_MIPI_JD9365D=y
|
||||
CONFIG_QUA_LOGO_MIPI_JD9365D_PWR_CTRL=y
|
||||
#CONFIG_QUA_LOGO_MIPI_JD9365D=y
|
||||
#CONFIG_QUA_LOGO_MIPI_JD9365D_PWR_CTRL=y
|
||||
CONFIG_QUA_LOGO_MIPI_ER88577B=y
|
||||
CONFIG_QUA_LOG0_MIPI_ER88577B_PWR_CTRL=y
|
||||
CONFIG_QUA_LCM_FASTBOOT=y
|
||||
CONFIG_UBOOT_MOTO_LD=y
|
||||
|
||||
@ -24,8 +24,9 @@ lcm_module-objs += utils/qua_lcm_gpio.o \
|
||||
lcm_mipi_qua_jd9365d_jlm101b021.o \
|
||||
lcm_rgb_qua_ek79001h_tg78550b3.o \
|
||||
lcm_rgb_qua_ek79001h_tg78550b3_24bits.o \
|
||||
lcm_rgb_qua_st7265_tcxd050iblma.o
|
||||
|
||||
lcm_rgb_qua_st7265_tcxd050iblma.o \
|
||||
lcm_mipi_er88577b.o\
|
||||
lcm_mipi_qua_er88577b_6hc1017b7e.o
|
||||
|
||||
lcm_module-objs += mol_lcm_module.o \
|
||||
|
||||
|
||||
@ -0,0 +1,332 @@
|
||||
|
||||
#include "mol_lcm_local.h"
|
||||
#include "dsi_com_param.h"
|
||||
#include "mol_lcm.h"
|
||||
|
||||
#define LCM_ER88577B_DEBUG 0
|
||||
|
||||
#define LCM_ER88577B_WIDTH 800
|
||||
#define LCM_ER88577B_HEIGHT 1280
|
||||
|
||||
const lcm_cfg_t s_lcm_mipi_er88577b_info;
|
||||
|
||||
static dsi_setting_tab_t s_lcm_mipi_er88577b_init_code[] = {
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00,0xE0,0xAB,0xBA}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00,0xE1,0xBA,0xAB}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x07, {0x05,0x00,0xB1,0x10,0x01,0x47,0xFF}},
|
||||
//{DSI_DI_DCS_WRITE_LONG, 0x07, {0x05,0x00,0xB1,0x11,0x01,0x47,0xFF}}, //BIST
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x09, {0x07,0x00,0xB2,0x0C,0x14,0x04,0x50,0x50,0x14}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x06, {0x04,0x00,0xB3,0x56,0x53,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x06, {0x04,0x00,0xB4,0x33,0x30,0x04}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0A, {0x08,0x00,0xB6,0xB0,0x00,0x00,0x10,0x00,0x10,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x08, {0x06,0x00,0xB8,0x05,0x12,0x29,0x49,0x48}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x29, {0x27,0x00,0xB9,0x7C,0x61,0x4F,0x42,0x3E,0x2D,0x31,0x1A,0x33,0x33,0x33,0x52,0x40,0x47,0x38,0x34,0x26,0x0E,0x06,0x7C,0x61,0x4F,0x42,0x3E,0x2D,0x31,0x1A,0x33,0x33,0x33,0x52,0x40,0x47,0x38,0x34,0x26,0x0E,0x06}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x13, {0x11,0x00,0xC0,0xCC,0x76,0x12,0x34,0x44,0x44,0x44,0x44,0x98,0x04,0x98,0x04,0x0F,0x00,0x00,0xC1}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0D, {0x0B,0x00,0xC1,0x54,0x94,0x02,0x85,0x9F,0x00,0x6F,0x00,0x54,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0F, {0x0D,0x00,0xC2,0x17,0x09,0x08,0x89,0x08,0x11,0x22,0x20,0x44,0xFF,0x18,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x19, {0x17,0x00,0xC3,0x87,0x47,0x05,0x05,0x1C,0x1C,0x1D,0x1D,0x02,0x1E,0x1E,0x1F,0x1F,0x0F,0x0F,0x0D,0x0D,0x13,0x13,0x11,0x11,0x24}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x19, {0x17,0x00,0xC4,0x06,0x06,0x04,0x04,0x1C,0x1C,0x1D,0x1D,0x02,0x1E,0x1E,0x1F,0x1F,0x0E,0x0E,0x0C,0x0C,0x12,0x12,0x10,0x10,0x24}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00,0xC6,0x2A,0x2A}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x09, {0x07,0x00,0xC8,0x21,0x00,0x31,0x42,0x34,0x16}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00,0xCA,0xCB,0x43}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0B, {0x09,0x00,0xCD,0x0E,0x4B,0x4B,0x20,0x19,0x6B,0x06,0xB3}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x07, {0x05,0x00,0xD2,0xE3,0x2B,0x38,0x08}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0E, {0x0C,0x00,0xD4,0x00,0x01,0x00,0x0E,0x04,0x44,0x08,0x10,0x00,0x00,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0B, {0x09,0x00,0xE6,0x80,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x08, {0x06,0x00,0xF0,0x12,0x03,0x20,0x00,0xFF}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 0x02, {0xF3,0x00}},
|
||||
|
||||
{DSI_DI_DELAY, 10, },
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 0x02, {0x11,0x00}},
|
||||
{DSI_DI_DELAY, 120, },
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 0x02, {0x29,0x00}},
|
||||
{DSI_DI_DELAY, 20, },
|
||||
{DSI_DI_END_OF_TABLE, 0x00, {0}}
|
||||
};
|
||||
#if 0
|
||||
static dsi_setting_tab_t s_lcm_mipi_er88577b_sleep_out_setting[] = {
|
||||
// sleep out
|
||||
// {DSI_DI_DELAY, 20, },
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 0x02, {0x11,0x00}},
|
||||
{DSI_DI_DELAY, 120, },
|
||||
// display on
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 0x02, {0x29,0x00}},
|
||||
{DSI_DI_DELAY, 20, },
|
||||
{DSI_DI_END_OF_TABLE, 0x00, {0}}
|
||||
};
|
||||
|
||||
static dsi_setting_tab_t s_lcm_mipi_er88577b_sleep_in_setting[] = {
|
||||
// sleep in
|
||||
{DSI_DI_DELAY, 20, },
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 0x01, {0x28}},
|
||||
{DSI_DI_DELAY, 20, },
|
||||
// Display off
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 0x01, {0x10}},
|
||||
{DSI_DI_DELAY, 120, },
|
||||
{DSI_DI_END_OF_TABLE, 0x00, {0}}
|
||||
};
|
||||
|
||||
static dsi_setting_tab_t s_lcm_mipi_er88577b_work_code[] = {
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 0x02, {0x36,0x00}}, /* 0x00: RGB 0x08: BGR */
|
||||
// display on
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 0x01, {0x29}},
|
||||
{DSI_DI_DELAY, 70, {0x00}},
|
||||
{DSI_DI_END_OF_TABLE, 0x00, {0}}
|
||||
};
|
||||
|
||||
static dsi_setting_tab_t s_lcm_mipi_er88577b_reset_code[] = {
|
||||
// sw reset
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 0x01, {0x01}},
|
||||
{DSI_DI_DELAY, 5, {0x00}},
|
||||
{DSI_DI_END_OF_TABLE, 0x00, {0}}
|
||||
};
|
||||
#endif
|
||||
static int32_t _lcm_mipi_er88577b_PowerOn(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
//lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
|
||||
#if LCM_ER88577B_DEBUG
|
||||
printf("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
// system("devmem 0x1020007c 32 0x1");
|
||||
// system("echo 33 > /sys/class/gpio/export");
|
||||
// system("echo out > /sys/class/gpio/gpio33/direction");
|
||||
// system("echo 1 > /sys/class/gpio/gpio33/value");
|
||||
|
||||
ops->ctrl_fun.mipi.bus_init((void *)param, (void *)&s_lcm_mipi_er88577b_info);
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t _lcm_mipi_er88577b_PowerOff(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
|
||||
#if LCM_ER88577B_DEBUG
|
||||
printf("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
ops->power.reset(lcmHandle->lcm_id, 0);
|
||||
ops->delayMs(10);
|
||||
|
||||
ops->ctrl_fun.mipi.bus_deinit((void *)param, (void *)&s_lcm_mipi_er88577b_info);
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t _lcm_mipi_er88577b_identify(void * param, lcm_ops *ops)
|
||||
{
|
||||
#define MIPI_ER88577B_480_ID0_ADDR (0xA1)
|
||||
#define MIPI_ER88577B_480_ID1_ADDR (0xA8)
|
||||
#define MIPI_ER88577B_480_ID0 (0x88)
|
||||
#define MIPI_ER88577B_480_ID1 (0x02)
|
||||
int32_t rtn = SUCCESS;
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
uint8_t read_data[2] = {0};
|
||||
|
||||
return rtn;
|
||||
#if LCM_ER88577B_DEBUG
|
||||
ops->debug_fun(1, __FUNCTION__, __LINE__, "start");
|
||||
#endif
|
||||
|
||||
CHECK_PTR(param, NULL, "inParam ptr is NULL ~_~!\n");
|
||||
CHECK_PTR(ops, NULL, "ops ptr is NULL ~_~!\n");
|
||||
|
||||
goto EXIT;
|
||||
|
||||
read_data[0] = 0xff;
|
||||
read_data[1] = 0xff;
|
||||
|
||||
rtn = ops->ctrl_fun.mipi.dcs_read(lcmHandle->lcm_id, DSI_DI_DCS_READ_0_PARAM, MIPI_ER88577B_480_ID0_ADDR, 1, &read_data[0]);
|
||||
rtn = ops->ctrl_fun.mipi.dcs_read(lcmHandle->lcm_id, DSI_DI_DCS_READ_0_PARAM, MIPI_ER88577B_480_ID1_ADDR, 1, &read_data[1]);
|
||||
|
||||
if ((MIPI_ER88577B_480_ID0 != read_data[0])
|
||||
|| (MIPI_ER88577B_480_ID1 != read_data[1])) {
|
||||
rtn = FAIL_ID_NO_MATCH;
|
||||
}
|
||||
|
||||
printf("er88577b_2lane id : 0x%x:0x%x, 0x%x:0x%x", MIPI_ER88577B_480_ID0, MIPI_ER88577B_480_ID1, read_data[0],read_data[1]);
|
||||
|
||||
EXIT:
|
||||
|
||||
#if LCM_ER88577B_DEBUG
|
||||
ops->debug_fun(1, __FUNCTION__, __LINE__, "end");
|
||||
#endif
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t _lcm_mipi_er88577b_init(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
|
||||
#if LCM_ER88577B_DEBUG
|
||||
printf("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
rtn = ops->ctrl_fun.mipi.push_tab(lcmHandle->lcm_id, s_lcm_mipi_er88577b_init_code, ARRAY_SIZE(s_lcm_mipi_er88577b_init_code));
|
||||
// rtn = ops->ctrl_fun.mipi.push_tab(lcmHandle->lcm_id, s_lcm_mipi_er88577b_sleep_out_setting, ARRAY_SIZE(s_lcm_mipi_er88577b_sleep_out_setting));
|
||||
|
||||
//rtn = ops->power.back_light_gpio(lcmHandle->lcm_id, 1);
|
||||
|
||||
#if LCM_ER88577B_DEBUG
|
||||
ops->debug_fun(1, __FUNCTION__, __LINE__, "end");
|
||||
#endif
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t _lcm_mipi_er88577b_suspend(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
|
||||
#if LCM_ER88577B_DEBUG
|
||||
printf("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
rtn = ops->power.back_light_gpio(lcmHandle->lcm_id, 0);
|
||||
|
||||
#if LCM_ER88577B_DEBUG
|
||||
ops->debug_fun(1, __FUNCTION__, __LINE__, "end");
|
||||
#endif
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t _lcm_mipi_er88577b_resume(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
|
||||
#if LCM_ER88577B_DEBUG
|
||||
printf("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
rtn = ops->power.back_light_gpio(lcmHandle->lcm_id, 1);
|
||||
|
||||
#if LCM_ER88577B_DEBUG
|
||||
ops->debug_fun(1, __FUNCTION__, __LINE__, "end");
|
||||
#endif
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t _lcm_mipi_er88577b_deinit(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
|
||||
#if LCM_ER88577B_DEBUG
|
||||
printf("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
rtn = ops->power.back_light_gpio(lcmHandle->lcm_id, 0);
|
||||
rtn = _lcm_mipi_er88577b_PowerOff(param, ops);
|
||||
|
||||
#if LCM_ER88577B_DEBUG
|
||||
ops->debug_fun(1, __FUNCTION__, __LINE__, "end");
|
||||
#endif
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
lcm_module_fun s_lcm_mipi_er88577b_ctrl =
|
||||
{
|
||||
.poweron = _lcm_mipi_er88577b_PowerOn,
|
||||
.poweroff = _lcm_mipi_er88577b_PowerOff,
|
||||
.identify = _lcm_mipi_er88577b_identify,
|
||||
.init = _lcm_mipi_er88577b_init,
|
||||
.suspend = _lcm_mipi_er88577b_suspend,
|
||||
.resume = _lcm_mipi_er88577b_resume,
|
||||
.deinit = _lcm_mipi_er88577b_deinit,
|
||||
};
|
||||
|
||||
static lcm_display_sync_info_t s_lcm_mipi_er88577b_dp_info =
|
||||
{
|
||||
.hor_sync_active = 20,
|
||||
.hor_back_porch = 80,
|
||||
.hor_active_pixel = LCM_ER88577B_WIDTH,
|
||||
.hor_front_porch = 80,
|
||||
|
||||
.ver_sync_active = 4,
|
||||
.ver_back_porch = 12,
|
||||
.ver_active_line = LCM_ER88577B_HEIGHT,
|
||||
.ver_front_porch = 20,
|
||||
};
|
||||
|
||||
|
||||
static dsi_timing_t s_lcm_mipi_er88577b_timing =
|
||||
{
|
||||
/*clk lane timing cfg*/
|
||||
.clane.mode = 0,
|
||||
.clane.lp11 = 0,
|
||||
.clane.lp01 = 0,
|
||||
.clane.zero = 13,
|
||||
.clane.prepare = 2,
|
||||
.clane.pre = 3,
|
||||
.clane.post = 10,
|
||||
.clane.trail = 3,
|
||||
.clane.inittime = 6,
|
||||
.clane.exit = 6,
|
||||
/*data lane timing cfg*/
|
||||
.dlane.mode = 0,
|
||||
.dlane.lp11 = 0,
|
||||
.dlane.lp01 = 6, //dlane lpx
|
||||
.dlane.prepare = 3,
|
||||
.dlane.zero = 4,
|
||||
.dlane.trail = 4,
|
||||
.dlane.inittime = 6,
|
||||
.dlane.exit = 6,
|
||||
/*data lane0 read timing cfg*/
|
||||
.read.mode = 0,
|
||||
.read.tago = 27,
|
||||
.read.tasure = 10,
|
||||
.read.taget = 34,
|
||||
/*clk cfg*/
|
||||
.clk = {
|
||||
.vou.mode = 1,
|
||||
.vou.sel = 0x3,
|
||||
.vou.div = 0,
|
||||
|
||||
.mif.mode = 0,
|
||||
.mif.pll_doubler = 0,
|
||||
.mif.pll_div_s = 1,
|
||||
.mif.pll_n = 0,
|
||||
.mif.pll_kint = 0x46dc5d,
|
||||
.mif.pll_nint = 0x38,
|
||||
.mif.pixelclk_div = 0,
|
||||
.mif.pll_pdiv = 2,
|
||||
.mif.dhd_div = 2,
|
||||
}
|
||||
};
|
||||
|
||||
static lcm_mipi_info s_lcm_mipi_er88577b_mipi_info =
|
||||
{
|
||||
.work_mode = DSI_VIDEO_MODE,
|
||||
.lane_num = DSI_TWO_LANE,
|
||||
.format = DSI_RGB888,
|
||||
.packet_size = 256,
|
||||
.timing = (void *)&s_lcm_mipi_er88577b_timing,
|
||||
};
|
||||
|
||||
const lcm_cfg_t s_lcm_mipi_er88577b_info =
|
||||
{
|
||||
.verder_name = VENDER_NAME,
|
||||
.name = "er88577b_2lane_800_1280",
|
||||
.width = LCM_ER88577B_WIDTH,
|
||||
.height = LCM_ER88577B_HEIGHT,
|
||||
.type = LCM_TYPE_MIPI, /*mcu, rgb, mipi*/
|
||||
.fps = 60,
|
||||
.direction = LCM_DIRECT_NORMAL,
|
||||
.dp_sync = &s_lcm_mipi_er88577b_dp_info,
|
||||
.infor = {
|
||||
.mipi = &s_lcm_mipi_er88577b_mipi_info,
|
||||
},
|
||||
.fun = &s_lcm_mipi_er88577b_ctrl,
|
||||
};
|
||||
|
||||
@ -0,0 +1,548 @@
|
||||
|
||||
|
||||
#include "mol_lcm_local.h"
|
||||
#include "dsi_com_param.h"
|
||||
#include "mol_lcm.h"
|
||||
#include <linux/delay.h>
|
||||
|
||||
#define LCM_WIDTH 800
|
||||
#define LCM_HEIGHT 1280
|
||||
#define LCM_DEBUG 1
|
||||
|
||||
const lcm_cfg_t qua_lcm_mipi_er88577b_6hc1017b7e_info;
|
||||
|
||||
extern int qua_lcm_parse_lcm_args(void);
|
||||
extern int qua_lcm_mipi_er88577b_hrst(int lcm_id);
|
||||
|
||||
static dsi_setting_tab_t qua_lcm_mipi_er88577b_6hc1017b7e_init_setting[] = {
|
||||
#if 1
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xE0,0xAB,0xBA}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xE1,0xBA,0xAB}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x06, {0x04,0x00, 0xE7,0x00,0x00,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x07, {0x05,0x00, 0xB1,0x10,0x01,0x7F,0x18}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x08, {0x06,0x00, 0xB2,0x0C,0x10,0x04,0x50,0x50,0x14}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x06, {0x04,0x00, 0xB3,0x56,0xD3,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x06, {0x04,0x00, 0xB4,0x33,0x30,0x04}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x09, {0x07,0x00, 0xB6,0xB0,0x00,0x00,0x10,0x00,0x10,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x08, {0x06,0x00, 0xB8,0x05,0x12,0x29,0x49,0x48}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x29, {0x27,0x00, 0xB9,0x7C,0x64,0x53,0x48,0x45,0x38,0x3E,0x27,0x41,0x40,0x40,0x5E,0x4E,0x57,0x49,0x47,0x3B,0x2A,0x06,0x7C,0x64,0x53,0x48,0x45,0x38,0x3E,0x27,0x41,0x40,0x40,0x5E,0x4E,0x57,0x49,0x47,0x3B,0x2A,0x06}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x12, {0x10,0x00, 0xC0,0x32,0x45,0xB4,0x54,0x66,0x66,0x44,0x44,0x80,0x04,0x7C,0x04,0x3F,0x00,0x00,0xC1}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0D, {0x0B,0x00, 0xC1,0x34,0x94,0x02,0x8F,0x80,0x00,0x7C,0x00,0x54,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0F, {0x0D,0x00, 0xC2,0x33,0x09,0x08,0x89,0x08,0x11,0x22,0x20,0x44,0xBB,0x18,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x19, {0x17,0x00, 0xC3,0xA4,0x64,0x08,0x07,0x06,0x13,0x12,0x11,0x10,0x0F,0x0E,0x0D,0x0C,0x04,0x05,0x02,0x02,0x02,0x02,0x02,0x02,0x24}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x19, {0x17,0x00, 0xC4,0x24,0x24,0x08,0x07,0x06,0x13,0x12,0x11,0x10,0x0F,0x0E,0x0D,0x0C,0x04,0x05,0x02,0x02,0x02,0x02,0x02,0x02,0x02}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xC6,0x40,0x40}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x09, {0x07,0x00, 0xC8,0x21,0x00,0x31,0x42,0x34,0x16}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x05, {0x03,0x00, 0xCA,0xCB,0x43}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0B, {0x09,0x00, 0xCD,0x0E,0x6E,0x6E,0x22,0x19,0x6B,0x06,0xB3}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x07, {0x05,0x00, 0xD2,0xE1,0x2B,0x38,0x08}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0D, {0x0B,0x00, 0xD4,0x00,0x01,0x00,0x0E,0x04,0x44,0x08,0x10,0x00,0x00,0x00}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x0B, {0x09,0x00, 0xE6,0x80,0x09,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x08, {0x06,0x00, 0xF0,0x12,0x03,0x20,0x00,0xFF}},
|
||||
{DSI_DI_DCS_WRITE_LONG, 0x04, {0x02,0x00, 0xF3,0x00}},
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 1, {0x11}},
|
||||
{DSI_DI_DELAY, 120, {0x00}},
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 1, {0x29}},
|
||||
{DSI_DI_DELAY, 20, {0x00}},
|
||||
{DSI_DI_END_OF_TABLE, 0x00, {0x00}}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x01, 0x00}},
|
||||
{DSI_DI_DELAY, 30, {0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0xE0, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0xE1, 0x93}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0xE2, 0x65}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0xE3, 0xF8}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x80, 0x01}}, //{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x80, 0x03}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0xE0, 0x01}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x00, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x01, 0x48}}, // 0x3B,0X41~0X48
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x0C, 0x74}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x17, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x18, 0xAF}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x19, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x1A, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x1B, 0xAF}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x1C, 0x00}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x35, 0x26}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x37, 0x09}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x38, 0x04}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x39, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x3A, 0x01}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x3C, 0x78}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x3D, 0xFF}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x3E, 0xFF}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x3F, 0x7F}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x40, 0x06}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x41, 0xA0}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x42, 0x81}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x43, 0x14}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x44, 0x23}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x45, 0x28}},
|
||||
|
||||
//{DSI_DI_DCS_WRITE_1_PARAM, 2,{0x4A,0x35}}, //bist mode
|
||||
//{DSI_DI_DCS_WRITE_1_PARAM, 2,{0x4B,0x04}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x55, 0x02}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x57, 0x69}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x59, 0x0A}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x5A, 0x2A}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x5B, 0x17}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x5D, 0x7F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x5E, 0x69}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x5F, 0x59}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x60, 0x4C}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x61, 0x47}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x62, 0x39}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x63, 0x3B}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x64, 0x24}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x65, 0x3D}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x66, 0x3C}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x67, 0x3C}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x68, 0x5A}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x69, 0x46}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x6A, 0x4A}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x6B, 0x43}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x6C, 0x46}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x6D, 0x20}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x6E, 0x0F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x6F, 0x00}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x70, 0x7F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x71, 0x69}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x72, 0x59}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x73, 0x4C}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x74, 0x47}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x75, 0x39}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x76, 0x3B}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x77, 0x24}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x78, 0x3D}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x79, 0x3C}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x7A, 0x3C}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x7B, 0x5A}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x7C, 0x46}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x7D, 0x4A}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x7E, 0x43}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x7F, 0x46}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x80, 0x20}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x81, 0x0F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x82, 0x00}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0xE0, 0x02}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x00, 0x42}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x01, 0x42}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x02, 0x40}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x03, 0x40}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x04, 0x5E}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x05, 0x5E}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x06, 0x5F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x07, 0x5F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x08, 0x5F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x09, 0x57}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x0A, 0x57}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x0B, 0x77}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x0C, 0x77}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x0D, 0x47}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x0E, 0x47}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x0F, 0x45}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x10, 0x45}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x11, 0x4B}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x12, 0x4B}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x13, 0x49}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x14, 0x49}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x15, 0x5F}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x16, 0x41}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x17, 0x41}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x18, 0x40}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x19, 0x40}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x1A, 0x5E}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x1B, 0x5E}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x1C, 0x5F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x1D, 0x5F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x1E, 0x5F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x1F, 0x57}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x20, 0x57}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x21, 0x77}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x22, 0x77}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x23, 0x46}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x24, 0x46}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x25, 0x44}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x26, 0x44}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x27, 0x4A}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x28, 0x4A}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x29, 0x48}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x2A, 0x48}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x2B, 0x5F}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x2C, 0x01}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x2D, 0x01}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x2E, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x2F, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x30, 0x1F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x31, 0x1F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x32, 0x1E}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x33, 0x1E}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x34, 0x1F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x35, 0x17}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x36, 0x17}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x37, 0x37}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x38, 0x37}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x39, 0x08}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x3A, 0x08}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x3B, 0x0A}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x3C, 0x0A}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x3D, 0x04}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x3E, 0x04}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x3F, 0x06}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x40, 0x06}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x41, 0x1F}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x42, 0x02}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x43, 0x02}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x44, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x45, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x46, 0x1F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x47, 0x1F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x48, 0x1E}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x49, 0x1E}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x4A, 0x1F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x4B, 0x17}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x4C, 0x17}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x4D, 0x37}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x4E, 0x37}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x4F, 0x09}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x50, 0x09}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x51, 0x0B}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x52, 0x0B}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x53, 0x05}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x54, 0x05}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x55, 0x07}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x56, 0x07}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x57, 0x1F}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x58, 0x40}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x5B, 0x30}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x5C, 0x16}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x5D, 0x34}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x5E, 0x05}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x5F, 0x02}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x63, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x64, 0x6A}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x67, 0x73}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x68, 0x1D}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x69, 0x08}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x6A, 0x6A}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x6B, 0x08}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x6C, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x6D, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x6E, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x6F, 0x88}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x75, 0xFF}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x77, 0xDD}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x78, 0x3F}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x79, 0x15}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x7A, 0x17}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x7D, 0x14}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x7E, 0x82}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0xE0, 0x04}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x00, 0x0E}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x02, 0xB3}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x09, 0x61}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x0E, 0x48}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x36, 0x49}}, //mark
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x37, 0x58}}, //mark
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0xE0, 0x00}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0xE6, 0x02}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0xE7, 0x0C}},
|
||||
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 1, {0x11}},
|
||||
{DSI_DI_DELAY, 240, {0x00}},
|
||||
|
||||
/* bist mode */
|
||||
//{DSI_DI_DELAY, 254, {0x00}},
|
||||
//{DSI_DI_DELAY, 254, {0x00}},
|
||||
//{DSI_DI_DCS_WRITE_1_PARAM, 2, {0xE0, 0x01}},
|
||||
//{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x4A, 0xB0}}, // bist
|
||||
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0xE0, 0x00}},
|
||||
{DSI_DI_DCS_WRITE_0_PARAM, 1, {0x29}},
|
||||
{DSI_DI_DELAY, 5, {0x00}},
|
||||
{DSI_DI_DCS_WRITE_1_PARAM, 2, {0x35, 0x00}},
|
||||
{DSI_DI_END_OF_TABLE, 0x00, {0x00}}
|
||||
#endif
|
||||
};
|
||||
|
||||
//static int lcdpower = 0xff;
|
||||
static int32_t qua_lcm_mipi_er88577b_PowerOn(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
// lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
#if LCM_DEBUG
|
||||
printk("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
// qua_lcm_mipi_er88577b_hrst(lcmHandle->lcm_probe.lcm_id);
|
||||
|
||||
printk("%s\n",__func__);
|
||||
ops->ctrl_fun.mipi.bus_init((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_identify(void * param, lcm_ops *ops)
|
||||
{
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
int lcm = 0;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printk("%s:%d\n", __func__, __LINE__);
|
||||
#endif
|
||||
|
||||
lcmHandle->lcm_id = lcmHandle->lcm_probe.lcm_id;
|
||||
lcm = qua_lcm_parse_lcm_args();
|
||||
if(-1 < lcm && lcm <= 3) {
|
||||
if((0 == lcmHandle->lcm_probe.lcm_id) && (lcm & 0x1)) return 0;
|
||||
if((1 == lcmHandle->lcm_probe.lcm_id) && (lcm & 0x2)) return 0;
|
||||
}
|
||||
|
||||
printk("%s %d lcm=%d error.\n", __func__, lcmHandle->lcm_id, lcm);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_PowerOff(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
// lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
#if LCM_DEBUG
|
||||
printk("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
// lcmHandle->lcm_id = lcmHandle->lcm_probe.lcm_id;
|
||||
ops->ctrl_fun.mipi.bus_deinit((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
printk("%s\n",__func__);
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_deinit(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printk("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
printk("%s\n",__func__);
|
||||
rtn = qua_lcm_mipi_er88577b_PowerOff(param, ops);
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_init(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printk("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
//if (0)
|
||||
rtn = ops->ctrl_fun.mipi.push_tab(lcmHandle->lcm_id, qua_lcm_mipi_er88577b_6hc1017b7e_init_setting, ARRAY_SIZE(qua_lcm_mipi_er88577b_6hc1017b7e_init_setting));
|
||||
printk("%s rtn %d\n",__func__,rtn);
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_suspend(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printk("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
ops->ctrl_fun.mipi.bus_deinit((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_resume(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printk("%s:%d\n",__FUNCTION__,__LINE__);
|
||||
#endif
|
||||
|
||||
ops->ctrl_fun.mipi.bus_init((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
|
||||
|
||||
//rtn = dsi_push_table(lcm_mipi_JD9365D_sleep_out_setting, ARRAY_SIZE(lcm_mipi_JD9365D_sleep_out_setting));
|
||||
return rtn;
|
||||
}
|
||||
|
||||
lcm_module_fun qua_lcm_mipi_er88577b_ctrl =
|
||||
{
|
||||
.poweron = qua_lcm_mipi_er88577b_PowerOn,
|
||||
.poweroff = qua_lcm_mipi_er88577b_PowerOff,
|
||||
.identify = qua_lcm_mipi_er88577b_identify,
|
||||
.init = qua_lcm_mipi_er88577b_init,
|
||||
.suspend = qua_lcm_mipi_er88577b_suspend,
|
||||
.resume = qua_lcm_mipi_er88577b_resume,
|
||||
.deinit = qua_lcm_mipi_er88577b_deinit,
|
||||
};
|
||||
|
||||
static lcm_display_sync_info_t qua_lcm_mipi_er88577b_dp_info =
|
||||
{
|
||||
.hor_sync_active = 20,
|
||||
.hor_back_porch = 40,
|
||||
.hor_active_pixel = LCM_WIDTH,
|
||||
.hor_front_porch = 40,
|
||||
|
||||
.ver_sync_active = 4,
|
||||
.ver_back_porch = 18,
|
||||
.ver_active_line = LCM_HEIGHT,
|
||||
.ver_front_porch = 20,
|
||||
};
|
||||
|
||||
static dsi_timing_t qua_lcm_mipi_er88577b_timing =
|
||||
{
|
||||
/*clk lane timing cfg*/
|
||||
.clane.mode = 1,
|
||||
.clane.lp11 = 0,
|
||||
.clane.lp01 = 16,
|
||||
.clane.zero = 34,
|
||||
.clane.prepare = 7,
|
||||
.clane.pre = 4,
|
||||
.clane.post = 16,
|
||||
.clane.trail = 9,
|
||||
.clane.inittime = 16,
|
||||
.clane.exit = 16,
|
||||
/*data lane timing cfg*/
|
||||
.dlane.mode = 1,
|
||||
.dlane.lp11 = 0,
|
||||
.dlane.lp01 = 16,
|
||||
.dlane.zero = 13,
|
||||
.dlane.prepare = 6,
|
||||
.dlane.trail = 10,
|
||||
.dlane.inittime = 16,
|
||||
.dlane.exit = 16,
|
||||
/*data lane0 read timing cfg*/
|
||||
.read.mode = 1,
|
||||
.read.tago = 67,
|
||||
.read.tasure = 25,
|
||||
.read.taget = 84,
|
||||
/*clk cfg*/
|
||||
.clk = {
|
||||
.vou.mode = 1,
|
||||
.vou.sel = 0x3,
|
||||
.vou.div = 0,
|
||||
|
||||
.mif.mode = 0,
|
||||
.mif.pll_doubler = 0,
|
||||
.mif.pll_div_s = 1,
|
||||
.mif.pll_n = 0,
|
||||
.mif.pll_kint = 5637144,
|
||||
.mif.pll_nint = 42,
|
||||
.mif.pixelclk_div = 12,
|
||||
.mif.pll_pdiv = 2,
|
||||
.mif.dhd_div = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static lcm_mipi_info qua_lcm_mipi_er88577b_mipi_info =
|
||||
{
|
||||
.work_mode = DSI_VIDEO_MODE,
|
||||
.lane_num = DSI_TWO_LANE,
|
||||
.format = DSI_RGB888,
|
||||
.packet_size = 256,
|
||||
.timing = (void *)&qua_lcm_mipi_er88577b_timing,
|
||||
};
|
||||
|
||||
const lcm_cfg_t qua_lcm_mipi_er88577b_6hc1017b7e_info =
|
||||
{
|
||||
.verder_name = VENDER_NAME,
|
||||
.name = "qua_dsi_800_1280_60_er88577b_6hc1017b7e",
|
||||
.width = LCM_WIDTH,
|
||||
.height = LCM_HEIGHT,
|
||||
.type = LCM_TYPE_MIPI, /*mcu, rgb, mipi*/
|
||||
.fps = 60,
|
||||
.direction = LCM_DIRECT_NORMAL,
|
||||
.dp_sync = &qua_lcm_mipi_er88577b_dp_info,
|
||||
.infor = {
|
||||
.mipi = &qua_lcm_mipi_er88577b_mipi_info,
|
||||
},
|
||||
.fun = &qua_lcm_mipi_er88577b_ctrl,
|
||||
};
|
||||
|
||||
#if 0
|
||||
|
||||
static int32_t qua_lcm_mipi_er88577b_identify(void * param, lcm_ops *ops)
|
||||
{
|
||||
int32_t rtn = 0;
|
||||
uint8_t read_buf[4] = {0};
|
||||
// unsigned long timeout = jiffies + msecs_to_jiffies(1000);
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
uint8_t _param[4] = {0xE0, 0x00};
|
||||
int count = 5, lcm = 0;
|
||||
|
||||
#if LCM_DEBUG
|
||||
printk("%s:%d\n", __func__, __LINE__);
|
||||
#endif
|
||||
|
||||
lcmHandle->lcm_id = lcmHandle->lcm_probe.lcm_id;
|
||||
lcm = qua_lcm_parse_lcm_args();
|
||||
if(-1 < lcm && lcm <= 3) {
|
||||
if((0 == lcmHandle->lcm_probe.lcm_id) && (lcm & 0x1)) return 0;
|
||||
if((1 == lcmHandle->lcm_probe.lcm_id) && (lcm & 0x2)) return 0;
|
||||
}
|
||||
|
||||
rtn = ops->ctrl_fun.mipi.dcs_write(lcmHandle->lcm_probe.lcm_id, _param, 2);
|
||||
if (rtn) {
|
||||
printk("%s %d dcs_write failed.\n", __func__, lcmHandle->lcm_id);
|
||||
return -1;
|
||||
}
|
||||
ops->delayMs(10);
|
||||
|
||||
while (count) {
|
||||
printk("%s %d count=%d \n", __func__, lcmHandle->lcm_id, count);
|
||||
/* Read Display Power Mode (0Ah) */
|
||||
// rtn = ops->ctrl_fun.mipi.dcs_read(lcmHandle->lcm_id, 0x06, 0x0a, 1, (uint8_t *)read_buf);
|
||||
// if(rtn == 0)
|
||||
// {
|
||||
// #if LCM_DEBUG
|
||||
// printk("%s %d: DST %x\n", __func__, lcmHandle->lcm_id, read_buf[0]);
|
||||
// #endif
|
||||
// return 0;
|
||||
// }
|
||||
/* Read Display Identification Information (04h) */
|
||||
rtn = ops->ctrl_fun.mipi.dcs_read(lcmHandle->lcm_id, 0x06, 0x04, 1, (uint8_t *)read_buf);
|
||||
if(read_buf[0] == 0x93 && rtn == 0)
|
||||
{
|
||||
#if LCM_DEBUG
|
||||
printk("%s %d: %x %x %x\n", __func__, lcmHandle->lcm_id, read_buf[0], read_buf[1], read_buf[2]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
ops->delayMs(2);
|
||||
count--;
|
||||
if (count == 0) {
|
||||
printk("%s %d identify timeout failed.\n", __func__, lcmHandle->lcm_id);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
#endif
|
||||
@ -31,6 +31,8 @@ extern lcm_cfg_t s_lcm_mipi_st7701s_info;
|
||||
extern lcm_cfg_t s_lcm_mipi_sample_1920_info;
|
||||
extern lcm_cfg_t s_lcm_mipi_sample_1280_info;
|
||||
extern lcm_cfg_t s_lcm_mipi_qfh24004_info;
|
||||
extern lcm_cfg_t qua_lcm_mipi_er88577b_6hc1017b7e_info;
|
||||
extern lcm_cfg_t s_lcm_mipi_er88577b_info;
|
||||
|
||||
/*rgb lcm*/
|
||||
extern lcm_cfg_t s_lcm_rgb_at070tn94_info;
|
||||
@ -82,7 +84,8 @@ lcm_cfg_t *lcm_main_tab[] = {
|
||||
&s_lcm_rgb18_at070tn94_info,
|
||||
&s_lcm_rgb_at070tn94_info,
|
||||
&qua_lcm_rgb_ek79001h_tg78550b3_24bits_info,
|
||||
|
||||
&s_lcm_mipi_er88577b_info,
|
||||
&qua_lcm_mipi_er88577b_6hc1017b7e_info,
|
||||
/*end lcm*/
|
||||
0,
|
||||
};
|
||||
@ -112,7 +115,8 @@ lcm_cfg_t *lcm_sub_tab[] = {
|
||||
&s_lcm_rgb18_at070tn94_info,
|
||||
&s_lcm_rgb_at070tn94_info,
|
||||
&qua_lcm_rgb_ek79001h_tg78550b3_24bits_info,
|
||||
|
||||
&s_lcm_mipi_er88577b_info,
|
||||
&qua_lcm_mipi_er88577b_6hc1017b7e_info,
|
||||
/*end lcm*/
|
||||
0,
|
||||
};
|
||||
@ -142,4 +146,3 @@ RTM_EXPORT(get_lcm_cfg_tab);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -0,0 +1,187 @@
|
||||
|
||||
|
||||
#include "mol_lcm_local.h"
|
||||
#include "dsi_com_param.h"
|
||||
#include "mol_lcm.h"
|
||||
#include <linux/delay.h>
|
||||
|
||||
|
||||
#define REG_PIN_MUX_BASE 0x10200000
|
||||
#define REG_LCD_DE_PIN 0x64
|
||||
#define REG_LCD_HS_PIN 0x68
|
||||
#define REG_LCD_VS_PIN 0x6C
|
||||
#define REG_LCD_D0_PIN 0x74
|
||||
#define REG_LCD_D1_PIN 0x78
|
||||
|
||||
#define REG_PIN_DRV_BASE1 0x0B100000
|
||||
#define REG_LCD_DE_DRV 0x28
|
||||
#define REG_LCD_HS_DRV 0x2C
|
||||
#define REG_LCD_VS_DRV 0x30
|
||||
#define REG_LCD_D0_DRV 0x38
|
||||
#define REG_LCD_D1_DRV 0x3C
|
||||
|
||||
#define GPIO_NUM_INDEX(x,y) (8*x + y)
|
||||
#define GPIO_NUM_LCD_DE GPIO_NUM_INDEX(3,3)
|
||||
#define GPIO_NUM_LCD_HS GPIO_NUM_INDEX(3,4)
|
||||
#define GPIO_NUM_LCD_VS GPIO_NUM_INDEX(3,5)
|
||||
#define GPIO_NUM_LCD_D0 GPIO_NUM_INDEX(3,7)
|
||||
#define GPIO_NUM_LCD_D1 GPIO_NUM_INDEX(4,0)
|
||||
|
||||
#define PIN_MUX_GPIO_ENABLE (1)
|
||||
|
||||
extern unsigned int qua_lcm_readl(unsigned addr);
|
||||
extern void qua_lcm_writel(unsigned int v, unsigned addr);
|
||||
|
||||
extern int qua_lcm_gpio_request(unsigned gpio, const char *label);
|
||||
extern void qua_lcm_gpio_free(unsigned gpio);
|
||||
extern int qua_lcm_gpio_get_value(unsigned gpio);
|
||||
extern int qua_lcm_gpio_direction_input(unsigned gpio);
|
||||
extern void qua_lcm_gpio_set_value(unsigned gpio, int value);
|
||||
extern int qua_lcm_gpio_direction_output(unsigned gpio, int value);
|
||||
|
||||
static void __qua_lcm_mipi_er88577b_hrst(unsigned int vci_pin_reg_oft, unsigned int rst_pin_reg_oft,
|
||||
unsigned int vci_pin_gpio_num, unsigned int rst_pin_gpio_num)
|
||||
{
|
||||
void *_vpmuxbase = fhosal_ioremap_nocache(REG_PIN_MUX_BASE, 0x100);
|
||||
// volatile unsigned int *_pmux_reg = (volatile unsigned int *)_vpmuxbase;
|
||||
unsigned int pmux_reg = (unsigned int)_vpmuxbase;
|
||||
printk("%s e\n", __func__);
|
||||
/* power on rst timing gpio */
|
||||
qua_lcm_writel(PIN_MUX_GPIO_ENABLE, pmux_reg + rst_pin_reg_oft);
|
||||
qua_lcm_gpio_request(rst_pin_gpio_num, "rst_gpio");
|
||||
qua_lcm_gpio_direction_output(rst_pin_gpio_num, 1);
|
||||
qua_lcm_gpio_set_value(rst_pin_gpio_num, 0);
|
||||
|
||||
/* power on vci timing gpio, 0: on, 1: off */
|
||||
qua_lcm_writel(PIN_MUX_GPIO_ENABLE, pmux_reg + vci_pin_reg_oft);
|
||||
qua_lcm_gpio_request(vci_pin_gpio_num, "vci_gpio");
|
||||
qua_lcm_gpio_direction_output(vci_pin_gpio_num, 1);
|
||||
qua_lcm_gpio_set_value(vci_pin_gpio_num, 1);
|
||||
mdelay(500);
|
||||
qua_lcm_gpio_set_value(vci_pin_gpio_num, 0);
|
||||
mdelay(10);
|
||||
|
||||
/* power on rst timing */
|
||||
// qua_lcm_gpio_set_value(rst_pin_gpio_num, 1);
|
||||
// udelay(5);
|
||||
// qua_lcm_gpio_set_value(rst_pin_gpio_num, 0);
|
||||
// udelay(10);
|
||||
qua_lcm_gpio_set_value(rst_pin_gpio_num, 1);
|
||||
mdelay(10);
|
||||
|
||||
// qua_lcm_gpio_free(rst_pin_gpio_num);
|
||||
// qua_lcm_gpio_free(vci_pin_gpio_num);
|
||||
fhosal_iounmap(_vpmuxbase);
|
||||
printk("%s x\n", __func__);
|
||||
}
|
||||
|
||||
int qua_lcm_mipi_er88577b_hrst(int lcm_id)
|
||||
{
|
||||
printk("%s e\n", __func__);
|
||||
printk("%s lcm_id=%d\n", __func__, lcm_id);
|
||||
if(lcm_id == 0)
|
||||
__qua_lcm_mipi_er88577b_hrst(REG_LCD_D0_PIN, REG_LCD_DE_PIN, GPIO_NUM_LCD_D0, GPIO_NUM_LCD_DE);
|
||||
|
||||
if(lcm_id == 1)
|
||||
__qua_lcm_mipi_er88577b_hrst(REG_LCD_D1_PIN, REG_LCD_HS_PIN, GPIO_NUM_LCD_D1, GPIO_NUM_LCD_HS);
|
||||
printk("%s x\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
int32_t qua_lcm_mipi_er88577b_hrst(void * param)
|
||||
{
|
||||
// int32_t rtn = 0, val = 0, tmp = 0, _v = 0, i = 0, count = 3;
|
||||
unsigned long flags;
|
||||
void *_vpmuxbase = fhosal_ioremap_nocache(REG_PIN_MUX_BASE, 0x100);
|
||||
// void *_vpdrvbase = fhosal_ioremap_nocache(REG_PIN_DRV_BASE1,0x100);
|
||||
|
||||
// volatile unsigned int *pdrv_reg = (volatile unsigned int *)_vpdrvbase;
|
||||
volatile unsigned int *pmux_reg = (volatile unsigned int *)_vpmuxbase;
|
||||
|
||||
lcm_handle_t *lcmHandle = (lcm_handle_t *)param;
|
||||
|
||||
lcmHandle->lcm_id = lcmHandle->lcm_probe.lcm_id;
|
||||
/* XAIN0_SADC, XAIN1_SADC */
|
||||
// qua_lcm_writel(0, (unsigned int)pmux_reg + 0xec);
|
||||
// qua_lcm_writel(0, (unsigned int)pmux_reg + 0xf0);
|
||||
|
||||
if(lcmHandle->lcm_probe.lcm_id == 0)
|
||||
{
|
||||
qua_lcm_writel(1, (unsigned int)pmux_reg + REG_LCD_DE_PIN);
|
||||
// tmp = qua_lcm_readl((unsigned int)pdrv_reg + REG_LCD_DE_DRV);
|
||||
// printk("%s LCD_DE drv = 0x%x\n", __func__, tmp);
|
||||
// _v = ((tmp & 0xf0) | 0x04);
|
||||
// qua_lcm_writel(_v, (unsigned int)pdrv_reg + REG_LCD_DE_DRV);
|
||||
qua_lcm_gpio_request(GPIO_NUM_LCD_DE, 0);
|
||||
qua_lcm_gpio_direction_output(GPIO_NUM_LCD_DE, 1);
|
||||
qua_lcm_gpio_set_value(GPIO_NUM_LCD_DE, 0);
|
||||
|
||||
/* power on vci timing gpio, 0: on, 1: off */
|
||||
qua_lcm_writel(PIN_MUX_GPIO_ENABLE, (unsigned int)pmux_reg + REG_LCD_D0_PIN);
|
||||
qua_lcm_gpio_request(GPIO_NUM_LCD_D0, 0);
|
||||
qua_lcm_gpio_direction_output(GPIO_NUM_LCD_D0, 1);
|
||||
qua_lcm_gpio_set_value(GPIO_NUM_LCD_D0, 1);
|
||||
mdelay(10);
|
||||
qua_lcm_gpio_set_value(GPIO_NUM_LCD_D0, 0);
|
||||
mdelay(20);
|
||||
|
||||
/* power on rst timing */
|
||||
qua_lcm_gpio_set_value(GPIO_NUM_LCD_DE, 1);
|
||||
udelay(10);
|
||||
qua_lcm_gpio_set_value(GPIO_NUM_LCD_DE, 0);
|
||||
udelay(10);
|
||||
qua_lcm_gpio_set_value(GPIO_NUM_LCD_DE, 1);
|
||||
mdelay(5);
|
||||
|
||||
// printk("%s gpio3_3 val = 0x%x\n", __func__, val);
|
||||
// qua_lcm_writel(tmp, (unsigned int)pdrv_reg + REG_LCD_DE_DRV);
|
||||
// qua_lcm_gpio_free(GPIO_NUM_LCD_DE);
|
||||
// qua_lcm_writel(0, (unsigned int)pmux_reg + REG_LCD_DE_PIN);+
|
||||
} // else {
|
||||
if(lcmHandle->lcm_probe.lcm_id == 1)
|
||||
{
|
||||
qua_lcm_writel(PIN_MUX_GPIO_ENABLE, (unsigned int)pmux_reg + GPIO_NUM_LCD_D1);
|
||||
qua_lcm_gpio_request(GPIO_NUM_LCD_D1, 0);
|
||||
qua_lcm_gpio_direction_output(GPIO_NUM_LCD_D1, 1);
|
||||
qua_lcm_gpio_set_value(GPIO_NUM_LCD_D1, 1);
|
||||
mdelay(10);
|
||||
qua_lcm_gpio_set_value(GPIO_NUM_LCD_D1, 0);
|
||||
mdelay(20);
|
||||
|
||||
qua_lcm_writel(1, (unsigned int)pmux_reg + REG_LCD_HS_PIN);
|
||||
// tmp = qua_lcm_readl((unsigned int)pdrv_reg + REG_LCD_VS_DRV);
|
||||
// printk("%s LCD_VS drv = 0x%x\n", __func__, tmp);
|
||||
// _v = ((tmp & 0xf0) | 0x04);
|
||||
// qua_lcm_writel(_v, (unsigned int)pdrv_reg + REG_LCD_VS_DRV);
|
||||
|
||||
qua_lcm_gpio_request(GPIO_NUM_LCD_HS, 0);
|
||||
qua_lcm_gpio_direction_output(GPIO_NUM_LCD_HS, 1);
|
||||
|
||||
local_irq_save(flags);
|
||||
preempt_disable();
|
||||
qua_lcm_gpio_set_value(GPIO_NUM_LCD_HS, 1);
|
||||
mdelay(10);
|
||||
// do{
|
||||
qua_lcm_gpio_set_value(GPIO_NUM_LCD_HS, 0);
|
||||
fhosal_udelay(10);
|
||||
qua_lcm_gpio_set_value(GPIO_NUM_LCD_HS, 1);
|
||||
fhosal_udelay(10);
|
||||
printk("%s gpio3_4 \n", __func__);
|
||||
// }while(1);
|
||||
preempt_enable();
|
||||
local_irq_restore(flags);
|
||||
// }while(1);
|
||||
// printk("%s gpio3_5 val = 0x%x\n", __func__, val);
|
||||
|
||||
// qua_lcm_writel(tmp, (unsigned int)pdrv_reg + REG_LCD_VS_DRV);
|
||||
// qua_lcm_gpio_free(GPIO_NUM_LCD_VS);
|
||||
// qua_lcm_writel(0, (unsigned int)pmux_reg + REG_LCD_VS_PIN);
|
||||
}
|
||||
|
||||
// fhosal_iounmap(_vpdrvbase);
|
||||
fhosal_iounmap(_vpmuxbase);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@ -1,56 +0,0 @@
|
||||
#CROSS toolchain configs
|
||||
export CROSS_TOOLCHAIN_VERSION?=v510
|
||||
|
||||
|
||||
# kernel version
|
||||
export KERNEL_VER=5.10.y
|
||||
# uboot version
|
||||
export UBOOT_VER=uboot
|
||||
|
||||
# busybox version
|
||||
export BUSYBOX_VER=busybox-1.36.1
|
||||
|
||||
# busybox defconfig
|
||||
export BUSYBOX_CFG=busybox_quaming_config# Uboot defconfig
|
||||
export UBOOT_CONFIG=quaming_qm10xd_demo_ld_nand_defconfig
|
||||
|
||||
# Kernel defconfig
|
||||
export KERNEL_CONFIG=quaming_qm10xd_demo_ld_nand_defconfig
|
||||
|
||||
# Kernel dts
|
||||
export KERNEL_DTS=quaming-kernel-qm10xd-demo_ld-nand.dts
|
||||
|
||||
export TARGET_OUTPUT_DIR=qm10xd_demo_ld_nand
|
||||
|
||||
|
||||
export TARGET_CONFIG_NIMI=qm10xd_demo_ld_nand
|
||||
|
||||
|
||||
include /home/test02/workspace/workspace/genSDK_base/gensdk/X-AIOS-LT00/base/soc/qm10xd/linux/prebuilts/build/configs/toolchain/$(CROSS_TOOLCHAIN_VERSION).mk
|
||||
|
||||
|
||||
export MEM_TOTAL_SIZE=64M
|
||||
|
||||
export MEM_OS_SIZE=36M
|
||||
|
||||
|
||||
export MC_SHOWLOGO_YADDR0=43E00000
|
||||
|
||||
export MC_SHOWLOGO_CADDR0=43E98000
|
||||
|
||||
export MC_SHOWLOGO_YADDR1=00000000
|
||||
|
||||
export MC_SHOWLOGO_CADDR1=00000000
|
||||
|
||||
export MC_DHD0_OSD_SIZE=1200
|
||||
|
||||
export MC_DHD0_OSD_FBC_EB=1
|
||||
|
||||
export MC_DHD1_OSD_SIZE=0
|
||||
|
||||
export MC_DHD1_OSD_FBC_EB=0
|
||||
|
||||
export mem_mmz_start=0x42400000
|
||||
|
||||
export mem_mmz_size=0x01c00000
|
||||
|
||||
Binary file not shown.
Binary file not shown.
17
sdk/X-AIOS-LT00-V1.0.4/build.sh
Executable file
17
sdk/X-AIOS-LT00-V1.0.4/build.sh
Executable file
@ -0,0 +1,17 @@
|
||||
make distclean
|
||||
rm -rf out
|
||||
rm -fr build/script/kconfig/__pycache__/kconfigfunctions.cpython-312.pyc
|
||||
rm -fr build/script/kconfig/__pycache__/kconfiglib.cpython-312.pyc
|
||||
rm -fr base/soc/qm10xd/linux/bsp/uboot/uboot/.build/
|
||||
rm -fr base/soc/qm10xd/linux/bsp/ramboot/.build/
|
||||
rm -fr base/soc/qm10xd/linux/bsp/uboot/uboot/configs/quaming_qm10xd_demo_ld_nand_defconfig.backup
|
||||
rm -fr product/demo_ld/partition-info.txt.backup
|
||||
rm -fr tools/partition/qm10xd/los_spi-nand/demo_ld_nand/programmer.ini.backup
|
||||
rm -fr base/soc/qm10xd/linux/output/.config
|
||||
rm -fr base/soc/qm10xd/linux/output/qm10xd_demo_ld_nand/bsp/boot/u-boot-dtb.bin
|
||||
rm -fr base/soc/qm10xd/linux/output/qm10xd_demo_ld_nand/bsp/boot/u-boot-sdl.bin
|
||||
rm -fr base/soc/qm10xd/linux/output/qm10xd_demo_ld_nand/bsp/boot/u-boot.bin
|
||||
rm -fr base/soc/qm10xd/linux/output/qm10xd_demo_ld_nand/bsp/spl/u-boot-spl-header.img
|
||||
rm -fr base/soc/qm10xd/linux/prebuilts/demo_ld/bsp/rootfs/initramfs-v510.cpio.xz
|
||||
make project_demo_ld_defconfig
|
||||
make xos -j$(nproc)
|
||||
@ -8,7 +8,7 @@ print("hello, this is run_cmd.py")
|
||||
def main(argv):
|
||||
print("Environment Variables:")
|
||||
for key, value in os.environ.items():
|
||||
print(f"{key}: {value}")
|
||||
print("{}: {}".format(key, value))
|
||||
|
||||
if len(sys.argv) == 3:
|
||||
subprocess.call(['/bin/bash', sys.argv[1], sys.argv[2]])
|
||||
@ -18,8 +18,8 @@ def main(argv):
|
||||
subprocess.call(['/bin/bash', sys.argv[1]])
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(f"Arguments count: {len(sys.argv)}")
|
||||
print("Arguments count: {}".format(len(sys.argv)))
|
||||
for i, arg in enumerate(sys.argv):
|
||||
print(f"Argument: {i:>6}: {arg}")
|
||||
print("Argument: {:>6}: {}".format(i, arg))
|
||||
main(sys.argv)
|
||||
|
||||
|
||||
@ -104,18 +104,19 @@ sleep 1
|
||||
udhcpc -T 2 -q -iwlan0 &
|
||||
fi
|
||||
|
||||
adbd_enable -m tz tz123456
|
||||
dmesg -n 1
|
||||
|
||||
cd /vendor/qua/wifi/host;
|
||||
./hciconfig hci0 up
|
||||
./btgatt-server &
|
||||
#cd /vendor/qua/wifi/host;
|
||||
#./hciconfig hci0 up
|
||||
#./btgatt-server &
|
||||
#./host_start.sh
|
||||
#./btgatt-server
|
||||
#sleep 2
|
||||
#pkill -9 btgatt-server
|
||||
#./btgatt-server
|
||||
#cat /dev/ATC &
|
||||
echo -n "AT+WIFIMACPSCTRL=2,0,1" > /dev/ATC
|
||||
#echo -n "AT+WIFIMACPSCTRL=2,0,1" > /dev/ATC
|
||||
|
||||
|
||||
|
||||
|
||||
18
sdk/X-AIOS-LT00-V1.0.4/cp.sh
Executable file
18
sdk/X-AIOS-LT00-V1.0.4/cp.sh
Executable file
@ -0,0 +1,18 @@
|
||||
DIR=/media/hyx/061C-D1C9/
|
||||
cd out/qm10xd_linux/qmimages
|
||||
cp code-size.txt $DIR
|
||||
cp data.ubi $DIR
|
||||
cp logo.img $DIR
|
||||
cp misc.img $DIR
|
||||
cp recovery.img $DIR
|
||||
cp recovery-rootfs.ubi $DIR
|
||||
cp rootfs.ubi $DIR
|
||||
cp script.ini $DIR
|
||||
cp system.ubi $DIR
|
||||
cp u-boot.bin $DIR
|
||||
cp u-boot-spl-header.img $DIR
|
||||
cp u-boot-spl-header_out.img $DIR
|
||||
cp usrdata.ubi $DIR
|
||||
cp zImage-dtb $DIR
|
||||
cd -
|
||||
sudo eject $DIR
|
||||
151
sdk/X-AIOS-LT00-V1.0.4/install_xos_env.sh
Executable file
151
sdk/X-AIOS-LT00-V1.0.4/install_xos_env.sh
Executable file
@ -0,0 +1,151 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# 颜色定义(便于输出提示)
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# 支持的 Ubuntu 版本列表
|
||||
SUPPORTED_VERSIONS=("20.04" "22.04" "24.04")
|
||||
|
||||
# 检查是否为 root/有 sudo 权限
|
||||
check_sudo() {
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo -e "${YELLOW}提示:需要 sudo 权限,即将请求管理员密码...${NC}"
|
||||
if ! sudo -v; then
|
||||
echo -e "${RED}错误:无 sudo 权限,无法继续安装${NC}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# 检测 Ubuntu 版本并验证是否支持
|
||||
detect_ubuntu_version() {
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
if [ "$ID" != "ubuntu" ]; then
|
||||
echo -e "${RED}错误:仅支持 Ubuntu 系统,当前系统为 $ID${NC}"
|
||||
exit 1
|
||||
fi
|
||||
UBUNTU_VERSION=$VERSION_ID
|
||||
echo -e "${GREEN}检测到 Ubuntu 版本:$UBUNTU_VERSION${NC}"
|
||||
|
||||
# 验证版本是否支持
|
||||
if ! [[ " ${SUPPORTED_VERSIONS[@]} " =~ " $UBUNTU_VERSION " ]]; then
|
||||
echo -e "${RED}错误:仅支持 Ubuntu ${SUPPORTED_VERSIONS[*]},当前版本为 $UBUNTU_VERSION,不支持安装${NC}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo -e "${RED}错误:无法检测系统版本${NC}"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# 通用工具安装(20.04/22.04/24.04 共用)
|
||||
install_common_packages() {
|
||||
echo -e "${GREEN}===== 安装通用编译工具 =====${NC}"
|
||||
sudo apt update -y
|
||||
sudo apt install -y \
|
||||
cmake mtools scons curl flex bison gperf build-essential zip \
|
||||
device-tree-compiler libsdl2-dev libpng-dev libcurl4-openssl-dev libssl-dev \
|
||||
gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib \
|
||||
g++-multilib libc6-dev-i386 x11proto-core-dev libx11-dev ccache \
|
||||
libgl1-mesa-dev libxml2-utils xsltproc unzip liblz4-tool gdb u-boot-tools git \
|
||||
python3 python3-pip python-is-python3 lib32z-dev fakeroot mtd-utils \
|
||||
android-sdk-libsparse-utils cpio
|
||||
|
||||
# 修复可能的依赖问题
|
||||
sudo apt -f install -y
|
||||
}
|
||||
|
||||
# Ubuntu 20.04 专属安装
|
||||
install_ubuntu_2004() {
|
||||
echo -e "${GREEN}===== 安装 Ubuntu 20.04 专属依赖 =====${NC}"
|
||||
# 安装 ncurses 相关
|
||||
sudo apt install -y libncurses5 lib32ncurses-dev
|
||||
# 安装 xlrd 1.2.0(突破系统环境限制)
|
||||
echo -e "${YELLOW}安装 xlrd 1.2.0...${NC}"
|
||||
pip3 install xlrd==1.2.0 --break-system-packages
|
||||
}
|
||||
|
||||
# Ubuntu 22.04 专属安装(适配逻辑同 20.04,ncurses 兼容 + xlrd 1.2.0)
|
||||
install_ubuntu_2204() {
|
||||
echo -e "${GREEN}===== 安装 Ubuntu 22.04 专属依赖 =====${NC}"
|
||||
# 22.04 兼容 20.04 的 ncurses 依赖,同时支持 xlrd 1.2.0
|
||||
sudo apt install -y libncurses5 lib32ncurses-dev
|
||||
# 安装 xlrd 1.2.0(突破系统环境限制)
|
||||
echo -e "${YELLOW}安装 xlrd 1.2.0...${NC}"
|
||||
pip3 install xlrd==1.2.0
|
||||
}
|
||||
|
||||
# Ubuntu 24.04 专属安装
|
||||
install_ubuntu_2404() { echo -e "${GREEN}===== 安装 Ubuntu 24.04 专属依赖 =====${NC}"
|
||||
# 添加 i386 架构
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt update -y
|
||||
# 安装 ncurses 相关
|
||||
sudo apt install -y libncurses6 libncurses6:i386 libncurses-dev libncurses-dev:i386
|
||||
# 安装 openpyxl
|
||||
sudo apt install -y python3-openpyxl
|
||||
}
|
||||
|
||||
# 验证安装结果
|
||||
verify_installation() {
|
||||
echo -e "${GREEN}===== 验证安装结果 =====${NC}"
|
||||
# 检查核心工具
|
||||
local tools=("cmake" "scons" "dtc" "python3" "pip3" "cpio" "fakeroot")
|
||||
for tool in "${tools[@]}"; do
|
||||
if command -v "$tool" &>/dev/null; then
|
||||
echo -e "${GREEN}[✓] $tool 安装成功${NC}"
|
||||
else
|
||||
echo -e "${RED}[✗] $tool 安装失败${NC}"
|
||||
fi
|
||||
done
|
||||
# 检查 Python 库
|
||||
if [ "$UBUNTU_VERSION" = "20.04" ] || [ "$UBUNTU_VERSION" = "22.04" ]; then
|
||||
if python3 -c "import xlrd; assert xlrd.__version__ == '1.2.0'" &>/dev/null; then
|
||||
echo -e "${GREEN}[✓] xlrd 1.2.0 安装成功${NC}"
|
||||
else
|
||||
echo -e "${RED}[✗] xlrd 1.2.0 安装失败${NC}"
|
||||
fi
|
||||
elif [ "$UBUNTU_VERSION" = "24.04" ]; then
|
||||
if python3 -c "import openpyxl" &>/dev/null; then
|
||||
echo -e "${GREEN}[✓] openpyxl 安装成功${NC}"
|
||||
else
|
||||
echo -e "${RED}[✗] openpyxl 安装失败${NC}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# 主流程
|
||||
main() {
|
||||
echo -e "${GREEN}===== 开始搭建 XOS 编译环境 =====${NC}"
|
||||
check_sudo
|
||||
detect_ubuntu_version
|
||||
install_common_packages
|
||||
|
||||
case "$UBUNTU_VERSION" in
|
||||
20.04)
|
||||
install_ubuntu_2004
|
||||
;;
|
||||
22.04)
|
||||
install_ubuntu_2204
|
||||
;;
|
||||
24.04)
|
||||
install_ubuntu_2404
|
||||
;;
|
||||
*)
|
||||
# 理论上不会走到这里(已在 detect_ubuntu_version 验证)
|
||||
echo -e "${RED}错误:不支持的 Ubuntu 版本${NC}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
verify_installation
|
||||
echo -e "${GREEN}===== XOS 编译环境搭建完成 =====${NC}"
|
||||
}
|
||||
|
||||
# 执行主流程
|
||||
main
|
||||
@ -85,7 +85,7 @@
|
||||
},
|
||||
{
|
||||
"name": "rootfs",
|
||||
"size": "6MB",
|
||||
"size": "12MB",
|
||||
"offset": "0x2D00000",
|
||||
"type": "rootfs",
|
||||
"filesystem_type": "ubi"
|
||||
@ -93,14 +93,14 @@
|
||||
{
|
||||
"name": "data",
|
||||
"size": "6MB",
|
||||
"offset": "0x3300000",
|
||||
"offset": "0x3900000",
|
||||
"type": "userdata",
|
||||
"filesystem_type": "ubi"
|
||||
},
|
||||
{
|
||||
"name": "usrdata",
|
||||
"size": "71MB",
|
||||
"offset": "0x3900000",
|
||||
"size": "65MB",
|
||||
"offset": "0x3F00000",
|
||||
"type": "userdata",
|
||||
"filesystem_type": "ubi"
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@
|
||||
},
|
||||
{
|
||||
"name": "rootfs",
|
||||
"size": "6MB",
|
||||
"size": "12MB",
|
||||
"offset": "0x2D00000",
|
||||
"type": "rootfs",
|
||||
"filesystem_type": "ubi"
|
||||
@ -93,14 +93,14 @@
|
||||
{
|
||||
"name": "data",
|
||||
"size": "6MB",
|
||||
"offset": "0x3300000",
|
||||
"offset": "0x3900000",
|
||||
"type": "userdata",
|
||||
"filesystem_type": "ubi"
|
||||
},
|
||||
{
|
||||
"name": "usrdata",
|
||||
"size": "71MB",
|
||||
"offset": "0x3900000",
|
||||
"size": "65MB",
|
||||
"offset": "0x3F00000",
|
||||
"type": "userdata",
|
||||
"filesystem_type": "ubi"
|
||||
}
|
||||
|
||||
@ -3,8 +3,8 @@ recovery,raw,16
|
||||
boot,raw,16
|
||||
logo,raw,8
|
||||
system,ubi,18874368
|
||||
rootfs,ubi,10485760
|
||||
rootfs,ubi,12582912
|
||||
data,ubi,6291456
|
||||
usrdata,ubi,63963136
|
||||
usrdata,ubi,68157440
|
||||
writeback,raw,12
|
||||
::
|
||||
|
||||
@ -3,8 +3,8 @@ recovery,raw,16
|
||||
boot,raw,16
|
||||
logo,raw,8
|
||||
system,ubi,18874368
|
||||
rootfs,ubi,10485760
|
||||
rootfs,ubi,12582912
|
||||
data,ubi,6291456
|
||||
usrdata,ubi,63963136
|
||||
usrdata,ubi,68157440
|
||||
writeback,raw,12
|
||||
::
|
||||
|
||||
@ -16,7 +16,7 @@ CONFIG_KERNEL_DTB="quaming-kernel-qm10xd-demo_ld-nand.dtb"
|
||||
CONFIG_ROOTFS_BUSYBOX_CONFIG="busybox_quaming_config"
|
||||
CONFIG_ROOTFS_BUSYBOX_VERSION="1.36.1"
|
||||
|
||||
#CONFIG_XOS_WIFI_QUADRV="ea6x21qx"
|
||||
CONFIG_XOS_WIFI_QUADRV="ea6x21qx"
|
||||
|
||||
CONFIG_XOS_BUILD_SDK="qm10xd_linux"
|
||||
CONFIG_XOS_BUILD_BOARD="qm10xd"
|
||||
|
||||
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
mem_total=64
|
||||
mem_mmz_start=0x42600000
|
||||
mem_mmz_size=0x01A00000
|
||||
fb0_start=0x43E00000
|
||||
fb0_size=1200
|
||||
fb0_start=0x43C18000
|
||||
fb0_size=4000
|
||||
fb0_fbc_eb=1
|
||||
fb4_start=0x00000000
|
||||
fb4_size=0
|
||||
|
||||
Binary file not shown.
@ -5,8 +5,8 @@ sdk_verion = 1.00.01
|
||||
hw_verion = 1.0
|
||||
b_num = 12
|
||||
[wifi]
|
||||
SSID =ZNJQ
|
||||
PASSWD =Znjq...123
|
||||
SSID =tz
|
||||
PASSWD =tz123456
|
||||
[audio]
|
||||
audio_sample_rate = 8000
|
||||
[video]
|
||||
|
||||
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/data/.gitignore
vendored
Normal file
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/data/.gitignore
vendored
Normal file
@ -1,15 +1,11 @@
|
||||
#!/bin/sh
|
||||
#ifconfig lo up
|
||||
|
||||
export LD_LIBRARY_PATH=/lib:/nfs/lib:/vendor/qua/lib
|
||||
cd /qua/ko
|
||||
./loadko.sh -i
|
||||
mount --bind /system/qua /vendor/qua
|
||||
mount --bind /system/res /res
|
||||
mount --bind /system/app /app
|
||||
|
||||
export LD_LIBRARY_PATH=/lib:/nfs/lib:/vendor/qua/lib
|
||||
|
||||
cd /ko
|
||||
./loadko.sh -i
|
||||
|
||||
cd /system/app/
|
||||
bootanimation_server -w 800 -h 1280 -s 38 -r 60 -v '2,32768;2,2457600' 2>&1 > /dev/kmsg &
|
||||
|
||||
|
||||
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/engines-1.1/capi.so
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/engines-1.1/capi.so
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/engines-1.1/padlock.so
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/engines-1.1/padlock.so
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libc.so.0
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libc.so.0
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libcjson.so
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libcjson.so
Executable file
Binary file not shown.
@ -0,0 +1 @@
|
||||
libcrypto.so.1.1
|
||||
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libcrypto.so.1.1
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libcrypto.so.1.1
Executable file
Binary file not shown.
@ -0,0 +1 @@
|
||||
libcurl.so.4
|
||||
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libcurl.so.4
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libcurl.so.4
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libhardware.so
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libhardware.so
Executable file
Binary file not shown.
@ -0,0 +1 @@
|
||||
libjpeg.so.62.4.0
|
||||
@ -0,0 +1 @@
|
||||
libjpeg.so.62.4.0
|
||||
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libjpeg.so.62.4.0
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libjpeg.so.62.4.0
Executable file
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
libmosquitto.so.2.0.18
|
||||
@ -0,0 +1 @@
|
||||
libmosquitto.so.2.0.18
|
||||
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libmosquitto.so.2.0.18
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libmosquitto.so.2.0.18
Executable file
Binary file not shown.
@ -0,0 +1 @@
|
||||
libmosquittopp.so.2.0.18
|
||||
@ -0,0 +1 @@
|
||||
libmosquittopp.so.2.0.18
|
||||
Binary file not shown.
@ -0,0 +1 @@
|
||||
libpng16.so.16
|
||||
@ -0,0 +1 @@
|
||||
libpng16.so.16
|
||||
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libpng16.so.16
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libpng16.so.16
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libquamm.player.so
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libquamm.player.so
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libquamm_common.so
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libquamm_common.so
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libquamm_gl.so
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libquamm_gl.so
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libquamm_utils.so
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libquamm_utils.so
Executable file
Binary file not shown.
@ -0,0 +1 @@
|
||||
libssl.so.1.1
|
||||
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libssl.so.1.1
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libssl.so.1.1
Executable file
Binary file not shown.
@ -0,0 +1 @@
|
||||
libssp.so.0.0.0
|
||||
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libssp.so.0.0.0
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libssp.so.0.0.0
Executable file
Binary file not shown.
@ -0,0 +1 @@
|
||||
libturbojpeg.so.0.3.0
|
||||
@ -0,0 +1 @@
|
||||
libturbojpeg.so.0.3.0
|
||||
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libturbojpeg.so.0.3.0
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/lib/libturbojpeg.so.0.3.0
Executable file
Binary file not shown.
@ -0,0 +1,12 @@
|
||||
prefix=/home/ss/work/openssl/arm-openssl
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
enginesdir=${libdir}/engines-1.1
|
||||
|
||||
Name: OpenSSL-libcrypto
|
||||
Description: OpenSSL cryptography library
|
||||
Version: 1.1.1k
|
||||
Libs: -L${libdir} -lcrypto
|
||||
Libs.private: -ldl -pthread
|
||||
Cflags: -I${includedir}
|
||||
@ -0,0 +1,11 @@
|
||||
prefix=/home/ss/work/openssl/arm-openssl
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: OpenSSL-libssl
|
||||
Description: Secure Sockets Layer and cryptography libraries
|
||||
Version: 1.1.1k
|
||||
Requires.private: libcrypto
|
||||
Libs: -L${libdir} -lssl
|
||||
Cflags: -I${includedir}
|
||||
@ -0,0 +1,9 @@
|
||||
prefix=/home/ss/work/openssl/arm-openssl
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: OpenSSL
|
||||
Description: Secure Sockets Layer and cryptography libraries and tools
|
||||
Version: 1.1.1k
|
||||
Requires: libssl libcrypto
|
||||
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/mnt/.gitignore
vendored
Normal file
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/mnt/.gitignore
vendored
Normal file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/acw.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/acw.ko
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/extac.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/extac.ko
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/fhfb.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/fhfb.ko
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/fybase.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/fybase.ko
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/fyosal.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/fyosal.ko
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/g2d.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/g2d.ko
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/i2s.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/i2s.ko
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/jpeg.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/jpeg.ko
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/lcm.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/lcm.ko
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/lcm_module.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/lcm_module.ko
Executable file
Binary file not shown.
126
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/loadko.sh
Executable file
126
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/loadko.sh
Executable file
@ -0,0 +1,126 @@
|
||||
#!/bin/sh
|
||||
# Useage: ./loadko [ -r|-i|-a ]
|
||||
# -r : rmmod all modules
|
||||
# -i : insmod all modules
|
||||
# default : rmmod all moules and then insmod them
|
||||
#
|
||||
|
||||
####################Variables Definition##########################
|
||||
source ./mmz_layout.cfg
|
||||
|
||||
mmz_start=$mem_mmz_start; # mmz start addr
|
||||
mmz_size=$mem_mmz_size; # mmz size
|
||||
|
||||
fb0_start=$fb0_start;
|
||||
fb0_size=$fb0_size;
|
||||
fb0_fbc_eb=$fb0_fbc_eb;
|
||||
|
||||
fb4_start=$fb4_start;
|
||||
fb4_size=$fb4_size;
|
||||
fb4_fbc_eb=$fb4_fbc_eb;
|
||||
|
||||
####################hex change to dec#############################
|
||||
mmz_size=`echo "$mmz_size" |
|
||||
awk 'BEGIN { temp = 0; }
|
||||
{
|
||||
temp = $1/1024/1024;
|
||||
}
|
||||
END { printf("%dM\n", temp); }'`
|
||||
|
||||
echo "mmz_size=$mmz_size;"
|
||||
|
||||
##################################################################
|
||||
|
||||
insert_ko()
|
||||
{
|
||||
#pinmux switch to i2s and i2c
|
||||
devmem 0x10200064 32 0x4
|
||||
devmem 0x10200068 32 0x4
|
||||
devmem 0x1020006c 32 0x4
|
||||
devmem 0x10200070 32 0x4
|
||||
devmem 0x10200074 32 0x4
|
||||
devmem 0x10200080 32 0x2
|
||||
devmem 0x10200088 32 0x2
|
||||
devmem 0x0b100044 32 0x22
|
||||
devmem 0x0b10004c 32 0x22
|
||||
|
||||
#driver load
|
||||
insmod fyosal.ko
|
||||
insmod mmz.ko mmz=anonymous,0,$mmz_start,$mmz_size anony=1 || report_error
|
||||
insmod fybase.ko logbuflen=16384
|
||||
insmod sys.ko
|
||||
insmod i2s.ko
|
||||
insmod extac.ko
|
||||
insmod fhfb.ko video="vram0_size:4000,vram1_size:0,vram2_size:0,vram3_size:0,vram4_size:0,vram5_size:0,vram6_size:0,vram7_size:0," fbc=3000 fbc1=0 fhfb0_start=0 fhfb0_size=0 fhfb0_fbc=1 fhfb4_start=0 fhfb4_size=0 fhfb4_fbc=1
|
||||
insmod lcm_module.ko
|
||||
insmod lcm.ko lcm0_id_cfg=1 lcm1_id_cfg=1 lcm0_id=5 lcm1_id=5
|
||||
insmod vou.ko
|
||||
insmod vdu.ko SupportBFrame=1
|
||||
insmod jpeg.ko
|
||||
insmod g2d.ko rotbuf=1024 wkbuf=0 vgsbuf=0
|
||||
# insmod g2d.ko wkbuf=1024 vgsbuf=1024 rotbuf=1024
|
||||
insmod acw.ko
|
||||
}
|
||||
|
||||
|
||||
remove_ko()
|
||||
{
|
||||
rmmod acw
|
||||
rmmod g2d
|
||||
rmmod jpeg
|
||||
rmmod vdu
|
||||
rmmod vou
|
||||
rmmod lcm
|
||||
rmmod lcm_module
|
||||
rmmod fhfb
|
||||
rmmod sys
|
||||
rmmod fybase
|
||||
rmmod mmz
|
||||
rmmod fyosal
|
||||
}
|
||||
|
||||
load_usage()
|
||||
{
|
||||
echo "Usage: ./loadko.sh [-option]"
|
||||
echo "options:"
|
||||
echo " -i insert modules"
|
||||
echo " -r remove modules"
|
||||
echo " -a remove modules first, then insert modules"
|
||||
echo " -h help information"
|
||||
echo -e "for example: ./loadko.sh -i\n"
|
||||
}
|
||||
|
||||
######################parse arg###################################
|
||||
b_arg_insmod=0
|
||||
b_arg_remove=0
|
||||
|
||||
for arg in $@
|
||||
do
|
||||
case $arg in
|
||||
"-i")
|
||||
b_arg_insmod=1;
|
||||
;;
|
||||
|
||||
"-r")
|
||||
b_arg_remove=1;
|
||||
;;
|
||||
"-a")
|
||||
b_arg_insmod=1;
|
||||
b_arg_remove=1;
|
||||
;;
|
||||
|
||||
"-h")
|
||||
load_usage;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
#######################parse arg end########################
|
||||
|
||||
#######################Action###############################
|
||||
if [ $b_arg_remove -eq 1 ]; then
|
||||
remove_ko;
|
||||
fi
|
||||
if [ $b_arg_insmod -eq 1 ]; then
|
||||
insert_ko;
|
||||
fi
|
||||
|
||||
@ -0,0 +1,154 @@
|
||||
#!/bin/sh
|
||||
# Useage: ./loadko [ -r|-i|-a ]
|
||||
# -r : rmmod all modules
|
||||
# -i : insmod all modules
|
||||
# default : rmmod all moules and then insmod them
|
||||
#
|
||||
|
||||
####################Variables Definition##########################
|
||||
|
||||
mmz_start=0x42400000; # mmz start addr
|
||||
mmz_size=28M; # mmz size
|
||||
|
||||
##################################################################
|
||||
#ulimit -s 2048
|
||||
#report_error()
|
||||
#{
|
||||
# echo "******* Error: There's something wrong, please check! *****"
|
||||
# exit 1
|
||||
#}
|
||||
|
||||
#config_clock()
|
||||
#{
|
||||
# echo clock_vpu_enable > /proc/driver/sys_config
|
||||
# echo clock_vpu_400000000 > /proc/driver/sys_config
|
||||
#
|
||||
# echo clock_isp_enable > /proc/driver/sys_config
|
||||
# echo clock_isp_333600000 > /proc/driver/sys_config
|
||||
#
|
||||
# echo clock_sensor0_enable > /proc/driver/sys_config
|
||||
# echo clock_sensor0_24000000 > /proc/driver/sys_config
|
||||
#
|
||||
# echo clock_sensor1_enable > /proc/driver/sys_config
|
||||
# echo clock_sensor1_24000000 > /proc/driver/sys_config
|
||||
#
|
||||
# echo clock_sensor2_enable > /proc/driver/sys_config
|
||||
# echo clock_sensor2_24000000 > /proc/driver/sys_config
|
||||
#}
|
||||
|
||||
insert_ko()
|
||||
{
|
||||
#pinmux switch to i2s and i2c
|
||||
devmem 0x10200064 32 0x4
|
||||
devmem 0x10200068 32 0x4
|
||||
devmem 0x1020006c 32 0x4
|
||||
devmem 0x10200070 32 0x4
|
||||
devmem 0x10200074 32 0x4
|
||||
devmem 0x10200080 32 0x2
|
||||
devmem 0x10200088 32 0x2
|
||||
devmem 0x0b100044 32 0x22
|
||||
devmem 0x0b10004c 32 0x22
|
||||
|
||||
# driver load
|
||||
# config_clock
|
||||
insmod fyosal.ko
|
||||
insmod mmz.ko mmz=anonymous,0,$mmz_start,$mmz_size anony=1 || report_error
|
||||
insmod fybase.ko logbuflen=16384
|
||||
# insmod sys_config.ko
|
||||
insmod sys.ko
|
||||
# insmod i2s.ko
|
||||
# insmod extac.ko
|
||||
# insmod media_process.ko
|
||||
# insmod vicap_rpc.ko
|
||||
# insmod isp.ko
|
||||
# insmod vpu.ko
|
||||
insmod fhfb.ko video="vram0_size:1200,vram1_size:0,vram2_size:0,vram3_size:0,vram4_size:1200,vram5_size:0,vram6_size:0,vram7_size:0,"
|
||||
insmod lcm_module.ko
|
||||
insmod lcm.ko lcm0_id_cfg=1 lcm1_id_cfg=1 lcm0_id=7 lcm1_id=6 #1280x800 * 2
|
||||
insmod vou.ko
|
||||
insmod vdu.ko
|
||||
insmod jpeg.ko
|
||||
insmod g2d.ko
|
||||
# insmod g2d.ko wkbuf=1024 vgsbuf=1024 rotbuf=1024
|
||||
# insmod vppu.ko
|
||||
# insmod vgs.ko
|
||||
# insmod venc_rpc.ko
|
||||
# insmod pre_rolling.ko buf_base=0x5F500000 buf_size=0x400000
|
||||
# insmod isp460.ko
|
||||
# insmod camif.ko
|
||||
# insmod src.ko
|
||||
# insmod nnp.ko
|
||||
insmod acw.ko
|
||||
}
|
||||
|
||||
remove_ko()
|
||||
{
|
||||
rmmod nnp
|
||||
rmmod src
|
||||
rmmod camif
|
||||
rmmod isp460
|
||||
rmmod pre_rolling
|
||||
rmmod venc_rpc
|
||||
rmmod vgs
|
||||
rmmod vppu
|
||||
rmmod g2d
|
||||
rmmod jpeg
|
||||
rmmod vpu
|
||||
rmmod isp
|
||||
rmmod vicap_rpc
|
||||
rmmod media_process
|
||||
rmmod sys_config
|
||||
rmmod sys
|
||||
rmmod fybase
|
||||
rmmod mmz
|
||||
rmmod fyosal
|
||||
rmmod xbus_rpc
|
||||
}
|
||||
|
||||
|
||||
load_usage()
|
||||
{
|
||||
echo "Usage: ./loadko.sh [-option]"
|
||||
echo "options:"
|
||||
echo " -i insert modules"
|
||||
echo " -r remove modules"
|
||||
echo " -a remove modules first, then insert modules"
|
||||
echo " -h help information"
|
||||
echo -e "for example: ./loadko.sh -i\n"
|
||||
}
|
||||
|
||||
######################parse arg###################################
|
||||
b_arg_insmod=0
|
||||
b_arg_remove=0
|
||||
|
||||
|
||||
for arg in $@
|
||||
do
|
||||
case $arg in
|
||||
"-i")
|
||||
b_arg_insmod=1;
|
||||
;;
|
||||
|
||||
"-r")
|
||||
b_arg_remove=1;
|
||||
;;
|
||||
"-a")
|
||||
b_arg_insmod=1;
|
||||
b_arg_remove=1;
|
||||
;;
|
||||
|
||||
"-h")
|
||||
load_usage;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
#######################parse arg end########################
|
||||
|
||||
#######################Action###############################
|
||||
if [ $b_arg_remove -eq 1 ]; then
|
||||
remove_ko;
|
||||
fi
|
||||
if [ $b_arg_insmod -eq 1 ]; then
|
||||
insert_ko;
|
||||
fi
|
||||
|
||||
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/mmz.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/mmz.ko
Executable file
Binary file not shown.
@ -0,0 +1,9 @@
|
||||
mem_total=64
|
||||
mem_mmz_start=0x42600000
|
||||
mem_mmz_size=0x01A00000
|
||||
fb0_start=0x43C18000
|
||||
fb0_size=4000
|
||||
fb0_fbc_eb=1
|
||||
fb4_start=0x00000000
|
||||
fb4_size=0
|
||||
fb4_fbc_eb=0
|
||||
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/sys.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/sys.ko
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/vdu.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/vdu.ko
Executable file
Binary file not shown.
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/vou.ko
Executable file
BIN
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/qua/ko/vou.ko
Executable file
Binary file not shown.
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/system/app/.gitignore
vendored
Normal file
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/system/app/.gitignore
vendored
Normal file
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/system/qua/.gitignore
vendored
Normal file
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/system/qua/.gitignore
vendored
Normal file
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/system/res/.gitignore
vendored
Normal file
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/system/res/.gitignore
vendored
Normal file
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/tmp/.gitignore
vendored
Normal file
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/tmp/.gitignore
vendored
Normal file
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/usrdata/.gitignore
vendored
Normal file
0
sdk/X-AIOS-LT00-V1.0.4/product/demo_ld/rootfs_overlay/usrdata/.gitignore
vendored
Normal file
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user