Commit Graph

48387 Commits

Author SHA1 Message Date
Hisping Lin df99e5808c cmd: add test case for secure storage
1.mmc testsecurestorage to test secure storage
2.test secure storage in rpmb and test secure storage in
  security partition when use emmc
3.test secure storage in security partition when use nand

Change-Id: Id6f72893c002c5040cb1790051c9685911878df7
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2019-02-14 19:58:09 +08:00
Kever Yang 2e08e06962 rockchip: make.sh: convert chip id RV1108 to RV110X
Change-Id: I93ff273109bcccdb499957dd1b02a5dcca941acf
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-02-14 17:35:31 +08:00
Kever Yang 3ebdbc6a7c rockchip: config: evb-rv1108: enable mmc and aosp image
Change-Id: I464460f1386acfecadc7a116f11ef3b3bb66d3cb
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-02-14 17:35:31 +08:00
Kever Yang 1feaf21adf rockchip: dts: rv1108: enable emmc
Enable emmc node.

Change-Id: I4ee5b078429e8e0686f301d03602e0875a613ee2
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-02-14 17:35:31 +08:00
Joseph Chen a059684b23 armv7: sleep.S: support other v7 cpu
Change-Id: Ib1b1cb973054c9faa6a11da8fc1ad7f1d5aec214
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-14 14:32:56 +08:00
Joseph Chen abf4f55116 armv7: sleep.S: rename _suspend_gd to __suspend_gd
Change-Id: I97911822c5616dbcbb3b28a156a3759f3b6b2af3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-14 14:32:56 +08:00
Jason Zhu 50ad91b70c configs: evb-px30: remove clock-names
Since the clock-names will be used by mmc module, so remove it from
CONFIG_OF_SPL_REMOVE_PROPS.

Change-Id: Ie42897b6b9eadfea86724ea1e25a6d47b57113af
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-02-14 09:11:07 +08:00
Zhangbin Tong 438f1a786f configs: rk322x_defconfig: enable CONFIG_RKNAND
Change-Id: Ifbb79f72cf04dfe601cd03fa3c06b5042dbd2ac3
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2019-02-14 09:06:23 +08:00
Zhangbin Tong d95f6a1c40 configs: rk3128x_defconfig: enable CONFIG_RKNAND
Change-Id: If64e5cf2dccd2fe7c9621e4ff456c49de484d399
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2019-02-14 09:06:23 +08:00
Zhangbin Tong 0a5f26cb4b rockchip: dts: rk322x: enable nandc
Change-Id: I495bc11aa8db9f6a916aaad3c5dad40f4c07b8e2
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2019-02-14 09:06:23 +08:00
Joseph Chen 8b09909151 pack_resource.sh: move to ./scripts/ folder
Adding copyright and license

Change-Id: Ia3e83797fa968e1cb8916f26ecae3c6f50835a49
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-13 17:31:13 +08:00
Joseph Chen 2ba1365e25 make.sh: support "--ignore-bl32" for trust_merger
Change-Id: I8428787c7218b3dd546283f6b5888d09a35623e7
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-13 16:58:20 +08:00
Joseph Chen 7582895812 tools: rockchip: trust_merger: support "--ignore-bl32"
Change-Id: Ia8385dc1b41893d475b4f14c222dca98c9d52aba
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-13 16:54:03 +08:00
Kever Yang 4a673710d2 rockchip: evb-rk3288: disable SPL_BACKTO_BROM
We get TPL and no need back to bootrom in SPL.

Change-Id: I27b9793acc1a8d311dc9b518e73150c3af711808
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-02-13 16:43:55 +08:00
Kever Yang 620cb65601 cmd: rbrom: fix to fit the MACRO SCOPE
Both cmd and its implement shoud be in the same MACRO.

Change-Id: I93587c425f999d9701d88b1d278fcc2a70d64133
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-02-13 16:43:46 +08:00
Joseph Chen f7bec22852 make.sh: add copyright and license
Change-Id: I9f5fcfe33134e901a77899f70a103d1a3fda26cd
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-13 10:38:27 +08:00
Joseph Chen d554a7b28e arm: interrupt: add stacktrace dump for all exceptions routine
show_regs() is called by all exceptions.

