Commit Graph

17559 Commits

Author SHA1 Message Date
Lin Jinhan a3341e9017 drivers: crypto: drop rng api from crypto driver
rng module is not belongs to crypto driver anymore.

Change-Id: I6d837397621267edb586034ff87b82fc33a30d5b
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-01-30 09:02:02 +08:00
Sughosh Ganu 28507ac336 UPSTREAM: dm: rng: Add random number generator(rng) uclass
Add a uclass for reading a random number seed from a random number
generator device.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit a2487684003b0bc380955e1a38cdd71da3ca4366)

Change-Id: Ife2287132db695181d663653f2ceaab0e343b41f
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-01-29 17:50:52 +08:00
Joseph Chen 40db74046c power: pmic: rk8xx: implement suspend/resume callback
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I46b13886fcb3e7733155cd6f5fce15473c439da3
2021-01-27 17:11:30 +08:00
Joseph Chen 2a7051be6c dm: pmic: add suspend/resume callback
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iaa3b0b7f7b3a0563370baace876e095deb64c28f
2021-01-27 17:11:30 +08:00
Jianqun Xu 7862d7bff3 UPSTREAM: core: uclass: fix to u32 for phandle of fdt
The function has a little fix during upstream review, do fix to sync
with upstream.

Change-Id: I9e1c43a660b2f83395d1639aa962988ca04494e5
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-19 10:01:24 +08:00
Jon Lin 8c4105cc49 mtd: spinand: Support BWJX08K
Change-Id: Iddcc569cb4865bc73d0829fd5e6a33c7c85632b5
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-01-19 10:00:49 +08:00
Joseph Chen e3a5bc90c0 rockchip: rk3568: add distro boot support
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id1edbf251a363698f07b2b9c069fd0890c7c55ff
2021-01-17 16:03:55 +08:00
Finley Xiao fd7b518283 rockchip: otp: Add support for rk3568
This adds the necessary data for handling otp on the rk3568.

Change-Id: Id5e8a3a1561604bb307ef17e06d11d7e62d8a840
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-01-13 09:32:47 +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
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
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 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
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
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 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
Wyon Bi 0725058a7d phy: Add MIPI D-PHY configuration options
Now that we have some infrastructure for it, allow the MIPI D-PHY phy's to
be configured through the generic functions through a custom structure
added to the generic union.

The parameters added here are the ones defined in the MIPI D-PHY spec, plus
the number of lanes in use. The current set of parameters should cover all
the potential users.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: If546789f44b477b9f46507e70ad9a59a4ab35288
2020-12-28 16:41:39 +08:00
Wyon Bi 4ef09685de phy: Add configuration interface
The phy framework is only allowing to configure the power state of thePHY
using the init and power_on hooks, and their power_off and exit
counterparts.

While it works for most, simple, PHYs supported so far, some more advanced
PHYs need some configuration depending on runtime parameters. These PHYs
have been supported by a number of means already, often by using ad-hoc
drivers in their consumer drivers.

That doesn't work too well however, when a consumer device needs to deal
with multiple PHYs, or when multiple consumers need to deal with the same
PHY (a DSI driver and a CSI driver for example).

So we'll add a new interface, through two funtions, phy_validate and
phy_configure. The first one will allow to check that a current
configuration, for a given mode, is applicable. It will also allow the PHY
driver to tune the settings given as parameters as it sees fit.

phy_configure will actually apply that configuration in the phy itself.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Icd170eaef9a1dbe21e0c7664b797a27877c703b5
2020-12-28 16:41:39 +08:00
Jean-Jacques Hiblot 1bac1f3947 UPSTREAM: drivers: phy: Handle gracefully NULL pointers
For some controllers PHYs can be optional. Handling NULL pointers without
crashing nor failing, makes it easy to handle optional PHYs.

