Commit Graph

1079683 Commits

Author SHA1 Message Date
Tao Huang
698e99a4a2 rk: scripts/mkimg: Pass '-B 0x200' to mkimage if supported
Pass '-B 0x200' to mkimage to align the FIT structure and data to 512 byte.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I56286064e8db62e4ae236e15a3de6827a577f506
2023-04-12 20:31:15 +08:00
Luo Wei
5f1c322d3b arm64: dts: rockchip: rk3588-vehicle-evb2: add nvp6188 and reverse support
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I71282cafc0767c97c0b051afb3af72ab34d0fa0d
2023-04-12 19:49:30 +08:00
Steven Liu
d2f341b548 arm64: rk3308_linux_defconfig: enable Rockchip AMP
Enable the following macros for AMP system:
CONFIG_ROCKCHIP_AMP=y

Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: Ic8eafe34df524f3713a6894ff1b18dc10b124896
2023-04-12 10:03:55 +08:00
Steven Liu
e7528f3e63 arm64: dts: rockchip: Add RK3308b amp dtsi
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I3f41e7a336812ed345c7382e89e43bc65431c9df
2023-04-12 10:03:55 +08:00
Jon Lin
f03bb81c59 drivers: rkflash: Update to SFTL version: 5.0.58 20220814
Fix V7:
undefined reference to `__stack_chk_guard'

Change-Id: Ie7b7cf74d16fb058acbad63c86c9ad8d9543032e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-04-11 18:48:03 +08:00
Chen Jinsen
fe03134a6c arm64: dts: rockchip: rk3566-tablet: enable iep
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
Change-Id: I81f8022ef0819003336a82a7c6ce3ba1b73c929c
2023-04-11 18:33:55 +08:00
Jianlong Wang
e0b16c2ae2 ARM: dts: rockchip: rk312x-evb: add tsadc and earlycon support
Change-Id: If75380c08add4ebefe6778bbde15d85dca5de7c9
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2023-04-11 18:14:38 +08:00
Jianlong Wang
97d83f7f20 ARM: configs: rk3128: add rk3128_linux_spi_nand.config
Change-Id: I50e9493632d2d164066eeb3e339e7447ed751523
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2023-04-11 18:12:07 +08:00
Jianlong Wang
8b50192260 ARM: dts: rockchip: add rk3128-evb-ddr3-v10-linux-spi-nand.dts
Change-Id: Icea0ee43563ff03231711ce51483e957dfdf74b4
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2023-04-11 18:11:53 +08:00
Wyon Bi
52bc9ad095 arm64: dts: rockchip: rk3588-vehicle-maxim-serdes: Fix pin name
Change-Id: Id47d1a1c478afcf49efc1c94bad0bbae940e3274
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-11 18:10:59 +08:00
Wyon Bi
5ee4b11f60 pinctrl: max96755f: Fix pin name
All GMSL2 devices have multi-function pins (MFP)
that can be used as general-purpose input and output (GPIO)
pins or for other functionality (e.g., I2C, I2S, SPI, etc.).

Change-Id: Idba149389c134d55a1c51c90fc889f859c064e4c
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-11 18:10:59 +08:00
Wyon Bi
386b6568c0 pinctrl: max96745: Fix pin name
All GMSL2 devices have multi-function pins (MFP)
that can be used as general-purpose input and output (GPIO) pins
or for other functionality (e.g., I2C, I2S, SPI, etc.).

Change-Id: I385593e85a0e52cc1500fd74075d524d178784ce
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-11 18:10:59 +08:00
Tony Xie
12aecdf275 arm64: dts: rockchip: rk3562: support bus-soc node
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia568587fdbb6c280d6da2e02f7213d60b230546a
2023-04-11 18:08:23 +08:00
Caesar Wang
c67ac18c59 arm64: dts: rockchip: update rk3399-sapphire-excavator-linux.dts
1/ update Copyright

2/ The backlight is for the eDP panel and it has the connector on the
excavator baseboard.

3/ remove cdn_dp

Fixes: 5a2a93f1ee ("arm64: dts: rockchip: move backlight from rk3399 sapphire to excavator")

Change-Id: I513fb62c8f8869a5a6151777c86da3dace362ede
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2023-04-11 18:07:31 +08:00
Simon Xue
2d3757bf81 iio: adc: rockchip_saradc: fix test logic
Change-Id: I2bba10bed0f5ad3b49e4a09f28ad90f3acb0d444
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2023-04-11 17:27:26 +08:00
Yu Qiaowei
8b2a823c47 video: rockchip: rga3: fix resource is not freed in rga_mm_map_phys_addr
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I8730b5d16ba3d5e6b67e9c174366e9793bbfd070
2023-04-11 17:05:30 +08:00
Sandy Huang
ad404d2920 drm/rockchip: drv: init gem obj for logo memory
less this commit will lead to null pointer, the follwing log is crash at
linux 5.15 version.

[    2.694917] Unable to handle kernel NULL pointer dereference at
virtual address 0000000000000030
[    2.697917] Mem abort info:
[    2.698159]   ESR = 0x96000005
[    2.698426]   EC = 0x25: DABT (current EL), IL = 32 bits
[    2.698896]   SET = 0, FnV = 0
[    2.699170]   EA = 0, S1PTW = 0
[    2.699447]   FSC = 0x05: level 1 translation fault
[    2.699877] Data abort info:
[    2.700129]   ISV = 0, ISS = 0x00000005
[    2.700469]   CM = 0, WnR = 0
[    2.700733] [0000000000000030] user address but active_mm is swapper
[    2.701295] Internal error: Oops: 96000005 [#1] SMP
[    2.701724] Modules linked in:
[    2.701992] CPU: 5 PID: 7 Comm: kworker/u16:0 Tainted: G        W
5.15.0 #1
[    2.702664] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[    2.703202] Workqueue: events_unbound deferred_probe_work_func
[    2.703711] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS
BTYPE=--)
[    2.704326] pc : drm_gem_plane_helper_prepare_fb+0x34/0x12c
[    2.704821] lr : drm_gem_plane_helper_prepare_fb+0x30/0x12c
[    2.705310] sp : ffffffc011d23710
...
[    2.711873] Call trace:
[    2.712094]  drm_gem_plane_helper_prepare_fb+0x34/0x12c
[    2.712556]  drm_atomic_helper_prepare_planes+0xf8/0x18c
[    2.713021]  drm_atomic_helper_commit+0x70/0x214
[    2.713429]  drm_atomic_commit+0x50/0x5c
[    2.713781]  rockchip_drm_show_logo+0x1580/0x1988
[    2.714201]  rockchip_drm_bind+0x660/0x770
[    2.714563]  try_to_bring_up_master+0x23c/0x2b0
[    2.714959]  __component_add+0xb8/0x18c
[    2.715302]  component_add+0x18/0x20
[    2.715621]  dw_dp_probe+0x654/0x660
[    2.715943]  platform_probe+0xa8/0xd0

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I7e6b162d5fb093c4a1f2551a01401c6cfba423f5
2023-04-10 15:30:21 +08:00
Zhang Yubing
b4b55361d6 phy: rockchip: phy-rockchip-typec: set phy default mode as usb
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Iacc843ea86e1c63c54c85b8949682b1b8c708559
2023-04-10 14:33:56 +08:00
LongChang Ma
065ceb71a8 media: rockchip: isp: fixed framerate ctl invalid issue
When set framerate from small one to big one, will lead to discard
all frame because the is_diacard flag is not reset to "false" in the
change.

Signed-off-by: LongChang Ma <chad.ma@rock-chips.com>
Change-Id: I7197d40ec0053c7dad7f2c088d77f7493626ea90
2023-04-10 14:31:57 +08:00
Wang Xiaobin
d8568b8087 ARM: dts: rockchip: rv1106g-evb2-v10: wifi add host_wake_irq
Signed-off-by: Wang Xiaobin <xb.wang@rock-chips.com>
Change-Id: I99a23e77340f3d51d357ad85a951596e2210392c
2023-04-10 14:31:05 +08:00
Sugar Zhang
eff4833be1 ASoC: hdmi-codec: Fix "ELD Bypass Switch"
CA info should be ignored in the ELD Bypass Situation.

Fixes: c6c61f8679 ("ASoC: hdmi-codec: Add option for ELD bypass")

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I02265570ebcf4d17558b604644dcf5e9425f06cb
2023-04-07 19:44:08 +08:00
Zefa Chen
44484c9fcf media: i2c: sensor_adapter fixes error of ioctl miss break
Fixes: 0bd81e611e ("media: i2c: sensor adapter add ioctl RKMODULE_SET_SENSOR_INFOS")
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Iba17ca89821dece817b32019ee3e20c1859b6564
2023-04-07 19:42:50 +08:00
Damon Ding
2cd49534fc drm/rockchip: tve: add support for parsing vdac_out_current from otp
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I1bfd7535adc36ff77b510a7e735de0bb0ad16c48
2023-04-07 16:20:31 +08:00
Damon Ding
7a94eacc84 arm64: dts: rockchip: rk3528: add test_version/vdac_out_current in otp node
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I7dcc214f457874c540a5f110783557b7e84ded8a
2023-04-07 16:20:26 +08:00
Jianwei Fan
6358a02c0c video: rockchip: vehicle: add rk3562 support
Change-Id: I4e2609244e349f7de802f5de42307d8240edd264
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-04-07 14:24:43 +08:00
Chandler Chen
4bee1c9a00 video: rockchip: mpp: fix rk3036 vdpu soft reset issue
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I38b3beaf0e6bcc5ef0e63614eb8c5c27fa37a1ca
2023-04-07 14:16:56 +08:00
William Wu
c3239eb297 phy: rockchip: inno-usb2: Fix mismatch id interrupt
Test on RK3588S Tablet, set the power supply of logic on
and set the power supply of usb2 phy off during deep sleep,
then the id falling edge interrupt will be triggered after
system resume, and kernel panic with the following log:

SError Interrupt on CPU0, code 0xbe000011 -- SError
CPU: 0 PID: 1946 Comm: kworker/0:0 Not tainted 5.10.110 #600
Hardware name: Rockchip RK3588S TABLET RK806 SINGLE Board (DT)
Workqueue: events rockchip_usb2phy_otg_sm_work
pstate: 20c00009 (nzCv daif +PAN +UAO -TCO BTYPE=--)
pc : _raw_spin_unlock_irqrestore+0x28/0x60
lr : regmap_unlock_spinlock+0x18/0x28
......
Kernel panic - not syncing: Asynchronous SError Interrupt
CPU: 0 PID: 1946 Comm: kworker/0:0 Not tainted 5.10.110 #600
Hardware name: Rockchip RK3588S TABLET RK806 SINGLE Board (DT)
Workqueue: events rockchip_usb2phy_otg_sm_work
Call trace:
 dump_backtrace+0x0/0x1c8
 show_stack+0x1c/0x2c
 dump_stack_lvl+0xdc/0x12c
 dump_stack+0x1c/0x64
 panic+0x150/0x3a4
 test_taint+0x0/0x30
 arm64_serror_panic+0x78/0x84
 do_serror+0xe0/0x100
 el1_error+0x94/0x118
 _raw_spin_unlock_irqrestore+0x28/0x60
 regmap_unlock_spinlock+0x18/0x28
 regmap_write+0x68/0x84
 rockchip_usb2phy_power_on+0x128/0x1f0
 rockchip_usb2phy_otg_sm_work+0x1d0/0x454
 process_one_work+0x1f4/0x490
 worker_thread+0x278/0x4dc
 kthread+0x13c/0x344
 ret_from_fork+0x10/0x30

In fact, there are two issues here.
1. The power of phy id belongs to the usb2 phy power supply.
And the id is pulled up to high level by default. So if we
power off usb2 phy supply during deep sleep, the id status
will fall to low level and trigger the falling edge interrupt.
In the id irq handler rockchip_usb2phy_id_irq(), it send Host
notification only depends the id falling edge irq status, it's
not enough in this case, it needs to check the iddig status
to make sure that the id status is indeed in low level.

2. For RK3588S, the pipe phystatus select register from the
usb grf, and the power domain of usb grf belongs to PD_USB.
So we must make sure the PD_USB is on when operate the pipe
phystatus select register. Originally, we operated the pipe
phystatus register in the phy ops of power_on, because we
expected that the phy ops of power_on called from the dwc3
controller pm runtime resume process which can power on the
PD_USB. However, in this test case, if the id falling edge
interrupt after system resume, the phy ops of power_on can
be called when PD_USB is off.

The call stack:
 rockchip_usb2phy_id_irq()
    -> send Host notification ->
 rockchip_otg_event()
    -> receive notification and schedule otg_sm_work ->
 rockchip_usb2phy_otg_sm_work()
    -> detect EXTCON_USB_HOST is set and call phy power_on ops
 rockchip_usb2phy_power_on()
    -> set the pipe phystatus select register

Change-Id: Ib7e5bc095ab1df2ca4c983d58a9f15720f0cccb9
Signed-off-by: William Wu <william.wu@rock-chips.com>
2023-04-07 14:16:20 +08:00
Chandler Chen
9ea7c790e7 video: rockchip: mpp: rkvdec2_link: modify task isr
fix task timeout not proc issue

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I76c246595ccfcc1d855e4ed3f2043f7a013ad005
2023-04-07 14:15:39 +08:00
Zhichao Yu
4b50d2f038 media: i2c: gc4653: fix image corruption when switch sensor flip/mirror
The configuration of flip/mirror would take effect in the half of frame,
which cause frame corruption. To make sure the flip/mirror configuration
is took effect in the next frame, we should enable register frame buffer
on gc4653.

Signed-off-by: Zhichao Yu <zhichao.yu@rock-chips.com>
Change-Id: Ibf85eb46d7c22785a820bcf781bd3e96a3455f00
2023-04-06 21:26:53 +08:00
Jianwei Fan
aaf9c163ea arm64: dts: rockchip: rk3562-evb2: add fast image reverse support
Change-Id: Ic240f2680e221aaadf40303d3367fcf604e03100
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-04-06 18:31:51 +08:00
Cai YiWei
d297b6606c media: rockchip: isp: version to v2.2.1
Change-Id: I0a14c0eb03337658812e63b325b4639105d86db3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-04-06 16:55:13 +08:00
Liang Chen
47989c4975 mali400: mali: set clk_gpu to normal pll when suspend
The pvtpll will power-down when suspend, and it will cause gpu resume
failed, so do not use pvtpll when suspend.

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: Ibf06cc8d836c994468751a66cf9ed3d0cc1e4b9f
2023-04-06 09:44:27 +08:00
Liang Chen
5302628c0d MALI: mali400: force gpu enter runtime suspend before system suspend
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I17c3c883774de97f2e09c56184ed98baf1ce5a07
2023-04-06 09:44:27 +08:00
Liang Chen
f08095c70c arm64: dts: rockchip: rk3528: adjust trip-point-0/1/2 for thermal-zones
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I46cde51e3f1a48a2a5fb4bae8bb5564071434e14
2023-04-06 09:44:27 +08:00
Elaine Zhang
7f95a5b165 arm64: dts: rockchip: rk3588: modify aclk_top_root 800M to 750M
aclk_top_root 800M parent is aupll(786.432M), but aupll is for audio only.
aclk_top_root 750M parent is cpll(1500M).

Change-Id: I61b306f11f1085b4a08adce89095f88b175c6738
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2023-04-06 09:37:05 +08:00
David Wu
d86890c654 net: phy: motorcomm: Fix clock in or out setting for YT8512B
If the PHY use ext clock, don't do ext clock register setting,
otherwise, go ahead.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I492d3bc21878cce9985333fbb7f609089d69a9f4
2023-04-06 09:36:33 +08:00
Jianwei Fan
24d4113f10 media: i2c: lt7911uxc: fix dcphy params and add more format
Change-Id: I0ec7fd209a878b899152c45101b03e4a22044692
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-04-06 09:30:54 +08:00
Cai YiWei
ebc5802918 media: rockchip: isp: sync dev register and fast_work
Change-Id: I36617e8c8e277f5616a139fec970fcdedf17256a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-04-04 18:29:57 +08:00
Cai YiWei
d7fed91daa media: rockchip: isp: fix open video during device register
Change-Id: I9569dd51b5237307ff48e3daf25bf0c97a5fbbb6
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-04-04 18:23:11 +08:00
Cai YiWei
464f935a46 media: rockchip: isp: lock for rockit qbuf
Change-Id: Ic66cae540a91916fa94c59d9541f847070239187
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-04-04 18:23:08 +08:00
Finley Xiao
0142cfb4ec arm64: dts: rockchip: rk3568: Add trim configure for tsadc
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: If1b4bf98b3be24c8a3f97fbb0adf7279ca9a2ed2
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2023-04-04 16:35:25 +08:00
Finley Xiao
bd7f511f36 thermal: rockchip: Add trim temperature for rk3568
Get the calibration parameters for each chip by reading the OTP,
and calculate temperature using calibration parameters.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ib0542cac3a1122ec9781139b2808df86d2d631bd
2023-04-04 16:35:25 +08:00
Chandler Chen
a7edc06ea2 video: rockchip: mpp: rkvdec2: use mmu reset instead of soft reset
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: Ic163aa78422122030b4e608879bed2c4a223429d
2023-04-04 14:31:30 +08:00
Damon Ding
61ff18b478 drm/rockchip: vop: add rb_swap check for serial rgb format
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I5394e22e58eac87f9ee1a8fdee1cc576970d5a87
2023-04-04 14:20:52 +08:00
Damon Ding
52afd66cc1 drm/rockchip: vop: add support for bg/rb/rg/delta/dummy swap ctrl
The dsp_data_swap bits order may be different.

One is bg/rb/rg/delta/dummy, such as RK3288, RK3328
and RK3399. The other is bg/delta/rb/rg/dummy, such
as RK3308, RV1126 and RV1106.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I876f5f3e416e7d44fecda70841b59c78b48bb90c
2023-04-04 14:20:52 +08:00
Chandler Chen
c4bd8d465a iommu/rockchip: add iommu force reset interface for device
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I153b91b2e1ad8e099d80f4af8c9e51d12f3af607
2023-04-04 11:18:36 +08:00
Chandler Chen
b6cc751bbb video: rockchip: mpp: rkvdec2_link: disable mmu irq when reset
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I537a2caf670456a1a25894e94968b6445961ff91
2023-04-04 11:16:25 +08:00
Qiqi Zhang
8832a2b6ce drm/rockchip: dsi2: mode valid func add more judgment conditions
In VR application scenarios, some panel will realize dynamic frame
rate adjustment through a wide range of VFP settings, and VFP may
exceed the ip limit (0~1023), which may cause abnormal display. so
reject any modes with larger periods.

Change-Id: I7bc6ae9709393ca0796fdec9ed1079b53b65cf99
Signed-off-by: Qiqi Zhang <eddy.zhang@rock-chips.com>
2023-04-04 10:43:15 +08:00
Jianwei Fan
52610e14e4 video: rockchip: vehicle: fix errors if not use gpio-det
Change-Id: I33ab7123e0aa938169fb7bdbe7c1bbb32f6a7c48
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-04-04 10:41:18 +08:00
Zhang Yubing
4fb2138533 drm/rockchip: vop3: fix rk3528 csc mode register config
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ifca0405a705e333ed98ee8b0b5925857fcb63102
2023-04-04 10:31:47 +08:00