Commit Graph

49265 Commits

Author SHA1 Message Date
Jon Lin 39b850de47 spi: rockchip_sfc add SPI Nand support
Change-Id: Ie31ccacd44d2a7b286db49fd5f18f1ecda663a6f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-08-07 17:37:17 +08:00
Jon Lin c4d5fc6337 cmd: mtd: fix compiler error
Change-Id: Idc4bcd902c02b5dbd6f5aac631f3977f257f606f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-08-07 17:37:14 +08:00
Jon Lin b99d850cbd Revert "cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands"
This reverts commit 9671243e8d10defb06f2ea24fac138c87697d7fc.

Change-Id: Ie34f9feb06aa0525c9fa59d79ecf687a9a572491
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-08-07 17:37:09 +08:00
Jon Lin b62a0f65a9 Revert "cmd: mtd: fix compilation warning for help when SYS_LONGHELP=n"
This reverts commit a645831ca0962532660e4db3155a8be85e5ca312.

Change-Id: Ida32a1a893b88503cffe432705d5d02921dfab09
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-08-07 17:37:05 +08:00
Boris Brezillon 87a1a21db6 UPSTREAM: mtd: nand: Pass mode information to nand_page_io_req
The NAND sub-layers are likely to need the MTD_OPS_XXX mode information
in order to decide if they should enable/disable ECC or how they should
place the OOB bytes in the provided OOB buffer.

Add a field to nand_page_io_req to pass this information.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Change-Id: Idb70434140c0304cfc97d7f3c52cbeca349fdff8
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit f86787280b37e381f8d82f48583434d62dd16e27)
2019-08-07 17:36:08 +08:00
Jon Lin 933d0d3165 UPSTREAM: mtd: move NAND files into a raw/ subdirectory
NAND flavors, like serial and parallel, have a lot in common and would
benefit to share code. Let's move raw (parallel) NAND specific code in a
raw/ subdirectory, to ease the addition of a core file in nand/ and the
introduction of a spi/ subdirectory specific to SPI NANDs.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Change-Id: I44522b3af6f28b74e0cdaf249edae6189e261a3e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit a430fa06a4ac50e785fdbfb7f43c3cb14b35619c)
2019-08-07 17:36:02 +08:00
Lin Huang 90a8d4436c arm: rockchip: rk1808 set isp qos priority to 2
isp qos priority is 1, and if run with npu, sometime
it can not get right image, so set it priority to 2.

Change-Id: I3cc34ffe9c17c8a4d79f9ba71732fcab3c879511
Signed-off-by: Lin Huang <hl@rock-chips.com>
2019-08-06 14:22:39 +08:00
Kever Yang 2a77afce30 rockchip: test: add log message need by LAVA
The LAVA system need message from log to show the test result.
"<LAVA_SIGNAL_*>" for start, end, test case result key;
"<LAVA_TEST_RUNNER>: exiting" for test complete key

Change-Id: I13522bf82da69f105f439853fa5c4b32c9f3d1ff
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-08-06 10:45:05 +08:00
Kever Yang eae5fe32f1 rockchip: evb-rk3128: enable RK8XX pmic and BOARD_EARLY_INIT_R
This options help evb-rk3128 able to init regulator and rk818 current
limit.

Change-Id: I32da0d7e3a59427200bc19e013fe7469a8b99c9f
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-08-06 10:28:41 +08:00
Kever Yang 92da45ec70 treewide: Migrate CONFIG_BOARD_EARLY_INIT_R to Kconfig
Migrate the CONFIG_BOARD_EARLY_INIT_R option to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>

Change-Id: I92483d7ecb8f2449eda4b3cdd3bc5ede45ae6c8d
2019-08-06 10:28:41 +08:00
Kever Yang 68fff71bb3 rockchip: evb-rk3128: enable rk818 current limit early
Some rk3128 board like fireprime is using rk818, and it may limit
the current before change the pmic setting, the normal process
need to enable the fuelguage and its dts which is too late,
the U-Boot may HANG at regulator_power_on_init() in board_init().

Change-Id: I7bd058d8bd8fac01377c3cef6b3681c1c6110ee7
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-08-06 10:28:41 +08:00
Kever Yang 997d73f9dc board_r: re-order the board_early_init_r()
The board_early_init_r() suppose to be called before board_init(),
then the board callback functions in board_r will be:
- board_early_init_r()
- board_init()
- board_late_init()