Change-Id: I11c95af8c1b54f2dad41891f6d0edb8d9fac6606
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 4e1842988364446ba0cf2171d1eebb53c15bc44e)
2020-12-28 16:41:39 +08:00
Jason Zhu 3a94f0b1f8 rockchip: rv1126: redefine the OTP_UBOOT_ROLLBACK_OFFSET
Redefine it as byte address.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I0c29170aee1331681ba591c9638c00793f5a969f
2020-12-28 14:13:14 +08:00
Jason Zhu 219085f099 rockchip: rk3568: add some defination of secure otp
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I493e409a447e48111674683fd24746c5a2cc6553
2020-12-28 14:11:51 +08:00
Jason Zhu 93c979da26 rockchip: rv1126: delete unused definition
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I3d4eaaad00f886dd91f8746f61bc599276a85758
2020-12-28 14:11:37 +08:00
Jason Zhu cf432719d2 misc: rockchip-otp: support rk3568
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I21be09b06f7ac3a0f75e47e59ec094d6e254d05d
2020-12-15 16:19:19 +08:00
Wenping Zhang 93a7515a89 video/rk_eink: add rockchip eink support.
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: I39e92ee00690ea1be274b1abd94d54284ef36898
2020-12-10 17:51:14 +08:00
Jason Zhu 78263d89a3 rsa: support write public hash in spl
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I4120d0cad1cb24b45c3b281649e1eba520a11ee2
2020-12-10 15:59:22 +08:00
Jason Zhu 5c0419f083 rockchip: rv1126: add some defination of secure otp
Include secure boot enable add rsa hash.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I70c4b030238c01ee1b569521bd5e1b03c70cbc68
2020-12-10 15:55:55 +08:00
zhangqing da3c693fb0 rockchip: dts: rk3568: Resync from kernel-4.19
Resync from kernel-4.19:
(I5f310f9b857 clk: rockchip: rk3568: export cpll_xxx clk id for more
function)

Change-Id: I4f5ea86ed73272dc3381ba27d1c56284fa17d546
Signed-off-by: zhangqing <zhangqing@rock-chips.com>
2020-12-07 09:22:55 +08:00
Joseph Chen 5b0bc49177 lib: avb: support crypto sha256/512
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ifbcc1940d9b494fc488c0b9e95f88d7c98604f62
2020-12-05 20:07:07 +08:00
Yifeng Zhao 5d96bba97e rk3568: add nand support for spl and uboot
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I3b849db025ae15dde22636ae17ac2d19c5484dd6
2020-11-30 09:53:23 +08:00
Joseph Chen 186b00109f rockchip: rk3568: place U-Boot at 10MB offset
2~10MB region is for OP-TEE.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic4d4beb9e42a2b17665102c811e59b5864cbc888
2020-11-26 15:43:56 +08:00
Shunqing Chen 038c1ecaa2 power: charge animation: energy enough auto exit uboot charge
Change-Id: Ifa94783869c7cb35f819f3700c82bac7d00a7b05
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2020-11-26 15:23:46 +08:00
Shunqing Chen 00d11ef213 pmic: rk8xx: support power key config from dts
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I4b2def4e5b171b2b46f26695e9cabec8a7b496e2
2020-11-26 11:51:28 +08:00
Jon Lin e336ce4ee5 mtd: spinand: Add foresee devices
Change-Id: I115ea19030edc2e83e877621f055555b481f98db
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-11-26 09:10:57 +08:00
Lin Jinhan 00fa57d80d driver: crypto: mask CRYPTO_SYNC_LOCKSTEP_INT_ST flag
This flag maybe abnormal trigger.

