4.3.28.2. BL2 配置文件说明
BL2 可以
BL2 配置文件
device/horizon/x5/board_cfg/soc/bl2_cfg/bl2_cfg.json
配置文件
build/tools/bl2_cfg.py
bl2_cfg.py 会bl2_cfg.json 中
build/mk_uboot.sh
bl2 feature 配置
bl2 看门狗配置
{
"bl2_cfg": {
"feature": {
"wdt_en": "false",
"wtd_timeout": 10,
...
},
},
...
}
在
wdt_en:bl2 看门狗是否 使能。 false表示关闭, true表示开启 wtd_timeout:超时时间,单位 是 秒
bl2 gpio 配置
bl2 支持out,可以aon、hsio、lsio 和 dsp。
每个hsio 和 lsio 有组 0 和1,其他0。
在0 为
单 pin 配置
{
"bl2_cfg": {
"feature": {
...
"gpio_cfg": {
"lsio_0_1": {
"value": 1
}
}
}
},
...
}
配置lsio_0_1 为例,表明value 为 1 表示
连续 pin 配置
{
"bl2_cfg": {
"feature": {
...
"gpio_cfg": {
"lsio_0_2-31": {
"value": 1
}
}
}
},
...
}
以 lsio_0_2-31 为例,表示 lsio 子系统
注:gpio_cfg 下
DDR 配置
{
...
"ddr": {
"detect": {
"adc_channel": 2,
"adc_map_rules": {
"ddr_profile_10": [51, 140],
"ddr_profile_11": [151, 240],
"ddr_profile_2": [251, 340],
"ddr_profile_3": [351, 440],
"ddr_profile_1": [451, 540],
"ddr_profile_7": [551, 640],
"ddr_profile_17": [651, 740],
"ddr_profile_18": [751, 840],
"ddr_profile_14": [851, 940],
"ddr_profile_15": [951, 1040],
"ddr_profile_12": [1051, 1140],
"ddr_profile_13": [1151, 1240],
"reserved_5": [1251, 1340],
"reserved_6": [1351, 1440]
}
},
"force": {
"force_enable":"false",
"ddr_type": "lpddr4",
"rank_type": "single",
"die_dencity": 1,
"alternative": 0
},
"ecc_enabled": "false",
"freq": "default",
"diag_test": "false"
},
...
}
这里
识别 DDR 的 ADC map 规则
DDR 的
类型,lpddr4 还是 lpddr4x DDR 的 rank 值,single rank 还是 dual rank
DDR 单 die 的
容量,1: 1GB; 2: 2GB 频点
信息 是否
使能 ecc
其中 DDR 的
通过 ADC 探测
获取 在
该 配置文件 中 强制 指定
如果
force_enable:设置为 true,表示强制 指定 ddr_type:DDR 类型。当前支持 的 有 lpddr4、lpddr4xrank_type:DDR rank 数量。当前支持 的 有 single、dualdie_dencity:DDR 单 die 容量。1: 1GB; 2: 2GBalternative:DDR Alternative 值。表示在 相同 的 ddr_type、rank_type和die_dencity下的 其他 配置,主要 是 针对 相同 规格 客户 的 不同 ODT 配置。默认 为 0,表示 使用 默认 的 ODT 配置。 freq:DDR 最高频率。3200; 3733; 4266
如果
force_enable:设置为 false,表示使用 外部 ADC 自动 探测 的 方式 adc_channel:ADC 探测 DDR 的通道 adc_map_rules:ADC 档位与 DDR 配置 的 映射 关系。字典 中 的 key表示的 是 DDR 配置文件,即 profile, value表示的 是 当前 DDR 配置 的 ADC 识别 范围,列表 中 的 第一项 表示 当前 DDR 配置 的 ADC 值 的 下限,第二项 表示 当前 DDR 配置 的 ADC 值 的 上限,单位 都 是 mv.
注意:
字典
中 的 key的组成 形式 必须 是 ddr_profile_num或reserved_num, 其中最后 的 num必须是 十进制 数字
ADC 的
| 颗粒 |
rank 数量 | density/CH | 最高 |
Alternative | profile | ADC 档位 |
|---|---|---|---|---|---|---|
| LP4 | 1 | 1 | 3200 | 0 | profile_1 | 500mv |
| LP4 | 2 | 1 | 4266 | 0 | profile_2 | 300mv |
| LP4X | 2 | 1 | 4266 | 0 | profile_3 | 400mv |
| LP4X | 2 | 1 | 3733 | 0 | profile_7 | 600mv |
| LP4 | 1 | 1 | 4266 | 0 | profile_10 | 100mv |
| LP4X | 1 | 1 | 4266 | 0 | profile_11 | 200mv |
| LP4 | 2 | 2 | 4266 | 0 | profile_12 | 1100mv |
| LP4X | 2 | 2 | 4266 | 0 | profile_13 | 1200mv |
| LP4 | 1 | 2 | 4266 | 0 | profile_14 | 900mv |
| LP4X | 1 | 2 | 4266 | 0 | profile_15 | 1000mv |
| LP4 | 1 | 1 | 3733 | 0 | profile_17 | 700mv |
| LP4 | 1 | 2 | 4266 | 1 | profile_18 | 800mv |
重新映射 adc 档位与 DDR profile
用户
例如
...
"ddr_profile_19": [1251, 1340],
...
注意事项
并非
| 颗粒 |
rank 数量 | density/CH | 最高 |
Alternative | profile | ADC 档位 |
|---|---|---|---|---|---|---|
| LP4 | 1 | 1 | 3200 | 0 | profile_1 | 500mv |
| LP4X | 2 | 1 | 3733 | 0 | profile_7 | 600mv |
| LP4 | 1 | 1 | 3733 | 0 | profile_17 | 700mv |
| LP4 | 1 | 2 | 4266 | 1 | profile_18 | 800mv |
| N/A | N/A | N/A | N/A | N/A | N/A | 1300mv |
| N/A | N/A | N/A | N/A | N/A | N/A | 1400mv |
开启 DDR 数字眼图
参数 diag_test 用于
"diag_test": "false" # 不开启眼图功能
"diag_test": "true" # 开启眼图功能
通过 bl2_cfg 开启 DDR 数字bl2_cfg 的 uboot 镜像
DDR 数字bl2_cfg 中reboot -m eye -f 进入,通过
eFUSE 配置
参考 BL2 烧录 eFuse 章节。