Commit Graph

50595 Commits

Author SHA1 Message Date
Yifeng Zhao 5b69ab5af5 tools: rockchip: fix compilation warnings
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Ib27aa885eef05c6f88fcbf41dd4d0a5a0f965a52
2020-06-29 15:27:00 +08:00
Joseph Chen 35176ccb87 Revert "spl: fit: check image length"
This reverts commit 359ed52cc2.

This early return causes variable "image_info" not initialized.
spl_load_fit_image() should return 0 only at the end.

Change-Id: I7dba24826758763e6e4da56579546cb50b9cb984
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2020-06-29 10:14:11 +08:00
Jon Lin 78cac1dffd mtd: nand: Remove bbt option property if scan fail
Change-Id: Ifb5b500b6ffee551aea5b6aecea629b3d0ea6207
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-29 09:18:21 +08:00
Wyon Bi f0f5bdc29d video/drm: inno_video_phy: Increase the timeout delay of PLL lock status to 100ms
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I60422087623c6c9f3a0219cb1a3e1c59ec523e73
2020-06-29 09:17:52 +08:00
Joseph Chen 89d0489d59 make.sh: support image size pack of ARMv7 platform
Without this patch, only ARMv8 and AArch32 support assign
image size.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I7d15d366251328ac2283172ef6f3a173298d451b
2020-06-28 10:57:38 +08:00
Hisping Lin df538e29bd lib: optee_client v2: support RKFS version 2
1.use get_rkss_version function to get rkss version,
  if security partition have data with rkss version 1, then
  we choice rkss version 1, if security partition is empty,
  then we choice rkss version 2
2.rkss version 2 support dual backup mechanism,
  security partition total use 1M
3.rkss version 2 R&W 256k data one time

Change-Id: I2f17b22d6a442df84be0d94a808b03465dc6fefe
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2020-06-24 11:45:46 +08:00
Hisping Lin d079c1a5ed lib: optee_client v1: support RKFS version 2
1.use get_rkss_version function to get rkss version,
  if security partition have data with rkss version 1, then
  we choice rkss version 1, if security partition is empty,
  then we choice rkss version 2
2.rkss version 2 support dual backup mechanism,
  security partition total use 1M
3.rkss version 2 R&W 256k data one time

Change-Id: I4103b6600666dffccf473ec4ed8854776a46da31
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2020-06-24 11:45:46 +08:00
Joseph Chen 986192a2bc common: image-fit: remove fit_get_image_defconf_node()
It's not a standard and nice interface, remove it.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib918c4759fa5e01393c36eccd5673b8ca754ef35
2020-06-24 11:21:14 +08:00
Joseph Chen 189c0d68bd rockchip: board: place board_quiesce_devices() at the bottom
Being convenient for other functions to be called.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1a02a150cf66ccf3dfc4be3621ad62829c3e6eb5
2020-06-24 11:21:14 +08:00
Joseph Chen 89d8b5fba1 include: global_data: add rollback index
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I6f8a558246e8003c7124609b604c0331cec1204a
2020-06-24 11:21:14 +08:00
Joseph Chen c8b8e10892 common: image-sig: make fit_rollback_index_verify() __weak function.
Allow board to implement it.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id5f87214510ccfea58621086c7c49c92ec36c06a
2020-06-24 11:21:14 +08:00
Tang Yun ping 970fa5d876 drivers: ram: rv1126: optimizing dram type select code
Use CONFIG_ROCKCHIP_TPL_INIT_DRAM_TYPE to select dram type.
Use the same define with arch/arm/include/asm/arch-rockchip/sdram.h (0 for
DDR4, 2 for DDR2, 3 for DDR3, 5 for LPDDR2, 6 for LPDDR3, 7 for LPDDR4).

