Commit Graph

49639 Commits

Author SHA1 Message Date
Joseph Chen b5038b6202 crypto: rockchip: v1: update print message
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic65aa48277f13b9dbf416a4ca19019d27ad0b546
2019-12-10 08:39:32 +08:00
Lin Jinhan c0e47d038c crypto: rockchip: v2: rk1808 is not support SHA512
Change-Id: Ic910d5e87657c80d454c4d8b6dc575ece2867f3e
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-12-10 08:39:32 +08:00
Lin Jinhan 8609b717aa cmd: crypto: unifiy hash output variable
rk1808 is not support SHA512.

Change-Id: Ica8c1a04553e862915417c36db6362df049e002e
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-12-10 08:39:32 +08:00
Joseph Chen 1d2a3f6ca3 dm: crypto: move head file to crypto.h
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iac0f2e5eec7d0370182f7b6a2c904b4542bbbc37
2019-12-10 08:39:32 +08:00
Yifeng Zhao 4333cc9aff rockchip: drivers: clk: rk3328: add spi clk config for spl and uboot
Change-Id: I12da02d52e3c4aec64fbd6a378cd40e96c3775ce
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-12-06 14:28:32 +08:00
Yifeng Zhao 08ab3f3cb0 rockchip: drivers: spi: add compatible info for rk3328 and rk3066
Change-Id: I9ffda6e902f1639f90c5383ed4df5fc8aad11c70
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-12-06 14:28:32 +08:00
Guochun Huang e2721f2989 drm/rockchip: lvds: Add support for MEDIA_BUS_FMT_RGB101010_1X7X5_SPWG/JEIDA bus format
Change-Id: I41b14d4a9fa2a19fb6df177eb92c0d2cf1c2fb3b
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2019-12-04 16:23:24 +08:00
Joseph Chen 2eb7260f2e cmd: fdt: use gd->fdt_blob as default fdt address
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I16a413bcbca17842cd560367ebae6454a63354f2
2019-12-03 20:23:51 +08:00
Joseph Chen d625acc28e rockchip: board: fix cru phandle fixup failed
Fixes: (2a5ad8b rockchip: board: treat 'u-boot,dm-spl' as 'u-boot,dm-pre-reloc')

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia0e9c875e0f341ef50d2c47911b166ebd1ebc369
2019-12-03 13:09:21 +08:00
Joseph Chen b455f42c3d core: root: fix reloc condition error '||' => '&&'
Fixes: (930ceb1 driver: core/input: treat 'u-boot,dm-spl' as 'u-boot,dm-pre-reloc')

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie0dad067451bc35ade865fbd9e52f43d0ec83aab
2019-12-03 13:09:21 +08:00
Joseph Chen 8226ac627b rockchip: board: print DTB hash result
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icc622b51b415f8aeaf1333dba1491426b906e806
2019-12-03 13:09:20 +08:00
Joseph Chen b554a8f003 common: board_f: print new fdt address
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I61a9e6e65a5a81639424f27bda4d389e002f1132
2019-12-03 12:58:01 +08:00
Joseph Chen 83c9bd4bbe board: rockchip: pass fuse programmed state to kernel
This flag is passed from miniloader by atags.

Change-Id: Ib39a23f762d64e9326222d544db8aeca037b0b36
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-12-02 14:07:49 +08:00
Joseph Chen 7a6f40248d rockchip: board: fix always entering recovery on normal boot U-disk
As usual, entering recovery depends on Misc partition content.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic3c2d13e4b087c0408989edf435ef27a44cac5d7
2019-12-02 14:07:49 +08:00
Jason Zhu f0aa8c5d41 rockchip: board: dump soc clk before use kernel dtb
When enable DEBUG, dump soc clk before use kernel dtb, so that
we can get the clock status in U-Boot before load and use
kernel dtb.

