Commit Graph

1064919 Commits

Author SHA1 Message Date
Shunhua Lan
cc58f3be22 drm/rockchip: dw-dp: add audio plugged callback for jack report
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: If96a7b68676a085c7fc290941271b210cc903cdd
2022-01-28 09:53:30 +08:00
Shunhua Lan
9a06c19490 drm/rockchip: dw-dp: enable audio through spdif and i2s switch
There are i2s and spdif interfaces for audio, default is i2s
When switching audio interfaces, both interfaces's mclk must be enabled
And can switch off after switching

Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I9007a2115c3c3fcdc5e68112aabcfab5fce5a5a8
2022-01-28 09:53:24 +08:00
Shunhua Lan
dcdf88d54d arm64: dts: rockchip: rk3588: fix audio mclk configuration for spdif to dp
The clock topology:
MCLK_SPDIF2     ----->  spdif_tx2 mclk
HCLK_SPDIF2_DP0 ----->  spdif_tx2 hclk

MCLK_SPDIF2_DP0   --|\
                    | |----- dp0 audio mclk
MCLK_I2S4_8CH_TX  --|/

MCLK_SPDIF5     ----->  spdif_tx5 mclk
HCLK_SPDIF5_DP1 ----->  spdif_tx5 hclk

MCLK_SPDIF5_DP1   --|\
                    | |----- dp1 audio mclk
MCLK_I2S8_8CH_TX  --|/

Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I00fc9a217227079ed51984615d63116e0be56443
2022-01-28 09:53:15 +08:00
Wangqiang Guo
dab9ef540d arm64: dts: rockchip: rk3588s-tablet-rk806-single: Add L/P sensor ucs14620
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: I84288e29c54ff63f9804feb5dcf96c2e6184c8a4
2022-01-28 09:35:32 +08:00
Chen Shunqing
f9b9472cbf power: supply: bq25890: disable auto dp/dm detection when pd in
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I2e19dd3a7c248ab968078dbd9b90f7490be6cb0c
2022-01-28 09:33:29 +08:00
Chen Shunqing
3ddaf8371c arm64: dts: rockchip: rk3588s-tablet-rk806-single: set bq25890 vreg to 4.4v
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I1e859aeafa21aca5f94cf2b391dd4b95d699eab6
2022-01-28 08:34:51 +08:00
Ding Wei
5b7bc45350 video: rockchip: mpp: Extract mpp_dev_shutdown for device shutdown
All device have similar function for device shutdown, thus,
extract it for common function.

Change-Id: I365cc10759559c7d7e824a6e4c93df24198d82f9
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2022-01-27 20:12:39 +08:00
Jaime Liao
c50772fd65 UPSTREAM: mtd: spinand: macronix: Add Quad support for serial NAND flash
Adding FLAG "SPINAND_HAS_QE_BIT" for Quad mode support on Macronix
Serial Flash.
Validated via normal(default) and QUAD mode by read, erase, read back,
on Xilinx Zynq PicoZed FPGA board which included Macronix
SPI Host(drivers/spi/spi-mxic.c).

Change-Id: I7951dd4705cdc7e03bd697da33d216cfd5237b4c
Signed-off-by: Jaime Liao <jaimeliao@mxic.com.tw>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/1628472472-32008-1-git-send-email-jaimeliao@mxic.com.tw
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 6f802696c2)
2022-01-27 20:08:24 +08:00
Zhang Yubing
6b870a0195 drm/rockchip: vop2: Check output_if instead of output_type for vp output type
When a vop port connect more than one type output interface(DP +
HDMI in connector mirror mode), the output_type can't provide all
the interface info, which may calculate wrong dclk. So we use
output_if to get the output interface info.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ia1b815c6d65a47b64e1b9679906c5979119f1d16
2022-01-27 19:49:45 +08:00
Zhang Yubing
c9cabc8567 drm/rockchip: dw-dp: add color properties support.
Add color properties support, then userspace can set the dp
output color depth and color format.

The default color depth and color format is 0, and driver
auto select the suitable color depth and color format.

If set the color depth to 0, it mean driver auto select
the suitable color depth and color format.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I453ec87e8305cb6d8ddf0f7e4a9c274b97c54ee8
2022-01-27 19:47:16 +08:00
Weixin Zhou
539893916b arm64: dts: rockchip: rk3588s-tablet-rk806-single: add fusb302 interrupt gpio configuration for uboot
The uboot Type-C PD driver needs to poll the interrupt gpio level,
but the uboot code does not have a suitable interface to convert the
attributes of "interrupt-parent" and "interrupts" to standard gpio,
so add int-n-gpios configure for uboot to analyze and use.

Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Ie403b158a259411312159845ec316ffd8a061acf
2022-01-27 19:45:43 +08:00
Jon Lin
63d457fdbd PCI: rockchip: dw: Change ep BAR distribution scheme
Change from:
	BAR0 512GB 32bits mem
	BAR1~5 64MB 32bits mem