Change-Id: Iac271d8d7b5d42ed9cf3d8a860a17f8080acf3bc
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-13 10:17:47 +08:00
Joseph Chen 6aa65bb1ee armv7: add -funwind-tables compile option to support stacktrace
Change-Id: Icfa223397e05dcd42ea3c12275385104bf275213
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-13 10:04:11 +08:00
Joseph Chen d0df954bf3 arm: lib: add arm32/64 stacktrace support
This patch supports dump arm32/64 stacktrace as the format of raw
address info. The U-Boot symbol table is not available now, please
use ./scripts/stacktrace.sh script to parse stacktrace info with command:

    ./scripts/stacktrace.sh <file>       // stacktrace info file

Example on RK3399:
    Call trace:
     PC:   [< 00258a7c >]  dwc3_gadget_uboot_handle_interrupt+0xa0/0x5bc
     LR:   [< 002052f8 >]  usb_gadget_handle_interrupts+0x10/0x1c

    Stack:
           [< 00258a7c >]  dwc3_gadget_uboot_handle_interrupt+0xa0/0x5bc
           [< 0025bd6c >]  sleep_thread.isra.20+0xb0/0x114
           [< 0025cf58 >]  fsg_main_thread+0x2c8/0x1814
           [< 0020db58 >]  do_rkusb+0x250/0x338
           [< 00226a00 >]  cmd_process+0xac/0xe0
           [< 00212df4 >]  run_list_real+0x6fc/0x72c
           [< 00212f94 >]  parse_stream_outer+0x170/0x67c
           [< 002126e0 >]  parse_string_outer+0xdc/0xf4
           [< 00212bb0 >]  run_list_real+0x4b8/0x72c
           [< 00212f94 >]  parse_stream_outer+0x170/0x67c
           [< 00212698 >]  parse_string_outer+0x94/0xf4
           [< 00225f30 >]  run_command_list+0x38/0x90
           [< 00202d08 >]  rockchip_dnl_mode_check+0x4c/0xd4
           [< 00202db0 >]  setup_boot_mode+0x20/0xf0
           [< 00203010 >]  board_late_init+0x10/0x40
           [< 0027071c >]  initcall_run_list+0x44/0x80
           [< 00213d68 >]  board_init_r+0x20/0x24

The "dump_stack()" is available to trigger stacktrace.

Change-Id: Ib1423269dd255fa4a34231489cd3b7e6ddd22540
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-13 09:04:23 +08:00
Joseph Chen b97fba2cf2 scripts: add stacktrace.sh to parse stacktrace info
Usage:
	./scripts/stacktrace.sh	<file>

	@<file>: stacktrace info file

Change-Id: I1a7b4798d9826d87ce03186958c51b30784d03e1
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-13 09:03:59 +08:00
Joseph Chen 7f28cbb61e lib: Kconfig: add CONFIG_SYS_STACK_SIZE
Change-Id: I37cb4ffea5ef6aa2475a3ca7a87f58f23fcff76a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-13 09:03:59 +08:00
Joseph Chen 5315192f60 rockchip: resource: add resource hdr magic validation
It fixes the dead loop issue of "bootrkp" command:
	......
	=Booting Rockchip format image=
	boot: invalid image tag(0x0)
	boot_rockchip_image ramdisk part boot read error
	bad resource image magic:
	DTB: rk-kernel.dtb
	invalid entry tag
	invalid entry tag
	invalid entry tag
	invalid entry tag
	......

Change-Id: Ia15f315eee94dce06800139ff547ebeee3847cae
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-12 17:40:24 +08:00
Elaine Zhang 5561190119 clk: rockchip: rk3288: add clk_set_default
support aclk_vio\hclk_vio clk setting.

Change-Id: Ie826c770670598161f22208f504d8762b8597811
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-02-01 16:17:34 +08:00
Jason Zhu 544e79360d configs: rockchip: px30: remove clock-names
Since the clock-names will be used by mmc module, so remove it from
CONFIG_OF_SPL_REMOVE_PROPS.