Change-Id: Iee4244bde4ddd8ec1207f1c7cf6942c5b4e8f876
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-12-02 11:26:18 +08:00
CanYang He c3339d2b00 driver: ram: rockchip: fix some soc can not use sdram_common api
Change-Id: Ifef625c090bfcc33fd077d3562e8a6a37ead98b9
Signed-off-by: CanYang He <hcy@rock-chips.com>
2019-11-29 18:28:14 +08:00
Joseph Chen 783f7f6ecf make.sh: add rk1806 build support
Build cmd: ./make.sh rk1806

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If04fd324b4ce8e196e711e50275dd26b0919655b
2019-11-29 17:05:35 +08:00
Joseph Chen 4887899d2f configs: add rk1806 defconfig
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I6e064c470e3f2ea6ea1aa622fc0776ea73675b7a
2019-11-29 17:05:35 +08:00
Joseph Chen 760b0468de rockchip: Kconfig: add RK1806 SoC
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I12bc82d47aa11afcececc7ce7b8f7d7cbecb8336
2019-11-29 17:05:34 +08:00
Joseph Chen ed7d08b837 rockchip: rk1806: add sip version smc call
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I833adf5cd86f45c0f2e9d98866d7c17adb3baaf0
2019-11-29 17:05:34 +08:00
Joseph Chen 94001eb016 rockchip: smccc: include arm-smccc.h in rockchip_smccc.h
So that the other drivers don't need to include arm-smccc.h

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If6638ecf2d4a9e6b33a04215df40c19314a764cc
2019-11-28 14:48:43 +08:00
Joseph Chen 59d931994c scripts: add README for rockchip scripts and tool
Provide a quick reference to developers.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I7cb96ad558637a5d06e2e450070bc3a8bda23043
2019-11-28 14:48:43 +08:00
Joseph Chen 25a2be8e4d scripts: repack-bootimg: fix os patch level "m" equal 0
Traceback (most recent call last):
  File "./scripts/mkbootimg", line 234, in <module>
    main()
  File "./scripts/mkbootimg", line 224, in main
    args = parse_cmdline()
  File "./scripts/mkbootimg", line 210, in parse_cmdline
    return parser.parse_args()
  File "/usr/lib/python2.7/argparse.py", line 1690, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1722, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1928, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/lib/python2.7/argparse.py", line 1868, in consume_optional
    take_action(action, args, option_string)
  File "/usr/lib/python2.7/argparse.py", line 1780, in take_action
    argument_values = self._get_values(action, argument_strings)
  File "/usr/lib/python2.7/argparse.py", line 2220, in _get_values
    value = self._get_value(action, arg_string)
  File "/usr/lib/python2.7/argparse.py", line 2249, in _get_value
    result = type_func(arg_string)
  File "./scripts/mkbootimg", line 172, in parse_os_patch_level
    assert m > 0 and m <= 12
AssertionError

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I625717d27b9e807c4a2afee6b38eca9750ee4e41
2019-11-28 11:38:16 +08:00
Joseph Chen c641fb242b common: Kconfig: select SHA1 if !DM_CRYPTO for android image verify
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id010fe3e5947ad19fdba8a2dd97f421d83282105
2019-11-27 20:53:34 +08:00
Xiao Ya peng c6d268e39e configs: rk322x: enable CONFIG_CMD_DTIMG
Change-Id: I2565da9b3ce0475709cec2ec5d2f51f4383655ea
Signed-off-by: Xiao Ya peng <yp.xiao@rock-chips.com>
2019-11-27 16:41:54 +08:00
Tony Xu 53bea680ec common: write keybox: always write storage flag to security sorage
Change-Id: Iaa536eb51216f46a35ae5999ed19ad5703509b6a
Signed-off-by: Tony Xu <tony.xu@rock-chips.com>
2019-11-27 11:31:04 +08:00
Algea Cao a872a3be27 Revert "drm/rockchip: hdmi: init vmode picture_aspect_ratio"
This reverts commit 888e59c91d.

The same mode may have different picture aspect ratio.
Some TV modes support only one of picture aspect ratios.
If the picture aspect ratio of this mode do not match in
the whitelist, the mode will be unavailable.

While HWC can make kernel don't report the picture
aspect ratios by ioctl, which avoids the judgment of the
picture aspect ratio in the whitelist.Some TVS will not
suffer from a loss of resolution.

