Interface functions may call by different threads, which may
access the same value at the same time. So we need add mutex
lock.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I682820c0eb366d514e21cc54f9ab97d5039a0814
gpiod_get_value would take gpio active state into count. So
the default pattern should be like prsnt-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>
to indicate that 1 means no devices. If we need 0 to indicate no devices,
we should use GPIO_ACTIVE_HIGH instead.
Fixes: cca1a93b9e ("PCI: rockchip: dw: Add present IO detect")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ic34debabfccdac357c52df427573decc65eea83f
When using user buffer, hardware crypto is used regardless of
whether the data length is greater than 32K.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I3228910def265765e772da1ab4eda3b54d9927cb
Cluster0_PD is a parent power domain for Cluster1/2/3_PD,
it should be power on first and power down last.
use list_for_each_entry_safe_reverse to make sure the
right order.
Fixes: 8684b9914503("drm/rockchip: vop2: power off all vop pd when enter
suspend mode")
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I50a5d53de40131d4878b8e1d4a065ce2b96eb2c8
1. Fix dma_fd cannot be imported when only RGA2.
2. fix crash in fill mode.
Update driver version to 1.2.2
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ib71b381c9e784f9eee8be925e80cfb27f0be2563
According to the result of SI test, adjust the ssc, voltage
swing, pre-emphasis to improve the phy compatibility.
Different rates use different parameters. The rbr and hbr
use the same parameters. Note that Type-C port's parameters
and DP standard port's parameters are different when the
lane rate is rbr or hbr.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I27a8a846a198c7feabf1aaf1459a7df056e4312a
When using DMA_fd, hardware crypto is used regardless of
whether the data length is greater than 32K.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ifcc78bca17beb99ae7eae73f3def6ebf55f5cf1b
RK3588 has two OTG controllers, OTG0 is configured as
OTG mode, and OTG1 is configured as host mode. The OTG1
doesn't init the otg sm work, so it can only handle the
otg sm work if the func of the work is initialized.
This patch can fix the warning if the logic is power off
during deep sleep on RK3588 EVB2.
WARNING: CPU: 0 PID: 145 at kernel/workqueue.c:3057 __flush_work+0x26c/0x28c
Modules linked in:
CPU: 0 PID: 145 Comm: irq/106-rockchi Not tainted 5.10.66 #720
Hardware name: Rockchip RK3588 EVB2 LP4 V10 Board (DT)
pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--)
pc : __flush_work+0x26c/0x28c
lr : __cancel_work_timer+0x11c/0x1c0
......
Call trace:
__flush_work+0x26c/0x28c
__cancel_work_timer+0x11c/0x1c0
cancel_delayed_work_sync+0x18/0x2c
rockchip_usb2phy_bvalid_irq+0xf4/0x144
rockchip_usb2phy_irq+0x368/0x384
irq_thread_fn+0x34/0x88
irq_thread+0x1a4/0x248
kthread+0x13c/0x344
ret_from_fork+0x10/0x30
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I42b5f6d22df3f7f94d54f05083694fb49e382620
Only dynamic OPPs can be removed by dev_pm_opp_remove.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I7362e7f58927ea9258c5abe761833e9fdc5e7656
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
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
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
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>
6M reserved when CONFIG_ROCKCHIP_THUNDER_BOOT=y.
Change-Id: Idd4bb302667e851f544b087af1ed7391b58d2075
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
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
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>
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
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>
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
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
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
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>
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