Change-Id: I7f1b4d9353564c5aa87cf33783e814b5390710ef
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-02-01 15:13:28 +08:00
Joseph Chen 683a8d16be arm: interrupt: clean up registers show
Change-Id: I0ecb11c5e67cb7e0e95d3fcaad9220628fddbfc6
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-01 11:53:47 +08:00
Joseph Chen 9fa74d15b8 arm: vectors: irq context get svc_lr and svc_sp
Without this patch, the irq context get the irq_lr and irq_sp
which doesn't make any sense, what we need are svc_lr and svc_sp.

Change-Id: I4c07e3688e818cd4516824a78d57ff092fdbe2b9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-01 11:53:47 +08:00
Joseph Chen c15709b516 irq: init IRQ_STACK_START_IN
IRQ_STACK_START_IN is default 0x0badc0de which is a invalid address,
this patch makes all exceptions routine work normally.

Change-Id: I3f4d75b90d840f7ea1cb7a2e1cbc7ad452aef15b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-01 11:53:47 +08:00
Shengfei Xu 9e9e0e07b5 power: pmic: rk8xx: save PMIC_POWER_EN register for rk817/rk809
rk817/rk809 must restore the PMIC_POWER_EN OTP value before the system reboot.

Change-Id: Ia62cb8f5b0dc9fef8a32a3af5f087c55a9888d78
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-02-01 10:31:28 +08:00
Joseph Chen 10e1f9ebb7 android: fix avb enable state set error
Fixes: 8e66ecd25d
(android: fix get wrong ramdisk address when avb verify)

Change-Id: I6b28ee32824e97e7eaed4aa8a530903d8486004b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-31 20:00:49 +08:00
William Wu da1b89c5ac usb: phy: rockchip: get the otg node correctly
In the commit 525293385cca ("rockchip: board: rework board
usb init"), it correct the way to find the otg node. This
patch do the same thing here.

Change-Id: I27c66f48d9f6c99f1d6e45c2b83d2bcd6365a1f3
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-31 17:55:14 +08:00
William Wu 294ad6176b rockchip: board: rework board usb init
Currently, usb 2.0 otg node was found by the compatible
"snps,dwc2" and the property "dr_mode". However, the
"dr_mode" isn't a necessary condition, more seriously,
if the dr_mode is set to "host" or "peripheral", we
will fail to get the otg node.

This patch finds otg node by the compatible "snps,dwc2"
for most of Rockchip SoCs supported only one DWC2 controller.
For RK3288, it supports two DWC2 controllers with the
same compatible "snps,dwc2", so we add another condition
(reg addr = 0xff580000) to get the otg node.

Change-Id: I16acbf3e8da9bec19b8ec0a331b9114cb5462ac0
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-31 17:55:14 +08:00
Wyon Bi dddde95be4 video/drm: analogix_dp: add edp reset control support
This patch adds eDP software reset operation to make sure
register access successfully on RK3288 and it fixes possible
register default value abnormal issue during boot up.

1) normal case:
Rockchip UBOOT DRM driver version: v1.0.1
0x120: 0x00000007
0x390: 0x00000003
Using display timing dts
Detailed mode clock 200000 kHz, flags[a]
H: 1536 1548 1564 1612
V: 2048 2056 2060 2068
bus_format: 100e
Link Training success!
final link rate = 0x06, lane count = 0x04

2) abnormal case:
Rockchip UBOOT DRM driver version: v1.0.1
0x120: 0x00000066
0x390: 0x00000202
Using display timing dts
Detailed mode clock 200000 kHz, flags[a]
H: 1536 1548 1564 1612
V: 2048 2056 2060 2068
bus_format: 100e
failed to get Rx Max Link Rate
failed to init training
unable to do link train