Change-Id: I1c9b3f3ff9286ac5fcf8443d5d7544e2cd0cd0f2
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-11-27 11:30:21 +08:00
David Wu 61ab4d721f power: io-domain: Don't printf sudev->name when get regulator failed
This patch fixed the following issue:

Stack:
       [< 00295020 >]  strnlen+0x10/0x28
       [< 002965b4 >]  vsnprintf_internal+0x61c/0xa84
       [< 00296a6c >]  vscnprintf+0x50/0x74
       [< 00296c58 >]  printf+0x94/0xb4
       [< 00263e04 >]  rockchip_iodomain_probe+0xcc/0x19c
       [< 0022e310 >]  device_probe+0x21c/0x268
       [< 0022f3e8 >]  uclass_get_device_tail+0x1c/0x40
       [< 0022f6dc >]  uclass_first_device+0x30/0x44
       [< 00263cdc >]  io_domain_init+0x2c/0x50
       [< 00202da8 >]  board_init+0xb4/0xc4
       [< 0027a480 >]  initcall_run_list+0x58/0x94
       [< 00214fbc >]  board_init_r+0x20/0x24
       [< 00201b24 >]  relocation_return+0x4/0x0

Change-Id: I1afc2613a1dba32e7f9c6ad2165e80853d421187
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-11-27 11:30:07 +08:00
Joseph Chen 27d36fbda0 cmd: crypto: make foo_data[] cacheline aligned
Crypto-v1 needs flush_dcache() for SHA, this avoids the warning
message "CACHE: Misaligned operation at range ...".

Change-Id: Ie766af60db83ec1f290103c2059863fa50d0a0ad
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-27 11:13:54 +08:00
Joseph Chen cc3d674144 linux: compiler-gcc: add __cacheline_aligned
Change-Id: I0cc437885aa3a1e6637c1aeee9df718ac61fa914
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-27 11:13:54 +08:00
Wu Liangqing 5e941216fb configs: rk3126: add CONFIG_ROCKCHIP_VENDOR_PARTITION
Change-Id: Id0212bae4bd018404cb2d09f415a8ca207010706
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2019-11-26 16:03:39 +08:00
Zhihuan He 1f404b074d rockchip: atags: remove atags useless func when build tpl
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
Change-Id: I496fde41388eee0d16d206d892c7b68945b36f56
2019-11-26 14:42:06 +08:00
YouMin Chen 8ccbf1ca60 rockchip: atags: the macro definition about memset/memcpy
If have define USE_ARCH_MEMSET/USE_ARCH_MEMCPY,it don't need
to realize memset/memcpy for rk_atags whit TPL.

Change-Id: I464f364edf711573dbad61302ff9e01f3a0edbf2
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2019-11-22 10:36:23 +08:00
Joseph Chen 763ecaa306 scripts: stacktrace.sh: use grep to filter lines
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3817c654f9391dd6b6a216333a3a8c9fc519c0d3
2019-11-22 08:42:16 +08:00
Joseph Chen 270d4d86b3 core: read: add dev_read_s32_default()
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I174670da004001feafcec568e978d2dfd9f55ef9
2019-11-22 08:42:16 +08:00
Jason Zhu 2442fbadc2 fastboot: support cmd boot-recovery & reboot-fastboot
Change-Id: I01693db8304c8fb1804c4342501cdbb38f8ccf2a
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-11-22 08:41:53 +08:00
Jason Zhu fd633ddcf6 android: add function android_bcb_write
Change-Id: Ie65068dc4fca751a9bcc959c56209aaf4729f638
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-11-22 08:41:53 +08:00
Joseph Chen f61a2da6e8 usb: gadget: validate NULL string before strncpy()
The variable "s" is passed as NULL(i.e 0) When g_dnl_set_serialnumber()
is called from hdelete_r() originally.

The memory 0~1M is secure for ATF on rockchip arm64 platforms,
so the strncpy() accesses 0 address and causes a data-abort.

This issue occurs on deleting env "serial#".

Change-Id: Idbf76d26809ab8b195ff4f8193e2eeac99692289
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-20 11:40:22 +08:00
Kever Yang 6de0075c5d rockchip: Kconfig: enable CONFIG_DEBUG_UART_BOARD_INIT for all SoC
Some SoC may missing this config, this is need by all the SoC, so set it
at higher level.

