Commit Graph

51256 Commits

Author SHA1 Message Date
Jason Zhu a0166cc6be mtd: Kconfig: add a Kconfig option to enable the support for MTD block write operations
This allows using CONFIG_IS_ENABLED(SPLMTD_WRITE) to compile out code
needed only if write support is required.
The option is added for u-boot and for SPL.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ia48169fcd601ad51d1723923ed71d610901275e1
2021-01-06 15:29:34 +08:00
Yifeng Zhao 5beee4e829 arch: rockchip: fit misc: fix complie error
arch/arm/mach-rockchip/fit_misc.c:26:12: error: ‘fit_image_check_uncomp_hash
defined but not used [-Werror=unused-function]

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: If959d9e946351ce41dd1374b4c69f182f5273d39
2021-01-06 14:54:48 +08:00
Yifeng Zhao c7c3548ddf drivers: Makefile: add block layer while enable rknand
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I8fc7b3d27e32d767da3597d3d5b7a6aa4a48ca40
2021-01-06 14:54:48 +08:00
Joseph Chen 791045ea0f common: android: AVB support lz4 kernel
The key point is to get kernel compression type by:
bootm_parse_comp((void *)(ulong)hdr + hdr->page_size);

Because if hdr->kernel_address is set as decompress
address before this comment, android_image_get_kernel_addr()
would return error kernel offset, result in a wrong
compression type from android_image_parse_comp().

Tested successfully on RK3568 EVB board:
 - LZ4 Image + AVB full partition load
 - LZ4 Image + AVB separate load
 - LZ4 Image + none-AVB separate load
 - Image + AVB full partition load
 - Image + AVB separate load
 - Image + none-AVB separate load

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic5385843f036b52eb7a286b7194852accfb52225
2021-01-06 14:44:05 +08:00
Jason Zhu 1f5c7b6414 spl: fit: support decreasing 1 if verify fail when enable a/b
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I922b929ac37181f61e820b6c2b2de750e816a99d
2021-01-04 19:23:48 +08:00
Jason Zhu 093f4d990f spl: ab: support decreasing 1 in spl
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ie3bad33476e25bbcbf9d845abc87c6e075671e0c
2021-01-04 17:12:44 +08:00
Jason Zhu 153f99a6bf configs: rk3568: support mmc write in spl
The a/b system info need be stored in spl.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I8296a52ad50a4afa0f4632d589890011c7ff4720
2021-01-04 17:12:37 +08:00
Jean-Jacques Hiblot 9127fbf440 UPSTREAM: mmc: add a Kconfig option to enable the support for MMC write operations
This allows using CONFIG_IS_ENABLED(MMC_WRITE) to compile out code
needed only if write support is required.
The option is added for u-boot and for SPL

Change-Id: Ibb3836ed8713e491238460783a85ee1808770f66
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
(cherry picked from commit d6400c3f8520bb9a203fe397039279c80f093c27)
2021-01-04 17:12:30 +08:00
Joseph Chen e156df4354 scripts: fit: validate image type of source file
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id04a4ef397fe19ffac3f09daeea6c5ebc9294dcd
2020-12-31 18:19:44 +08:00
Ziyuan Xu 993c3b78b3 configs: rv1126-emmc-tb: disable pinctrl for tb
Change-Id: I67932a0c17f8d0f9cab858421ae40965d583a8bd
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2020-12-31 14:46:55 +08:00
Joseph Chen 5ead1aa09a rockchip: spl: only allow do reset after dm setup
Without this, there is a dead loop path:

