Commit Graph

48062 Commits

Author SHA1 Message Date
Tang Yun ping 16a92a426e rockchip dmc: add rockchip dmc code
This dmc code is prepare for ddr test tool to scanning ddr freq,
normal firmware no need to enable it.
Current version only support PX30/RK3326 and RK3328/RK3228H,
CONFIG_ROCKCHIP_DMC=y to enable it

Change-Id: I25360846bb5af74eb82bdc6e64bdaa2d55ab0f64
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2018-12-03 16:26:08 +08:00
zain wang 94727c946f rockchip: rk3326: enable lzo/lz4 compressed kernel image
Change-Id: Ia86b0be60cebf55e53ddc3b33679104f216579a6
Signed-off-by: zain wang <wzz@rock-chips.com>
2018-12-03 10:30:59 +08:00
Ziyuan Xu fafc46378e rockchip: sdhci: print helpful message out explicitly
Change-Id: If51e25ed7e1b321edd06eaa153894ec638a7963a
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-12-01 11:54:03 +08:00
jon.lin 5727ee4295 drivers: rkflash: dump ret when flash init failed
1.dump flash id;
2.dump ret.

Change-Id: I850fdfadaa12cde62953a0e109e16510b66a8b5e
Signed-off-by: jon.lin <jon.lin@rock-chips.com>
2018-12-01 11:53:21 +08:00
Joseph Chen 9841897eb9 arm: rockchip: select SKIP_RELOCATE_UBOOT
there is no necessary reason to do uboot relocation, and actually
it brings trouble for our debug at some time, so skip it.

Change-Id: I56567a6ff13c8431e7e1773652826692ec0e6c9e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-01 11:47:26 +08:00
Joseph Chen 645a442d90 common: support skip U-Boot relocation
Change-Id: I8640907204c82928c2fb07177835dc55a126aaf0
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-01 11:47:26 +08:00
Shunqian Zheng 3065df6c98 ARCH: arm: px30: clear force_jtag mode
If SDMMC0_DET pull low gpio1_d4/d5 mux as sdmmc functions, otherwise
they mux as JTAG or UART. But the jtag_force(grf_cpu_con1[7])
is enable after reset.

This clear force_jtag mode to enable uart4 when SDMMC0_DET is high.

Change-Id: I2a2dadaad7dc2df8de3b43ff47d27d266caca62f
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2018-12-01 11:45:25 +08:00
vicent.chi 98ebaf0e5b CRU: rv1108 add emmc clk get and set
Change-Id: I8cbfda46d2f7e84f11dbcca844d00c87559d0aa0
Signed-off-by: vicent.chi <vicent.chi@rock-chips.com>
2018-12-01 11:40:42 +08:00
jon.lin 57d1845397 drivers: rkflash: support 4KB page size slc nand
1.support 4KB page size slc nand;
2.support idblock update when NANDC version is 9.

Change-Id: I393bfae2b03e8293ed21acf901ffcc80d0ca0302
Signed-off-by: jon.lin <jon.lin@rock-chips.com>
2018-12-01 11:38:45 +08:00
Joseph Chen eee2651354 rockchip: rk3308: detect adc key by uboot fdt info
fixes: bcf84996f0
(rockchip: rk3308: fix adc key read failed when kernel dtb is enabled)

Change-Id: I46071bf516cc9ee81f4e33cf884ba7baaa5f2d89
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-30 17:21:44 +08:00
Sandy Huang 861ce1a007 Revert "Add: Allow logo in 16bit or 32bit color BMP"
This reverts commit 39965620e8.

Change-Id: Ic2996614b9cddc1835b079c2e7ac784daa99ad3f
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-11-30 11:27:06 +08:00
Sandy Huang 55e2f86dd4 Revert "video/drm: logo: fix show 8bit bmp logo failed"
This reverts commit 78d830ca5b.

