Commit Graph

47671 Commits

Author SHA1 Message Date
Andy Yan 008aee876a boot_android: add runtime compatible for un/compressed kernel image
This patch add auto parse the compress format of kernel image.
Then decompress the compressed kernel image for arm64, as for
arm32 zImage, we only need to load it to a higher memory, then
the kernel will handle the decompress itself.

Test on RK3308 AARCH64 mode (Cortex A35 816 MHZ) boot with eMMC:

------------------------------------------------------------------
Format    |  Size(Byte) | Ratio | Decomp time(ms) | Boot time(ms) |
-------------------------------------------------------------------
Image     | 7720968     |       |                 |     488       |
-------------------------------------------------------------------
Image.lz4 | 4119448     | 53%   |       59        |     455       |
-------------------------------------------------------------------
Image.lzo | 3858322     | 49%   |       141       |     536       |
-------------------------------------------------------------------
Image.gz  | 3529108     | 45%   |       222       |     609       |
-------------------------------------------------------------------
Image.bz2 | 3295914     | 42%   |       2940      |               |
-------------------------------------------------------------------
Image.lzma| 2683750     | 34%   |                 |               |
-------------------------------------------------------------------

Note: the boot time is counted from first ddr init log to first Kernel log.

Change-Id: I73b12ec944fbc8238b0e061a37e2f31aa3093231
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-07-14 11:39:04 +08:00
Hisping Lin d5d77aebb0 lib: optee_client: modify macro in Kconfig
CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION is support
for OPTEE_V1

Change-Id: Ic83d06a08a1d409905dcc61e0f7346ab23261b0c
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2018-07-14 11:37:57 +08:00
Dingqiang Lin 0d2d4c06b3 drivers: rkflash: Fully remove caching last few sectors in ftl_write.
1.Remove cashe write
2.Remark power off lost page

Change-Id: I6cdeb0f5b2d40e1c00d4cdd7f2260bf869c0e7a8
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-14 11:36:59 +08:00
Sandy Huang bcf9093629 drm/rocckhip: fix panic when enable hdmi at uboot
hdmi without panel, so we must confirm panel->func
and panel_data->panel isn't NULL.

Change-Id: I87abec5d04e26bdab4cb643f7ed5757f3e31c918
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-07-13 10:52:15 +08:00
Kever Yang d94724f747 rockchip: board: do not probe mmc/nand in init_kernel_dtb()
The rkimg_bootdev cmd will do it instead.

Change-Id: Ic4bef6e5d14837e80c185fc2cd1123f34b015054
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-07-12 20:56:05 +08:00
Dingqiang Lin af26325796 rockchip: rkflash: remove caching last few sectors in ftl_write
1.In ftl_write, if last few sectors are smaller than one page, them'll
be cached, and join with next ftl ops. When download image in loader
mode, them wont be download to flash when power off in some cases, and
it's unacceptable.

Change-Id: I2375a6be8b1fa5b41dfdc962d2c3824d92ba25ef
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-12 11:06:33 +08:00
Dingqiang Lin 08eb34f0b4 rockchip: dts: rk3308: enable sfc node
Change-Id: I333d21506492afd9a3515fb803f477d26f4dc201
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-12 10:23:21 +08:00
Dingqiang Lin b88d7442a3 rockchip: configs: rk3308: change to sftl and enable sfc devices
Change-Id: I7d835f10d65aed321d578bf93486cee62f37d07a
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-12 10:23:21 +08:00
Kever Yang 7a39aeb5cd rockchip: rk3399: update doc for u-boot.itb write position
u-boot.itb will use the same position as uboot.img

Change-Id: I839c947a0221d347e5810d1fc8bbae655aba429b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-07-12 10:22:48 +08:00
Joseph Chen 7070f875d9 make.sh: support hex prefix with "0x" or "0X" for <addr> subcmd
Command:
	./make.sh <addr>

Change-Id: Iea2cf4009ed39989796a15556490db70b12696fc
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-10 20:31:25 +08:00
Joseph Chen 6a7642592a make.sh: update help info
Change-Id: Ia3a56c4173184a1871ab765c661726fb1fc66d2c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-10 20:31:25 +08:00
Joseph Chen 5c75ab41e7 make.sh: support pack all loaders
Command:
	./make.sh loader-all

Change-Id: I458c30f6505eaace52858254277905e163255fa2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-10 20:31:25 +08:00
Sandy Huang b8654f90c4 arm: dts: rockchip: update display node default status
if you want to enable display at uboot you need to set
the following node status to okay:

1. display_subsystem
2. route_rgb
3. vop
4. rgb
5. backlight
6. pwm1[depend on your hardware]
7. panel[update timing and init cmd]

Change-Id: I18b8857d49350ee870522599c9986d749b51bca0
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-07-10 18:02:11 +08:00
Sandy Huang 67b9012c29 drm/rockchip: add support mcu screen
the mcu screen need send init command through crtc, so we add
the function display_send_mcu_cmd() from panel to crtc.

