The xHCI specification 1.1 does not require xHCI-compliant
controllers to always enable hardware USB2 LPM. However,
the current xHCI driver always enable it when seeing HLC=1.
On rk3566 platforms, the xHCI USB2 LPM is enabled by default.
And we found that a lot of USB Disks have USB2 HW LPM broken
issue when connected to rk3566 USB2 OTG interface.
Here are a part of special USB Disks with USB2 HW LPM broken:
1. idVendor=325d, idProduct=6410, Manufacturer: aigo
2. idVendor=21c4, idProduct=0cd1, Manufacturer: Lexar
3. idVendor=0951, idProduct=1666, Manufacturer: Kingston
When use dd command to write to these USB Disks, it may fail
with the following log:
[ 2844.700148] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
[ 2889.072272] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
[ 2921.498045] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
......
[ 2953.923773] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
Theoretically, we can add USB_QUIRK_NO_LPM individually for
these special USB Disks, however, it's diffcult to cover all
USB Disks. So it's better to disable the USB2 LPM for xHCI
on rk3566 platforms.
Change-Id: I2c180b68f41a4d25a4c860c32550f3a406eb2028
Signed-off-by: William Wu <william.wu@rock-chips.com>
The xHCI specification 1.1 does not require xHCI-compliant
controllers to always enable hardware USB2 LPM. However,
the current xHCI driver always enable it when seeing HLC=1.
On rv1106 platforms, the xHCI USB2 LPM is enabled by default.
And we found that a lot of USB Disks have USB2 HW LPM broken
issue when connected to rv1106 USB2 OTG interface.
Here are a part of special USB Disks with USB2 HW LPM broken:
1. idVendor=325d, idProduct=6410, Manufacturer: aigo
2. idVendor=21c4, idProduct=0cd1, Manufacturer: Lexar
3. idVendor=0951, idProduct=1666, Manufacturer: Kingston
When use dd command to write to these USB Disks, it may fail
with the following log:
[ 2844.700148] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
[ 2889.072272] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
[ 2921.498045] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
......
[ 2953.923773] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
Theoretically, we can add USB_QUIRK_NO_LPM individually for
these special USB Disks, however, it's diffcult to cover all
USB Disks. So it's better to disable the USB2 LPM for xHCI
on rv1106 platforms.
Change-Id: Ie058b65b963ce9a8aa72ae1a55a38f0c78d3a095
Signed-off-by: William Wu <william.wu@rock-chips.com>
If wl2868c power off in suspend, then the registers
will be reset, so we need to restored them after resume.
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: Id7170a27f18fd9a640df358e0b13244036121d9f
In common case, the 500MHz vop aclk rate can satisfy the vop request.
For some high pixel clock case(8K@60Hz, 4K@120Hz, etc),the vop aclk
should enhance to 800MHz to avoid abnormal display issue.
When display a high pxel clock timing from bootloader to kernel, the
bootloader will set the vop aclk rate to 800MHz. The vop driver in
kernel will also set the vop aclk rate to 800MHz. But the clock driver
will set the vop aclk rate to 800MHz before the vop driver. The vop
aclk rate will change as: 800MHz->500MHz->800MHz, which will cause
a flicker.
To fix this issue, remove the vop aclk rate assign in clock controller
node, and define it in vop node.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I785fe464bba79bb2bcd63a8588d847edecef5a17
The hsync of some timings maybe bigger than 300.
If get hsync error, it could be very large, so we
think that is error if it's bigger than 500.
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I57e8b462c3a224ba402d8ab1c20fd2c4c0f77a2c
Update all 64bit rockchip devicetree files to use SPDX-License-Identifiers.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Ie983cca0d54cae8b5ad6d322d51eb7bbd265aa0a
HDMIRX and HDMITX cec cannot enable at the same time.
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I825c552a57dd795d358108f95a1dc24391aa3f93
CONFIG_VIDEO_RK_IRCUT need config for imx415 module with rk3588 evb1
otherwise camera can't work in GKI mode
Because GKI does not compile __v4l2_async_notifier_clr_unready_dev,
the link relationship will be established only after all devices
on the dts link are registered
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ib7e244e0ab7ea1f19e4247ce0731f2a588c1d382
drivers/video/rockchip/rga3/rga_drv.c:1036:3: error: implicit declaration of function 'rga_power_enable_all' [-Werror=implicit-function-declaration]
rga_power_enable_all();
^~~~~~~~~~~~~~~~~~~~
drivers/video/rockchip/rga3/rga_drv.c:1040:3: error: implicit declaration of function 'rga_power_disable_all' [-Werror=implicit-function-declaration]
rga_power_disable_all();
^~~~~~~~~~~~~~~~~~~~~
drivers/video/rockchip/rga3/rga_drv.c: In function 'rga_drv_probe':
drivers/video/rockchip/rga3/rga_drv.c:1526:1: warning: label 'failed' defined but not used [-Wunused-label]
error, forbidden warning:rga_drv.c:1526
failed:
^~~~~~
drivers/video/rockchip/rga3/rga_drv.c:1376:6: warning: unused variable 'i' [-Wunused-variable]
error, forbidden warning:rga_drv.c:1376
int i, irq;
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I3a7bd21a2351b474df654a81b93f7f0c1560aac1
There are 3 planes and 3 mirror plane for rk3566. If both
exist in one vp, the mirror planes should be removed in
plane_mask drm_property.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I15b776224ebfbaa19a0d9d3dca56828a980e0c54
In order to avoid mapping memory when the job pointer is invalid after abort.
Update driver version to 1.2.18
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I50a581f604e66975f87d1566a3dd1b2e95c7e2a3
This will be used to identify the running state of the current scheduler.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ib5cdff02e9aa6a32ac1f5e2916190aaa6141a687
In some cases, there are too much userspace high priority RT threads, which
cause kernel RT threads or kworkers block too long time. This config separate
kernel and userspace RT threads into two priority regions, priority 0~49 for
kernel and priority 50~99 for userspace, so that kernel RT threads is always
higher priority than userspace. This config also set RT policy for kworkers.
Change-Id: I87e03915dc0dd03cbcd91d211d2ef56c301451f9
Signed-off-by: Liang Chen <cl@rock-chips.com>
Enable this config used in some old IP chips, e.g. rk3288/rk3399...Socs.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I015ac9fdab94f23c8c6cd14b2696cfdf03cc0f18
gamma maybe enable at uboot, so we read dsp_lut state to adjust gamma
state is more correct.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie8893e6136009874c140933b10a77d532e019aa1
This patch fix following two cases dwc2 resume does not recognize
peripherals.
1. plug in device after system suspend, then press the power-on
button to wake up,at this time the dr_mode is OTG, op_state is
still Peripheral, the Bit[0] of GINTSTS is 1 and the port power
is off, dwc2 will not resume at this time.
2. plug in device then press the power-on button to put the system
to sleep, then we press the power-on button to wake up the system,
At this time, the dr_mode is OTG, op_state is still Host, the Bit[0]
of GINTSTS is 1, dwc2 will not resume and working abnormally.
To resolve the first exception, we should call the dwc2_hsotg_resume()
directly to resume dwc2. To resolve the second exception, if the dwc2
is lost power during suspend like RK3326S platform, wo should reinit
the core to device mode, and after do dwc2_hsotg_resume, it can trigger
the ID status change interrupt if the OTG cable is still connect. Then
we can init it for host mode in the ID status change interrupt handler.
We can use the power on bit of Hprt register to distinguish whether
it is lost power during suspend.
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Change-Id: I7cd09bce993dcee8e5bfcaddd5fe884cdfab6b52
Some rockchip encoder (e.g RV1106/RV1103) support to reserve
UVC Header in the encoded image, this patch improve the uvc
driver to support zero copy for uvc formats MJPEG/H264/H265,
and no support zero copy for YUYV.
By default, the uvc driver disable the zero copy, you can
set the ${USB_FUNCTIONS_DIR}/uvc.gs*/uvc_zero_copy to 1
to enable the zero copy.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I19be26170d51f209f3196f546515be665481b8b5