Commit Graph

51213 Commits

Author SHA1 Message Date
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
Jon Lin 45f0941d2b mtd: spi-nor-ids: Add Gigadevice gd25q256 ID
Change-Id: I70aca02c537b67cd0c92c3067d903763f528a1e8
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-12-28 14:45:26 +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 5c9deb91df configs: rk3568: add rsa key size
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I714c329f3def375ae4d25953bbe119071b7f16ba
2020-12-28 14:13:08 +08:00
Jason Zhu bf39446f5d rockchip: spl: support rollback index
Support rollback index when enable CONFIG_SPL_ROCKCHIP_SECURE_OTP.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Id865d9b13f92a322b576dd0168805e05acbdbcbf
2020-12-28 14:13:01 +08:00
Jason Zhu 59f02c0900 misc: rename the ROCKCHIP_SECURE_OTP to ROCKCHIP_SECURE_OTP_V1
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Id0db096848d0ed1137c5153e80e66b37356e3273
2020-12-28 14:12:09 +08:00
Jason Zhu 18481d05b7 misc: rockchip-otp: update the rk3568's secure area
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ia787f9c4e67e311fe4cc4e5b8f0c674221f36d8b
2020-12-28 14:12:03 +08:00
Jason Zhu a31e24f37f rockchip: fit_misc: use OTP_SECURE_BOOT_ENABLE_ADDR to get vboot address
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I464f6834d3ec2cb653e5149ab2f9abd3bbcc1724
2020-12-28 14:11:57 +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 9b12595b4e configs: rv1126: add CONFIG_RSA_C_SIZE
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I54fb49bb88110ce430a4451b79c84c8c06a2e4da
2020-12-28 14:11:44 +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 9c63859ff7 lib: rsa-verify: calculate the hash depended on operator size
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I72822a2331afb45a1b291e473cd83f7ce3d627f6
2020-12-28 12:05:12 +08:00
Jason Zhu 781ee9b393 lib: rsa-sign: support calculate deferent size of rsa's key
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ia473b5123c11ed57d1eed560964b6a7dc482b7df
2020-12-28 11:57:01 +08:00
Elaine Zhang aa00306883 clk: rockchip: rk3568: fix up the return value for rk3568_clk_set_rate()
Change-Id: If472e1b954624ff5205e3064d484de3533cde949
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-12-24 15:11:20 +08:00
Finley Xiao 2bff5c680e clk: rockchip: rv1126: Only change APLL rate to 1008MHz for tb
fixes: (c1bad47 clk: rockchip: rv1126: Change APLL rate to 1008MHz)

Change-Id: If0c284af8c5710b43d353fdf6b12b226c288ae07
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-12-24 15:06:36 +08:00
Jason Zhu 3a5404aff4 clk: rockchip: rk3568: set the APLL_HZ to 816MHz
Set the APLL_HZ to lower frequency in spl when the pmic is not
available.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Id540ff174ef93c3d9ea22bb37dc26ca7b587a5b7
2020-12-24 10:00:10 +08:00
Zhihuan He bc45a18269 drivers: ram: rockchip: rk3308: coding style
Change-Id: Icf1bb1d8ca588b244eb7b736d0e033013d023851
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2020-12-23 18:13:34 +08:00
Zhihuan He 355cdcf345 rockchip: rk3308: coding style
Change-Id: If0404baf3019317e2dcf9a6c8a77e8a82a13f888
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2020-12-23 18:13:34 +08:00
Guochun Huang e9b1001b3c video/drm: dsi: add rk3568 support
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I8cef8db74dcc9e05f4c0b2511c728838a0d92cb7
2020-12-23 15:48:38 +08:00
Andy Yan d040854345 drm/rockchip: Add support for vop2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I52af209b3a9b85692d0589e1653160d284f4ba9c
2020-12-23 15:48:38 +08:00
Sandy Huang cdb300bd81 video/drm: display: add compatible rk356x dtsi config
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I9ef1d7ad2bfaa84b90482208421e8b7a76d051ff
2020-12-23 15:48:38 +08:00
David Wu 2cde40a19f arm: board: Random way to change multiple mac addresses
Change-Id: I11f93717fae567daaba4801979fb38c74e7b4e83
Signed-off-by: David Wu <david.wu@rock-chips.com>
2020-12-23 15:31:13 +08:00
Jason Zhu 98637248d5 clk: rockchip: rk3568: fix print error log
The log is "Fail to set the ACLK_BUS clock"

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ie22e5139e1446ae751d1e64729c7a0b4cdbac69e
2020-12-22 12:10:45 +08:00
YouMin Chen 3c13acb0a2 rockchip: sdram_msch: update noc define for rv1126
Change-Id: Ic545cacffabc0c726d6d0de3e6d72a3e6c971849
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-12-21 16:47:27 +08:00
YouMin Chen 5290223f29 rockchip: sdram: add define for lpddr4x
Change-Id: Ic7cd740e3498e47ad48376784ca0855d633baf65
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-12-21 16:42:02 +08:00
Tang Yun ping de9242dcd7 drivers: ram: sdram_common: add 4rank support for rk3568
Change-Id: I179ff4ef1f07a881f76ac086c4ab330e3ff82d73
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2020-12-21 16:42:01 +08:00