Commit Graph

47671 Commits

Author SHA1 Message Date
Joseph Chen 09f4e561ac android: update android image header to support new version
mainly to support android P.

Change-Id: I34a49e4eedcde06a9e40792c7c908737dc10b426
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-06 11:15:19 +08:00
Zhangbin Tong 9322063530 configs: rk3128x_defconfig: enable CONFIG_OF_LIBFDT_OVERLAY
Change-Id: I4474350c7ab45412f05ff3ef79f3f6363e68712b
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-08-06 11:15:19 +08:00
Zhangbin Tong aa1c055a6e configs: rk3128x_defconfig: enable CONFIG_CMD_DTIMG
Change-Id: Ia088c543b001219db6c85792620c1a57f233e491
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-08-06 11:15:19 +08:00
Zhangbin Tong df8be4b672 rockchip: rk3128x: update with save defconfig
Change-Id: I2f6a904c0462c25be0bd705bfa83dc4f3334ed8c
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-08-06 11:15:19 +08:00
Sam Protsenko 2967d2f74d FROMLIST: cmd: Add dtimg command
dtimg command allows user to work with Android DTB/DTBO image format.
Such as, getting the address of desired DTB/DTBO file, printing the dump
of the image in U-Boot shell, etc.

This command is needed to provide Android boot with new Android DT image
format further.

