Commit Graph

49279 Commits

Author SHA1 Message Date
Joseph Chen 0f9d23ea98 dm: key: allow power key to skip irq handler init
At sometime, its parent driver would setup the main interrupt(e.g. PMIC).

Change-Id: I8d24266c48f515fc92c3529a5b6aa7a18d181af1
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-09 17:32:47 +08:00
Joseph Chen ded32713dc power: pmic: register interrupt controller as a irq chip
So that the child drivers can request their irq through the
generic interrupt framework.

Include: RK805/808/816/817/818.

Change-Id: I5556f2e926e850ac6717a05166eab5e19566d531
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-09 17:32:43 +08:00
Joseph Chen 92f4f0904b irq: add "dump_irqs" command support
Change-Id: Ia20bc3b0f4dc600f311ba3de0e75714b5d4c002c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-09 17:26:04 +08:00
Joseph Chen ae63f11992 irq: add trigger count and enable/disable stat
Change-Id: I3f29c4e3e420be0fe545a2f55f238345a17eaa6a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-09 17:26:04 +08:00
Joseph Chen 2c4e90c1f8 irq: add irq_handler_enable_suspend_only() interface
Change-Id: I3cda4c3a4ce5928be32eaa8b65ccd4e16946c116
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-09 17:26:04 +08:00
Joseph Chen 4176611909 irq: add virq irq-chip support
This patch support the device to add its interrupt controller as "irq chip"
into generic interrupt framework, the other driver can request its child
interrupt like a real hardware irq.

Example for PMIC:
    GIC-\
        |- ...
        |- GPIO-\
                |- ...
                |- PMIC-\
                        |_ virq_0
                        |_ virq_1
                        |_ virq_2
                        |...
                        |_ virq_n

Change-Id: I17716f3db494a85fc22b23ff18042771a6116da8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-09 17:26:04 +08:00
Joseph Chen cf34425241 irq: clean up code
Change-Id: I51c2713b7c42fa798fee6971a2c91d867042ef70
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-09 17:26:04 +08:00
Joseph Chen 0b84b74a16 rockchip: rk3308: more space for ramdisk image on aarch32
It seems ramdisk image needs more space.

Change-Id: Idcdd9ca5b568132381ee1951be603045e1d09d13
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-09 15:06:27 +08:00
Joseph Chen 443feaabc1 rockchip: test: add failed message for all cases
Failed message with prefix: "[UT-ERROR]: ..."

Change-Id: If44c174fc5e929d154851b4e2bf003c8a666f8b2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-09 14:57:09 +08:00
Joseph Chen 474718ff26 rockchip: test: storage: do not support user param
Default test case is enough.

Change-Id: Ic3627efc7b1cacd8b86d8303daa26af1f7fd32e7
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-09 14:57:09 +08:00
Shixiang Zheng d4a9114ac1 video/drm: rockchip_vop: workaround a issue of px30 treat rgb888 as bgr888
Change-Id: I188cc8c32077ade7eef72ebec1b4e54d5736c46a
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-08-09 11:52:15 +08:00
Joseph Chen 34d4668048 configs: rk3399: enable CONFIG_CMD_BOOTD
Change-Id: I527b63a7122603eaa6b5e525c5adb190d8c64cb9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-09 09:38:29 +08:00
Joseph Chen b50ed7b8b3 common: rkimg: add recovery mode reason
Recovery mode from:
	- MISC partition;
	- "reboot recovery" command;
	- recovery key pressed without usb attach;

Change-Id: I1e43260926acca827d43210023655321f470c3a5
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-08 18:23:30 +08:00
Joseph Chen 2b2ef88659 rockchip: boot_mode: remove unused recovery env set
Change-Id: I50920f3b24f37d5bea123c7166eb4ed9e17c7b1e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-08-08 18:12:13 +08:00
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