Commit Graph

1064939 Commits

Author SHA1 Message Date
Finley Xiao
c572fc0487 soc: rockchip: opp_select: Fix safe rate error
Replace tmp_safe_rate type with unsigned long.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I6677eea0a76448d58d0ef1e23ceb0cfcf393c80a
2022-02-09 20:22:25 +08:00
Damon Ding
53e774ac86 drm/rockchip: vop: separate the of_device_id array by different SoC
Separate the process of device matching by the different SoC macro
definitions, which can reduce memory usage.

./ksize.sh  drivers/gpu/drm/

before ksize: 565102 Bytes
after  kszie: 526734 Bytes
save   about:  38368 Bytes

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I6b3689b11598120aad16956235d1ee2bbdbe80e0
2022-02-09 19:48:43 +08:00
Sugar Zhang
e5c34ac367 ARM: dts: rockchip: Add support for RV1106/3 EVB REF Board
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ia8e91f17aa429207caf9d5ca8a1570ef4d9e4e82
2022-02-09 09:29:15 +08:00
Sugar Zhang
f164131252 ARM: dts: rockchip: Add core dtsi for RV1106/3
RV1106/3 is a highly integrated vision processor SoC
for IPC, especially for AI related application.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I77650867696ac94c0a9ab9ad3b6ddaeea6121169
2022-02-09 09:24:32 +08:00
Jianwei Fan
98f59f4f3a arm64: rockchip_defconfig: enable CONFIG_VIDEO_S5K3L6XX
Enable CONFIG_VIDEO_S5K3L6XX which found on rk3588s tablet
rk806 single board

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: If06becce1e3209feccff6d0975fdb17f81df26c1
2022-02-08 20:18:26 +08:00
Jianwei Fan
cb409c05ac arm64: dts: rockchip: rk3588s-tablet-rk806-single: add camera configuration
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ica76e81538b92afefb0693b760a1020f2269d520
2022-02-08 20:15:50 +08:00
Jianwei Fan
ed07815405 media: i2c: s5k3l6xx: add s5k3l6xx camera driver
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I140414d9c54af22818852812bf436d562c6d5b0b
2022-02-08 20:13:10 +08:00
Zhen Chen
8556e654d6 MALI: bifrost: fix panic "stack is corrupted in: kbase_get_real_power_locked"
The panic was triggered
by running "cat /sys/kernel/debug/mali0/ipa_current_power".

It is fixed by enlarging KBASE_IPA_BLOCK_TYPE_NUM according to the fact
that we set 4 clks for GPU in rk3588 dts.

Change-Id: I3a87f6f2d25cf296d95d033d3d98c51666ea482d
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2022-02-08 20:11:31 +08:00
Ziyuan Xu
e1ebd0062d mmc: free the available reserved memory of escd when CONFIG_ROCKCHIP_THUNDER_BOOT=y
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I77c69d579c9121adde94ffc2e68514a9fd34e870
2022-02-08 19:27:52 +08:00
Ziyuan Xu
ba941e36cc soc: rockchip: thunderboot_mmc: make sense of the *free_reserved_area*
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I5470dadd845c706cae305f8f60b721b9904a7ddb
2022-02-08 19:27:52 +08:00
Tao Huang
e20b6973ec ARM: rockchip: Locate kernel at 0x00608000 if CPU_RV1126
6M reserved when CONFIG_ROCKCHIP_THUNDER_BOOT=y.

Change-Id: Idd4bb302667e851f544b087af1ed7391b58d2075
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-02-08 19:14:31 +08:00
Sugar Zhang
65a0c70ca0 ARM: Make TEXT_OFFSET more flexible
arch/arm/kernel/head.S:181: Error: invalid constant (608000) after fixup
arch/arm/boot/compressed/head.S:209: Error: invalid constant (608000) after fixup

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I1efb510817d02732e76976058e5af97586ea0147
2022-02-08 18:53:19 +08:00
Cai YiWei
a411a983a6 media: rockchip: isp: increase v4l2 events length
Change-Id: I30638c25cd51b64875c0fbe6383b879ed8ab8fb2
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-02-08 18:49:26 +08:00
Zefa Chen
7609787206 media: rockchip: vicap increase v4l2 event length
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4e41d445f4c1d13dc8232b80306e2ff992e0b037
2022-02-08 18:48:12 +08:00
Tao Huang
a04ad7f646 input: sensors: make local struct sensor_operate ops static
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ifa014ea6e830d4a312a173de473dda3f05c66ad3
2022-02-08 18:40:15 +08:00
Algea Cao
8f1f6dcb73 drm/rockchip: dw_hdmi: Set connector id value
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I5f2477e14f039a88f5aea87d86a64cc4f6ed6cf1
2022-02-08 18:36:47 +08:00
XiaoDong Huang
72788364f5 Revert "arm64: dts: rockchip: Temporarily disable cpu-sleep idle state for rk3588"
This reverts commit 61e3b7cd73.

Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Ia690790ab1ed063d313c60f3190f3960fa6fe1f0
2022-02-08 16:48:57 +08:00
Zhang Yubing
af0ae5b434 phy: rockchip-samsung-hdptx-hdmi: fix pll close issue
If phy pll is used, we don't power off phy. Delay to do
the phy power off work when the phy pll isn't used.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I5a90bc7de2664da2775a81e89aedc26c42da7062
2022-02-08 16:34:05 +08:00
Wang Jie
0bec4db01a usb: typec: tcpm: husb311: disable i2c timeout reset function
According to the description of the I2C_RESET(0x9E) register in
the husb311 datasheet, the main configuration is enable/disable
i2c timeout reset function(bit[7]) and i2c timeout time(bit[3:0]).

If the i2c timeout reset function is enabled, the husb311 will perform
a soft reset in some cases, such as system hibernation, and close the
i2c bus (SCL and SDA are low at the same time). So we disable the i2c
timeout reset function.

Change-Id: Id9169f3ecf65725a959aadda9d2f8f60f20c87a3
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2022-02-08 14:32:05 +08:00
Shunhua Lan
d2cf002d8f arm64: dts: rockchip: add and enable dp sound cards for rk3588 evbs
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I5a1efac436fd0aa49b894c1247b2ae6108ff4ee8
2022-01-28 09:53:36 +08:00
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