tool: ddrbin_tool: update to v1.12 20221031

build from:
	ddbee40 updata to version v1.12 20221031

update feature:
	ddbee40 updata to version v1.12 20221031
	7e21690 updata to version v1.12 20221027
	0ff7f43 tool: add pstore, boot_fsp etc info
	ce4ec38 updata to version v1.11 20220729
	27ae957 tool: rename res_space_remap to res_space_remap_partion
	5f4e2f3 updata to version v1.11 20220725
	c6bf61f tool: add support extended temperature refresh, auto
precharge etc.
	13464e2 tools: add sdram.h

Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
Change-Id: Ie93bc49d1f0c2550495861ba333e3cbca115e2bd
This commit is contained in:
Zhihuan He
2022-07-25 16:32:14 +08:00
committed by Jianhong Chen
parent 5fbf4949b1
commit 6f34a9d109
3 changed files with 179 additions and 75 deletions

View File

@@ -21,12 +21,20 @@ channel mask=
stride type=
standby_idle=
ext_temp_ref_en=
link_ecc_en=
per_bank_ref_en=
derate_en=
auto_precharge_en=
res_space_remap_all=
res_space_remap_portion=
rd_vref_scan_en=
wr_vref_scan_en=
eye_2d_scan_en=
res_space_remap=
dis_printf_training=
dis_train_print=
ssmod_downspread=
ssmod_div=
@@ -34,6 +42,16 @@ ssmod_spread=
ddr_2t=
pstore_base_addr=
pstore_buf_size=
uboot_log_en=
atf_log_en=
optee_log_en=
spl_log_en=
tpl_log_en=
boot_fsp=
ddr2_f1_freq_mhz=
ddr2_f2_freq_mhz=
ddr2_f3_freq_mhz=

Binary file not shown.

View File

