Commit Graph

863295 Commits

Author SHA1 Message Date
Caesar Wang
a2cb2cc59c arm64: dts: rockchip: update pmu_io_domains in rk3568-evb.dtsi
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Idf4e71ce021267e9098018abff6d540476fca1ba
2021-05-28 09:50:51 +08:00
Jianqun Xu
af1fb0dc82 power/avs: rockchip: rk3568 iodomain ignore pmuio1 and vccio2
1. pmuio1 on RK3568 SoC supports 3.3v only, no register to set.
2. vccio2 used for flash, which select by hardware

Change-Id: Ie168626906b52dea5b789b6b4dfcf1e45eb5f08a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-05-27 16:32:08 +08:00
Sandy Huang
42256c1a8f drm/rockchip: gem: fix dma_free_attrs() parameter error
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I84204ef5348d3429aa104c6e8a307458d1a88504
2021-05-27 16:30:49 +08:00
shengfei Xu
6aef0738cf regulator: fan53555: fix regulator resume error
if the default voltage and the regulator on/off in suspend can't be
changed in runtime, the fan53555 not need the resume function.
fix regulator resume error as follows log:
[   12.726012] dpm_run_callback(): regulator_resume+0x0/0x68 returns -1
[   12.726041] PM: Device regulator.1 failed to resume: error -1
[   12.726623] dpm_run_callback(): regulator_resume+0x0/0x68 returns -1
[   12.726641] PM: Device regulator.2 failed to resume: error -1
[   12.727216] dpm_run_callback(): regulator_resume+0x0/0x68 returns -1
[   12.727246] PM: Device regulator.3 failed to resume: error -1
[   12.727826] dpm_run_callback(): regulator_resume+0x0/0x68 returns -1
[   12.727855] PM: Device regulator.4 failed to resume: error -1
[   12.728437] dpm_run_callback(): regulator_resume+0x0/0x68 returns -1
[   12.728467] PM: Device regulator.5 failed to resume: error -1
[   12.729045] dpm_run_callback(): regulator_resume+0x0/0x68 returns -1
[   12.729074] PM: Device regulator.6 failed to resume: error -1
[   12.729653] dpm_run_callback(): regulator_resume+0x0/0x68 returns -1
[   12.729683] PM: Device regulator.7 failed to resume: error -1
[   12.730195] dpm_run_callback(): regulator_resume+0x0/0x68 returns -1
[   12.730222] PM: Device regulator.8 failed to resume: error -1
[   12.730783] dpm_run_callback(): regulator_resume+0x0/0x68 returns -1
[   12.730812] PM: Device regulator.9 failed to resume: error -1

Fixes: af1b6e88fa ("regulator: fan53555: add fan53555 resume")
Change-Id: Iab3ef39e6bc218eab12430d43299f8e85d6e465e
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2021-05-27 14:55:37 +08:00
Elaine Zhang
dc69c8c782 UPSTREAM: clk: rockchip: Optimize PLL table memory usage
Before the change: The sizeof rk3568_pll_rates = 2544
Use union: The sizeof rk3568_pll_rates = 1696

In future Soc, more PLL types will be added, and the
rockchip_pll_rate_table will add more members,
and the space savings will be even more pronounced
by using union.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Link: https://lore.kernel.org/r/20210511090726.15146-1-zhangqing@rock-chips.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 23029150a0
 git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git v5.14-clk/next)
Change-Id: Ia8f038861c327feb41602cc9a997e82333fae67b
2021-05-27 14:23:59 +08:00
Caesar Wang
b4ea08d1ed scripts: io-domain.sh: update docs
Fixes: b25c12a00a ("scripts: add io-domain.sh for rk356x io-domain check")
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I7e1c657102fd782a359c3aabfbbdbdf63875f675
2021-05-27 09:38:37 +08:00
Huang zhibao
e774833d4f ARM: dts: rv1126-ai-cam.dtsi: set not used io group domain to 3.3v
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I95e89bb9d9951d5d96f6f3feaa6d9579184d62a0
2021-05-26 17:12:21 +08:00
Tao Huang
8b3bd9721e ARM: rv1126_defconfig: Replace CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU by CONFIG_SQUASHFS_DECOMP_MULTI
The squashfs multi CPU decompressor makes use of get_cpu_ptr() to
acquire a pointer to per-CPU data. get_cpu_ptr() implicitly disables
preemption which serializes the access to the per-CPU data.

But decompression can take quite some time depending on the size. The
observed preempt disabled times in real world scenarios went up to 32ms,
causing massive wakeup latencies. This happens on all CPUs as the
decompression is fully parallelized.

So replace CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU by CONFIG_SQUASHFS_DECOMP_MULTI.

