154a17cb1STang Yun ping1. modify "ddrbin_param.txt", choose ddr frequency, uart info. 254a17cb1STang Yun ping2. run "ddrbin_tool" with argument 1: ddrbin_param.txt, argument 2: ddr bin file. 354a17cb1STang Yun ping like: ./ddrbin_tool ddrbin_param.txt px30_ddr_333MHz_v1.13.bin 454a17cb1STang Yun ping 554a17cb1STang Yun pingsupport following chip: 6*3e8d76b8SZhihuan HePX30: ddr bin version should be released later than V1.11. Support modify uart info only. The ddr bin version V1.12 and later support DDR 2t info modification, only DDR3 support. The ddr bin version V1.16 and later support ssmod. 7*3e8d76b8SZhihuan HeRK1808: ddr bin version should be released later than V1.03. Support modify uart info and ddr frequency. ddr freq should be one of 333,400,533,666,786,933. The ddr bin version V1.03 and later support DDR 2t info modification, only DDR2/DDR3/DDR4 support. The ddr bin version V1.05 and later support ssmod. 82820321cSZhihuan HeRK322x: ddr bin version should be released later than V1.08. Support modify uart info and ddr frequency. These is no limit to ddr frequency. The ddr bin version V1.09 and later support DDR 2t info modification, only DDR2/DDR3 support. 9*3e8d76b8SZhihuan HeRK322xh: ddr bin version should be released later than V1.14. Support modify uart info only. The ddr bin version V1.16 and later support DDR 2t info modification, only DDR3 support. The ddr bin version V1.17 and later support ssmod. 10*3e8d76b8SZhihuan HeRK3288: ddr bin version should be released later than V1.07. Support modify uart info only. The ddr bin version V1.08 and later support DDR 2t info modification, only DDR3 support. 11*3e8d76b8SZhihuan HeRK3308: ddr bin version should be released later than V1.28. Support modify uart info and ddr frequency. ddr freq should be one of 393,451,589. The ddr bin version V1.29 and later support DDR 2t info modification, only DDR2/DDR3 support. The ddr bin version V1.31 and later support ssmod. 12*3e8d76b8SZhihuan HeRK3326: ddr bin version should be released later than V1.11. Support modify uart info only. The ddr bin version V1.12 and later support DDR 2t info modification, only DDR3 support. The ddr bin version V1.16 and later support ssmod. 132820321cSZhihuan HeRK3368: ddr bin version should be released later than V2.04. Support modify uart info and ddr frequency. These is no limit to ddr frequency. The ddr bin version V2.05 and later support DDR 2t info modification, only DDR3 support. 14*3e8d76b8SZhihuan HeRK3328: ddr bin version should be released later than V1.14. Support modify uart info only. The ddr bin version V1.16 and later support DDR 2t info modification, only DDR3 support. The ddr bin version V1.17 and later support ssmod. 15*3e8d76b8SZhihuan HeRK3399: ddr bin version should be released later than V1.25. Support modify uart info only. The ddr bin version V1.25 and later support ssmod. 16*3e8d76b8SZhihuan HeRK3399PRO NPU: ddr bin version should be released later than V1.03. Support modify uart info and ddr frequency. ddr freq should be one of 333,400,533,666,786,933. The ddr bin version V1.03 and later support DDR 2t info modification, only DDR2/DDR3/DDR4 support. The ddr bin version V1.05 and later support ssmod. 17*3e8d76b8SZhihuan HeRV1126/RV1109: all of version. Support modify uart info and ddr frequency. ddr freq should be one of 330,396,528,664,784,924,1056. Support DDR 2t info modification, only DDR3/DDR4 support. The ddr bin version V1.05 and later support ssmod. 1854a17cb1STang Yun ping 1954a17cb1STang Yun pingddrbin_param.txt: 2054a17cb1STang Yun pingstart tag: keep default value. Do not modify it. 212820321cSZhihuan Heddr2_freq: ddr2 frequency, unit:MHz. 222820321cSZhihuan Help2_freq: lpddr2 frequency, unit:MHz. 232820321cSZhihuan Heddr3_freq: ddr3 frequency, unit:MHz. 242820321cSZhihuan Help3_freq: lpddr3 frequency, unit:MHz. 252820321cSZhihuan Heddr4_freq: ddr4 frequency, unit:MHz. 262820321cSZhihuan Help4_freq: lpddr4 frequency, unit:MHz. 27*3e8d76b8SZhihuan Help4x_freq: lpddr4x frequency, unit:MHz. 2854a17cb1STang Yun ping 292820321cSZhihuan HeIf ddr*_freq/lp*_freq is no value, it's frequency will keep the same with the ddr bin frequency. 30558a25b2STang Yun ping 31*3e8d76b8SZhihuan Heuart id: uart number. 0 for uart0, 1 for uart1, 2 for uart2..., 0xf will disable uart. 32*3e8d76b8SZhihuan Heuart iomux: uart iomux info, 0 for uartn_m0, 1 for uartn_m1, 2 for uartn_m2...(like uart2_m0, uart2_m1,uart2_m2), 33558a25b2STang Yun pingOr 1 for uartn_a, 2 for uartn_b, 3 for uartn_c.(like uar2a, uart2b, uart2c). 34*3e8d76b8SZhihuan Heuart baudrate: uart baudrate should be 115200 or 1500000. 35558a25b2STang Yun ping 362820321cSZhihuan HeIf uart id/iomux/baudrate is no value, uart info will keep the same with ddr bin config. 372820321cSZhihuan He 382820321cSZhihuan Heddr_2t: ddr 2T timing mode. 1: enable ddr 2T, 0: disable ddr 2T. 392820321cSZhihuan HeIf 'ddr_2t' is no value, ddr_2t info will keep the same with ddr bin config. 40eea48410SZhihuan He 4172640b4bSZhihuan Heddr2_f1_freq_mhz: ddr2 frequency number 1, unit:MHz. 4272640b4bSZhihuan Heddr2_f2_freq_mhz: ddr2 frequency number 2, unit:MHz. 4372640b4bSZhihuan Heddr2_f3_freq_mhz: ddr2 frequency number 3, unit:MHz. 4472640b4bSZhihuan Heddr2_f4_freq_mhz: ddr2 frequency number 4, unit:MHz. 4572640b4bSZhihuan Heddr2_f5_freq_mhz: ddr2 frequency number 5, unit:MHz. 4672640b4bSZhihuan He... 4772640b4bSZhihuan Heddr*_f*_freq_mhz/lp*_f*_freq_mhz: Only RV1126/RV1109 used.The program will initialize dram by following order for example: ddr4_freq, ddr4_f1_freq_mhz, ddr4_f2_freq_mhz, ddr4_f3_freq_mhz, ddr4_f4_freq_mhz, ddr4_f5_freq_mhz. 4872640b4bSZhihuan HeAnd the final frequency is ddr4_freq to boot system. 49*3e8d76b8SZhihuan HeThe ddr frequency table in kernel dts/dtsi file need correspond to these frequencies. 50*3e8d76b8SZhihuan He 51*3e8d76b8SZhihuan HeThese parameters are about Spread Spectrum Modulator(ssmod) for PLL. 52*3e8d76b8SZhihuan Hessmod_downspread: ssmod work mode. 0: down spread, 1: center spread. 53*3e8d76b8SZhihuan Hessmod_div: Divider required to set the modulation frequency. RK3308 suggests to ssmod_div=2, others platforms suggest to ssmod_div=5. 54*3e8d76b8SZhihuan Hessmod_spread: spread amplitude % = 0.1 * ssmod_spread; 0: disable ssmod, others will enable ssmod, max to 0x1f. 55