Commit Graph

47688 Commits

Author SHA1 Message Date
Hisping Lin d156c9ff6f lib: optee_client: v2 client support compile to 32 bits
Change-Id: I25cbbe486016cbe6fb1a6eff440bb7efab46a4c6
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2018-08-07 10:48:14 +08:00
Joseph Chen a678796b79 rockchip: sdram: implement dram_initr_banksize()
We reserve firmware region after MMU is enabled and translation
table set up, so that the region can be mapped as cacheable to
communicate with firmware by share memory.

Change-Id: I9ba6fc1bc5e8b794dcf5e693fbc2a29a8f2187d3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-07 10:48:05 +08:00
Joseph Chen f4d148502c board_r: add dram_initr_banksize()
Some platform requires to reserve memory regions for some firmware
to avoid kernel touches it, but U-Boot may have communication with
firmware by share memory. So that we had better reserve firmware
region after the initr_caches() which enables MMU and init
translation table, we need firmware region to be mapped as cacheable
like other regions, otherwise there would be dcache coherence issue
between firmware and U-Boot.

Change-Id: Icb986022b484c96dffcafc98972ae24362cb8e4b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-07 10:47:42 +08:00
Kever Yang bb14c03be0 rockchip: rk3328: increase spl size
Since we have TPL, the SPL is actually running in SDRAM and there
should be no size limit by sram size.

Change-Id: Ic466777c51e75c9ac83c1cc7be926a0f2c0cacaa
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-08-07 10:20:20 +08:00
Jason Zhu f7c0370c61 mmc: dw_mmc: fix timeout error
If data error, we will reset the controller and wait when it is
ready. But the timeout data type is u32, it is never less than
zero. So change judgement data to one.

Change-Id: If049da06ecfe42fd31cca344bf87f69f7850dbe2
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-08-06 11:24:09 +08:00
Elaine Zhang 8e2239d5eb clk: rockchip: rk3328: replenish some CLK settings
Change-Id: I33e6ff57c2d616c933a458dade9a751460d0bc9a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-06 11:21:15 +08:00
Elaine Zhang 5e347bef3e regulator: rk816: support rk816 ES2 chip
Change-Id: Idaba0e148b520e2d43d2185461acaab3ff9cb16d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-06 11:20:55 +08:00
Elaine Zhang 7150785e44 rockchip: clk: rk3368: support more clks to set and get rate
Make clock ids consistent with kernel.
Support more clks to set and get rate.
Add clk dump.

Change-Id: I348c98ce81ce76af9c492a30480fcb495da7ed79
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-06 11:20:24 +08:00
Joseph Chen 3ee2bc3c66 configs: rk3328: enable rockchip efuse
Change-Id: Ie1a307f5a680f962f7dcc07bf9e63c97a6f4f734
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-06 11:15:19 +08:00
Joseph Chen 59a83996bc rockchip: efuse: support rk3328 non-secure efuse
Change-Id: Ie74764ef946b79c2e9f73e9082c1cb8bbc288abb
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-06 11:15:19 +08:00
Joseph Chen a2df55e58d configs: rk3128x: enable rockchip efuse
Change-Id: I2e77ee1c487762e6d6e27e9d75ec55d4217251a2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-06 11:15:19 +08:00
Joseph Chen b4a9471978 rockchip: add fdt overlay after read kernel dtb
Change-Id: If8d6f9d8efa735514e9152dd9d4cda43436f7d18
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-06 11:15:19 +08:00
Joseph Chen f8dbe86116 android: support dtb overlay
- read dtbo from recovery or dtbo partition;
- append "androidboot.dtbo_idx" to cmdline;
- apply dtb overlay when first read kernel dtb;
- pass dtb that first time read to kernel;

Change-Id: Iba5c02c1307d3dad69ef96d3b3b0927fb507be8f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-06 11:15:19 +08:00
Joseph Chen b11786b4f0 input: rk key: fix missing register key into dm input uclass
Change-Id: I3237923ed14724e838a8b79a40db4ac45dde5f16
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-06 11:15:19 +08:00
Joseph Chen c67b8746fb image: android: use debug to print cmdline
if cmdline is too long, it wastes time.

Change-Id: Ie8658fca11c3706df50d1eaae2ee479af6e8de08
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-06 11:15:19 +08:00
Joseph Chen bcd21a1f01 image: android-dt: add dt_for_each_entry() to iterate over all dt entry of DT image
Change-Id: I4db1e1da0d55701798bb8c296dd58e26592ef3c8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-06 11:15:19 +08:00
Joseph Chen c673757f56 common: fdt_support: support "bootargs_ext" merge into "bootargs"
When DTBO is enabled, dtbo may provide "bootargs_ext" to append
cmdline base on "bootargs".

Change-Id: I4abf554591a3983c5f41494ecadf5614b8f6404b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-06 11:15:19 +08:00
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