Change-Id: Ic2996614b9cddc1835b079c2e7ac784daa99ad3a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-11-30 11:26:19 +08:00
Joseph Chen 0a9c335c55 rockchip: dts: rk3288: add u-boot,dm-pre-reloc for usb otg
It makes rockusb works normally even there is no valid kernel dtb.

Change-Id: Ie7a125450de1b9394ed5c17fc5a0df3239e203d6
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-30 08:49:08 +08:00
Joseph Chen 1927b5fd8a rockchip: dts: rk3368: add u-boot,dm-pre-reloc for usb otg
It makes rockusb works normally even there is no valid kernel dtb.

Change-Id: Ic2996614b9cddc1835b079c2e7ac784daa99ad3e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-30 08:44:51 +08:00
Andy Yan 203b897e05 rockchip: rk3308: boot kernel Image at 0x00680000 for aarch64
According to commit c791e8a8("rockchip: rk3308: set text base to
0x00600000").

Boot aarch64 kernel Image from 0x680000(6M + 512KB) will make
better usage of the ram space.

Load compressed zImage to 0x02480000(36M + 512 KB), then decompress
it to 0x680000.

Change-Id: I08760029ab4daf442ec97b9074db40c54b1413e7
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-11-30 08:44:13 +08:00
Finley Xiao 21ab40a873 rockchip: clk: rk3308: Add flag for clk_set_defaults
Change-Id: Ic9009b35e395cfe8c2a8f8d367b75b85294c7354
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-11-29 20:40:09 +08:00
Joseph Chen e04b9c6bbd clk: rockchip: rk3308: add arm clk 408M support
Change-Id: I133576889860c7bae3f722dcd53df6a50c500c35
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-29 20:40:09 +08:00
Joseph Chen a33c12a6fe rockchip: rk3308: add rockchip_get_clk/cru interface
Change-Id: I63bb32228af0fc9bb86374aae3a3c96d0901540d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-29 20:40:09 +08:00
Joseph Chen 53dc0e6778 regulator: pwm: use debug to verbose init voltage
dm regulator uclass would verbose this message.

Change-Id: I76c73bdcf6354d7d892f75ad022be416d3ab0c09
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-29 20:40:09 +08:00
Joseph Chen d9e2bd8a57 common: boot_rkimg: verbose partition type
rockchip platforms support both efi and rkparam partition types,
it helps a lot for debug.

Change-Id: I3ba3fe552ecd99c38112a1417eb6c22721a03242
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-29 20:40:09 +08:00
Joseph Chen df2027612e disk: part: add interface to get partition type
Change-Id: I69894f5e4ce03909a8290e941d8808593d027080
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-29 20:40:09 +08:00
Joseph Chen 61184b8f14 rockchip: board: remove verbose "Using kernel dtb"
This is a debug message to know if we use kernel dtb.
We have already got this info from "DTB: rk-kernel.dtb",
so remove it.

Change-Id: I28e29e43aa818ac61c9864b94bd80ceb85fc9c3a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-29 20:40:08 +08:00
Joseph Chen 0e107a57eb rockchip: dts: rk3128: add u-boot,dm-pre-reloc for usb otg
It makes rockusb works normally even there is no valid kernel dtb.

Change-Id: I7f17bda7fdd841135d0ab0392db58cfc65cc7f5e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-28 20:45:10 +08:00
Joseph Chen 0a6aa43dec rockchip: dts: rk322x: add u-boot,dm-pre-reloc for usb otg
It makes rockusb works normally even there is no valid kernel dtb.

Change-Id: Icdb2f9611d25525bbe15d4aafb9120e31e749af2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-28 20:45:10 +08:00
Joseph Chen c111479f4f clk: rockchip: px30: support arm clk 408M
Change-Id: I98cd856c99ebf2cd77d1a8ff94d2e0a40f0a4bfb
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-28 16:19:30 +08:00
Joseph Chen d59cf5aebb dm: of_access: add ofnode_read_u64() support
only support of-live.

Change-Id: I37c10efa30ef46369f4a4ad7f16c4c758d6ad563
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-28 14:09:47 +08:00
Joseph Chen 03af66d3ee dm: pmic: use strstr() to match regulator prefix
this is more flexsible to match regulator type.

Change-Id: I5589b5d1d32d8ac1c6d09d64e680eddd31f2ba90
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-28 14:08:44 +08:00
Lin Huang 08b717aba0 clk: rockchip: rk1808: set apll default frequency to 1.2GHz
For cpu_vdd default voltage enough to support cpu frequency to 1.2GHz,
so set rk1808 default cpu frequency to 1.2GHz.

Change-Id: Ia8a888ee79ab3ae3868790bcc1851552acf90086
Signed-off-by: Lin Huang <hl@rock-chips.com>
2018-11-28 10:53:15 +08:00
Jason Zhu fc1a55637d rockush: add serialnumber to usb_device_descriptor
Change-Id: I498be22dd73ffa8e8844bd9ceedb294b5bba72ce
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-11-23 11:06:51 +08:00
David Wu d55170174a pinctrl: rockchip: Add pinctrl support for rk3308b
Change-Id: Ibf85312e909e040ef0efb120efe3f48c4a2c6ab9
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-11-22 17:45:16 +08:00
Andy Yan 58e5d8f2cd rockchip: add api to distinguish soc variants
Add api soc_is_xxx for soc variants distinguishing.
Most of them borrowed from linux kernel
include/linux/rockchip/cpu.h.

Change-Id: Ifb932c022ffdf001b64979fe2554452f0d480e88
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-11-22 17:45:06 +08:00
Kever Yang 7cb1213267 Revert "rockchip: firefly: Add "usb start" to auto-start USB device"
This reverts commit a1903c18db.

It's really bad idea to add "usb start" in preboot, it will spend
a lot of time to scan usb bus, and most of people do not need this
feature.

Change-Id: Ifbc97320ca786f3c4ba593e415c0b2af2a979c47
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-11-22 10:59:02 +08:00
Kever Yang 31bc0a57fb rockchip: make_fit_optee: update output dir
The output directory is not the same for different build system,
let's get it from environment.

Change-Id: Ifa05c9bc09d5b609d16bcbed767bccd3c2bbaa38
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-11-22 09:18:34 +08:00
Joseph Chen 41442d6c2c configs: rk3328: remove unused modules to reduce size
remove: usb-host/net/irq/partitions/command

Change-Id: If4584ae2f608d482b07e2179056fbe1b7c7be596
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-21 10:37:00 +08:00
Tony Xu 1e8c0e44aa Attestation key: write attestation key to secure storage
Split attestation key into AttestationKey.ec and AttestationKey.rsa,
then write to secure storage.

Change-Id: I8e00d602c4174a002e6ecad2e4cfa846f32a681f
Signed-off-by: Tony Xu <tony.xu@rock-chips.com>
2018-11-21 10:11:40 +08:00
YouMin Chen da54d0c8b4 rockchip: rk3328: add support ddr4
Change-Id: Id4d5faa579c8715ea3833744420c61fbf34ddfea
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2018-11-21 10:10:52 +08:00
Sandy Huang 5356fe17e9 video/drm: lvds: enable chanel1 when in ttl mode
Change-Id: I1b2022455fb9a6d45290628831c9683a026cefde
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-11-21 10:09:22 +08:00
Wyon Bi 3c5714f034 video/drm: lvds: add bandgap handling
Change-Id: I8dbeefe22f41ba384a9fbd5576ab9e1dbd6886ee
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-11-21 09:45:20 +08:00
Wyon Bi 206cad104e rockchip: px30: disable video phy bandgap by default to reduce power consumption
Change-Id: I98f84a9fd73a42252c695ab0dcc8fe0185ecd611
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-11-21 09:45:05 +08:00
Andy Yan 7bd73124c2 rockchip: rk3308: set compressed kernel image to 0x01880000(24M + 0x80000) for aarch64
We put decompressed kernel image at 0x02080000(32M + 0x80000)
for arm64, so there is very limit space left after 32M offset
for some boards which run with 64M DRAM.
Put compressed kernel image to 24M + 0x8000, then u-boot can
decompresse it to 32M + 0x80000, this make boards with 64M
SDRAM can boot compressed kernel image.

Change-Id: Ifbed027fca1e6dfa420ad52bc903aa770244af2f
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-11-20 17:34:11 +08:00
Andy Yan 37a2bd9eec configs: popmetal-rk3288: disable silent console
We still hope to see the boot log from console.

Change-Id: Id7d8588aab198161361b6f8b59177fd3bb7f90a6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-11-20 17:34:11 +08:00
Andy Yan b577008115 configs: popmetal-rk3288: enable boot_android command
Enable boot_android command to boot Android format image.

Change-Id: Ia516d77af5480608f5d33ae3cdf8f7e69eb307ba
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-11-20 17:34:11 +08:00
Joseph Chen a21c2f0ae1 rockchip: dts: rk3368-evb: move chosen to *-u-boot.dtsi
Change-Id: I642736143d7a01df24a2814ad188247314d9315f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-20 14:20:32 +08:00
Joseph Chen 01a0b7a601 make.sh: using wide range match for all loader ini
Change-Id: I1d4f63ed0685816f0b41796ac10bdafae068eee2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-19 20:06:10 +08:00
Jason Zhu ae1f243a7b mmc: delete SEND_STATUS after set-timing in hs200 mode
In the eMMC spec, “Note that while the actual timing change is done,
the behavior of any command sent command sent (like CMD13) cannot be
guaranteed due to the asynchronous operation. Therefore it is not
recommended to use CMD13 to check the busy completion of the timing
change indication.” indicates that SEND_STATUS can not be send after
set-timing, so delete it.

Test eMMC model:
Manufacturer ID: 45
OEM: 100
Name: DG401
Rd Block Len: 512
MMC version 5.1
Capacity: 14.7 GiB

Change-Id: Idd47461b529f28af649f2275041f36ef998ee404
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-11-19 15:16:56 +08:00
Ziyuan Xu 9e8ce8162d mmc: distinguish switch command via send_status
The cmd13 can't guarantee the switch command is success even it response
without any error bit assert. So we should wait busy signal to wait the
behaviour of the device is completed.

Change-Id: Ia7e9efc27b5e05a7bcb9b4c98eef1e134efc29e7
Fixes: 55e5defd20 ("mmc: rework mmc_switch for non-send_status scenario")
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-11-19 15:16:56 +08:00
Kever Yang 2b78fc239c rockchip: remove unused fit source file
We use fit generator script instead.

Change-Id: Ia799d5032e5f4ce21647548eca6efa70856da1a5
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-11-19 15:15:57 +08:00
Kever Yang 38f74602a5 rockchip: configs: use FIT_GENERATOR instead of FIT_SOURCE
There are some armv7 SoCs like RK3288 have a different SDRAM_BASE,
so we need a script to generate correct BASE, update all SoC configs
to use script.

Change-Id: Ibba2f6adc6b9a104b54bbe9c7feefa92e6efcfe0
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-11-19 15:15:57 +08:00
Kever Yang 6d64bf28b2 rockchip: add script to generate optee fit its
The U-Boot and OP-TEE load&entry address may not the same for
different SoCs, so we need a script to adapt it.

Change-Id: Id5418aa8ac8b35045be9310f317a73e7c24d7518
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-11-19 15:15:57 +08:00
Kever Yang fb7f9b09f0 rockchip: firefly-rk3288: remove SPL_STACK_R
The rk3288 TPL is always running in DDR, we do not need a relocate
STACK address.

Change-Id: Ibc4c543ee96f81b407db6374f6293a07928cffda
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-11-19 15:15:57 +08:00