Change-Id: Ide4a6043dff0a7b0040bf62b1aa1814f3c365235
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-07-10 18:02:11 +08:00
Sandy Huang 937d9ddabd drm/rockchip: px30 vop: add mcu register config
Change-Id: I77d571233abd4fd3998b1916ff1576c01c1e90d4
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-07-10 18:02:11 +08:00
Elaine Zhang 3afe53975c clk: rockchip: rk3288: add PLL_LIMIT_FREQ
npll is for dclk, add PLL_LIMIT_FREQ for better jitter.

Change-Id: I6ac09e9bdbd1bef0eddb37835100be782b772d54
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-10 14:43:00 +08:00
Joseph Chen 426b906c94 rockchip: vendor: fix compile warning
error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]

Change-Id: I4773ec9983f2b4302832ad78671168b6529b1ac2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-09 20:09:20 +08:00
Joseph Chen 0d889c3a8d tools: env: make fw_printenv statically linked
this makes sure fw_printenv works normally on most
platforms without care about C library.

Change-Id: If3b942d2fadb293eeeb00695a10b708847a827ad
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-09 20:09:20 +08:00
Joseph Chen 53ea579188 make.sh: support get function symbol and addr2line
Command:
	./make.sh [func address]

Example:
	>> ./make.sh 000000000024fb1c

	>> 000000000024fb1c l     F .text  000000000000004c spi_child_pre_probe
	>> /home/guest/u-boot/drivers/spi/spi-uclass.c:153

Change-Id: I6f413631fad6c51a79a35d3794d636fec6beef5b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-09 20:01:44 +08:00
Finley Xiao 4ffb5e6c04 clk: rockchip: rk3308: Modify the print format of clk
Change-Id: Idb56e8c662fafe443e8f271046d8b6298b1ca5ec
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-09 19:53:33 +08:00
Finley Xiao e27c054acc rockchip: clk: rk3308: Correct clock divisor range assertions
Change-Id: I97e8b1b5c454d9cea4126a302491a63f1d57b430
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-09 19:51:24 +08:00
Finley Xiao cb981eea7f rockchip: clk: px30: Correct clock divisor range assertions
Change-Id: Ie187ca603b47bfedaa33041ce85e78be7d4b5b23
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-09 19:51:24 +08:00
Elaine Zhang 6944022d14 clk: rockchip: rk3399: remove pll init
use the dts node to set rate by:
assigned-clocks = <&cru PLL_GPLL>;
assigned-clock-rates = <800000000>;

Change-Id: I2a674213509308fcd5ad27239bdf261c428d8027
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-09 19:48:56 +08:00
William Wu 6e4c159cf4 usb: dwc3: get rid of debug compile error
When enable debug option to compile, it will give the
following error, this patch is used to get rid of it.

error: ‘flags’ is used uninitialized in this function [-Werror=uninitialized]

Change-Id: Iba4cd59ab28eb7a48490e45842541f0418239e17
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-09 19:41:47 +08:00
William Wu e7b5bb3cc9 rockchip: usb: dwc2: support rk3288 usb with kernel dtb
Whit kernel dtb support, we need to get rk3288 dwc2 otg
node by compatible "rockchip,rk3288_usb20_otg" rather than
"snps,dwc2", because rk3288 dwc2 otg uses rockchip legacy
dwc2 driver "dwc_otg_310".

Change-Id: Ib7b536e554776f1dd09d34d0a2ac1754df9c753e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-09 19:41:10 +08:00
Joseph Chen 00129fb35e env: add env_update_filter()
provide ignore option to filter unused key words from a
list of new string which is ready to be appended.

Change-Id: I82d61ee21ec658e73549de42ad94ed259582cb7a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-09 14:18:03 +08:00
Joseph Chen c204540bc3 regulator: rk8xx: remove REG_DCDC_UV_ACT setting
no special reason to remove, just to keep the same setting
with rkdevelop which is stable.

Change-Id: I3fe810d7080e29525cdf24c4475b0acb5380a9c5
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-09 10:40:41 +08:00
Joseph Chen 537b230e8f regulator: pwm: support "rockchip,pwm_voltage" init voltage
1. add this property to compabile legacy pwm regulator driver
   on rkdevelop;
2. give default init voltage 1.1v;

Change-Id: I7b1f989c28d91edd6e467ae1ba94299c6d695afb
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-09 10:38:51 +08:00
Joseph Chen a538876eeb dm: regulator: print init voltage
Change-Id: I266a76f43485eac8770e51787985b93992ef0668
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-09 10:29:34 +08:00
Yifeng Zhao fe9a00a206 drivers: rknand: zftl fix 2cs 3d mlc nand gc fail issue
bug:
1ppa = 2212a00, status = 0, 2d1db 2bc05 spare: 3a20ea 2d1dc 22bc05 0
1ppa = 2212a00, status = 1, 3b8ef 25fe52 spare: 3a6bfa 3c5d6 5fe53 2
1ppa = 2212a00, status = 0, 2d1db 2bc05 spare: 3a20ea 2d1dc 22bc05 0
1ppa = 2212a00, status = 1, 3b8ef 25fe52 spare: 3a6bfa 3c5d6 5fe53 2