to:
	BAR0 512GB np 32bits mem
	BAR1 8MB np 32bits mem
	BAR2 BAR4 64MB pref 64bits mem

And the log is like the following:
[    5.245427] [  T148] pci 0000:01:00.0: BAR 2: assigned [mem 0x900000000-0x903ffffff 64bit pref]
[    5.245449] [  T148] pci 0000:01:00.0: BAR 4: assigned [mem 0x904000000-0x907ffffff 64bit pref]
[    5.245471] [  T148] pci 0000:01:00.0: BAR 1: assigned [mem 0xf0800000-0xf0ffffff]

Change-Id: I43ba2ebe0aacdc2b7f49175a6008d22c26ffd220
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-01-27 19:40:18 +08:00
Jon Lin
522737b2a6 PCI: rockchip: dw: Initialize dbi_base2 for ep
Change-Id: I494cf7f6f519a072704754e43e991035336b03b9
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-01-27 19:33:50 +08:00
Shawn Lin
cca1a93b9e PCI: rockchip: dw: Add present IO detect
prsnt-gpios can be defined in DTS for showing if PCIe device is present
or not. By default, low voltage means device is present defined by PCIe
ECM spec. However, some buggy board may invert this voltage level. So
if you need high voltage to show the device is present, please add
rockchip,prsnt-active-high as well.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ib0a5b509afc202a9ec63a4bbdd1e54a3916dcfc9
2022-01-27 19:26:02 +08:00
Shawn Lin
65e1c00702 PCI: rockchip: dw: release driver for all error routines
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ie6501563a9361ec67b9924d636dacf1d09927f0b
2022-01-27 19:19:49 +08:00
Shawn Lin
6bb6ab5f00 PCI: rockchip: dw: Add macro to control threaded init controllers
Sometimes we may need disable threaded init controllers, for instance,
multiple PCIe-2-SATA usage need to disable threaded init in order to
fix the sequence of disk number.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I34d22c619046b3f0d7c03e4a19a5ff07680be057
2022-01-27 19:18:12 +08:00
Cai YiWei
f89f45e5ef media: rockchip: isp: fix awb raw data config for multi device
Change-Id: I295dcda2a0f7e1ccc40f3e9f1b9838e655238584
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-01-27 19:13:18 +08:00
Zefa Chen
bfbdfdecf6 media: i2c: add sensor adapter driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ie21ecbcb7d6d01f7ed1276dcf0346095a8083093
2022-01-27 18:58:44 +08:00
Zefa Chen
812bc2a478 media: rockchip: vicap support disconnect with isp
control by sensor adapter driver

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I1a15eb31fa038246e3e86e25d5cff4dd3978a453
2022-01-27 18:51:49 +08:00
Zefa Chen
73eddef111 media: rockchip: vicap support config compact mode after streaming
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I8a6959e1f855525bc82cd45cf5194a94e611dab0
2022-01-27 18:16:30 +08:00
Zefa Chen
8d0a93bfd2 phy: rockchip: csi2-dphy: mipi csi phy support get bus config from sensor
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ic496357bc0c4c029271f50a208bce808db94077c
2022-01-27 18:07:45 +08:00
Zefa Chen
6c91957756 include: rk-camera-module: add control for sensor adapter driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2d434a4b608bf6e6168237280e75c933fc192df3
2022-01-27 18:05:46 +08:00
Yifeng Zhao
0706188444 arm64: dts: rockchip: rk3568: add reset for sdhci
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I9c52300cf882c83f1fe2577553662b87d19ef66a
2022-01-27 09:04:49 +08:00
Yifeng Zhao
5517e7cd50 arm64: dts: rockchip: rk3588: add reset for sdhci
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I0c2fc27f5a7a787c708287b7d847f27f9dffa185
2022-01-27 09:04:49 +08:00
Yifeng Zhao
0fe8d27fcd mmc: sdhci-of-dwcmshc: add reset call back for rockchip Socs
The reset function build in the SDHCI will not reset the logic
circuit related to the tuning function, which may cause data
reading errors. It is need to reset the controller by the cru.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I969945ae9db969ca8ea0869e8eaf7521dbe957ec
2022-01-27 09:04:33 +08:00
Andy Yan
0a4829dad9 drm/rockchip: vop2: Setup bg delay number for splice vp even there is no active plane
The background color and color bar won't display if the bg delay number
not correctly setting.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I11f78d043b173e4cd651f0c1ea5cab5dfe0fdb4b
2022-01-26 11:18:10 +08:00
Elaine Zhang
c1527f1566 clk: rockchip: rk3588: add flag CLK_MUX_READ_ONLY for pclk_center_root
make pclk_center_root as read only.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ie55f7fb6834cf0e51e4e1ada911f9bd031d83889
2022-01-26 10:51:44 +08:00
Elaine Zhang
ecc3a02c17 arm64: dts: rockchip: rk3588s: remove pclk_center_root clk init
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I3e29e50754b8c39bafaeaa726bfcc9aec7dd9ec3
2022-01-26 10:51:44 +08:00
Elaine Zhang
f725e9df2c clk: rockchip: Add clock controller for the RV1106
Add the clock tree definition for the new RV1106 SoC.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I392cccbd4a4510940c099b7911a4f4711788f8ee
2022-01-25 18:12:51 +08:00
Elaine Zhang
33b5055b63 clk: rockchip: add dt-binding header for rv1106
Add the dt-bindings header for the rv1106, that gets shared between
the clock controller and the clock references in the dts.
Add softreset ID for rv1106.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ia5bd903c6dc9caf925277fd42f873d8e8d6f643a
2022-01-25 17:55:08 +08:00
Elaine Zhang
a5186ef94e dt-binding: clock: Document rockchip,rv1106-cru bindings
Document the device tree bindings of the rockchip Rv1106 SoC
clock driver in
Documentation/devicetree/bindings/clock/rockchip,rv1106-cru.yaml.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ide494c03b439ef0e3b88f1cfa6ee9b263b172f3f
2022-01-25 17:51:17 +08:00
Sugar Zhang
39123b4f3a soc: rockchip: Add CPU_RV1106 config
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I02d553fee8261b912defd1f2aa6ee8a002aa5825
2022-01-25 17:50:35 +08:00
Shunqing Chen
9d47d3aef2 media: rockchip: hdmirx: add cec support
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: Idcfb5be184e6b1aa4818421626b7c24f1409e18d
2022-01-25 17:44:11 +08:00
Jianwei Fan
eaa4aee939 media: i2c: ep9461e: add ep9461e HDMI 4-in 1-out switcher driver
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I45d9bab61a5d5656cd77be6bb858b79f545f334f
2022-01-25 17:37:51 +08:00
Yu Qiaowei
ee87937f76 video: rockchip: rga3: Fix memory out-of-bounds on iova
When the virtual address has an in-page offset, iova needs to be offset
to the corresponding starting point.

