Commit Graph

51388 Commits

Author SHA1 Message Date
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
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
Vignesh Raghavendra 37a5e4d859 UPSTREAM: phy: Fix possible NULL pointer deference
It is possible that users of generic_phy_*() APIs may pass a valid
struct phy pointer but phy->dev can be NULL, leading to NULL pointer
deference in phy_dev_ops().

So call generic_phy_valid() to verify that phy and phy->dev are both
valid.

Change-Id: I0d19180ae8524eb240f4afd6ea55d5d0f2907798
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 64b69f8c89352975c25730bcca4bf8af2296297f)
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
Guochun Huang 0220733d75 drm/rockchip: remove initialization of conn_state->output_if
Change-Id: I9f00db573fd411dc6ea977abfedb562d2e4116b6
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2020-12-28 16:37:08 +08:00
Steven Liu ee1765b515 rockchip: rk3568: fix uart iomux error.
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: Ib1683c8ef40127b4fb5b0feb18778b85da47fe03
2020-12-28 16:36:57 +08:00
Simon Xue cce5b40859 rockchip: dts: rv1126: enable wdt
Change-Id: I6d66dd8fca6beaf90557af048e4a50aaabe788d5
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-12-28 16:19:25 +08:00
Simon Xue e197a0baf5 rockchip: dts: rk3568: enable wdt
Change-Id: I73c34bcdd68cdd30dc07c688331ba9fa284159e7
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-12-28 16:19:25 +08:00
Joseph Chen 4d85f76c54 rockchip: kernel dtb: fixup cru phandle of "resets" property
Mainly for wdt in U-Boot.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I80946bf85015b84d8ea4db95fc00b314160505f8
2020-12-28 16:19:25 +08:00
Joseph Chen ef5a68b123 core: device: always use wdt from U-Boot
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icedfecb6de80cb9dc1a71118e7271e2b7b66e90c
2020-12-28 16:19:25 +08:00
Elaine Zhang 6c0e8ad896 clk: rockchip: rk3568: support wdt clk set/get rate
Change-Id: I04b868618f0590b44cea8c00041b9fb676e55919
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-12-28 16:19:25 +08:00
Elaine Zhang 1abad17a96 clk: rockchip: rv1126: support wdt clk set/get rate
Change-Id: If47a22130507cb3512a8f19b474ea1e01354b52b
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-12-28 16:19:25 +08:00
Simon Xue 8cd358cbe2 test: rockchip: power: fix do_test_wdt
Change-Id: I9c1add612aefdaadaa2c065b7b6ab4ce6fd1f4e3
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-12-28 16:19:25 +08:00
Simon Xue 63ea025947 rockchip: dts: rk3568: wdt add reset
Change-Id: Ib18ae7bc9c83cdd42e4e444b598072f81d2d48c0
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-12-28 16:19:25 +08:00
Simon Xue 6d2b3a9a8d rockchip: dts: rv1126: wdt add reset
Change-Id: I86d24ce0476dcc898dd5f12d6e5039a13358c76b
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-12-28 16:19:25 +08:00
Zain Wang bcec45798d rockchip: board: Do not set unvalid index to rollback-index
Signed-off-by: Zain Wang <wzz@rock-chips.com>
Change-Id: I2ba9c666c8375e02569518db9604d214c2a23b53
2020-12-28 15:10:23 +08:00
Jianqun Xu c571b46d59 ARM: rockchip: rk1808 set gpio0_C2 to pull down
It's a long story to explain why to set gpio0_c2 to pull down, start
from ...

The rk1808 suspend supports to swith 32k clock source, BUT need the
low level for each source clock.

clk_32k  ---  ext_32k from pmic for example (pin on SoC is AWK13)
         |
	 ---  int_32k divided from 24MHz

The pin AWK13 default to be GPIO0_C2 which is normal state defaultly.

When the software try to switch clk_32k from int_32k to ext_32k, but
the pin is in normal state, unluckly for some board it's high level,
the result is the switch never be done, till device try to do suspend
and into a halt state.

Make the gpio0_c2 to be pull down as default state for kernel.

Change-Id: I6ae5859352d9a680166b4c711e25491a60442209
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-12-28 14:51:09 +08:00
Jason Zhu a432abd525 rockchip: rk1808: fix typo
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I117c754994afc73a1c57274593ddc216273344d8
2020-12-28 14:47:57 +08:00