hang() => spl_hang_reset() => do_reset() => failed to reset => hang()!

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8553bde97bd45ca63e5a12aca1acfc939301b04f
2020-12-31 14:40:33 +08:00
Ziyuan Xu 658285c1fb clk: rockchip: rv1126: mux aclk_pdbus according to frequency
Aim to reduce power consumption, cpll should be gated and the clocks
will mux to non-cpll.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: If9d1b48cdb237cf38133523a4fc20fa6e87e8e62
2020-12-31 14:39:56 +08:00
Algea Cao 9db037e4cc configs: rk3568: Enable hdmi config for rk3568
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I08edf492932839bcc59093e231b5356c1983dc31
2020-12-31 14:38:43 +08:00
Algea Cao 5ccad8f6bf drm/rockchip: hdmi: Support RK3568 dw-hdmi
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I3c9275a44c519c3927ea7199147a738d4c2a1334
2020-12-31 14:38:43 +08:00
Algea Cao 10ee9f5b51 drm/rockchip: vop2: Add support for hdmi
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I6043fad382c48670c765bce67a3f291a0fc66bd5
2020-12-31 14:38:43 +08:00
Joseph Chen 1d22de7f19 rockchip: rv1126: rename periph device region
Adding to whitelist.txt:
	CONFIG_PERIPH_DEVICE_START_ADDR
	CONFIG_PERIPH_DEVICE_END_ADDR

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia07a467489e52b7580351829768437dc67e71833
2020-12-30 17:48:20 +08:00
Joseph Chen 173e789e96 make/fit.sh: support replace components of uboot.img
args: --uboot [bin] --fdt [bin] --tee [bin] --mcu [bin] --bl31 [elf]

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4453cd48d352592fb232b67c5f70d04845d00545
2020-12-30 17:45:34 +08:00
Joseph Chen 2708ed29a4 rockchip: fit: update gunzip() max image size to 2MB
RK3568 U-Boot is over 1MB size.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ibe2000e4472c57c8d91b38b1fc2ce3d23c27a3db
2020-12-30 17:34:45 +08:00
Joseph Chen 3e9875cd72 spl: fit: assume the max size of U-Boot/tee/atf is 2MB
RK3568 U-Boot is over 1MB size.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I743cf403ddfb63d9452a2d6781d99ebdd5313e9c
2020-12-30 17:33:11 +08:00
Joseph Chen ac6373ccc8 configs: rk3568: enable optee-client v2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib5eaf36b07bfb88a140669e9755eb5e0a120e83c
2020-12-30 17:02:32 +08:00
Joseph Chen f62abd3813 configs: rk3568: enable android image hash verify
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib4291c46e46c2d1edffa0338d18f1cc0dae65008
2020-12-30 17:02:32 +08:00
Joseph Chen b800cd5a0c Revert "scripts: fit.sh: remove unused property but not initial as 0"
This reverts commit f269c7e952.

Reason: It breaks software RSA verify.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2dd1676d57c3860f3d278ef61935c9e77435a30e
2020-12-30 17:02:32 +08:00
Wenping Zhang 449de1d380 video/rk_eink: Only initilize the eink driver on the first time.
This commit fix hardware without eink screen continue outputing
eink log during charging.

Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: I1b14f0cd921342d1efb83dc72be6829a157be6d9
2020-12-30 16:05:17 +08:00
Jason Zhu c6d7f8e4f0 spl: ab: print a/b info in spl
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I2f1b05a6e12e53988a84b8ac876e80cd722fcaff
2020-12-30 16:04:51 +08:00
Jason Zhu fb4fd3b6ad configs: rk3568: support a/b system for spl
If support a/b system in uboot, please slect CONFIG_ANDROID_AB.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I7465bbfd5ed526805df02796674bdc1ef769aefb
2020-12-30 16:04:51 +08:00
Jason Zhu effae6d715 disk: part: fix can not find partition with suffix "_a" & "_b"
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I3c4eb52101b77abec367a16cc9c2477b9ec8da04
2020-12-30 16:04:51 +08:00
William Wu edaca8fc29 rockchip: rk3568: assert reset the pipephys to save power
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ie2df9df2a7312debf215276450476537f5c29bad
2020-12-30 16:04:06 +08:00
Jianqun Xu 9d8aa448b5 common: fix hex print format to %#010lx
Before this patch:
   Flattened Device Tree blob at 08300000
   Booting using the fdt blob at 0x8300000

With this patch:
   Flattened Device Tree blob at 0x08300000
   Booting using the fdt blob at 0x08300000

Change-Id: Ibd5f1cfc07791eff829512d1820eb3c8c0caa007
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-12-30 08:38:31 +08:00
David Wu 34ddf661ae arm: dts: rk3568: Add gmac node
Change-Id: Ie75274260889afa7cb5aa1b3814d691542358974
Signed-off-by: David Wu <david.wu@rock-chips.com>
2020-12-29 18:06:54 +08:00
David Wu 2a2aae6ca3 arm: dts: rk3568: Fix typo in gmac1_clkin
Change-Id: Ice4a313d004fa9f9b193d7258b0216187a4e5be2
Signed-off-by: David Wu <david.wu@rock-chips.com>
2020-12-29 18:06:54 +08:00
David Wu a38f1c5ac9 configs: Enable ethernet support for rk3568
Change-Id: I74437c9da16cde98469c6761d73074c6041f0520
Signed-off-by: David Wu <david.wu@rock-chips.com>
2020-12-29 18:06:54 +08:00
David Wu 33a014bdc9 net: gmac_rockchip: Add rk3568 gmac support
Change-Id: I3de9899a27160f5acccc04cd1ac03b406e4b3296
Signed-off-by: David Wu <david.wu@rock-chips.com>
2020-12-29 18:06:54 +08:00
David Wu befcb6277d net: gmac_rockchip: Prepare for rk3568 gmac support
Change-Id: Iada7af00c052a7ebe7e6b702ada2bd2ef585a913
Signed-off-by: David Wu <david.wu@rock-chips.com>
2020-12-29 18:06:54 +08:00
David Wu ee1ce3c58a pinctrl: rockchip: Use gmac1_rxd0 to select M0 and M1
Change-Id: Idba7d638d4fc55b1c163a3fa104c04345a74e51c
Signed-off-by: David Wu <david.wu@rock-chips.com>
2020-12-29 18:06:54 +08:00
Joseph Chen 00f93bdf98 drivers: pci: separate SPL & U-Boot proper build
It fixes SPL compile issue after PCI enabled.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic3d4a464defd2074be083effd25f513ae19d2e01
2020-12-29 16:35:35 +08:00
Jason Zhu ee7b0fb8d5 rockchip: board: fix initial otp index as again and again
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ib520b342edd6e404d8bb4167d0280e8589f38fb4
2020-12-29 14:56:56 +08:00
Jon Lin 9148182d3c mtd: mtd_blk: Support SPI Nor blk_derase
Change-Id: I1be6dfc1fa7acd25f98031f48002abf13479418c
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-12-29 14:45:29 +08:00
Jon Lin 1e5036b9d9 rockchip: vendor: Support MTD SPI Nor
Change-Id: I67d01db2d335abfd483596a2f7033d1e38cffaf5
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-12-29 14:45:29 +08:00
Tang Yun ping 9ff9a8fead rockchip: rk356x: setting ebc priority to 0x3
Enable all power domain except npu and gpu.

