mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-17 03:48:55 +00:00
V1.0.6
This commit is contained in:
@@ -252,12 +252,6 @@ config AIC_USING_TSEN_CPU
|
||||
default n
|
||||
select AIC_TSEN_DRV
|
||||
|
||||
config AIC_USING_TSEN_GPAI
|
||||
bool "Using TSEN_GPAI"
|
||||
depends on AIC_USING_TSEN
|
||||
default n
|
||||
select AIC_TSEN_DRV
|
||||
|
||||
source "bsp/artinchip/drv/tsen/Kconfig.dev"
|
||||
endmenu
|
||||
|
||||
@@ -358,6 +352,21 @@ config AIC_USING_AUDIO
|
||||
|
||||
source "bsp/artinchip/drv/audio/Kconfig"
|
||||
|
||||
#---------------------------
|
||||
# TOUCH device global option
|
||||
#---------------------------
|
||||
|
||||
if KERNEL_BAREMETAL
|
||||
|
||||
config AIC_USING_TOUCH
|
||||
bool "Using Touch"
|
||||
default n
|
||||
select AIC_TOUCH_DRV
|
||||
|
||||
source "bsp/artinchip/drv_bare/touch/Kconfig"
|
||||
|
||||
endif
|
||||
|
||||
#---------------------------
|
||||
# xxx device global option
|
||||
#---------------------------
|
||||
@@ -466,6 +475,33 @@ config AIC_INTERRUPTSTACK_SIZE
|
||||
range 0 AIC_PSRAM_SW_SIZE
|
||||
default 4096
|
||||
|
||||
# 5. Support seconed Flash
|
||||
|
||||
menu "Support another Flash"
|
||||
choice
|
||||
prompt "Number of Flash"
|
||||
default AIC_FLASH_NUM_ONE
|
||||
help
|
||||
Whether support another flash
|
||||
config AIC_FLASH_NUM_ONE
|
||||
bool "only 1 flash"
|
||||
config AIC_FLASH_NUM_TWO
|
||||
bool "support 2 flashes"
|
||||
endchoice
|
||||
choice
|
||||
prompt "Seconed Flash type"
|
||||
depends on AIC_FLASH_NUM_TWO
|
||||
default AIC_SECONED_FLASH_NOR
|
||||
help
|
||||
Type of seconed Flash
|
||||
config AIC_SECONED_FLASH_NOR
|
||||
bool "norflash"
|
||||
config AIC_SECONED_FLASH_NAND
|
||||
bool "nandflash"
|
||||
endchoice
|
||||
|
||||
endmenu
|
||||
|
||||
endmenu
|
||||
|
||||
#---------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022, ArtInChip Technology Co., Ltd
|
||||
* Copyright (c) 2022-2024, ArtInChip Technology Co., Ltd
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -115,9 +115,6 @@ void aic_memheap_free(int type, void *rmem)
|
||||
*/
|
||||
void rt_hw_board_init(void)
|
||||
{
|
||||
aic_board_sysclk_init();
|
||||
aic_board_pinmux_init();
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
rt_system_heap_init((void *)&__heap_start, (void *)&__heap_end);
|
||||
#if (!defined(QEMU_RUN) && defined(RT_USING_MEMHEAP))
|
||||
@@ -125,6 +122,9 @@ void rt_hw_board_init(void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
aic_board_sysclk_init();
|
||||
aic_board_pinmux_init();
|
||||
|
||||
#ifdef RT_USING_COMPONENTS_INIT
|
||||
rt_components_board_init();
|
||||
#endif
|
||||
@@ -173,11 +173,14 @@ const struct dfs_mount_tbl mount_table[] = {
|
||||
#ifdef LPKG_RAMDISK_TYPE_INITDATA
|
||||
{"ramdisk0", "/ram", "elm", 0, 0, 0},
|
||||
#endif
|
||||
#ifndef AIC_AB_SYSTEM_INTERFACE
|
||||
#if (defined(AIC_USING_FS_IMAGE_TYPE_FATFS_FOR_0) || defined(AIC_USING_FS_IMAGE_TYPE_FATFS_FOR_1))
|
||||
{"blk_rodata", "/rodata", "elm", 0, 0, 0},
|
||||
{"blk_data", "/data", "elm", 0, 0, 1},
|
||||
{"blk_rodata", "/rodata", "elm", 0, 0, 0},
|
||||
#endif
|
||||
#if (defined(AIC_USING_FS_IMAGE_TYPE_FATFS_FOR_0) || defined(AIC_USING_FS_IMAGE_TYPE_FATFS_FOR_1))
|
||||
{"blk_data", "/data", "elm", 0, 0, 1},
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LPKG_USING_LITTLEFS
|
||||
{"data", "/data", "lfs", 0, 0, 0},
|
||||
#endif
|
||||
|
||||
Binary file not shown.
13
target/d12x/demo68-nand/pack/env.txt
Normal file
13
target/d12x/demo68-nand/pack/env.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
osAB_next=A
|
||||
osAB_now=A
|
||||
rodataAB_next=A
|
||||
rodataAB_now=A
|
||||
dataAB_next=A
|
||||
dataAB_now=A
|
||||
upgrade_available=0
|
||||
bootlimit=5
|
||||
bootcount=0
|
||||
rodata_partname=blk_rodata
|
||||
rodata_partname_r=blk_rodata_r
|
||||
data_partname=blk_data
|
||||
data_partname_r=blk_data_r
|
||||
@@ -3,10 +3,21 @@
|
||||
"size": "128m", // Size of SPI NAND
|
||||
"partitions": {
|
||||
"spl": { "size": "1m" },
|
||||
"userid": { "size": "256k" }, // at least 16KB
|
||||
"env": { "size": "256k" },
|
||||
"env_r": { "size": "256k" },
|
||||
"os": { "size": "2m" },
|
||||
"rodata": { "size": "6m" },
|
||||
"os_r": { "size": "2m" },
|
||||
"rodata": { "size": "10m" },
|
||||
"rodata_r": { "size": "6m" },
|
||||
"data": {
|
||||
"size": "50m",
|
||||
"size": "40m",
|
||||
"nftl": { // Volume in NFTL device
|
||||
"data": { "size": "-" },
|
||||
},
|
||||
},
|
||||
"data_r": {
|
||||
"size": "40m",
|
||||
"nftl": { // Volume in NFTL device
|
||||
"data": { "size": "-" },
|
||||
},
|
||||
@@ -21,10 +32,10 @@
|
||||
"media": {
|
||||
"type": "spi-nand",
|
||||
"device_id": 0,
|
||||
"array_organization": [
|
||||
{ "page": "2k", "block": "128k", "oob": "64"},
|
||||
// { "page": "4k", "block": "256k", "oob": "128"},
|
||||
],
|
||||
"array_organization": [
|
||||
{ "page": "2k", "block": "128k", "oob": "64"},
|
||||
// { "page": "4k", "block": "256k", "oob": "128"},
|
||||
],
|
||||
}
|
||||
},
|
||||
"updater": { // Image writer which is downloaded to RAM by USB
|
||||
@@ -45,6 +56,11 @@
|
||||
"attr": ["mtd", "required"],
|
||||
"part": ["spl"]
|
||||
},
|
||||
"env": {
|
||||
"file": "env.bin",
|
||||
"attr": ["mtd", "optional"],
|
||||
"part": ["env","env_r"]
|
||||
},
|
||||
"os": {
|
||||
"file": "d12x_os.itb",
|
||||
"attr": ["mtd", "required"],
|
||||
@@ -62,8 +78,8 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
"temporary": { // Pre-proccess to generate image components from raw data
|
||||
"aicboot": {
|
||||
"pre-process": { // Pre-proccess to generate image components from raw data
|
||||
"aicimage": { // Create aic boot image
|
||||
"uartupg-psram-init.aic": { // No loader, only PreBootProgram to initialize PSRAM
|
||||
"head_ver": "0x00010001",
|
||||
"resource": {
|
||||
@@ -71,22 +87,38 @@
|
||||
"pbp": "d12x.pbp",
|
||||
},
|
||||
},
|
||||
"bootloader.aic": {
|
||||
"pbp_ext.aic": {
|
||||
"head_ver": "0x00010001",
|
||||
"resource": {
|
||||
"pbp": "d12x.pbp",
|
||||
"private": "pbp_cfg.bin",
|
||||
},
|
||||
// combine to use with loader.aic
|
||||
"with_ext": "true",
|
||||
},
|
||||
"loader.aic": {
|
||||
"head_ver": "0x00010001",
|
||||
"loader": {
|
||||
"file": "bootloader.bin",
|
||||
"load address": "0x30043000",
|
||||
"entry point": "0x30043100",
|
||||
"load address ext": "0x40200000",
|
||||
"entry point ext": "0x40200100",
|
||||
"load address": "0x40200000",
|
||||
"entry point": "0x40200100",
|
||||
},
|
||||
"resource": {
|
||||
"private": "pbp_cfg.bin",
|
||||
"pbp": "d12x.pbp",
|
||||
},
|
||||
},
|
||||
},
|
||||
"itb": {
|
||||
"concatenate": { // cat files in order
|
||||
"bootloader.aic": ["pbp_ext.aic", "loader.aic"],
|
||||
},
|
||||
"uboot_env": { // Create env data from txt
|
||||
"env.bin": {
|
||||
"file": "env.txt",
|
||||
"size": "4096",
|
||||
"redundant": "enable",
|
||||
},
|
||||
},
|
||||
"itb": { // Create itb image from its
|
||||
"d12x_os.itb": {
|
||||
"its": "d12x_os.its"
|
||||
},
|
||||
|
||||
9
target/d12x/demo68-nand/pack/ota-subimgs.cfg
Normal file
9
target/d12x/demo68-nand/pack/ota-subimgs.cfg
Normal file
@@ -0,0 +1,9 @@
|
||||
[image]
|
||||
size = "";
|
||||
version = "1.0.0";
|
||||
|
||||
[file]
|
||||
ota_info.bin:file;
|
||||
d12x_os.itb:os;
|
||||
rodata.fatfs:rodata;
|
||||
data.fatfs:blk_data;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022, ArtInChip Technology Co., Ltd
|
||||
* Copyright (c) 2022-2024, ArtInChip Technology Co., Ltd
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -9,6 +9,11 @@
|
||||
#include <aic_core.h>
|
||||
#include <aic_hal.h>
|
||||
#include "board.h"
|
||||
#include <libfdt.h>
|
||||
#include <of.h>
|
||||
#include <aic_utils.h>
|
||||
|
||||
extern size_t __dtb_pos_f;
|
||||
|
||||
struct aic_pinmux
|
||||
{
|
||||
@@ -22,12 +27,12 @@ struct aic_pinmux aic_pinmux_config[] = {
|
||||
#ifdef AIC_USING_UART0
|
||||
/* uart0 */
|
||||
{5, PIN_PULL_DIS, 3, "PA.0"},
|
||||
{5, PIN_PULL_DIS, 3, "PA.1"},
|
||||
{5, PIN_PULL_UP, 3, "PA.1"},
|
||||
#endif
|
||||
#ifdef AIC_USING_UART1
|
||||
/* uart1 */
|
||||
{5, PIN_PULL_DIS, 3, "PA.2"},
|
||||
{5, PIN_PULL_DIS, 3, "PA.3"},
|
||||
{5, PIN_PULL_UP, 3, "PA.3"},
|
||||
#endif
|
||||
#ifdef AIC_USING_CAN0
|
||||
/* can0 */
|
||||
@@ -46,10 +51,8 @@ struct aic_pinmux aic_pinmux_config[] = {
|
||||
#ifdef AIC_USING_I2C0
|
||||
{4, PIN_PULL_DIS, 3, "PA.8"}, // SCK
|
||||
{4, PIN_PULL_DIS, 3, "PA.9"}, // SDA
|
||||
{1, PIN_PULL_DIS, 3, "PA.10"}, // RST
|
||||
{1, PIN_PULL_DIS, 3, "PA.11"}, // INT
|
||||
#endif
|
||||
#ifdef AIC_USING_QSPI0
|
||||
#if defined(AIC_USING_QSPI0) && !defined(AIC_SYSCFG_SIP_FLASH_ENABLE)
|
||||
/* qspi0 */
|
||||
{2, PIN_PULL_DIS, 3, "PB.0"},
|
||||
{2, PIN_PULL_DIS, 3, "PB.1"},
|
||||
@@ -169,6 +172,10 @@ struct aic_pinmux aic_pinmux_config[] = {
|
||||
{1, PIN_PULL_DIS, 3, AIC_AUDIO_PA_ENABLE_GPIO},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef AIC_USING_CTP
|
||||
{1, PIN_PULL_DIS, 3, AIC_TOUCH_PANEL_RST_PIN},
|
||||
{1, PIN_PULL_DIS, 3, AIC_TOUCH_PANEL_INT_PIN},
|
||||
#endif
|
||||
};
|
||||
|
||||
void aic_board_pinmux_init(void)
|
||||
@@ -188,4 +195,24 @@ void aic_board_pinmux_init(void)
|
||||
hal_gpio_set_bias_pull(g, p, aic_pinmux_config[i].bias);
|
||||
hal_gpio_set_drive_strength(g, p, aic_pinmux_config[i].drive);
|
||||
}
|
||||
|
||||
#ifndef AIC_BOOTLOADER
|
||||
struct fdt_header *header;
|
||||
uint32_t dtb_size;
|
||||
void *dtb_pos_r;
|
||||
|
||||
header = (struct fdt_header *)(&__dtb_pos_f);
|
||||
|
||||
if (fdt_magic(header) == FDT_MAGIC)
|
||||
{
|
||||
dtb_size = fdt_totalsize(header);
|
||||
dtb_pos_r = aicos_malloc(0, dtb_size);
|
||||
|
||||
aicos_memcpy(dtb_pos_r, (void *)(&__dtb_pos_f), dtb_size);
|
||||
|
||||
of_relocate_dtb((unsigned long)dtb_pos_r);
|
||||
|
||||
pinmux_fdt_parse();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022, ArtInChip Technology Co., Ltd
|
||||
* Copyright (c) 2022-2024, ArtInChip Technology Co., Ltd
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -115,9 +115,6 @@ void aic_memheap_free(int type, void *rmem)
|
||||
*/
|
||||
void rt_hw_board_init(void)
|
||||
{
|
||||
aic_board_sysclk_init();
|
||||
aic_board_pinmux_init();
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
rt_system_heap_init((void *)&__heap_start, (void *)&__heap_end);
|
||||
#if (!defined(QEMU_RUN) && defined(RT_USING_MEMHEAP))
|
||||
@@ -125,6 +122,9 @@ void rt_hw_board_init(void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
aic_board_sysclk_init();
|
||||
aic_board_pinmux_init();
|
||||
|
||||
#ifdef RT_USING_COMPONENTS_INIT
|
||||
rt_components_board_init();
|
||||
#endif
|
||||
@@ -160,6 +160,9 @@ static const struct romfs_dirent _mountpoint_root[] =
|
||||
{ROMFS_DIRENT_DIR, "rodata", RT_NULL, 0},
|
||||
{ROMFS_DIRENT_DIR, "sdcard", RT_NULL, 0},
|
||||
{ROMFS_DIRENT_DIR, "udisk", RT_NULL, 0},
|
||||
#if defined(AIC_FLASH_NUM_TWO)
|
||||
{ROMFS_DIRENT_DIR, "extra", RT_NULL, 0},
|
||||
#endif
|
||||
};
|
||||
const struct romfs_dirent romfs_root =
|
||||
{
|
||||
@@ -173,9 +176,11 @@ const struct dfs_mount_tbl mount_table[] = {
|
||||
#ifdef LPKG_RAMDISK_TYPE_INITDATA
|
||||
{"ramdisk0", "/ram", "elm", 0, 0, 0},
|
||||
#endif
|
||||
#ifndef AIC_AB_SYSTEM_INTERFACE
|
||||
#if (defined(AIC_USING_FS_IMAGE_TYPE_FATFS_FOR_0) || defined(AIC_USING_FS_IMAGE_TYPE_FATFS_FOR_1))
|
||||
{"blk_rodata", "/rodata", "elm", 0, 0, 0},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef LPKG_USING_LITTLEFS
|
||||
{"data", "/data", "lfs", 0, 0, 0},
|
||||
#endif
|
||||
@@ -187,6 +192,11 @@ const struct dfs_mount_tbl mount_table[] = {
|
||||
#endif
|
||||
#if (defined(AIC_USING_USB0_HOST) || defined(AIC_USING_USB1_HOST))
|
||||
{"udisk", "/udisk", "elm", 0, 0, 0xFF},
|
||||
#endif
|
||||
#if defined(AIC_SECONED_FLASH_NOR)
|
||||
{"extra", "/extra", "lfs", 0, 0, 0},
|
||||
#elif defined(AIC_SECONED_FLASH_NAND)
|
||||
{"blk_extra", "/extra", "elm", 0, 0, 0},
|
||||
#endif
|
||||
{0}
|
||||
};
|
||||
|
||||
Binary file not shown.
13
target/d12x/demo68-nor/pack/env.txt
Normal file
13
target/d12x/demo68-nor/pack/env.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
osAB_next=A
|
||||
osAB_now=A
|
||||
rodataAB_next=A
|
||||
rodataAB_now=A
|
||||
dataAB_next=A
|
||||
dataAB_now=A
|
||||
upgrade_available=0
|
||||
bootlimit=5
|
||||
bootcount=0
|
||||
rodata_partname=blk_rodata
|
||||
rodata_partname_r=blk_rodata_r
|
||||
data_partname=blk_data
|
||||
data_partname_r=blk_data_r
|
||||
@@ -3,10 +3,12 @@
|
||||
"size": "16m", // Size of SPI NOR
|
||||
"partitions": {
|
||||
"spl": { "size": "256k" },
|
||||
"env": { "size": "128k" },
|
||||
"env_r": { "size": "128k" },
|
||||
"userid": { "size": "256k" }, // at least 16KB
|
||||
"os": { "size": "2m" },
|
||||
"rodata": { "size": "6m" },
|
||||
"data": { "size": "7m" }
|
||||
"rodata": { "size": "10m" },
|
||||
"data": { "size": "1m" }
|
||||
},
|
||||
},
|
||||
"image": {
|
||||
@@ -37,6 +39,11 @@
|
||||
"attr": ["mtd", "required"],
|
||||
"part": ["spl"]
|
||||
},
|
||||
"env": {
|
||||
"file": "env.bin",
|
||||
"attr": ["mtd", "optional"],
|
||||
"part": ["env","env_r"]
|
||||
},
|
||||
"os": {
|
||||
"file": "d12x_os.itb",
|
||||
"attr": ["mtd", "required"],
|
||||
@@ -54,8 +61,8 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
"temporary": { // Pre-proccess to generate image components from raw data
|
||||
"aicboot": {
|
||||
"pre-process": { // Pre-proccess to generate image components from raw data
|
||||
"aicimage": { // Create aic boot image
|
||||
"uartupg-psram-init.aic": { // No loader, only PreBootProgram to initialize PSRAM
|
||||
"head_ver": "0x00010001",
|
||||
"resource": {
|
||||
@@ -63,25 +70,41 @@
|
||||
"pbp": "d12x.pbp",
|
||||
},
|
||||
},
|
||||
"bootloader.aic": {
|
||||
"pbp_ext.aic": {
|
||||
"head_ver": "0x00010001",
|
||||
"resource": {
|
||||
"pbp": "d12x.pbp",
|
||||
"private": "pbp_cfg.bin",
|
||||
},
|
||||
// combine to use with loader.aic
|
||||
"with_ext": "true",
|
||||
},
|
||||
"loader.aic": {
|
||||
"head_ver": "0x00010001",
|
||||
"loader": {
|
||||
"file": "bootloader.bin",
|
||||
"load address": "0x30043000",
|
||||
"entry point": "0x30043100",
|
||||
"load address ext": "0x40200000",
|
||||
"entry point ext": "0x40200100",
|
||||
"load address": "0x40200000",
|
||||
"entry point": "0x40200100",
|
||||
},
|
||||
"resource": {
|
||||
"private": "pbp_cfg.bin",
|
||||
"pbp": "d12x.pbp",
|
||||
},
|
||||
},
|
||||
},
|
||||
"itb": {
|
||||
"concatenate": { // cat files in order
|
||||
"bootloader.aic": ["pbp_ext.aic", "loader.aic"],
|
||||
},
|
||||
"itb": { // Create itb image from its
|
||||
"d12x_os.itb": {
|
||||
"its": "d12x_os.its"
|
||||
},
|
||||
},
|
||||
"uboot_env": {
|
||||
"env.bin": {
|
||||
"file": "env.txt",
|
||||
"size": "4096",
|
||||
"redundant": "enable",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
{
|
||||
"spi-nor": { // Device, The name should be the same with string in image:info:media:type
|
||||
"size": "16m", // Size of SPI NAND
|
||||
"partitions": {
|
||||
"spl": { "size": "256k" },
|
||||
"os": { "size": "2m" },
|
||||
"rodata": { "size": "6m" },
|
||||
"data": { "size": "7m" }
|
||||
},
|
||||
},
|
||||
"image": {
|
||||
"info": { // Header information about image
|
||||
"platform": "d12x",
|
||||
"product": "demo68-nor",
|
||||
"version": "1.0.0",
|
||||
"media": {
|
||||
"type": "spi-nor",
|
||||
"device_id": 0,
|
||||
}
|
||||
},
|
||||
"updater": { // Image writer which is downloaded to RAM by USB/UART
|
||||
"psram": {
|
||||
"file": "uartupg-psram-init.aic",
|
||||
"attr": ["required", "run"],
|
||||
"ram": "0x30043000"
|
||||
},
|
||||
"spl": {
|
||||
"file": "bootloader.aic",
|
||||
"attr": ["required", "run"],
|
||||
"ram": "0x40100000"
|
||||
},
|
||||
},
|
||||
"target": { // Image components which will be burn to device's partitions
|
||||
"spl": {
|
||||
"file": "bootloader.aic.enc",
|
||||
"attr": ["mtd", "required"],
|
||||
"part": ["spl"]
|
||||
},
|
||||
"os": {
|
||||
"file": "d12x_os.itb.enc",
|
||||
"attr": ["mtd", "required"],
|
||||
"part": ["os"]
|
||||
},
|
||||
"rodata": {
|
||||
"file": "rodata.fatfs.enc",
|
||||
"attr": ["mtd", "optional"],
|
||||
"part": ["rodata"]
|
||||
},
|
||||
"data": {
|
||||
"file": "data.lfs.enc",
|
||||
"attr": ["mtd", "optional"],
|
||||
"part": ["data"]
|
||||
},
|
||||
},
|
||||
},
|
||||
"temporary": { // Pre-proccess to generate image components from raw data
|
||||
"aicboot": {
|
||||
"uartupg-psram-init.aic": { // No loader, only PreBootProgram to initialize PSRAM
|
||||
"head_ver": "0x00010001",
|
||||
"resource": {
|
||||
"private": "pbp_cfg.bin",
|
||||
"pbp": "d12x.pbp",
|
||||
},
|
||||
},
|
||||
"bootloader.aic": {
|
||||
"head_ver": "0x00010001",
|
||||
"loader": {
|
||||
"file": "bootloader.bin",
|
||||
"load address": "0x30043000",
|
||||
"entry point": "0x30043100",
|
||||
"load address ext": "0x40300000",
|
||||
"entry point ext": "0x40300100",
|
||||
},
|
||||
"resource": {
|
||||
"private": "pbp_cfg.bin",
|
||||
"pbp": "d12x.pbp",
|
||||
},
|
||||
},
|
||||
},
|
||||
"itb": {
|
||||
"d12x_os.itb": {
|
||||
"its": "d12x_os.its"
|
||||
},
|
||||
},
|
||||
"spienc": {
|
||||
"bootloader.aic.enc": {
|
||||
"file": "bootloader.aic", // File to be encrypted
|
||||
"address": "0x0", // Flash start address file to be stored
|
||||
"key": "keys/spi_aes.key", // Keys the same in eFuse
|
||||
// "nonce": "keys/spi_nonce.key", // Nonce the same in eFuse
|
||||
"tweak": "0",
|
||||
},
|
||||
"d12x_os.itb.enc": {
|
||||
"file": "d12x_os.itb", // File to be encrypted
|
||||
"address": "0x40000", // Flash start address file to be stored
|
||||
"key": "keys/spi_aes.key", // Keys the same in eFuse
|
||||
// "nonce": "keys/spi_nonce.key", // Nonce the same in eFuse
|
||||
"tweak": "0",
|
||||
},
|
||||
"rodata.fatfs.enc": {
|
||||
"file": "rodata.fatfs", // File to be encrypted
|
||||
"address": "0x240000", // Flash start address file to be stored
|
||||
"key": "keys/spi_aes.key", // Keys the same in eFuse
|
||||
// "nonce": "keys/spi_nonce.key", // Nonce the same in eFuse
|
||||
"tweak": "0",
|
||||
},
|
||||
"data.lfs.enc": {
|
||||
"file": "data.lfs", // File to be encrypted
|
||||
"address": "0x840000", // Flash start address file to be stored
|
||||
"key": "keys/spi_aes.key", // Keys the same in eFuse
|
||||
// "nonce": "keys/spi_nonce.key", // Nonce the same in eFuse
|
||||
"tweak": "0",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
8
target/d12x/demo68-nor/pack/ota-subimgs.cfg
Normal file
8
target/d12x/demo68-nor/pack/ota-subimgs.cfg
Normal file
@@ -0,0 +1,8 @@
|
||||
[image]
|
||||
size = "";
|
||||
version = "1.0.0";
|
||||
|
||||
[file]
|
||||
ota_info.bin:file;
|
||||
d12x_os.itb:os;
|
||||
rodata.fatfs:rodata;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022, ArtInChip Technology Co., Ltd
|
||||
* Copyright (c) 2022-2024, ArtInChip Technology Co., Ltd
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -9,6 +9,11 @@
|
||||
#include <aic_core.h>
|
||||
#include <aic_hal.h>
|
||||
#include "board.h"
|
||||
#include <libfdt.h>
|
||||
#include <of.h>
|
||||
#include <aic_utils.h>
|
||||
|
||||
extern size_t __dtb_pos_f;
|
||||
|
||||
struct aic_pinmux
|
||||
{
|
||||
@@ -22,12 +27,12 @@ struct aic_pinmux aic_pinmux_config[] = {
|
||||
#ifdef AIC_USING_UART0
|
||||
/* uart0 */
|
||||
{5, PIN_PULL_DIS, 3, "PA.0"},
|
||||
{5, PIN_PULL_DIS, 3, "PA.1"},
|
||||
{5, PIN_PULL_UP, 3, "PA.1"},
|
||||
#endif
|
||||
#ifdef AIC_USING_UART1
|
||||
/* uart1 */
|
||||
{5, PIN_PULL_DIS, 3, "PA.2"},
|
||||
{5, PIN_PULL_DIS, 3, "PA.3"},
|
||||
{5, PIN_PULL_UP, 3, "PA.3"},
|
||||
#endif
|
||||
#ifdef AIC_USING_CAN0
|
||||
/* can0 */
|
||||
@@ -43,8 +48,6 @@ struct aic_pinmux aic_pinmux_config[] = {
|
||||
#ifdef AIC_USING_I2C0
|
||||
{4, PIN_PULL_DIS, 3, "PA.8"}, // SCK
|
||||
{4, PIN_PULL_DIS, 3, "PA.9"}, // SDA
|
||||
{1, PIN_PULL_DIS, 3, "PA.10"}, // RST
|
||||
{1, PIN_PULL_DIS, 3, "PA.11"}, // INT
|
||||
#endif
|
||||
#if defined(AIC_USING_QSPI0) && !defined(AIC_SYSCFG_SIP_FLASH_ENABLE)
|
||||
/* qspi0 */
|
||||
@@ -55,6 +58,15 @@ struct aic_pinmux aic_pinmux_config[] = {
|
||||
{2, PIN_PULL_DIS, 3, "PB.4"},
|
||||
{2, PIN_PULL_DIS, 3, "PB.5"},
|
||||
#endif
|
||||
#if defined(AIC_USING_QSPI1) && defined(AIC_SYSCFG_SIP_FLASH_ENABLE)
|
||||
/* qspi1 */
|
||||
{3, PIN_PULL_DIS, 3, "PB.0"},
|
||||
{3, PIN_PULL_DIS, 3, "PB.1"},
|
||||
{3, PIN_PULL_DIS, 3, "PB.2"},
|
||||
{3, PIN_PULL_DIS, 3, "PB.3"},
|
||||
{3, PIN_PULL_DIS, 3, "PB.4"},
|
||||
{3, PIN_PULL_DIS, 3, "PB.5"},
|
||||
#endif
|
||||
#ifdef AIC_USING_SDMC0
|
||||
{2, PIN_PULL_UP, 7, "PB.6"},
|
||||
{2, PIN_PULL_UP, 7, "PB.7"},
|
||||
@@ -265,6 +277,10 @@ struct aic_pinmux aic_pinmux_config[] = {
|
||||
{1, PIN_PULL_DIS, 3, AIC_AUDIO_PA_ENABLE_GPIO},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef AIC_USING_CTP
|
||||
{1, PIN_PULL_DIS, 3, AIC_TOUCH_PANEL_RST_PIN},
|
||||
{1, PIN_PULL_DIS, 3, AIC_TOUCH_PANEL_INT_PIN},
|
||||
#endif
|
||||
};
|
||||
|
||||
void aic_board_pinmux_init(void)
|
||||
@@ -284,4 +300,24 @@ void aic_board_pinmux_init(void)
|
||||
hal_gpio_set_bias_pull(g, p, aic_pinmux_config[i].bias);
|
||||
hal_gpio_set_drive_strength(g, p, aic_pinmux_config[i].drive);
|
||||
}
|
||||
|
||||
#ifndef AIC_BOOTLOADER
|
||||
struct fdt_header *header;
|
||||
uint32_t dtb_size;
|
||||
void *dtb_pos_r;
|
||||
|
||||
header = (struct fdt_header *)(&__dtb_pos_f);
|
||||
|
||||
if (fdt_magic(header) == FDT_MAGIC)
|
||||
{
|
||||
dtb_size = fdt_totalsize(header);
|
||||
dtb_pos_r = aicos_malloc(0, dtb_size);
|
||||
|
||||
aicos_memcpy(dtb_pos_r, (void *)(&__dtb_pos_f), dtb_size);
|
||||
|
||||
of_relocate_dtb((unsigned long)dtb_pos_r);
|
||||
|
||||
pinmux_fdt_parse();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022, ArtInChip Technology Co., Ltd
|
||||
* Copyright (c) 2022-2024, ArtInChip Technology Co., Ltd
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -115,9 +115,6 @@ void aic_memheap_free(int type, void *rmem)
|
||||
*/
|
||||
void rt_hw_board_init(void)
|
||||
{
|
||||
aic_board_sysclk_init();
|
||||
aic_board_pinmux_init();
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
rt_system_heap_init((void *)&__heap_start, (void *)&__heap_end);
|
||||
#if (!defined(QEMU_RUN) && defined(RT_USING_MEMHEAP))
|
||||
@@ -125,6 +122,9 @@ void rt_hw_board_init(void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
aic_board_sysclk_init();
|
||||
aic_board_pinmux_init();
|
||||
|
||||
#ifdef RT_USING_COMPONENTS_INIT
|
||||
rt_components_board_init();
|
||||
#endif
|
||||
@@ -173,9 +173,11 @@ const struct dfs_mount_tbl mount_table[] = {
|
||||
#ifdef LPKG_RAMDISK_TYPE_INITDATA
|
||||
{"ramdisk0", "/ram", "elm", 0, 0, 0},
|
||||
#endif
|
||||
#ifndef AIC_AB_SYSTEM_INTERFACE
|
||||
#if (defined(AIC_USING_FS_IMAGE_TYPE_FATFS_FOR_0) || defined(AIC_USING_FS_IMAGE_TYPE_FATFS_FOR_1))
|
||||
{"blk_rodata", "/rodata", "elm", 0, 0, 0},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef LPKG_USING_LITTLEFS
|
||||
{"data", "/data", "lfs", 0, 0, 0},
|
||||
#endif
|
||||
|
||||
Binary file not shown.
13
target/d12x/hmi-nor/pack/env.txt
Normal file
13
target/d12x/hmi-nor/pack/env.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
osAB_next=A
|
||||
osAB_now=A
|
||||
rodataAB_next=A
|
||||
rodataAB_now=A
|
||||
dataAB_next=A
|
||||
dataAB_now=A
|
||||
upgrade_available=0
|
||||
bootlimit=5
|
||||
bootcount=0
|
||||
rodata_partname=blk_rodata
|
||||
rodata_partname_r=blk_rodata_r
|
||||
data_partname=blk_data
|
||||
data_partname_r=blk_data_r
|
||||
@@ -3,9 +3,12 @@
|
||||
"size": "16m", // Size of SPI NOR
|
||||
"partitions": {
|
||||
"spl": { "size": "256k" },
|
||||
"env": { "size": "128k" },
|
||||
"env_r": { "size": "128k" },
|
||||
"userid": { "size": "256k" }, // at least 16KB
|
||||
"os": { "size": "2m" },
|
||||
"rodata": { "size": "6m" },
|
||||
"data": { "size": "7m" }
|
||||
"rodata": { "size": "10m" },
|
||||
"data": { "size": "1m" }
|
||||
},
|
||||
},
|
||||
"image": {
|
||||
@@ -36,6 +39,11 @@
|
||||
"attr": ["mtd", "required"],
|
||||
"part": ["spl"]
|
||||
},
|
||||
"env": {
|
||||
"file": "env.bin",
|
||||
"attr": ["mtd", "optional"],
|
||||
"part": ["env","env_r"]
|
||||
},
|
||||
"os": {
|
||||
"file": "d12x_os.itb",
|
||||
"attr": ["mtd", "required"],
|
||||
@@ -53,8 +61,8 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
"temporary": { // Pre-proccess to generate image components from raw data
|
||||
"aicboot": {
|
||||
"pre-process": { // Pre-proccess to generate image components from raw data
|
||||
"aicimage": { // Create aic boot image
|
||||
"uartupg-psram-init.aic": { // No loader, only PreBootProgram to initialize PSRAM
|
||||
"head_ver": "0x00010001",
|
||||
"resource": {
|
||||
@@ -62,22 +70,38 @@
|
||||
"pbp": "d12x.pbp",
|
||||
},
|
||||
},
|
||||
"bootloader.aic": {
|
||||
"pbp_ext.aic": {
|
||||
"head_ver": "0x00010001",
|
||||
"resource": {
|
||||
"pbp": "d12x.pbp",
|
||||
"private": "pbp_cfg.bin",
|
||||
},
|
||||
// combine to use with loader.aic
|
||||
"with_ext": "true",
|
||||
},
|
||||
"loader.aic": {
|
||||
"head_ver": "0x00010001",
|
||||
"loader": {
|
||||
"file": "bootloader.bin",
|
||||
"load address": "0x30043000",
|
||||
"entry point": "0x30043100",
|
||||
"load address ext": "0x40200000",
|
||||
"entry point ext": "0x40200100",
|
||||
"load address": "0x40200000",
|
||||
"entry point": "0x40200100",
|
||||
},
|
||||
"resource": {
|
||||
"private": "pbp_cfg.bin",
|
||||
"pbp": "d12x.pbp",
|
||||
},
|
||||
},
|
||||
},
|
||||
"itb": {
|
||||
"concatenate": { // cat files in order
|
||||
"bootloader.aic": ["pbp_ext.aic", "loader.aic"],
|
||||
},
|
||||
"uboot_env": { // Create env data from txt
|
||||
"env.bin": {
|
||||
"file": "env.txt",
|
||||
"size": "4096",
|
||||
"redundant": "enable",
|
||||
},
|
||||
},
|
||||
"itb": { // Create itb image from its
|
||||
"d12x_os.itb": {
|
||||
"its": "d12x_os.its"
|
||||
},
|
||||
|
||||
8
target/d12x/hmi-nor/pack/ota-subimgs.cfg
Normal file
8
target/d12x/hmi-nor/pack/ota-subimgs.cfg
Normal file
@@ -0,0 +1,8 @@
|
||||
[image]
|
||||
size = "";
|
||||
version = "1.0.0";
|
||||
|
||||
[file]
|
||||
ota_info.bin:file;
|
||||
d12x_os.itb:os;
|
||||
rodata.fatfs:rodata;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022, ArtInChip Technology Co., Ltd
|
||||
* Copyright (c) 2022-2024, ArtInChip Technology Co., Ltd
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -9,6 +9,11 @@
|
||||
#include <aic_core.h>
|
||||
#include <aic_hal.h>
|
||||
#include "board.h"
|
||||
#include <libfdt.h>
|
||||
#include <of.h>
|
||||
#include <aic_utils.h>
|
||||
|
||||
extern size_t __dtb_pos_f;
|
||||
|
||||
struct aic_pinmux
|
||||
{
|
||||
@@ -22,19 +27,19 @@ struct aic_pinmux aic_pinmux_config[] = {
|
||||
#ifdef AIC_USING_UART0
|
||||
/* uart0 */
|
||||
{5, PIN_PULL_DIS, 3, "PA.0"},
|
||||
{5, PIN_PULL_DIS, 3, "PA.1"},
|
||||
{5, PIN_PULL_UP, 3, "PA.1"},
|
||||
#endif
|
||||
#ifdef AIC_USING_UART1
|
||||
/* uart1 */
|
||||
{5, PIN_PULL_DIS, 3, "PA.2"},
|
||||
{5, PIN_PULL_DIS, 3, "PA.3"},
|
||||
{5, PIN_PULL_UP, 3, "PA.3"},
|
||||
#endif
|
||||
#ifdef AIC_USING_UART2
|
||||
/* uart2 */
|
||||
{1, PIN_PULL_DIS, 3, "PD.2"}, // LED1
|
||||
{1, PIN_PULL_DIS, 3, "PD.3"}, // LED2
|
||||
{5, PIN_PULL_DIS, 3, "PD.4"},
|
||||
{5, PIN_PULL_DIS, 3, "PD.5"},
|
||||
{5, PIN_PULL_UP, 3, "PD.5"},
|
||||
#endif
|
||||
#ifdef AIC_USING_CAN0
|
||||
/* can0 */
|
||||
@@ -270,6 +275,10 @@ struct aic_pinmux aic_pinmux_config[] = {
|
||||
{1, PIN_PULL_DIS, 3, AIC_AUDIO_PA_ENABLE_GPIO},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef AIC_USING_CTP
|
||||
{1, PIN_PULL_DIS, 3, AIC_TOUCH_PANEL_RST_PIN},
|
||||
{1, PIN_PULL_DIS, 3, AIC_TOUCH_PANEL_INT_PIN},
|
||||
#endif
|
||||
};
|
||||
|
||||
void aic_board_pinmux_init(void)
|
||||
@@ -289,4 +298,24 @@ void aic_board_pinmux_init(void)
|
||||
hal_gpio_set_bias_pull(g, p, aic_pinmux_config[i].bias);
|
||||
hal_gpio_set_drive_strength(g, p, aic_pinmux_config[i].drive);
|
||||
}
|
||||
|
||||
#ifndef AIC_BOOTLOADER
|
||||
struct fdt_header *header;
|
||||
uint32_t dtb_size;
|
||||
void *dtb_pos_r;
|
||||
|
||||
header = (struct fdt_header *)(&__dtb_pos_f);
|
||||
|
||||
if (fdt_magic(header) == FDT_MAGIC)
|
||||
{
|
||||
dtb_size = fdt_totalsize(header);
|
||||
dtb_pos_r = aicos_malloc(0, dtb_size);
|
||||
|
||||
aicos_memcpy(dtb_pos_r, (void *)(&__dtb_pos_f), dtb_size);
|
||||
|
||||
of_relocate_dtb((unsigned long)dtb_pos_r);
|
||||
|
||||
pinmux_fdt_parse();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user