Change-Id: I982db49c1881f6975afd4ba48f88ee3dd9286d3e
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2020-06-24 10:11:36 +08:00
Wu Liangqing f5b9cd907b configs: rk3368: enable POWER_FG_RK817
Change-Id: Ie57836c14e632a3338e38fa3943a6832e23cb131
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-06-24 08:59:04 +08:00
Wu Liangqing 58cb0c2b99 configs: rk3399: enable POWER_FG_RK817
Change-Id: If217a6f8cda64fb35aad3842594f66bb4483b11f
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-06-24 08:31:33 +08:00
Joseph Chen ed71c65549 pmic: rk8xx: add "addr" filed for battery bind
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I073dcd49f89a75d1d320f3e80307b137814d0e2f
2020-06-23 19:30:23 +08:00
Joseph Chen 50454a094f dm: pmic: add "addr" field for binding children
If some child info->prefix are the same, try to
distinguish them by parent addr.

Example:
	pmic@20, pmic@1a...

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I504cd887e232bb309d8e1790f6d55910172d08b5
2020-06-23 19:30:21 +08:00
Tang Yun ping d3f5f12c3c rockchip: rv1126: tpl support thunder boot
If CONFIG_ROCKCHIP_THUNDER_BOOT=y, it will enable ddr fast boot.

Change-Id: Ia43039dd1247ebb937aaa8b6d9a9103df2dfe1f5
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2020-06-23 16:41:26 +08:00
Tang Yun ping 0b4032fdb0 rockchip: rv1126: delete some unused code for tpl
Change-Id: Iae5a157dacf8c189633ca73028b35b375688860d
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2020-06-23 16:41:26 +08:00
Liang Chen a96802b209 rockchip: px30: switch VCCIO6 voltage controlled by io_vsel6
According to the description of GRF_IO_VSEL, the voltage of
VCCIO6(which is the concern of emmc/flash/sfc controller) will
indicate by GPIO0_B6 or io_vsel6. The SOC defaults use GPIO0_B6
to indicate power supply voltage for VCCIO6 by hardware, then
we can switch to io_vsel6 after system power on, and release
GPIO0_B6 for other usage.

Change-Id: I9c8339e357a7328d9ffeb711ba5d0bdd41971101
Signed-off-by: Liang Chen <cl@rock-chips.com>
2020-06-23 10:53:51 +08:00
Joseph Chen cd1c982e9a test: rockchip: power: call do_test_charge()
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4784b5f21ff4f39b0112d5cc5626c26b853a0246
2020-06-23 10:38:21 +08:00
Joseph Chen 00dada44a9 make.sh: update tpl pack command
All available:
	./make.sh tpl-spl    --- pack tpl+spl
	./make.sh tpl        --- pack tpl
	./make.sh spl-s      --- pack spl
	./make.sh spl        --- pack spl

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iea58976bb7fc87775b8c3c1bd2c1fd151c6be51c
2020-06-23 10:24:26 +08:00
Joseph Chen 8885b307bc configs: add rv1126-mini-template_defconfig
This defconfig provides a template to generate a minimum u-boot.bin
for eMMC board with some basic features, developer can enable more
features base on it. If developer want to get a even smaller
u-boot.bin, try to drop them accordding to board requirement:

- Remove Power(about 15KB):
	# CONFIG_DM_PMIC is not set
	# CONFIG_DM_REGULATOR is not set
	# CONFIG_DM_REGULATOR_FIXED is not set
	# CONFIG_DM_PWM is not set
	# CONFIG_DM_I2C is not set

- Remove USB(about 55KB):
	# CONFIG_USB is not set
	# CONFIG_PHY_ROCKCHIP_NANENG_USB2 is not set

	- The USB is not available and U-Boot fallbacks to bootrom download
	  mode by menu key pressed.

- Remove Command-interface(about 33KB):
	# CONFIG_CMDLINE is not set
	CONFIG_U_BOOT_CMD_ALWAYS=y

	- Only the command with U_BOOT_CMD_ALWAYS() delcared is available.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2ec124bc1014ed3627aec3e7b5f6545d2670eff4
