Commit Graph

50578 Commits

Author SHA1 Message Date
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
Joseph Chen 32ccc236e9 scripts: fit: update uboot.img packing message
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I60f573df2fe73bba7ca9941f3431a6bda020b490
2020-06-15 10:57:34 +08:00
Sandy Huang 48efbc7eef drm/rockchip: vop: rk312x use win1 to show logo
since kernel set rk312x win1 to show kernel logo, so here sync with
kernel config.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3ed562526cd6f61359bef1567c7f2ea57149435d
2020-06-15 10:52:19 +08:00
Sandy Huang 695a88c4e9 drm/rockchip: win module base on rk3366 need to treats rgb888 as bgr888
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I83a28d0530db1d388176e2c249d6af8b9763f209
2020-06-15 10:52:19 +08:00
Jon Lin 2f0bb0e6b9 mtd: nand: Fix error in counting BITS_PER_LONG
Change-Id: I148a18733e055e5e43f7b259af05b3e0b36ac648
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-14 18:55:46 +08:00
Jason Zhu 6b5189e724 rockchip: rk1808: add nand flash definition
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Id7ab325059eeecb342af83cd7333cad55adb7dd6
2020-06-12 18:50:44 +08:00
Jason Zhu 88d49dd4d7 rockchip: dts: rk1808: support sfc device in spl
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I5a69ae076454339ee69ed5381884b9bce6173c61
2020-06-12 18:50:44 +08:00
Jon Lin 9dd9794e32 rkflash: Support new SPI Nor devices
1.Support FM25Q128A, MX25L3233FM2I
2.Change XT25F128A, GD25Q256B

Change-Id: I359bcb9fac25ae298c2e3c5ae22d61e9e5077c63
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-12 17:07:22 +08:00
Jon Lin b191872f34 mtd: spinand: Support GD5F2GQ4UBxxG
Change-Id: Ia3e340ae8b86c282953f94c16b801414218818bf
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-12 15:09:10 +08:00
Jason Zhu 602b8060f1 spl: mmc: support load image depend on parameter next_stage
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I215cc0095d875fe8f4d58b27d49e30cb615e8167
2020-06-12 09:22:40 +08:00
YouMin Chen 05431850c7 drivers: ram: rv1126: add support DDR3/LPDDR3 1056MHz
Change-Id: Ib24e263f1a58861a173b5b566718385b3f67eedc
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-11 13:21:52 +08:00
YouMin Chen 48c0a787fe drivers: ram: rv1126: fix DDR3 read training error
Change-Id: I0fef4eda1d14d1e46fdfdf474b6abfcc9577617d
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-11 09:33:02 +08:00
Jason Zhu 1258f25b98 spl: rkfw: fix decompress error when boot.img has no ramdisk
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I43066282cd8449b08b37d5ef68d57dd3046b956b
2020-06-10 09:30:47 +08:00
Joseph Chen 6b9455ac4c configs: rv1126: enable charge animation
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I23948ce2504703c6935ad770ae02ac1aa8ecea78
2020-06-09 19:54:11 +08:00
Jason Zhu f6c38d0b78 configs: rv1126: support thunder boot
1.support boot kernel by spl
2.rename the defconfig

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ia2691e6ff612b10e6c68a67917163c0385ac0e13
2020-06-09 19:33:18 +08:00
Joseph Chen a6b23e8e97 configs: remove unused keybox and keymaster
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I16cc190edc40b4850f9259ef4f967fa296daa76b
2020-06-09 19:28:47 +08:00
Jason Zhu 44da3fa18e spl: mtd_blk: load rk firmware when load fit failed
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ic8b0a397e9193e62f7349bbd2230d34b6485b58a
2020-06-09 11:01:59 +08:00
Jason Zhu 2206b10747 rockchip: rk3308: enlarge CONFIG_SPL_MAX_SIZE to 0x40000
We are using DRAM offset 0~0x40000 as SPL text size, Note that BSS,
STACK and MALLOC may using separate space.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I19b5f868e8a596a627011ad127a9d34837a6c1b6
2020-06-09 11:01:59 +08:00