Change-Id: I16e935635cce61d02d6641992483baf98f9fe71b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-11-19 17:22:04 +08:00
Kever Yang c90232ab81 rockchip: ram: add support for rk3326 evb
PX30 evb is ddr3;
RK3326 evb is lpddr3

Change-Id: I02c365e8c0f9b5e6cfa47ad7c5972d6a8ce327d9
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-11-19 16:52:51 +08:00
Kever Yang e82920f397 rockchip: px30: Enable support for UART5
Because the UART2 IOs are mux with SDcard, in order to use SDCard,
we need to use UART5(on evb RPi connector) instead of UART2M0

Change-Id: Ibeab51636eb748f389d9211193c0b5682c266c9e
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-11-19 16:52:42 +08:00
Kever Yang f546c94580 rockchip: rk3288: no need to check PLL setting.
Remove assert to make DEBUG work.

Change-Id: Idd41066f98c759b4fefe25c8715138c1c54df418
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-11-19 16:49:37 +08:00
Joseph Chen ef473e3642 regulator: pwm: remove init voltage setting
Regulator uclass takes over this job, avoid to init twice.

Change-Id: Idea56143bd7008742936d3bbe1ebadb00c683a47
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-19 14:25:46 +08:00
Dayao Ji 0a34d7e5db common: android: support A/B with DP support
Need to pass androidboot.force_normal_boot=1 instead of
skip_initramfs when A/B supporting dynamic partition.

Change-Id: I1748690d04d4ef16e121d8dc88f69745a3cbb77d
Signed-off-by: Dayao Ji <jdy@rock-chips.com>
2019-11-15 10:00:47 +08:00
Jon Lin ad65dd86b6 mtd: spinand: support GD5F2GQ4UExxG
Change-Id: If7b0c17129b9a914fc6854959cf074b33b876a5e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-11-15 09:09:30 +08:00
Andy Yan a05d668445 rockchip: rv1108: reduce u-boot.bin size below 512KB
According to rkcommon.h, when back to bootrom from ddr
initializing, the next payload size is defined RK_MAX_BOOT_SIZE,
which is 512KB.

So we disable some cmd module here.

Current u-boot-dtb.bin is 508KB.

Change-Id: I1ff97907c19fd33f428627a6de66ec790514599a
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-11-15 09:09:01 +08:00
Andy Yan df7b19b0b1 rockchip: dts: rv1108-evb: enable sdmmc
Add sd card support, tested on rv1108 evb v11.

Change-Id: I61e25c78c23c4f774a314b9489f81dab1d990531
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-11-15 09:09:01 +08:00
Andy Yan 2bfd4c143b rockchip: dts: rv1108: increase sdmmc drive strength to 8ma
sync from linux kernel develop-3.10:
"ARM: dts: rk1108: increase sdmmc's drive strength to 8ma"
(sha1: 90ac5cb61aabf2e344c10b4c55954d6a3f41bd55)

Change-Id: Ifd38ced2b0a9cada25e9348f455454c9edbc7bd8
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-11-15 09:09:01 +08:00
Joseph Chen a84f21ebb8 rockchip: add misc BCB message offset compatibility
Rockchip platforms defines BCB message at the 16KB offset of
misc partition while the Google defines it at 0x0 offset.

From Android-Q, the 0x0 offset is mandary on Google VTS, so this
patch is a compatibility according to android image 'os_version'.

Android os version >= 10 is at 0x0 offset, otherwise at 16KB offset.

Change-Id: I54a7674e2dc2e0c29fc624f17b4453663c9ea462
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-14 11:08:45 +08:00
Joseph Chen c092b1390d common: image: provide BCB offset according to android os version
Rockchip platforms defines BCB message at the 16KB offset of
misc partition while the Google defines it at 0x0 offset.

From Android-Q, the 0x0 offset is mandary on Google VTS.

Change-Id: Iac36d421ed605684353c30bfe0e9982bdd5de065
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-14 11:08:45 +08:00