Change-Id: Id398d1e8636c28b8cc42d950cafa5e2731a41b62
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2020-11-24 16:02:35 +08:00
Joseph Chen 2d25c32e07 rockchip: dts: rk3568: Resync from kernel-4.19
Resync from kernel-4.19:
(2f153f1fa73c arm64: dts: rockchip: rk3568: add thermal-zone for pvtm)

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I36fdfc366f4d44f3226b6f8b35ee496701fe021e
2020-11-19 15:34:01 +08:00
Elaine Zhang fdd74c3220 clk: rockchip: rk3568: support ebc clk setting/getting rate
Change-Id: Iecac8e56b2b5615b54c8969767053b6282fe6fb8
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-11-19 14:48:18 +08:00
Jason Zhu 661bcdfeff mtd: mtd_blk: add mtd_blk_map_fit() to create map for fit image
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I0d0195f455ee9afb32676510fc077fe63ae5c7ad
2020-11-18 16:10:55 +08:00
Joseph Chen 9d23fbe3b7 spl: fit: load kernel dtb if need
kernel FDT is for U-Boot if there is not valid one from images,
ie: resource.img, boot.img or recovery.img. It is put right
after U-Boot FDT.

This is used for U-disk bing up.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I348b6ea5736f46c091284c501e7e0f9c64cd2f78
2020-11-14 15:32:03 +08:00
Jon Lin 69b42caea5 rockchip: rk3568: Support nand devices
Change-Id: If8433d63e7f101f2f1837b6f613705b0ba18f72a
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-11-10 14:58:34 +08:00
Joseph Chen 034db99592 dm: serial: support always use uart debug mode
In this mode, uart debug is initialized depends on
configuration from pre-loader or CONFIG_UART_DEBUG_.

The serial is not care about dts "stdout-path" and
not register into console framework any more. It's
nice to use pre-loader serial and make serial easy
to configure.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If4c68229d76b6f1710a35e3ef9a2a91cb306fa9c
2020-11-02 18:34:22 +08:00
Joseph Chen 6a1649e26d core: node: remove unused API
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I797cb2f594865ab9310651183bf98b8112fe429e
2020-11-02 18:34:21 +08:00
Joseph Chen 5033f049cb rockchip: rk3568: add irq definitions
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I13b662eff5a86b8fe021612130e50b9c3e783105
2020-11-02 18:34:21 +08:00
Ren Jianing 858bd926c5 configs: rk3568: add USB support
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Id49e056ad30c4cef2eea22a7eb4ea4992318b9c4
2020-11-02 18:18:24 +08:00
Joseph Chen 912fa0754a common: board_f.c: add fpga init call
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I5fb507094207b14ad64cf3dee646aaac177bf43d
2020-11-02 16:39:14 +08:00
Lin Jinhan c48f1acf4a crypto: rockchip: modify crypto hash cache support for crypto v1&v2
Change-Id: I6e0604bf02908269ab021714378b66ed712fdc06
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2020-10-30 09:24:49 +08:00
Finley Xiao a4c57e8a07 rockchip: otp: Add support for rv1126
This adds the necessary data for handling otp on the rv1126.

Change-Id: Ie78ad04861ee8dca506f0bb7b851570b360694de
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-10-23 15:06:11 +08:00
Joseph Chen 7e26af3867 rockchip: add rk3568 SoC support
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2e163b93d4ec5a60f1ff9c589626d3ccd994f854
2020-10-22 19:39:19 +08:00
Joseph Chen be7064f8f7 rockchip: dts: rk3568: add basic dtsi/dts
Sync from kernel-4.19:
(85abcd6 phy: phy-rockchip-snps-pcie3: Initial support)

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I474a6f5bfdaf5f78655a121ac9dc08e3708de226
2020-10-22 19:39:19 +08:00
Elaine Zhang 6b7c0aa59e rockchip: dts: rk3568: sync from kernel
sync from: ac723c clk: rockchip: rk3568: Replace RKNN with NPU

Change-Id: I24084626ef787f6fb7cbb8875365eb31fbea3541
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-10-22 19:39:19 +08:00
Jason Zhu cee2fb0e57 common: android_ab: move the ab functions to android_ab.c
Move the ab functions to android_ab.c and add "ab_" prefix to
api function.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I4527a0c957aa7853a1b75d456ca3fabaf80c1c57
2020-10-22 19:38:57 +08:00
Jason Zhu cf87ffd351 include: android_image: move some android common definitions to this file
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ia0da707408bcd43b50b49cef89495af7f9d97cd7
2020-10-22 19:38:57 +08:00