Change-Id: I516fcbae91548e6e0ed469129ee5d11ee09b0a1e
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-08-06 10:28:41 +08:00
Joseph Chen 99d14b019e test: rockchip: refactor framework and update test case
Change-Id: I8406aaa6c4eacf2b2eb0fa6d787e2a46f45c8049
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-06 10:23:50 +08:00
Sandy Huang a2d2b88ee1 video/drm: rockchip_display: add return value for automatic test
Change-Id: I6cd4f7d4bd738c7f4cf59af3a2daf46365e7c1e9
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-06 10:23:50 +08:00
Lin Jinhan e7b6c6a93f dm: crypto: add SHA512 test
Change-Id: If7bb7bb559a9d4d5e70e1f27eabb8995c85872d9
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-08-05 17:51:21 +08:00
Lin Jinhan 2061474232 cmd: Kconfig: CMD_CRYPTO select SHA512
when CMD_CRYPTO is enabled, SHA512 will be selected.

Change-Id: I2a4dfa1ed024b9a6cc39417836e45ee1309fdfa1
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-08-05 17:46:03 +08:00
Lin Jinhan e7846385ca crypto: add crypto v2 SHA512 support
Change-Id: Idee2ada3d5da6aef2a170509da2efa6b1f6e4a9d
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-08-05 17:46:03 +08:00
Wyon Bi 3320fa9361 video/drm: dsi: resolved dependency between mipi_tx0 and mipi_tx1
It has a shared pll for mipi_tx0/mipi_tx1 on RK3288/RK3399,
so we need to initialize mipi_tx0 as necessary before enabling mipi_tx1.

Change-Id: I217c93232c6cfdfb7bf15142b903d44783120ab0
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-08-02 15:44:55 +08:00
Wyon Bi 2942bf186f video/drm: panel: allocate rockchip_panel objects per device
Change-Id: I7719c945c56f794769e16ead44f5aea9acc3cac3
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-08-02 15:44:55 +08:00
Joseph Chen 2227535d49 lib: add sha512 support
Porting from: https://tls.mbed.org/sha-512-source-code.

Update and follow sha1/256.c function name and coding style.

Change-Id: Idbe70b71e54e0e56a88aac5ec306c75fb2237f4f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-02 10:34:33 +08:00
Jason Zhu 993f1e5cc0 common: spl: mmc: support A/B system boot
Change-Id: I4b50a1daa2733c4926d90b4d489845b34a07eba3
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-08-02 09:23:44 +08:00
Jason Zhu 10dd5e8c27 rockchip: spl: set bootdev by atags
Change-Id: Ia47748b95bc2870d1bf7256306230458be42a77c
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-08-02 09:23:44 +08:00
Jason Zhu 6f678d2aa9 spl: record boot_device into spl_image and call
spl_perform_fixups

On some boards, we want to give the board/architecture-specific code a
chance to look at where the next image has been loaded from and
perform fixups before starting the next image.  This is of particular
importance, when we probe multiple devices for bootable payloads and
boot the first one found.

This change adds the following:
 - we record the boot_device used into the spl_image structure
 - we provide an extension-point for boards/architectures that can
   perform late fixups depending on a fully populated spl_image
   structure (i.e. we'll know the final boot_device and have info
   on the image type and operating system to be booted).

Change-Id: Iebca59a61979bc12eabe743c73dc2279e870e2ff
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-08-02 09:23:44 +08:00
Jason Zhu 7a4963852a rockchip: atags: add interface to set boottype by spl bootdevice
Change-Id: I2dd6435d1c70d18114680c469bce72555735f55e
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-08-02 09:23:44 +08:00
Jason Zhu 0cc16201bc common: spl: ab: add ab interface to get slot info
Change-Id: Iffd16dfcf9014b024e522639cbcd851f002b742e
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-08-02 09:23:44 +08:00
Joseph Chen 6bccab8707 fdt: fixup: move board_fdt_fixup the earliest than others
If we update fdt by create or move operation, the fdt nodes offset are
changed, but device node of DM didn't update its offset linking with the
fdt node. This makes driver can't parse the right fdt node info.

This is a DM framework bug, we need this patch to workarund it.

Change-Id: I18ee427fe2457ae42e5c6d1dab3e365fe87e06e4
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-01 17:46:49 +08:00
Zhangbin Tong 7e02d185cc configs: rk3328_defconfig: enable CONFIG_CMD_DTIMG
Change-Id: Ic15017931d22a0fa3c5b9f92aebc4a5bfe74d780
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2019-08-01 17:44:09 +08:00
Joseph Chen fbf99d9116 cmd: add "download" to enter rockusb/bootrom mode
Effect order: rockusb => bootrom.

Change-Id: Ie206f565e1c79e72c173c25f6970c93c8306332f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-01 10:05:41 +08:00
Joseph Chen a581116483 dm: console/serial: fix flushc() doesn't work
fixes: c1e72b20c9
(dm: console/serial: add flushc() support)