Change-Id: Idacbb0c72a40442da3a87e60bfe1d9965f3ca79c
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-31 16:44:29 +08:00
Jason Zhu 9136a2d39c rockchip: dts: px30/rk3326: add emmc hs200 support
Change-Id: I0080a12452dd7fa77b8b7fd26a61bc429b3cfa27
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-01-31 11:17:22 +08:00
Tony Xu 700a366893 drivers: usb: Add readback check when write keybox
Change-Id: I969012e391bd8b6b764d259379d610853cd163b5
Signed-off-by: Tony Xu <tony.xu@rock-chips.com>
2019-01-31 11:08:44 +08:00
Tony Xu 9780bd18ce common: write keybox: Add readback check interface
Change-Id: Ic020bd7e80869c2e3096637fce0adced654d3ce4
Signed-off-by: Tony Xu <tony.xu@rock-chips.com>
2019-01-31 11:08:44 +08:00
Wyon Bi b4ab4a0f32 reset: rockchip: convert to use live dt
Change-Id: I70b17b0d9c4ded215cb58f0b65303fc3dea64f7e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-30 18:41:25 +08:00
Wyon Bi 611de31725 video/drm: analogix_dp: Fix color depth configuration
Change-Id: Iea7fb59a2eb811d3db09cb6d0d8be03cd98a4645
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-30 18:41:25 +08:00
Wyon Bi 00cdbd6c88 video/drm: panel: Allow to configure bpc (bits per color) from DT
Change-Id: Iad86b7121e4cdfbd981daba6f860fd8b97bca52a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-30 18:41:25 +08:00
Wyon Bi 74e3938979 video/drm: Rename rockchip-dw-mipi-dsi.c to dw_mipi_dsi.c
Change-Id: I409b32e945a2182e2948255b02644a98d16fcc21
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-30 18:41:24 +08:00
Joseph Chen 98e497fd55 arm: arm32_macros: fix coding style
Change-Id: I736139237d184aa7a35c840ea0ed3214d7e47e44
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-30 17:57:45 +08:00
Wyon Bi 8b8b9c4b96 video/drm: dsi: fix pll clock setting for synopsys phy
Fixes: 1c3c799444 ("video/drm: dsi: fix pll clock setting for synopsys phy")
Change-Id: I1b5ef22c6c63a99dd3f10ea03f31d50d3bfeea06
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-30 17:11:20 +08:00
Guochun Huang d84edf5f5c android: dtbo: enabled by default
Change-Id: I711a9f341b8126e159d4ab07f3fb7fb5e2fab9a2
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2019-01-30 17:10:04 +08:00
Joseph Chen 8e66ecd25d android: fix get wrong ramdisk address when avb verify
- add interface to get android avb enable state;
- get ramdisk from "ramdisk_addr_r" only when android avb disabled
  and CONFIG_ANDROID_BOOT_IMAGE_SEPARATE is enabled;

(fixes: 644e344 android: support loading android image separate)

Change-Id: I7280f911a0c5db851d119acb458b3f335dc28bce
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-30 16:51:22 +08:00
Joseph Chen ecc8fa7230 configs: rk3368: increase sys malloc_f len
Avoid malloc_f space for pre-reloc is not enough which
may cause memory override.

Change-Id: Ifa358f5700dfa8b1dc1240a210e414fb69fca914
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-30 16:21:54 +08:00
Wyon Bi 49ae8667cc video/drm: display: atomic display enable handling
Change-Id: If71e8590fb4e1b1e743d4b085e42b7530f518084
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-30 11:40:17 +08:00
David Wu 81681b40b9 rockchip: dts: rv1108-evb: Fix gmac dts configuration
Add the phy regulator supply for rv1108-evb, and fix the
configuration of clock_in_out.

But the phy will init failed because the phy-reset pin is
the same as the mipi data pin.

Change-Id: I14b0accd083742ca6eb4ae6bec1139ef5ba65db0
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-01-30 11:39:48 +08:00
Jason Zhu 0b06bacceb configs: rk3128x: enable CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION
Since sd does not have RPMB, so store secure data in security partition
for sdboot.

Change-Id: Ibf4557b5b2721657a6abf2f9e70e1b6c8893d7fc
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-01-29 14:03:05 +08:00
Jason Zhu 726087de6e crypto: support rockchip hardware crypto
Support: rsa & sha algorithm
Usage: Set CONFIG_RK_CRYPTO to enable rk crypto.

Change-Id: I2b6a920308fcdf46481bcf38fc6be532a02255bd
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-01-28 20:42:54 +08:00
Jason Zhu 564654eb9c lib: optee_client: add read&wite permanent attributes certificate
Change-Id: I83321afcf9d89b0cde0bcc78f1f02c847f85a115
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-01-28 20:42:54 +08:00
Shunqing Chen 73d987a762 configs: rk3126: add POWER_FG_RK816 support
Change-Id: Ie5111627ac3303a9beb6f9f778004c7b9cbeb020
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2019-01-28 15:39:27 +08:00