Change-Id: I3fb74bca595ee2345f2f7c276eaf8cc68bcd249b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-05-26 16:53:36 +08:00
Wang Panzhenzhuan
8f4114af53 media: i2c: gc2385 match vts and 30fps strictly for cts
fix cts  CaptureRequestTest#testEdgeModeControl[1] &
CaptureRequestTest#testNoiseReductionModeControl[1]  failed
failed log:
Frame duration must be in the range of [33333333, 66666666],
value 32813000 is out of range [32833332, 67666664])

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Icdc6a89f33d6d0fd8332c51033afe6303e246ce3
2021-05-26 16:52:19 +08:00
Cai YiWei
181068321e arm64: dts: rockchip: rk3568: isp iommu v2
Fixes: 28f15a4887 ("arm64: dts: rockchip: rk3568: add isp node")
Change-Id: I1959b21216e539ad4dc482262496c99ccbc3db30
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-05-26 14:13:25 +08:00
Sugar Zhang
8fc61e3ff6 ASoC: rockchip: i2s: Add support for frame inversion
Change-Id: Ic77122501224cec45200ae64416745a82fb67d76
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-05-26 14:08:26 +08:00
Wang Panzhenzhuan
e3390a9335 media: platform: rockchip: cif: fix rk356x iommu issue
when open video0/1/2/3 first, then close it;
if reopen video0, the output data is green;
if not enable iommu, it's ok; fix it;

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ib977c34f005548bbc21cc93ca39c10d871235ad9
2021-05-26 10:00:19 +08:00
Allon Huang
a427c86942 media: platform: rockchip: cif: set stopping time out as fps when reset cif
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I1376766c27ba08453a6d2b93ea5a5a3d188a1c42
2021-05-26 09:58:59 +08:00
Allon Huang
ff16b2d505 media: platform: rockchip: cif: do reset when mipi fs & fe are not paired
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: If22316faffcdeb5a619d214eb8b650f300d1c41c
2021-05-26 09:58:59 +08:00
Allon Huang
1c41457a25 media: platform: rockchip: cif: fix iommu lose effectiveness when do cru reset
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I9e116d4ea8af2bac787fb9df18fede3637f27c3c
2021-05-26 09:58:59 +08:00
Lin Jinhan
9aff3a5f41 crypto: rockchip: move algs private data from rk_crypto_dev
Algos private data should store in tfm's ctx field to avoid
modify by other algos while calculating.

Change-Id: I1c77e408e3374c697849ec508323131bf5f488b2
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-05-26 09:56:26 +08:00
Lin Jinhan
e9611f31d7 crypto: rockchip: optimize the coding style
Rename some struct name and variable name been more clearly.

Change-Id: Icf5e6f9d1a7e3f4abfbe05b3fb0034651a120039
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-05-26 09:56:26 +08:00
Lin Jinhan
50f13f96ce crypto: rockchip: add rk3568 support
Change-Id: Ie83dc798cd584d74d9e9b068af17518596ac82dc
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-05-26 09:56:26 +08:00
Lin Jinhan
44e7c00833 arm64: dts: rockchip: rk3568: add crypto node
Change-Id: Icb7a7e01ec83ebe01f32224108c102a1c7bf2fdd
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-05-26 09:56:26 +08:00
Lin Jinhan
788e3c89ee crypto: rockchip: mask lock_step error int flag
lock_step will accidentally triggered sometimes.

Change-Id: I401c662d515cf17e6c89dfb2dfa4b33b6866b8a5
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-05-26 09:56:26 +08:00
Wu Liangqing
b25c12a00a scripts: add io-domain.sh for rk356x io-domain check
Change-Id: Iac84a3236835fcc4dc686a579ef2930343885690
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-05-26 09:47:22 +08:00
Wu Liangqing
e18c51f465 arm64: dts: rockchip: io-domian all default set 3.3V for rk356x boards
io-domian  default as:
&pmu_io_domains {
     status = "okay";
     pmuio1-supply = <&vcc3v3_pmu>;
     pmuio2-supply = <&vcc3v3_pmu>;
     vccio1-supply = <&vccio_acodec>;
     vccio3-supply = <&vccio_sd>;
     vccio4-supply = <&vcc_3v3>;
     vccio5-supply = <&vcc_3v3>;
     vccio6-supply = <&vcc_3v3>;
     vccio7-supply = <&vcc_3v3>;
};
TODO:
Need to be modified according to the actual hardware
for example rk3568-evb:
&pmu_io_domains {
     status = "okay";
     pmuio1-supply = <&vcc3v3_pmu>;
     pmuio2-supply = <&vcc3v3_pmu>;
     vccio1-supply = <&vccio_acodec>;
     vccio3-supply = <&vccio_sd>;
     vccio4-supply = <&vcc_1v8>;
     vccio5-supply = <&vcc_3v3>;
     vccio6-supply = <&vcc_1v8>;
     vccio7-supply = <&vcc_3v3>;
};

Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: I296a696851c2a85618d08cce82da546c72266699
2021-05-26 09:47:01 +08:00
XiaoDong Huang
c20865f332 firmware: rockchip_sip: don't update fiq_target_cpu in sip_fiq_debugger_uart_irq_tf_init
To fix problem in redmine #297983, make some rules about fiq_target_cpu:
The default value of fiq_target_cpu is zero and
can only be updated in sip_fiq_debugger_switch_cpu
or sip_fiq_debugger_enable_fiq.