Change-Id: I30c0789a8629ec76ab126b1ac7a49fe6bf7ff061
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2018-07-04 18:07:34 +08:00
Jason Zhu 6651d4c0fb dev_desc: judge dev_desc whether NULL or not before use it
Change-Id: I9d0e2d207a143a02949fbdff2d9ad39f154e4f3e
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-07-04 09:31:05 +08:00
Jason Zhu 94685712a7 rockchip: common: fix scan mmc 1 bug
Set detect mmc 1 and rkimgtest mmc 1 at the same
level. If not, the devtype will be set as default
when run rkimgtest mmc 1 fail but not scan other
storge devices.

Change-Id: I971ea5a8e70f17641483f00b8d467ac5757ca533
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-07-04 09:30:39 +08:00
Dingqiang Lin 05f86d2dcb rockchip: configs: evb-aarch-rk3308: enable rkflash driver for aarch32 evb
1.Change to slc ftl for rk Slc Nand Flash devices;
2.Enabel spi nand, spi nor drivers.

Change-Id: I3314b4dfcfff356a37d50934b1235d8304b738fa
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-03 20:56:31 +08:00
shengfei Xu 4aae031371 fuel gauge: rk817: fix the fuel gauge error
The GAS_GUAGE_Q_INIT was written to the wrong value causing the fuel gauge to fail.

Change-Id: Idbafc110deef6f6ce93dac9a0ad81974d1f112a9
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-07-03 10:52:53 +08:00
Joseph Chen 04d4208bc8 regulator: rk8xx: fix LDO 'config_reg' missing
1. use 'NA' to indicate not unsed or not exist configure;
2. there is not configure register for ldo, so define it as NA;

Change-Id: Ic87e5c9fe6128c14a47a306a8726c487d5b96664
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen d9d90a7304 make.sh: pack all loader image for target platform
mainly for rk3399 ini files:
	RK3399MINIALL.ini
	RK3399MINIALL_SPINOR.ini

Change-Id: I025c98c2cb0a4e8d6070efe1999797c90b113036
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen b62551987d make.sh: clean up
1. improve help description;
2. support subcmd without [board] option;
3. imporve 'O=<dir>' support;
4. imporve code format;

Change-Id: I7bb0d6176ce856750cfbcd234edfb8b237ea424a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen 312bdeaca5 configs: rockchip: rk3288_defconfig
Change-Id: I4c1bec92a5a2452e4afe5d3b0a1ff2694ceaccff
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen 5b0c392267 configs: rk3399: enable more configure
Change-Id: Iaccea12ffa788a2ff07bd33601c3712d50e5b0d9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen f98160cbdd dm: regulator: verbose more regulator configure message
regulator_show() is used as an debug way, so its verbose
message should be detail enough, this helps a lot.

Change-Id: Iabe5fc65e8b6ff27b9c92bc3f0b6948e1013a9c8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen 34483cf702 dm: regulator: make suspend and normal configure non relative
suspend configure result should not influence normal configure

Change-Id: I7107ad5f3303d1f1456ada5949deced5fa8e4ec2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen 7dc573239e fuel gauge: rk818: clean up
this is a initial version porting from rkdevelop
commit: 64f6c0e.

Change-Id: Iadc46282e0782d0cd985cb0ee9d317cb5d94f41e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen 3476b70682 include: rk_timer_irq: add rk3399 TIMER_CTRL definition
Change-Id: I2e88b19b722a7f6a9171c5f1bbfbd7592c525f8c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen cf49f6adf1 power: charge animation: add debug message
Change-Id: Ib96ab67e9e2657385f19c9e2ab2ed518da0ad2f8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen eeb3338caa rockchip: board: print debug when not find charge display driver
Change-Id: Ie75068bed96ef146e4dd949bd698ae64317a16b0
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen b609c2e80d fuel gauge: Kconfig: remove defaut y for rk816
Change-Id: I37534b0128e596a005c318e39e4b54382752b273
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen fb6848b749 input: Kconfig: add rk817 help descripiton for RK8XX_PWRKEY
Change-Id: Ic5e0265cb046c5c5796542f6f12d1f588b7fa05c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen a0ad9ed129 input: rk key: fix compile warning
Change-Id: I357db633bbd904d00757a909665f8f624ef2b50d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen 7b0adbaa7d input: gpio key: fix compile warning
Change-Id: I897c625d623365a7f9bc49fb4ceb1ed9057cd103
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00
Joseph Chen 917ec9ee71 power: pwm regulator: make message from printf to debug
Change-Id: I7e9b2a6bcfe437f01bb318281110935aaf029619
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-03 10:52:29 +08:00