Signed-off-by: Tang Yun ping <typ@rock-chips.com>
Change-Id: I3757b8770b6d5a2a96b9d0945bbe536b6d387741
2020-12-29 14:43:52 +08:00
Guochun Huang bee25ee674 video/drm: remove DSI special assign
these flags will be used by other output interface, so remove
DSI special assign.

Change-Id: Ieb3a20e62c2b899e6757635eced86b85e1fb22f7
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2020-12-29 14:43:12 +08:00
Wyon Bi 0309acda6d configs: rk3568: Add support for edp
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Id13e7f7964bbddfaa2ff8eb13ec58336abdc0a2b
2020-12-28 09:54:04 +00:00
Wyon Bi 699c29a5d8 video/drm: analogix_dp: Add support for rk3568
This patch adds support for Analogix eDP TX IP used on RK3568 SoC.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ia48f1f99f336d4d98d5fba4e5fd15a35bdbaf373
2020-12-28 09:54:03 +00:00
Wyon Bi c5b1fb658e video/drm: Add dp helper
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I559f7288038c9b1128f64e56ea7f156a1f643f33
2020-12-28 09:54:03 +00:00
Wyon Bi a6285d17cb video/drm: analogix_dp: Move PLL lock check to analogix_dp_set_link_bandwidth()
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Iffd2ff42de9102cf0293cf7bb68422dd6331474b
2020-12-28 09:54:03 +00:00
Wyon Bi 253c2dc8a6 video/drm: analogix_dp: Simplify analogix_dp_{set/get}_lane_link_training helpers
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I5e0a90c8a1fd132567635a7751c1ca4ade38e692
2020-12-28 09:54:03 +00:00
Wyon Bi d90a0d9f94 video/drm: analogix_dp: Implement detect callback
Change-Id: I1e6746768092747920afcb3af07e36c1ecae9856
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-12-28 09:54:03 +00:00
Joseph Chen 2b75673259 configs: rk3568: enable decompress image
Do decompress in post image process.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I018d346bf28878e41709d1b50d6c1e097fa6cb6f
2020-12-28 16:52:44 +08:00
Joseph Chen acfb487b4a configs: rk3568: sync with make savedefconfig
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib3c7af85ca5bd9989c6f522f00320c7d6f6f18f0
2020-12-28 16:52:44 +08:00
Wyon Bi cf9110094e phy: Add driver for Rockchip Naneng eDP Transmitter PHY
DPTPHYT22ULP is designed for chips that perform eDP/DP data
communication while operating at low power consumption.
The main link is a multi-gigabit transmitter macro which
enable speed up to 4.0Gbps data transmitter with optimized
power and die size, also it can be easily fabricated and
implemented in a video system. The AUX channel is a halfduplex,
bidirectional channel consisting of one differential pair,
supporting the bit rate of about 1Mbps.

Macro consists of multi-main link transmitter channels,
AUX channel, one PLL and bias-gen unit. The main link
transmitter performs dedicated P2S, clock generator,
driver with preemphasis and self-test. Each of the channels
can be turned off individually.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ic60d8bb86a53f686e8c46323b58d099c727a36d3
2020-12-28 16:41:39 +08:00
Wyon Bi 672d3078db phy: Add DisplayPort configuration options
Allow DisplayPort PHYs to be configured through the generic
functions through a custom structure added to the generic union.
The configuration structure is used for reconfiguration of
DisplayPort PHYs during link training operation.

The parameters added here are the ones defined in the DisplayPort
spec v1.4 which include link rate, number of lanes, voltage swing
and pre-emphasis.

Add the DisplayPort phy mode to the generic phy_mode enum.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I472cc21ccf19ae55888085500bfad27787cc3074
2020-12-28 16:41:39 +08:00