Update driver version to 1.2.1

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I01e5109bd684f573920773d0d1e08685d1214a40
2022-01-25 17:10:27 +08:00
Yu Qiaowei
821d33cd0f video: rockchip: rga3: Add error return value in rga_job_schedule
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I2de7b458ef71b31f6b5e3693db9757ee52dc85b7
2022-01-25 17:09:08 +08:00
Algea Cao
215ac770e2 phy: rockchip-samsung-hdptx-hdmi: Fix slight deviation of some frequencies
HDMI phy pll Ksub can't set to 0, or some frequencies may
have slight deviation.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I5e9b6faf7a4397b2b43beea7094fbd3f4b4cb46b
2022-01-25 16:54:44 +08:00
Elaine Zhang
6926e98d70 clk: rockchip: rk3588: export hdmirx_biu soft reset id
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I37c1f67bd62eabe3b0cfa2e1b304a3ae1950b66e
2022-01-25 16:41:58 +08:00
Jianwei Fan
3604e25e7a arm64: dts: rockchip: fix the file names of bt656 and bt1120 dtb
Fixes: 3a84f255cd ("arm64: dts: rockchip: rk3588: add support for BT656")
Fixes: 48801131ab ("arm64: dts: rockchip: rk3588: add support for BT1120")
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ic182b1d138c0ceb26859639a99b56266754052de
2022-01-25 15:57:28 +08:00
Zhang Yubing
26491f667e drm/rockchip: add rockchip private drm property define
Different output interface may user the some property, keep
the property define in rockchip drm driver header file.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ia0e53c978285fa3fc4bb1642ab5886279139c461
2022-01-25 14:29:09 +08:00
Jianwei Fan
16179a9ba6 arm64: dts: rockchip: rk3588s-evb3: add support ahd to bt1120 configuration
add dts file:
        rk3588s-evb3-lp4x-v10-nvp6158-ahd-to-bt1120.dts

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I12993714936cbc4c2e7b29649cadc9ead7a95da9
2022-01-25 14:27:26 +08:00
Zhang Yubing
74d6a13cb6 drm/rockchip: dw_hdmi: fix output interface config
hdmi id 0 mean hdmi0, hdmi id 1 mean hdmi1, fix it.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I8766336cf88c8b1dbff0f2f018cb69a5e65fdfa4
2022-01-25 11:01:23 +08:00
Sugar Zhang
6783f7920e clk: rockchip: Rename CLK_RV110X to CLK_RV1108
Now RV1103/6 is coming, the original CLK_RV110X is for
RV1107/8, to avoid been mis-understood, so, make this
change.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Id27803b6b2863f6949ddebb9c285c21ad1ca32ef
2022-01-25 09:26:41 +08:00
Ding Wei
5104b0274b video: rockchip: mpp: Move mpp_get_task_used_device for common func
Change-Id: I374f216a2b487549a605e228a8bbe45445eaacb4
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2022-01-24 19:54:45 +08:00
Weiwen Chen
fba771c378 arm64: dts: rockchip: Add rk3588-ipc.dtsi for IPC products
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I8bc6abe231820379f5e97eab53b60710f2c0d4f6
2022-01-24 19:36:28 +08:00
Elaine Zhang
7f38c7fb40 thermal: rockchip: optimize static memory consume
$ ./scripts/bloat-o-meter rockchip_thermal_olg.o rockchip_thermal.o
add/remove: 0/32 grow/shrink: 1/1 up/down: 500/-6844 (-6344)
Function                                     old     new   delta
rk_tsadcv2_get_temp                           20     520    +500
temp_last                                      4       -      -4
prob_last                                      4       -      -4
bounding_cnt                                   4       -      -4
rk_tsadcv2_irq_ack                            16       -     -16
rk_tsadcv3_control                            24       -     -24
rk_tsadcv2_tshut_mode                         44       -     -44
rk_tsadcv2_initialize                         48       -     -48
rk_tsadcv5_initialize                         68       -     -68
rk_tsadcv4_initialize                         68       -     -68
rv1108_tsadc_data                             84       -     -84
rk3568_tsadc_data                             84       -     -84
rk3399_tsadc_data                             84       -     -84
rk3368_tsadc_data                             84       -     -84
rk3366_tsadc_data                             84       -     -84
rk3328_tsadc_data                             84       -     -84
rk3308_tsadc_data                             84       -     -84
rk3288_tsadc_data                             84       -     -84
rk3228_tsadc_data                             84       -     -84
rk1808_tsadc_data                             84       -     -84
px30_tsadc_data                               84       -     -84
rk_tsadcv7_initialize                        180       -    -180
rk_tsadcv3_initialize                        208       -    -208
rk_tsadcv3_get_temp                          244       -    -244
rk3328_code_table                            280       -    -280
rv1108_table                                 288       -    -288
rk3568_code_table                            288       -    -288
rk3399_code_table                            288       -    -288
rk3368_code_table                            288       -    -288
rk3288_code_table                            288       -    -288
rk3228_code_table                            288       -    -288
rk1808_code_table                            288       -    -288
rk_tsadcv2_code_to_temp                      556       -    -556
of_rockchip_thermal_match                   2548     392   -2156
Total: Before=12093, After=5749, chg -52.46%

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I506a6135907942abcb60684f9f0888a238950421
2022-01-24 19:23:26 +08:00
Sugar Zhang
6631851252 soc: rockchip: Rename CPU_RV110X to CPU_RV1108
Now RV1103/6 is coming, the original CPU_RV110X is for
RV1107/8, to avoid been mis-understood, so, make this
change.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I1fa19e740b72934dc84f0d2bbbf56b00aa24225a
2022-01-24 19:23:26 +08:00
Tao Huang
92073c0050 drm/rockchip: Remove depends on ROCKCHIP_IOMMU
Some CPUs without IOMMU but have VOP.

Change-Id: Ic11d1438851eb4773bc94e74879a2329964d012a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-01-24 19:23:26 +08:00
Elaine Zhang
971b62dfb0 clk: rockchip: rk3588: aclk_vop not allowed set parent to aupll
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Id66af7ceffba10cb3218626b3ca0cc408fa55fba
2022-01-24 19:23:26 +08:00
Jianqun Xu
b6f4e3659a pinctrl: rockchip: fix rk3568 slew rate to 2bit per pin
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I5cb7d6fbb26f5bcdc6ab181d1ad33547259163ab
2022-01-24 15:16:53 +08:00