2020-06-22 20:09:06 +08:00
Joseph Chen 61c4c6b471 phy: rockchip: fix compile error
Report compile error if CONFIG_IO_TRACE=y.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2cc791659a77c8c7d9fe01eed2c7b9ae052730bb
2020-06-22 20:02:28 +08:00
Joseph Chen a78c1921ec common: iotrace: do optimize
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I260f46e744a4059ba5b3022586c26910187606eb
2020-06-22 20:02:15 +08:00
Joseph Chen ed9976b572 rockchip: dts: rv1126: delete unused property
The propery is brought by CONFIG_OF_U_BOOT_REMOVE_PROPS
required from GMAC.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib85ec0678a0a0404eb4cda5974c52076bf0a1e37
2020-06-22 20:01:58 +08:00
Joseph Chen 3017074fb2 rockchip: rkimg: use menu key to enter bootrom download mode
It's possible that USB is disabled due to developer needs
a critial size of u-boot.bin.

Disabling USB makes vbus can't be detected any more, so that
we add menu key and the events trigger are changed:

- rockusb mode(fallback to bootrom mode):
	"recovery key pressed + vbus=1" => "menu key pressed"

- recovery mode:
	"recovery key pressed + vbus=0" => "recovery key pressed"

At the most time, USB is enabled and this feature is not applied.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9da8f17987742cea3267dbb35ee88d57a00c578a
2020-06-22 19:59:50 +08:00
Joseph Chen 766120444d rockchip: dts: rv1126: add menu key
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib3e24be7153cc94428e2d6dcdc5a43c6c2ce8501
2020-06-22 19:59:50 +08:00
Tang Yun ping f876ce9b2e drivers: ram: rv1126: adjust some print info
Change-Id: I07e0509dee69e172e6d5adbaabf61f3eef5eec4a
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2020-06-19 12:46:03 +08:00
Tang Yun ping 2c5208e273 drivers: ram: rv1126: use read preamble training mode for ddr4
Change-Id: I8128352f9727a502c029c08eb57e486a9835c405
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2020-06-19 11:46:51 +08:00
Jason Zhu 4298c19d4f misc: decompress: add function misc_decompress_process()
Use it to decompress data.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I189cded00069cc9f559097811733a481aae8d08f
2020-06-18 10:34:30 +08:00
Jason Zhu e6832242e0 spl: rkfw: fix test misc_decompress_is_complete return value
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ie378336e55d638e94f1d7c0c9dccb2c9b5ac6758
2020-06-18 10:34:16 +08:00
Jason Zhu 809af6ba3d misc: rockchip_decompress: update the decompress driver
1.add DECOM_AXI_STAT to test decompress whether is in idle
2.correct the misc_decompress_is_complete return value

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I904d9909ade709fb479893325dd6c0b3d47d5908
2020-06-18 10:34:04 +08:00
Sandy Huang 859836bc0c drm/rockchip: change 8bit bmp decoder result from BGR565 to RGB565
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I0ca715bd69bc9ff1a61c98f766ecab2458737b27
2020-06-17 16:49:21 +08:00
Sandy Huang f0e8414b2a drm/rockchip: fix rgb888 format color incorrect
vop full need to do rb swap when deal with rgb888/bgr888;

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I60fac72b21720fcf4f406c56fe7d9dc21ebf7635
2020-06-17 16:49:21 +08:00
Joseph Chen 982d40b6ae rockchip: rkimg: clean some code
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8d54c5c8beb81bfab72885234a69d93f638081cf
2020-06-17 15:21:41 +08:00
Joseph Chen b704ab33c2 cmd: add "always" attribute for some commands
They are basic commands even in critical cost down version

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0ad56056133226c25cbcfb70e54d519eb7582341
2020-06-17 15:21:41 +08:00
Joseph Chen 558b8198d4 dm: serial: introduce DEBUG_UART_ALWAYS_MODE configure
Rename CONSOLE_SERIAL_SKIP_INIT to DEBUG_UART_ALWAYS_MODE for
easy understand.