View redmine#297983 for details.

Change-Id: I947a73c3ffc0c818a611e108a343f05b8465645b
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-05-25 15:16:57 +08:00
Yifeng Zhao
feea10898f arm64: dts: rockchip: change naneng combphy ref clock to 100mhz for rk3568
When using 24MHz reference clock, some devices can't identify
the SATA PM chip, And the signal quality is not as good as 100MHz.
so change the reference clock to 100MHz.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: If7d951a0b77d503f9faf1c1f88c78a9e07471e47
2021-05-25 14:27:24 +08:00
Yiqing Zeng
b9305c6dac media: i2c: os02g10 fix set flip/mirror failed bug and fix wrong vts_def
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ie143b7311798eb328f665772caeaaf49f412b8f3
2021-05-25 11:37:28 +08:00
Zorro Liu
10f466ce6b drm/rockchip: ebc_dev: release version v1.13
EPD_A2 mode use part update to save panel power cost

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I65181c3ef51034b9302532f9f1276ebd2724d0ee
2021-05-25 11:35:04 +08:00
Zhenke Fan
696b4dffd4 media: i2c: ov4688: add 16x dgain, ratio = dgain/2048
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: Ib6b61843e0577b265f03fb0b7846573218f62046
2021-05-25 10:35:45 +08:00
Zefa Chen
d2acc3d9d9 media: i2c: imx258 support capture spd data and embedded data
usage:
csi has 4 available channels, generally id0->vc0, id1->vc1, id2->vc2, id3->vc3.
A channel can only takes one data type. When you need to collect spd data or embedded data,
you can use an idle channel and change its vc to be consistent with active data.

dts configuration:
imx258: imx258@10 {
	rockchip,spd-id = <3>;//use id3 to capture spd data
	rockchip,ebd-id = <2>;//use id2 to capture embedded data
};

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I89a0f9472bbe475c9da368b09eaad0cd00fc69c6
2021-05-25 10:31:35 +08:00
William Wu
11bd07bda6 phy: rockchip: inno-usb2: increase hs eye height for otg port
Test on RK3568S EVB1, the otg device data eye test fail with
far end template when use 1.2 meter long cable. So tuning
the hs eye height from 400mv(default) to 437.5mv. And we
test on RK3568 EVB1, it can also benefit from this patch.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ie2342aba5546990838fdd6faf27a007a8843fd0d
2021-05-23 16:06:35 +08:00
Huang zhibao
f96dfe0687 arm64: dts: rockchip: rk3566-box: update io_domain
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I70335dd9075bafd852e78f4a99a8942f0afd0856
2021-05-21 18:05:12 +08:00
Huang zhibao
e6f173f86b arm64: dts: rockchip: rk3566-box: disable ddr auto-freq-en
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I9fdd665184c4ee60cd4dc4c7e5857f496f1970f2
2021-05-21 15:25:05 +08:00
Shawn Lin
d43b47a114 PCI: rockchip: dw: Reset device before enabling power
To more precisely follow the spec, we should make sure
refclk is available and stable for device only after
stable training. In previous way, if the refclk is provided
by external chip, enabling power means refclk is ready before
anything, and then we reset the device to hope the chip back
to the initial state. But we find some devices are not really
meant to do that, that being said, the spec is vague here so
we can't make any promise from the vendor that #PERST will take
everything back.

Move resetting device before enabling power to restrictly follow
the spec, no matter whether #PERST is work or not, we just rely
on the power control.