Change-Id: I0e0fae58b23bad52b4377d00e89f1b055d39f187
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-01 10:05:41 +08:00
wengtao 09d1ed2844 configs: rk3368_defconfig: enable CONFIG_GMAC_ROCKCHIP
Ethernet cannot get the burned MAC address through ifconfig
if we do not enable GMAC

Change-Id: I99c9a805a7f0d42c4b9a1a9b2c869ed6bfb1d4dc
Signed-off-by: wengtao <tao.weng@rock-chips.com>
2019-07-31 12:30:51 +08:00
wengtao 11c62a96b2 configs: rk3368: update by make savedefconfig
Change-Id: If60fc50a69bb1caa863d2438957a72fc96587f61
Signed-off-by: wengtao <tao.weng@rock-chips.com>
2019-07-31 12:30:03 +08:00
Jason Zhu 85bf7be3e6 common: spl: mmc: use block interface to find mmc device
Use block interface to find mmc device if enable CONFIG_SPL_BLK.

Change-Id: Ide47190c0648627d9853296a59053bdff282e4f7
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-29 15:35:17 +08:00
Jason Zhu 444036a7cd dm: mmc: support get MMC order through aliases in spl process
Since we use the aliases in U-Boot to get the MMC device order, and
sometimes we pass the spl boot device to U-Boot. This may be confused
that which MMC device is passed to U-Boot. So unify it together.

Change-Id: I8db5e90d9543004aff128322398edffad35b551b
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-29 15:35:17 +08:00
Jason Zhu 83ea92e1b2 disk: part: support get part info in spl
Change-Id: I79be3609f0a4f9a24cb82c5cb8090bde0eafaf85
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-29 15:35:17 +08:00
Jason Zhu 6e54cbfe00 disk: fix compile error when enable part efi in spl build
TEST:
./make.sh rk3308

CONFIG:
CONFIG_SPL_EFI_PARTITION
CONFIG_SPL_LIBDISK_SUPPORT

Error message:
disk/part_efi.c:1219:11: error: ‘part_test_efi’ undeclared here
(not in a function) .test  = part_test_efi,
disk/part_efi.c:1182:12: error: ‘is_pte_valid’ defined but not
used [-Werror=unused-function] static int is_pte_valid(gpt_entry * pte)
......

Change-Id: I231511eb54d998151aadff68f19db7ee8127f122
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-29 15:35:17 +08:00
Shunqing Chen e064ede6e6 fuel gauge: rk817/rk809: fix code error
Change-Id: I297015130144cb3c41e45a2030b729edd61498ce
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2019-07-26 09:49:39 +08:00
Jon Lin 14b86dc993 spi: rockchip_sfc update to compatible interface
1.update interface to get register base
2.update interface to scan subnote

Change-Id: I14b9f582219b775d8c94ea38ab4bb0527d05c37d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-26 09:18:44 +08:00
Joseph Chen fe404743f8 power: io-domain: initialize all io-domain
There maybe more than one io-domain.

Change-Id: I786544547b7c5da034e4d9685d60144c22266c3b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-25 16:23:07 +08:00
Tony Xu 6a4b5e01bf common: write_keybox: write a flag to security storage
The flag is used to help ta to decide where to read key

Change-Id: I3255cc86dbf37940326364fcc617f774f9cfd89b
Signed-off-by: Tony Xu <tony.xu@rock-chips.com>
2019-07-25 14:17:10 +08:00
Adam Ford 1490eb89f4 UPSTREAM: Convert CONFIG_SPI to Kconfig
This converts the following to Kconfig:
   CONFIG_SPI

This partly involves updating code that assumes that CONFIG_SPI implies
things that are specific to the MPC8xx SPI driver.  For now, just update
the CONFIG tests.  This also involves reworking the default for
CONFIG_SYS_DEF_EEPROM_ADDR so that we don't set it when we cannot make a
reasonable default, as it does not cause any compile failures.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
(cherry picked from commit f1b1f77060beadbfe9f42a3be00019bd025afbd6)
Change-Id: Ie9f15ada869105eb407f41d4df7eecbaa916b940
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-23 17:15:32 +08:00
Eugeniy Paltsev 300e61c1ec UPSTREAM: spi: dw: invert wait condition in dw_spi_xfer
While switching to readl_poll_timeout macros from custom code
the waiting condition was accidently inverted, so it was pure
luck that this code works at least in some conditions.

Fix that by inverting exit condition for readl_poll_timeout.

Fixes: c6b4f031d9 ("DW SPI: fix tx data loss on FIFO flush")