Select this to always use debug UART, skip complicated
console UART register.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3c265840bde015fe5fd7c73d959ba0538297b7c2
2020-06-16 15:07:35 +08:00
Joseph Chen 08d70ef365 configs: rv1126-usbplug: update accordding to latest code
Some configurations was changed, let's update defconfig.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I70c977a7e2256732f9e6e1c68bf3f469366fbf71
2020-06-16 15:07:35 +08:00
Joseph Chen 1392e21877 rockchip: add depends for ROCKCHIP_FIT_IMAGE_PACK
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1015bba4eddb6eec241956d867d637fd8649471b
2020-06-16 15:07:35 +08:00
Joseph Chen 1e83a6cbf7 rockchip: rv1126: use imply instead of select
In order to drop them in defconfig.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I438def3afb98021c8216e48eeaecc26165bfa18b
2020-06-16 15:07:35 +08:00
Jason Zhu 47f7fd3a52 blk/mmc: add function blk_dread_prepare
This function prepares to read data without confirming completed.
We can use it to prefetch data and run other process.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I76116c25dfdb7559b80a0216c414189e85409a3e
2020-06-16 11:34:02 +08:00
Jason Zhu 55eb094f8a rockchip: rv1126: update the spl stack address
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I891e9600cffd8fd9495ef13560314b6fc8809eb7
2020-06-16 09:58:42 +08:00
Jason Zhu 2f0354fcb2 configs: rv1126: update the defconfig
1.support GPT partition
2.support a/b system
3.enlarge the CONFIG_SYS_MALLOC_F_LEN for GPT partition

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I8ff0c0327c3f9e5ab68dc1b405503dcfc70ee0ec
2020-06-16 09:58:42 +08:00
Jon Lin 0f1dc4879a mtd: mtd_blk: Check map table block address overflow
1.Check map table block address overflow
2.Reinit map table original value

Change-Id: I4450b5a6856e38e2624da9db31d5eb98de7f5696
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-15 21:05:44 +08:00
Joseph Chen f9976ae435 make.sh/fit: support pack without U-Boot
command: ./make.sh --no-uboot.

Providing empty file for mcu or U-Boot image if it's
not required.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I48650f6cc0bbcc9ed111fee0354ccafe4f6c1773
2020-06-15 14:25:53 +08:00
Joseph Chen 359ed52cc2 spl: fit: check image length
Do not go further if it is 0.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1d4c07303a4998a9c112986ee4efda39c1d55d63
2020-06-15 11:41:08 +08:00
Joseph Chen 0732900259 make.sh: update tpl+spl pack command
Legacy command:
	./make.sh spl     --- pack tpl+spl
	./make.sh spl-s   --- pack spl

New command:
	./make.sh tpl-spl --- pack tpl+spl
	./make.sh spl-s   --- pack spl
	./make.sh spl     --- pack spl

Note: legacy command "./make.sh spl" was not appied on any SDK.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib0a96c94dd6e8fc90184e62ff495dda68ecf571f
2020-06-15 11:40:50 +08:00
Joseph Chen 5e23d42422 scripts: fit: add a macro for "data2sign.bin"
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie36551e14f74c6c1a09012f02de5a48bd4dae888
2020-06-15 11:29:46 +08:00
Joseph Chen cc0b1aa3fe make.sh: fit: append "-itb" postfix for args
"--uboot" => "--uboot-itb";
"--boot" => "--boot-itb".

In order to distinguish with "--no-uboot".

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4d1e1a3f88619fb728165764af52ca58665a5e89
2020-06-15 11:29:46 +08:00
Joseph Chen b42b4e1160 make.sh: clean up coding style
Not change any code logic.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If63da35728028de638a701635425cfa1f195dfde
2020-06-15 10:57:34 +08:00