Fixes: c84a4aa411 ("PCI: rockchip: dw: Move deassert #PERST after enabling LTSSM")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ie1f4aa1a3fb7b6de813512bf4b2c025328e0c17f
2021-05-21 15:24:22 +08:00
Yiqing Zeng
9f7ed9a3df media: i2c: support sc035hgs sensor driver
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ic614e98bed0cf8610166666ae820f3fc2e51af26
2021-05-21 15:17:15 +08:00
Yiqing Zeng
375fb5e3a0 media: i2c: support sc8220 sensor driver
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I14135e074bc35fa6d9438997d3750b5271777099
2021-05-21 15:15:05 +08:00
Yiqing Zeng
06c60e3d95 media: i2c: support sc2335 sensor driver
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I5a54b7b2aa1fdcc7e4ce781375f77a459ec9e2ae
2021-05-21 15:00:42 +08:00
Cai YiWei
19757da2a2 media: rockchip: isp: separate rdbk from csi subdev
Change-Id: I8c5f42c7d5526634e49b2934fb28026702de17c9
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-05-21 09:44:18 +08:00
Cai YiWei
e1c77d9fa5 media: rockchip: isp: dmatx support embedded and shield pixels data
Change-Id: Ifb07d7a7b11d44a5843dfe3a66284e38b98fbbb6
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-05-21 09:44:18 +08:00
Cai YiWei
c6306a5510 media: v4l: add embedded data and shield pix data format
Change-Id: I59105c445ec5d94e5ae865bab7768ce5c6de2ec6
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-05-20 18:19:06 +08:00
Cai YiWei
df0ed076f0 media: uapi: Add EBD and SPD media bus format
MEDIA_BUS_FMT_EBD_1X8: embedded data
MEDIA_BUS_FMT_SPD_2X8: shield pixels data

Change-Id: I5224dd860058f0d5d78a9038c53de9c9e048cb8f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-05-20 18:19:06 +08:00
Ding Wei
ff2f479da9 video: rockchip: mpp: Optimize kref_get within mem_regions
tips:
1. If fd has imported, then just copy mem_regiony struct.
2. Task is the unit for running, and mem_region is the
   internal element of task.
3. In mem_regions, it can only kref_get once with the same fd,
   instead of all fds which the same fd.

Change-Id: I7236803a5a263d6e79256036caf580b5ac2c35e9
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-05-20 18:17:54 +08:00
Caesar Wang
bcd00049f4 arm64: dts: rockchip: disable afbc by default on rk3568-linux.dtsi
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I1dbf50e9056242991afae4df3303c739065dfb6b
2021-05-20 14:57:41 +08:00
Andy Yan
f58aa54a27 drm/rockchip: vop2: Add option to disable afbc window
Change-Id: I115a1671c0bf3a6e7af541a376fbdafa33bbb439
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-05-20 14:56:18 +08:00
Algea Cao
9b9760675b drm/bridge: synopsys: dw-hdmi: Fix cec timeout when resume
Unmute cec irq when resume

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ic3d83ab7721fcf525d64ac08c970af3e51ecee88
2021-05-20 11:38:39 +08:00
Wang Panzhenzhuan
7488e22d23 dt-bindings: media: i2c: Document add hi846
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I94f48ed9d931a30d08f4af6d5c8ee203a4afbdf8
2021-05-20 11:38:07 +08:00
Wang Panzhenzhuan
d1b3204f5e media: i2c: add camera driver hynix hi846
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I405dbd6c509cb7c3424d1f0fa6cfa355adb5a4d9
2021-05-20 11:31:28 +08:00
Wang Panzhenzhuan
4be5174ea2 dt-bindings: media: i2c: Document add hi556
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ib5406d9a690f27e70d0df37429c18b8ad488c7c7
2021-05-20 11:29:26 +08:00
Wang Panzhenzhuan
c81aa1af42 media: i2c: add camera driver hynix hi556
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: If069f3e11074eb7635754c47b39a7b8ca3434219
2021-05-20 11:28:36 +08:00
Elaine Zhang
5dc8c4a1bf FROMLIST: clk: rockchip: fix rk3568 cpll clk gate bits
The cpll clk gate bits had an ordering issue. This led to the loss of
the boot sdmmc controller when the gmac was shut down with:
`ip link set eth0 down`
as the cpll_100m was shut off instead of the cpll_62p5.
cpll_62p5, cpll_50m, cpll_25m were all off by one with cpll_100m
misplaced.

Fixes: e9ac850b88 ("clk: rockchip: add clock controller for rk3568")

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://patchwork.kernel.org/project/linux-clk/patch/20210519174149.3691335-1-pgwipeout@gmail.com/
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I012bdbdc44c4e8de1b42a00c2a9bffb7bd66faef
2021-05-20 10:02:52 +08:00
Wyon Bi
94be4db841 drm/bridge: analogix_dp: Add optional LCD panel self test
Many TCON devices include an embedded LCD panel self-test mode.
This mode is designed to help system integrators identify
the root cause of abnormal display operation, without the use of
complicated debug tools.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I19770c7488d43e2486c5fde5cc0a5b345e5be0eb
2021-05-19 14:52:57 +08:00
Zorro Liu
4634dc6901 arm64: dts: rockchip: rk3566-eink: add more ddr freq and disabled
default

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: If8e2d053c9d07fb539e53c72f5705cdfe74cf600
2021-05-19 14:16:27 +08:00