Change-Id: I741ce99a6b6cf57c248426549c0047d636d9e43e
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 9b14ac5cc2294ac3eaae92421abff27ed3e6caae)
2019-07-23 17:15:32 +08:00
Marek Vasut 7f3cd1e4f8 UPSTREAM: spi: sh_qspi: Make use of the 32byte FIFO
The QSPI controller on RCar Gen2 has 32byte FIFO. Instead of doing
the SPI transmission 1 byte at time, if there is a 32byte chunk of
data to be transferred, fill the FIFO completely and then transfer
the data to/from the FIFO. This increases the SPI NOR access speed
significantly.

Change-Id: Idc0280488ce052492579ee8e52f6084aa0840f3b
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit ea5512eb095067dda27930246792d2957feb9434)
2019-07-23 17:15:32 +08:00
Marek Vasut 9d14f4ef9b UPSTREAM: spi: sh_qspi: Replace ad hoc waiting with wait_for_bit
Replace the ad-hoc endless loops with wait_for_bit() with
reasonable timeout. Note that the loops had internal 10uS
delays, although there is no reason for those on this HW,
so they are dropped.

Change-Id: I0d004adc09e2fb32e88b17b0f060aecc0b7bda35
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 9573db654d1999a1dfde6469782aa8d7cf3d589f)
2019-07-23 17:15:32 +08:00
Marek Vasut 2b8aed016f UPSTREAM: spi: sh_qspi: Drop SPBDCR wait
Waiting for SPBDCR == 1 is not required and is covered by the
subsequent wait for SPSR_SPRFF, so drop this.

Change-Id: Ie943ac6feff57e478a7b2e7325eac9b5438c0374
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 118226495249268a35e604b2e6309801699f6224)
2019-07-23 17:15:32 +08:00
Marek Vasut 7950bf5ee5 UPSTREAM: spi: sh_qspi: Replace data types with short ones
Just replace unsigned {char,short,long} with u{8,16,32},
no functional change.

Change-Id: Ie9a9d331acb364d9b27a72a052a511a8da61c471
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 0e6fa20b14ed27ef667ddb31c8e7c620417ee4f5)
2019-07-23 17:15:32 +08:00
Marek Vasut 5d78ea082a UPSTREAM: mtd: spi: Add Renesas RPC SPI-flash driver
Add driver for the RPC block in SPI-flash mode. This driver allows
access to a SPI NOR flash attached to the RPC block and does not
support RPC in Hyperflash mode. Note that this block is extremely
selective when communicating with the SPI NOR.

Change-Id: I8b936d2862a1ef4bc2451d54a1808b7b49710b17
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit fbebea27e16eb760f1f2109a7535003bf359ba2b)
2019-07-23 17:15:32 +08:00
Tom Rini 10f7c0a965 UPSTREAM: Revert "spi: atmel: Drop non-dm code"
As we aren't quite able to convert some platforms with a very small size
limit in SPL yet, we need to revert this for now.

This reverts commit 7b0947787358c6b277431d6b76ce043d8bec641d.

Change-Id: I9953c2529a611950db1de168d772607329f827b7
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit e80fa2c2c0870f7c17e233ecc07552e1082c1513)
2019-07-23 17:15:32 +08:00
Tom Rini 71c98550b1 UPSTREAM: Revert "spi: atmel: Drop atmel_spi.h"
As we aren't quite able to convert some platforms with a very small size
limit in SPL yet, we need to revert this for now.

This reverts commit 37434db29be495ef41f204a97b8bf13b1418f97d.

Change-Id: I91af9f7fc85430b3c0c9c095f097e6692cac91ea
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 5270df2836761909864d9b548bf4b7f7f3a51484)
2019-07-23 17:15:32 +08:00
Christophe Leroy 5bda114b50 UPSTREAM: powercp: mpc8xx: move commproc.h
include/commproc.h is dedicated to the 8xx, rename it cpm_8xx.h and
move it into arch/powerpc/include/asm

Change-Id: I37b02101bd88b607f0f9eca79fdbb7cc1e85ed4d
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 18f8d4c60d26e6cd113461c5d716c64897c3f112)
2019-07-23 17:15:32 +08:00
Christophe Leroy 87e4c6020e UPSTREAM: powerpc: mpc8xx: Change CONFIG_8xx to CONFIG_MPC8xx
CONFIG_8xx doesn't mean much outside of arch/powerpc/
This patch renames it CONFIG_MPC8xx just like CONFIG_MPC85xx etc ...
It also renames 8xx_immap.h to immap_8xx.h to be consistent with
other file names.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
(cherry picked from commit ee1e600c13d16febd517ab7d0d2c243db174789b)
Change-Id: I564708bb6517b699749e8a54c013d032f785e459
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-23 17:15:32 +08:00