@@ -9,41 +9,62 @@ function 2: get ddr.bin file config to gen_param.txt file
./ddrbin_tool -g gen_param.txt px30_ddr_333MHz_v1.15.bin
The config will show in gen_param.txt.
Note: The function 1 and function 2 are two separate functions
The gen_param.txt file which is generated by function 2 no need use in function 1.
The detail information as following:
* support ddrbin version
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| platform | uart info | ddr freq | ssmod | DDR 2T | sr pd | drv, odt, Vref etc| dis training info | eye sacn | res space remap|
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| PX30/RK3326 | V1.11 | X | X | V1.12 | V1.15 | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| RK1808 | V1.03 | V1.03 | X | V1.03 | V1.04 | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| RK322x | V1.08 | V1.08 | X | V1.09 | X | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| RK322xh | V1.14 | X | X | V1.16 | V1.17 | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| RK3288 | V1.07 | X | X | V1.08 | X | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| RK3308 | V1.28 | V1.28 | X | V1.29 | V1.30 | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| RK3368 | V2.04 | V2.04 | X | V2.05 | X | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| RK3328 | V1.14 | X | X | V1.16 | V1.17 | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| RK3399 | V1.25 | X | V1.25 | X | X | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| RK3399PRO NPU | V1.03 | V1.03 | X | V1.03 | X | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| RV1126/RV1109 | V1.00 | V1.00 | V1.05 | V1.00 | V1.05 | V1.05 | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| RK3566/RK3568 | V1.00 | V1.00 | V1.06 | V1.00 | V1.00 | V1.06 | V1.07 | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
| RK3588 | V1.00 | V1.00 | X | V1.00 | V1.00 | V1.00 | V1.03 | V1.06 | V1.06 |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------+----------+----------------+
The 'X' means not support change those parameters by tool.
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| platform | uart info | ddr freq | ssmod | DDR 2T | sr pd | drv, odt, Vref etc| dis print training info | dis CBT |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RV1108 | V1.08 | V1.08 | V1.10 | V1.08 | V1.08 | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| PX30/RK3326 | V1.11 | X | V1.16 | V1.12 | V1.15 | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RK1808 | V1.03 | V1.03 | V1.05 | V1.03 | V1.04 | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RK322x | V1.08 | V1.08 | X | V1.09 | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RK322xh | V1.14 | X | V1.17 | V1.16 | V1.17 | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RK3288 | V1.11 | X | X | V1.11 | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RK3308 | V1.28 | V1.28 | V1.31 | V1.29 | V1.30 | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RK3308S | V2.05 | V2.05 | V2.05 | V2.05 | V2.05 | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RK3368 | V2.04 | V2.04 | X | V2.05 | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RK3328 | V1.14 | X | V1.17 | V1.16 | V1.17 | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RK3399 | V1.25 | X | V1.25 | X | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RK3399PRO NPU | V1.03 | V1.03 | X | V1.03 | X | X | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RV1126/RV1109 | V1.00 | V1.00 | V1.05 | V1.00 | V1.05 | V1.05 | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RK3566/RK3568 | V1.00 | V1.00 | V1.06 | V1.00 | V1.00 | V1.06 | V1.07 | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| RK3588 | V1.00 | V1.00 | X | V1.00 | V1.00 | V1.00 | X | X |
+---------------+-----------+----------+-------+--------+-------+-------------------+-------------------------+---------+
| function | platform and ddrbin version |
| ------------------------------- | -------------------------------------- |
| first scan channel/channel mask | RK3588 V1.00/RK3399 V1.25/RK3288 V1.11 |
| stride type | RK3588 V1.00/RK3399 V1.25/RK3288 V1.11 |
| ext_temp_ref_en | Null |
| link_ecc_en | Null |
| per_bank_ref_en | RK3588 V1.09 |
| derate_en | RK3588 V1.09 |
| auto_precharge_en | Null |
| res_space_remap_portion | RK3588 V1.09 |
| res_space_remap_all | RK3588 V1.09 |
| rd_vref_scan_en | RK3588 V1.08 |
| wr_vref_scan_en | RK3588 V1.08 |
| eye_2d_scan_en | RK3588 V1.08 |
| ch/bank/rank_mask | RK3588 V1.00 |
| pstore base_addr/buf_size | RK3588 V1.09 |
| uboot/atf/optee/spl/tpl log en | RK3588 V1.09 |
| boot_fsp | RK3588 V1.09 |
* UART info
@@ -54,18 +75,76 @@ uart baudrate: uart baudrate should be 115200 or 1500000.
* disable print training information
dis_printf_training: 1: will disabled print training information; 0: will enable print training information.
dis_train_print: 1: will disabled print training information; 0: will enable print training information.
* remap pcie 100M reg to DDR
* recycle registers space(remap register space to DDR)
res_space_remap: 1: will remap pcie 100M reg to DDR memory space.
res_space_remap_portion
1: will remap the part of registers to DDR memory space(will not larger than 4GB).
It is PCIE and some reserved space in RK3588, and the PCIE can not be used when set to 1.
res_space_remap_all
1: will wrap all registers space(include res_space_remap_portion enable space) to DDR memory space. This space would be place in larger than 4GB.
The PCIE can be used when set to 1 in RK3588.
* DDR eye scanning
1) eye_2d_scan_en: 1: will enable 2D eye scanning for debug purpose, vref and skew eye scanning.
2) wr_vref_scan_en: 1: enable vref scan and use scanning result for write.
3) rd_vref_scan_en: 1: enable vref scan and use scanning result for read.
* DDR (final) freq(ddrx_f0_freq_mhz)
* DDR auto precharge
auto_precharge_en: 1: will enable the DDR auto precharge.
* DDR refresh derate
derate_en: 1: will enable derate function of the LP2/LP3/LP4/LP4X/LP5.
The high temperature will issue more refresh command and the low temperature will less.
* DDR per bank refresh
per_bank_ref_en: 1: will enable per bank refresh
* link ECC enable
link_ecc_en: 1: read/write link ecc enable.
* Extended temperature refresh
ext_temp_ref_en: 1: will enable the extended temperature refresh which is 0.5x refresh operation in all time.
* pstore_base_addr pstore_buf_size
The pstore buffer base address: pstore_base_addr << 16, 64kB align.
The pstore buffer size: pstore_buf_size * 4KB.
It is define the addr and size to save ddrbin log for last log.
* uboot_log_en
1: enable uboot log.
0: disable uboot log.
* atf_log_en
1: enable atf log.
0: disable atf log.
* optee_log_en
1: enable optee log.
0: disable optee log.
* spl_log_en
1: enable spl log.
0: disable spl log.
* tpl_log_en
1: enable tpl log.
0: disable tpl log.
* boot_fsp
To choose the which DDR freq to boot system. 0 means fsp0_freq, 1 means fsp1_freq, 2 means fsp2_freq, 3 means fsp3_freq, the default is 0.
* DDR (final) freq(also called ddrx_f0_freq_mhz/fsp0_freq)
For RK3588, the boot_fsp used to choose which ddrx_fx_freq_mhz/fspx_freq to boot system, default is ddrx_f0_freq_mhz/fsp0_freq.
For the others platform, it is the final freq to boot system.
ddr2_freq(ddr2_f0_freq_mhz): ddr2 frequency, unit:MHz.
lp2_freq (lp2_f0_freq_mhz): lpddr2 frequency, unit:MHz.
@@ -76,47 +155,52 @@ lp4_freq (lp4_f0_freq_mhz): lpddr4 frequency, unit:MHz.
lp4x_freq(lp4x_f0_freq_mhz): lpddr4x frequency, unit:MHz.
lp5_freq (lp5_f0_freq_mhz): lpddr5 frequency, unit:MHz.
For RV1126/RV1109, RK3566/RK3568, RK3588 those frequencies are the final freq in loader.
+---------------+--------------------------------------------------------+
| platform | support frequencies |
+---------------+--------------------------------------------------------+
| PX30/RK3326 | X |
+---------------+--------------------------------------------------------+
| RK1808 | 333,400,533,666,786,933 |
+---------------+--------------------------------------------------------+
| RK322x | not larger than 800 |
+---------------+--------------------------------------------------------+
| RK322xh | X |
+---------------+--------------------------------------------------------+
| RK3288 | X |
+---------------+--------------------------------------------------------+
| RK3308 | 393,451,589 |
+---------------+--------------------------------------------------------+
| RK3368 | DDR3 not larger than 800, LP3 not larger than 666 |
+---------------+--------------------------------------------------------+
| RK3328 | X |
+---------------+--------------------------------------------------------+
| RK3399 | X |
+---------------+--------------------------------------------------------+
| RK3399PRO NPU | 333,400,533,666,786,933 |
+---------------+--------------------------------------------------------+
| RV1126/RV1109 | 328,396,528,664,784,924,1056 |
+---------------+--------------------------------------------------------+
| RK3566/RK3568 | 324,396,528,630,780,920,1056,1184,1332,1560 |
+---------------+--------------------------------------------------------+
| RK3588 | LP4/LP4x [306.5MHz - 2133MHz]; LP5: [400MHz - 2750MHz] |
+---------------+--------------------------------------------------------+
* support ddr frequency:
The 'X' as follows means not support change frequencies by tool.
+---------------+-----------------------------------------------------------------+
| platform | support frequencies(MHZ) |
+---------------+-----------------------------------------------------------------+
| RK1108 | DDR2: 400; LP2: <= 533; DDR3: <= 800 |
+---------------+-----------------------------------------------------------------+
| PX30/RK3326 | X |
+---------------+-----------------------------------------------------------------+
| RK1808 | 333,400,533,666,786,933 |
+---------------+-----------------------------------------------------------------+
| RK322x | DDR2/LP2: <= 533; others: <= 800 |
+---------------+-----------------------------------------------------------------+
| RK322xh | X |
+---------------+-----------------------------------------------------------------+
| RK3288 | X |
+---------------+-----------------------------------------------------------------+
| RK3308/RK3308S| DDR2/LP2: 393,451; DDR3: 393,451,589 |
+---------------+-----------------------------------------------------------------+
| RK3368 | DDR3: <= 800; LP3: <= 666 |
+---------------+-----------------------------------------------------------------+
| RK3328 | X |
+---------------+-----------------------------------------------------------------+
| RK3399 | X |
+---------------+-----------------------------------------------------------------+
| RK3399PRO NPU | 333,400,533,666,786,933 |
+---------------+-----------------------------------------------------------------+
| RV1126/RV1109 | 328,396,528,664,784,924,1056 |
+---------------+-----------------------------------------------------------------+
| RK3566 | 324,396,528,630,780,920,1056 |
+---------------+-----------------------------------------------------------------+
| RK3568 | DDR3/LP3: 324,396,528,630,780,920,1056 |
| | DDR4/LP4/LP4X: 324,396,528,630,780,920,1056,1184,1332,1560 |
+---------------+-----------------------------------------------------------------+
| RK3588 | LP4/LP4x [306.5MHz - 2133MHz]; LP5: [400MHz - 2750MHz] |
+---------------+-----------------------------------------------------------------+
* DDR frequencies(add more)
ddr2_f1_freq_mhz: ddr2 frequency number 1, unit:MHz.
ddr2_f2_freq_mhz: ddr2 frequency number 2, unit:MHz.
ddr2_f3_freq_mhz: ddr2 frequency number 3, unit:MHz.
ddr2_f4_freq_mhz: ddr2 frequency number 4, unit:MHz.
ddr2_f5_freq_mhz: ddr2 frequency number 5, unit:MHz.
ddr2_f1_freq_mhz: ddr2 frequency fsp 1, unit:MHz.
ddr2_f2_freq_mhz: ddr2 frequency fsp 2, unit:MHz.
ddr2_f3_freq_mhz: ddr2 frequency fsp 3, unit:MHz.
ddr2_f4_freq_mhz: ddr2 frequency fsp 4, unit:MHz.
ddr2_f5_freq_mhz: ddr2 frequency fsp 5, unit:MHz.
...
The ddrx_f0_freq_mhz is named ddrx_freq.
The ddrx_f0_freq_mhz(the fsp0 frequency) is named ddrx_freq.
ddr*_f*_freq_mhz/lp*_f*_freq_mhz: Only RV1126/RV1109, RK3566/RK3568, RK3588 used.
The program will initialize dram by following order.
@@ -134,6 +218,8 @@ For example:
ddr4_f3_freq_mhz=780
...
Note: The ddr frequency table in kernel dts/dtsi file need correspond to these frequencies.
* SR PD idle
sr_idle: auto self-refresh mode delay time.