Change-Id: I2a626f333f604b6f0424aa03feaddab4e8506a3f
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
(am from http://patchwork.ozlabs.org/patch/925871/)
2018-08-06 11:15:19 +08:00
Sam Protsenko e91b3373a9 FROMLIST: common: Add support for Android DT image
Android documentation recommends new image format for storing DTB/DTBO
files: [1]. To support that format, this patch adds helper functions for
Android DTB/DTBO format. In image-android-dt.* files you can find helper
functions to work with Android DT image format, such us routines for:
    - printing the dump of image structure
    - getting the address and size of desired dtb/dtbo file

This patch uses dt_table.h file, that was added in 643cefa4d848 ("Import
Android's dt_table.h for DT image format") by Alex Deymo.

[1] https://source.android.com/devices/architecture/dto/partitions

Change-Id: I78f6750af6c4fecb80d331bc06bc5cbe98da5825
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
(am from http://patchwork.ozlabs.org/patch/925870/)
2018-08-06 11:15:19 +08:00
Alex Deymo 7ec0ac2b36 UPSTREAM: Import Android's dt_table.h for DT image format
Android documentation defines the recommended image format for storing
DTB/DTBO files in a single dtbo.img image. This patch includes the
latest header file with the struct definitions for this format from
AOSP.

The header was adapted to U-Boot's coding style and the function
declarations were removed.

Change-Id: I4d3a452b600a6908f4b720b6e6c926c918be5630
Signed-off-by: Alex Deymo <deymo@google.com>
[trini: Change SDPX tag location]
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
(cherry picked from commit 643cefa4d848a9358951caab42b5f9cd15e4fb5f)
2018-08-06 11:15:19 +08:00
Finley Xiao d101530a8a rockchip: clk: px30: Add support to set vopl aclk and dclk rate
Change-Id: I31376ebb8d1d40d46ad4e2b6421b65ac7fae096d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-08-06 11:12:03 +08:00
Finley Xiao f909d4a8c9 rockchip: clk: px30: Add support to limit minimum rate for vop dclk
Change-Id: Ieff359603b1b6dede4377b1a17daf3eb803e2552
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-08-06 11:12:03 +08:00
Finley Xiao bf97d0d67a rockchip: clk: px30: Avoid setting gpll rate repeatedly
Change-Id: I24a062bf17f2552b94c9421b52ee930890fefcb6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-08-06 11:12:03 +08:00
Finley Xiao eb46e71787 rockchip: clk: px30: restore bus and peri rate when change gpll rate
Change-Id: I208196e11e7c4fa5db26a02abdd41ecfa610d5bd
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-08-06 11:12:03 +08:00
Finley Xiao a221d6e67e rockchip: clk: px30: Add support to set npll rate
Change-Id: Ida62e70610bd28d4c7d327e0431f09b0e4de6b2e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-08-06 11:12:03 +08:00
Finley Xiao c4d4e4dc26 rockchip: clk: px30: Add clk_set_defaults()
As clk_set_defaults() is removed in device core, so add it in clock
driver.

Change-Id: Ib5b9a7f81c738c65f2cb3e0ca74a410cda2ca1e2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-08-06 11:12:03 +08:00
Finley Xiao 56dd66cf79 rockchip: clk: px30: Modify the print format of clk
The new print format can reduce startup time.

Change-Id: I7ea53e07b8245fe4b5ef1fa15dd1f6efb176db47
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-08-06 11:12:03 +08:00
Dingqiang Lin e83e4aa5e7 drivers: rkflash: add 25Q64JVSSIQ and 25Q64FWSSIG nor devices
Change-Id: I642a3db7a69e3b44c72ee965f1595078837bfa8e
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-08-06 08:53:59 +08:00
Wyon Bi 18f2475d9f rockchip: px30: scan sub-nodes of the syscon node
Change-Id: Iab8f77f9bc52e9268df2f0c4accb5b0903e92af1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-08-06 08:48:00 +08:00
Nickey Yang e869504af3 rockchip: dts: rk3288-fennec: add edp display support
Change-Id: Icda290e83f8356f3bc80ee1ffc5bd8faab4e7dea
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-08-06 08:41:57 +08:00
Wyon Bi a60b58c4d9 video/drm: lvds: Reverse sample clock direction on px30
Fix display corruption when vdd_log equals 0.95v.

Change-Id: I808a40ec7fdc2866f6b34a97ad77a7b1f9c01fd4
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-08-02 19:54:20 +08:00
Elaine Zhang 09e1ca4340 clk: rockchip: rk3399: fix up the pll setting
If the gpll and npll freq is no change,don't set pll once again.

Change-Id: Ib16a0a1ff56560997b6ed4b487fc2d56928c14ec
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-02 17:04:36 +08:00
Elaine Zhang efb944b698 rockchip: clk: rk3128: support more clks to set and get rate
Make clock ids consistent with kernel.
support more clks to set and get rate.
add clk init.

Change-Id: I1e6b5734887e0bd5d845f1286f10eb0e3e42bc08
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-02 17:03:55 +08:00
Elaine Zhang 809e91fd38 rockchip: clk: rk322x: support more clks to set and get rate
Change-Id: Ibed40f1826469263a8015d8af2dea4d3567a08e6
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-02 17:03:55 +08:00
Elaine Zhang 0b7db90f19 rockchip: clk: rk3328: support more clks to set and get rate
Change-Id: Ic231b7701c6eb23b0e9db21c1d28fb4d08c4debf
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-02 17:03:55 +08:00
Elaine Zhang 2f0a72b1f2 rockchip: clk: pll: add common pll setting funcs
Change-Id: I99887338a4f84aead905938eee066b460c4c1b9f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-02 17:03:55 +08:00
Sandy Huang dc71f496cd drm/rockchip: 3229 vop: fix mistake fild when in interlace mode
set frame effect to fix mistake fild when in interlace mode.

Change-Id: Ic4e7b7134bd54aa65d31264a3e4625eebdc229c5
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-08-02 17:03:55 +08:00
Joseph Chen b498696e73 rockchip: resource: add more quote
Change-Id: I4a9a25cacd032977f952956af83e4c1d91e239a9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-02 14:24:30 +08:00
Dingqiang Lin 09509cd539 drivers: rkflash: support IDBlock updating in loader mode for nand devices
SPI Nand and Nand flash devices are supported

Change-Id: Ic4dbd5cf38bd46be474bb410224a9082bce1b5f2
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-08-02 11:08:39 +08:00
chenfen b2a78faeb5 rockchip: clock: rk3399: support 400KHZ output for emmc initialization.
support 400KHz output for emmc initialization

Change-Id: I4f2182981f587688c777f64c30d0eeb59f69b0ea
Signed-off-by: chenfen <chenfen@rock-chips.com>
2018-08-01 17:21:49 +08:00
chenfen 850fcf3e04 mmc: sdhci: config controller MMC_TIMING_MMC_HS
If emmc driver config MMC_TIMING_MMC_HS, need config

controller SDHCI_HOST_CONTROL2 register SDHCI_CTRL_UHS_SDR50.

It will affect emmc phy work mode.

Change-Id: Ib45f30eb6b70bde6f1beb4612ded17ee2b24b5fe
Signed-off-by: chenfen <chenfen@rock-chips.com>
2018-08-01 17:18:59 +08:00
chenfen cc0bf5ed98 rockchip: emmc: rk3399: priority to use cru division.
Priority to use cru division is better timing than use controller

division.

Change-Id: I8b7b9a9c99f09407f209fda8df6460136a3105e9
Signed-off-by: chenfen <chenfen@rock-chips.com>
2018-07-31 17:22:33 +08:00
Dingqiang Lin cd67f373aa drivers: rkflash: add vendor ops api for nand devices
1.Add vendor ops api for nand devices;
2.Remove unused headfile.
3.Make rkflash block driver reachable by other devices

Change-Id: I26129cb94382b0714b9c35f4dc6113ddb752251c
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-31 14:51:32 +08:00
Dingqiang Lin 3872c3f472 drvers: block: blk-uclass: add SPI Flash blk devices
1.Add SPI Flash blk devices;
2.Remove unused RKSFC blk devices.

Change-Id: I0c570798875b4dddf7dfc651f992d2e8eb725228
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-31 14:51:32 +08:00
Dingqiang Lin 3f360b7931 rockchip: bootcmd: change rksfc to spi flash devices in bootdev
1.Under the control of sfc, SPI Nand and SPI Nor are registered as two
different if_type block dev and are both the child_dev of sfc:
	a.Dev 0: blk_dev "rkflash", devenum 0, if_type SpiNand
	b.Dev 1: blk_dev "rkflash", devenum 1, if_type SpiNor

Change-Id: Iaa90fdc5c0926495c989189b9ef9e317b70f23a4
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-31 14:51:32 +08:00
Dingqiang Lin aa16b1f803 cmd: rksfc: change dev if_type
1.In rkflash driver, SPI Nand and SPI Nor are registered as two
different if_type
block dev. They are both the child_dev of sfc;
2.Here we send cmd to "rksfc" to operate it's child-dev spi flash device.

Change-Id: I9314ef9c556f8cfbe023021bd66bebec137a4e71
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-31 14:51:32 +08:00
Dingqiang Lin c8638ec3c0 common: boot_rkimg: add SPI flash boot type
Change-Id: I9d1d36390833387a93eb7ed76b1d6f90e3640edb
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-31 14:51:32 +08:00
Dingqiang Lin 4c0421560d disk: part: add SPI Flash blk_desc print
1.Add SPI Flash blk_desc print;
2.Remove RKSFC print which is unused.

Change-Id: I5ef3b6936dd57cd01490176bc8877159cedadccc
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-31 14:51:32 +08:00
Dingqiang Lin b331f5a603 drivers: rkflash: treat spi nand and spi nor as two different block devices
1.when dm sfc of-match, it will bind two kinds of spi flash devices as
rkflash:
	a.SpiNand, devnum 0, if_type IF_TYPE_SPINAND
	b.SpiNor, devnum 1, if_type IF_TYPE_SPINOR
2.Publish type of rkflash product.

Change-Id: I393452b16640811e9b0217fe5e91e76bc84c7745
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-31 14:51:32 +08:00
Zhihuan He 9563e87b41 ARM64: invalid icache for cortex a35
Different loader can not boot normally in cortex-A35,like rk3308,
because cortex-A35 enable icache in default.

Change-Id: I87f3e8a2539186f3e408fad8ea903c375118b1d9
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2018-07-31 14:48:57 +08:00
Zhihuan He 5b580fb9ec rockchip: rv1108: spl: disable SPL_LIBCOMMON/GENERIC configs
remove CONFIG_SPL_LIBCOMMON_SUPPORT and CONFIG_SPL_LIBGENERIC_SUPPORT
defconfig for reducing spl size.

Change-Id: Ie7b1905c44976f8a62e2462acd455a6ec6bb8be7
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2018-07-31 14:48:57 +08:00
Zhihuan He e62c13b977 rockchip: spl: add udelay(),hang(),memset() in spl
add udelay(),hang(),memset() in spl.c when we do not config
CONFIG_SPL_LIBGENERIC_SUPPORT.

Change-Id: Ib6c5532af002b501659ee5964d3a09954f0b3fdf
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2018-07-31 14:48:57 +08:00
Jason Zhu d4bcb632d8 configs: evb-px30: enable vendor partition
Change-Id: Ic55ef11f3164c17318f7ee1213001e0f1b800271
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-07-31 14:48:00 +08:00
shengfei Xu 6266c4934d fuel gauge: rk817: clear the OFF_CNT register
Change-Id: Iab37f0a0b69a35ed56f3bef4c0d0699d4922e6bc
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-07-30 15:45:39 +08:00
Kever Yang 4be02e2816 rockchip: px30: enable vol+ key in pre-reloc
We need vol+ key as recovery key for board to get into rockusb.

Change-Id: Ia1d80cb62695fa2208744ea62a0c6fec5d1e20a8
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-07-27 15:45:10 +08:00
Kever Yang 0c53cb8fc4 rockchip: dts: px30: enable usb gadget for rockusb
Rockusb have to available so that we can use it even if there is
no avaiable kernel/resource image.

Change-Id: I39c22052f66fb7151eeb885b684d8fc1291dc3f4
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-07-27 15:45:10 +08:00
Elaine Zhang 4897499e15 clk: rockchip: rk3399: add gpll and npll init
remove clk_set_defaults(), need init pll freq as kernel.

Change-Id: I245d01bf65b3092c21a0c2aa06a0a6eaca8528ef
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-27 15:44:58 +08:00
Kever Yang cadc8d74e2 clock: remove clk_set_defaults() in device core
We do not need to assign-clock for every driver in Rockchip platform,
only below module need this feature, remove it for boot time optimize:
- GMAC (need set parent from dts)
- CRU ARM clock (rockchip board will call set_armclk_rate() instead)
- VOP (need set parent)

Change-Id: Ie8facfb7499323f4649e0e1d908f850de1338e12
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-07-27 15:44:58 +08:00
Shunqian Zheng 596700d74b make.sh: fix the broken of px3se loader/trust packing
PX3SE loader/trust packing was broken since
  d443b7d make.sh: parse RKCHIP from .config

This fixs px3se building with previous commit. And since we're
here, detecting the variant gracefully.

Change-Id: I5c7f5385a4cfd0d6beba842bd4766b77d8f67d88
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2018-07-27 09:06:10 +08:00
Shunqian Zheng f094cb2954 rockchip: add PX3SE kconfig
PX3SE is a variant of RK3128, especially the loader and trust img.

Change-Id: I91f417957b5f3db503fdaa8f2f6c3271f46094b6
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2018-07-26 15:32:43 +08:00
Jian Qiu 9b95292d1a configs: evb-rk3326: enable CONFIG_FASTBOOT_OEM_UNLOCK
Change-Id: I76bffc998986e5e4bd723b8e9649592f5bc1e63f
Signed-off-by: Jian Qiu <qiujian@rock-chips.com>
2018-07-26 15:30:46 +08:00
Shunqian Zheng ce6becde2e config/dts: px3se: Rockusb mode by Vol+ and reset
Enalbe ADC keys to enter Rockusb mode by holding Vol Up
key and reset.

Change-Id: I2f17fccf890424049aff5946f439016ad76ea52d
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2018-07-26 15:19:59 +08:00
shengfei Xu 8a7ae883f7 fuel gauge: rk817: set different input current when different charger is detected
The four power source types that are detected are:
Standard downstream port (SDP)
– This is a computer USB port capable of 500mA.
Charging downstream port (CDP)
- This is typically a powered USB hub capable of 1500mA.
Dedicated charging port (DCP)
- This is a standard wall charger capable of at least 1500mA.
DCP without shorting D+/D-(FLOATING)
- This is a non-standard wall charger capable of at least 1500mA.

Change-Id: Icb3d3c02d9ef5dfbcabf0232743ad057c578dcf4
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-07-25 14:36:15 +08:00