Commit Graph

865538 Commits

Author SHA1 Message Date
Cai YiWei
cfe05e46c9 media: rockchip: ispp: fix monitor no working
Change-Id: I13c410af8902f65d5fc855a32c2778e44d369851
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-08 19:03:57 +08:00
Cai YiWei
5e30baa651 media: rockchip: isp: unregister dmarx at driver remove
Change-Id: I1146e5c81445980f456bc2ff19810c0ae84d2c7b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-08 19:03:57 +08:00
Cai YiWei
d49f43aafc media: rockchip: ispp: disable scl dma write if no output buffer
Change-Id: I11bbc17dad564510c7cbd37d4ad357f81fe1ecf2
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-08 19:03:57 +08:00
Shunqian Zheng
054b699457 iio: imu: inv_icm42600: fix build error
Icm42600 was backported from upstream kernel.
Let icm24600 adopt kernel version 4.19 with minimal changes.

Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I5d4717bdd2e8d04732015d01a9587868165fea9a
2021-10-08 18:27:21 +08:00
Jean-Baptiste Maneyrol
419a3fb68e UPSTREAM: dt-bindings: iio: imu: Add inv_icm42600 documentation
Document the ICM-426xxx devices devicetree bindings.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 45924b8fd2)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I435c2c10d5d9e71215a034afa30c11c491883f0a
2021-10-08 18:24:50 +08:00
Jean-Baptiste Maneyrol
d541e55456 UPSTREAM: iio: imu: inv_icm42600: add accurate timestamping
Add a timestamping mechanism for buffer that provides accurate
event timestamps when using watermark. This mechanism estimates
device internal clock by comparing FIFO interrupts delta time and
device elapsed time computed by parsing FIFO data.

Take interrupt timestamp in hard irq handler and add IIO device
specific timestamp structures in device private allocation.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit ec74ae9fd3)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I2606414aaaecb5e6b16a729376bad374e3cdd024
2021-10-08 18:24:27 +08:00
Jean-Baptiste Maneyrol
beec1e5a14 UPSTREAM: iio: imu: inv_icm42600: add buffer support in iio devices
Add all FIFO parsing and reading functions. Add accel and gyro
kfifo buffer and FIFO data parsing. Use device interrupt for
reading data FIFO and launching accel and gyro parsing.

Support hwfifo watermark by multiplexing gyro and accel settings.
Support hwfifo flush.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 7f85e42a6c)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I7d259cc0a4fa6da00c2014e40cd57c60232bcd5a
2021-10-08 18:24:09 +08:00
Jean-Baptiste Maneyrol
9a4f272340 UPSTREAM: iio: imu: inv_icm42600: add device interrupt
Add INT1 interrupt support. Support interrupt edge and level,
active high or low. Push-pull or open-drain configurations.

Interrupt will be used to read data from the FIFO.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit e5efa1049b)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: Ic6c19caa25e67a44d4d6ab7dd876fc023388bc31
2021-10-08 18:23:52 +08:00
Jean-Baptiste Maneyrol
faabd7297a UPSTREAM: iio: imu: add Kconfig and Makefile for inv_icm42600 driver
Add 3 modules: inv-icm42600, inv-icm42600-i2c, inv-icm42600-spi.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 8237945dbc)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I8bd9bcc06c9886daad5915d94bbfc20025ab23b6
2021-10-08 18:23:12 +08:00
Jean-Baptiste Maneyrol
1ffc3c45e8 UPSTREAM: iio: imu: inv_icm42600: add temperature sensor support
Add temperature channel in gyroscope and accelerometer devices.

Temperature is available in full 16 bits resolution when reading
register and in low 8 bits resolution in the FIFO. Return full
precision raw temperature with corresponding scale and offset.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit bc3eb0207f)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I76b7a140b4d504289cdc433f2e36835ad5f1984d
2021-10-08 18:23:12 +08:00
Jean-Baptiste Maneyrol
038d60f8f0 UPSTREAM: iio: imu: inv_icm42600: add accelerometer IIO device
Add IIO device for accelerometer sensor with data polling
interface.
Attributes: raw, scale, sampling_frequency, calibbias.

Accelerometer in low noise mode.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit a47c1cdcb9)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: Iddfda60129a4029449718ab837314e71e359c5bc
2021-10-08 18:23:12 +08:00
Jean-Baptiste Maneyrol
9e7f3f7253 UPSTREAM: iio: imu: inv_icm42600: add gyroscope IIO device
Add IIO device for gyroscope sensor with data polling interface.
Attributes: raw, scale, sampling_frequency, calibbias.

Gyroscope in low noise mode.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit a095fadb44)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I3e13086ca0a2c9ea657bdbaddcca6848ee1decfd
2021-10-08 18:23:12 +08:00
Jean-Baptiste Maneyrol
b4c7ee2dee UPSTREAM: iio: imu: inv_icm42600: add SPI driver for inv_icm42600 driver
Add SPI driver for InvenSense ICM-426xxx devices.

Configure bus signal slew rates as indicated in the datasheet.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 9f9ff91b77)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: Id948c314093f28a3bc90d22f0a174dc8d115ca9d
2021-10-08 18:23:12 +08:00
Jean-Baptiste Maneyrol
1ca48f4883 UPSTREAM: iio: imu: inv_icm42600: add I2C driver for inv_icm42600 driver
Add I2C driver for InvenSense ICM-426xxx devices.

Configure bus signal slew rates as indicated in the datasheet.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 7297ef1e26)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I0e05a41113ad450b9bb6fe252e380dca381a2580
2021-10-08 18:23:12 +08:00
Jean-Baptiste Maneyrol
a01c19d97b UPSTREAM: iio: imu: inv_icm42600: add core of new inv_icm42600 driver
Core component of a new driver for InvenSense ICM-426xx devices.
It includes registers definition, main probe/setup, and device
utility functions.

ICM-426xx devices are latest generation of 6-axis IMU,
gyroscope+accelerometer and temperature sensor. This device
includes a 2K FIFO, supports I2C/I3C/SPI, and provides
intelligent motion features like pedometer, tilt detection,
and tap detection.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 31c24c1e93)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: Iefe5c28aadd1ca4c75496f6090c3858090cd1c30
2021-10-08 18:23:12 +08:00
Zefa Chen
3bdad4c739 media: rockchip: cif: mipi csi2 do cru reset when stop
to avoid interruption signal after stop

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I1a4e896c38a9c24b6d3d4ded93aaa5b75800c68d
2021-10-08 17:49:17 +08:00
Zefa Chen
4800a4346c media: rockchip: cif fixed frame sequence bug in HDR mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I6d1837bb6dd4ae2cbae397fb3a4cce404e5d3909
2021-10-08 17:47:03 +08:00
Zefa Chen
927d72b998 media: i2c: sc500ai fixed vflip err
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I184fd7e06514cae76d02a1990086e98fcf3e9a33
2021-10-08 17:47:03 +08:00
Jianwei Fan
ac58e64e38 arm64: dts: rockchip: rk3568-evb6: add lt8619c dvp-mode and dual-edge
configuration

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I12ae50c528e0399e1e31b1a4488b35a07016145e
2021-10-08 09:59:34 +08:00
Jianwei Fan
7d717e6c83 media: i2c: lt8619c: update the driver to v0.01.02
1. add BT656 mode support.
2. add ddr mode support.
3. fix 576i and 480i support mode.
4. add 4K30 mode.

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ifc59493ab7e838c59b00963c6c4d31749b068047
2021-10-08 09:59:34 +08:00
Caesar Wang
efd472c3cd arm64: dts: rockchip: set unique possible_crtcs for rk3568_linux.dtsi
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: If25aa8e06474473a69d1a370e3e546ecc2a6b748
2021-09-30 15:14:15 +08:00
Liang Chen
3a8b9f0a17 arm64: dts: rockchip: rk3568: adjust opp-table for dmc by PVTM
Change-Id: I0706715afe2635f4e810f025c585a59c9b7c24ec
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-09-30 14:47:54 +08:00
Cai YiWei
ffd3865c49 media: rockchip: isp: fix bottom image for debayer with extend line
Change-Id: Ie6e4a7e9744be498f594ad7f03351b771a6236c1
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-29 17:59:24 +08:00
Xu Hongfei
ac39fa39ef media: rockchip: isp: disable tmo interrupt
remove associated configuration in TMO isr

Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
Change-Id: I610bc64aaa2549d10e4383df0d8247f161bc8048
2021-09-29 16:54:20 +08:00
Wang Jie
7e43ca389f usb: typec: tcpm: add husb311 driver
At present, there is no requirement for PD3.0 PPS function,
the driver has not verified this function.

Change-Id: Ib78bf1f96f806cca4a20567db2a7cbaf0fba01af
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2021-09-29 16:27:16 +08:00
Andy Yan
21f773b41f drm/rockchip: vop2: Reset used_layers to 0
used_layers should reset to 0 before count
port_mux.

And also fix the follow warning:
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:2538:26: warning: Value
stored to 'vp' during its initialization is never read
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:2537:21: warning: Value
stored to 'layer' during its initialization is never read

Fixes: 2120901346 ("drm/rockchip: vop2: Assign plane for vp by
plane_mask")

Change-Id: I56b1576070392b7b262ef65b19cf14d1bfde0586
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-09-29 16:14:03 +08:00
William Wu
900f48781f usb: quirks: add quirk for MT7668 WIFI with broken LPM
The MT7668 WIFI/BT can't be detected by xHCI controller
on Rockchip platforms when the LPM is enabled.

This patch adds an USB_QUIRK_NO_LPM quirk for this device.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Iacaf6d050ece06e09c2d286206860c2214c52661
2021-09-28 20:30:34 +08:00
William Wu
16dc44d17c usb: gadget: f_uac2: fix range size of sampling frequency control
Refer to the UAC 2.0 spec "Table 5-7: 4-byte Control RANGE
Parameter Block", the range size of sampling frequency control
is wNumSubRanges + n * (dMIN + dMAX + dRES), n is the total
of the sampling frequency.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Iababf610914688f178621915e03bdabe58fe310b
2021-09-28 20:27:54 +08:00
David Wu
7dee443c55 net: core: Add filter config option
Add this config option to reduce memory usage, if it was not necessary.

./ksize.sh net

before size: 716596 Bytes
after  size: 673095 Bytes
save   size: 43501  Bytes

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I012d926a7a8be9a4897a85fbf47f7fbbab1e43c4
2021-09-28 14:11:06 +08:00
Fenrir Lin
5f2f9e73c6 ARM: configs: rv1126-battery-evb.config add es7202 and ap6203
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: I3c3cb0ee26098812204b268d8fa732eb039f47ae
2021-09-28 14:09:43 +08:00
David Wu
70f7f93f15 net: core: Add ethool config option
Add this config option to reduce memory usage, if it was not necessary.

./ksize.sh net

before size: 739668 Bytes
after  size: 716596 Bytes
save   size: 23073  Bytes

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I3e3c515f6b88d2ebf04cb8976d061591caca201e
2021-09-27 18:01:59 +08:00
David Wu
fcc4ae2e47 net: ethernet: stmmac: Add STMMAC_PTP config option
Add this config option to reduce memory usage, if it was not necessary.

./ksize.sh drivers/net/ethernet/stmicro/

before size: 59075 Bytes
after  size: 55366 Bytes
save   size: 3709  Bytes

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I82c404a41a7abde6adf38557d8b2096b17b4b6e5
2021-09-27 17:57:43 +08:00
XiaoTan Luo
3b6f928fba drm: rockchip: rk618: update hdmi connect status to jack
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I39588e906e047b9e59a60f3dd7dedf729a3a35f8
2021-09-27 17:43:29 +08:00
XiaoTan Luo
8633b4cf1d drm: rockchip: rk618: add spdif for hdmi audio source
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I15cac9c3ab92140983511a5ea0e333ef991ba1e1
2021-09-27 17:43:24 +08:00
Andy Yan
1b50b34dcf drm/rockchip: vop2: Set vpstate->color_key to uint64_t
color_key is passed by atomic_set_property with a uint64_t val.

Change-Id: Idc66dc1632f3c00f353d05016aa79f362506fef5
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-09-27 17:40:55 +08:00
XiaoTan Luo
e640e2cc5e arm64: configs: rockchip_linux_defconfig: enable SND_SOC_ROCKCHIP_HDMI
enable ROCKCHIP_HDMI ASoC driver to report jack status.

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I61dd19266747cfa2eb97030c107d95924f80f03d
2021-09-27 17:40:55 +08:00
XiaoTan Luo
acecb8f15a arm64: configs: rockchip_defconfig: enable SND_SOC_ROCKCHIP_HDMI
enable ROCKCHIP_HDMI ASoC driver to report jack status.

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I180161b64878c34bda0e5b7bd354cc993d8abee9
2021-09-27 17:34:08 +08:00
XiaoTan Luo
760158d29b ASoC: rockchip: add machine driver for hdmi audio
this patch is used for rockchip HDMI audio output.

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I577179e7563ad241014d023da12af1e622e84c9a
2021-09-27 17:33:42 +08:00
Simon Xue
2001f161f2 iio: adc: rockchip_saradc: fix interrupt issue
Saradc interrupt status may exist forever if read saradc
when system suspending which disable clock that finally
lead to interrupt system dead. Add mutex in suspend to
avoid this issue.

Change-Id: I6a83e4bd79db90a79985685b5e94df2209b5ae81
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-09-27 17:25:38 +08:00
Wang Panzhenzhuan
55e6dba6c1 arm64: dts: rockchip: rk3326-evb-lp3-v11: fix camera config
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ibde871bcfd026cd926d8ffbe4c94e975572aaeb8
2021-09-27 17:22:07 +08:00
Michael Grzeschik
6a5b75cf13 BACKPORT: usb: gadget: uvc_video: add worker to handle the frame pumping
This patch changes the function uvc_video_pump to be a separate
scheduled worker. This way the completion handler of each usb request
and every direct caller of the pump has only to schedule the worker
instead of doing the request handling by itself.

Moving the request handling to one thread solves the locking problems
between the three queueing cases in the completion handler, v4l2_qbuf
and video_enable.

Many drivers handle the completion handlers directly in their interrupt
handlers. This patch also reduces the workload on each interrupt.

Test on RK3568 EVB1 USB 3.0 UVC, use the high priority dedicated
workqueue instead of the system_wq can help to improve the uvc
transfer performance.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I3c7ab421f8f58dad0a36e005edf8640f7b0a0402
(cherry picked from commit 43cd002387)
2021-09-27 14:29:58 +08:00
William Wu
d5736c3819 usb: dwc3: gadget: fix req list in miss isoc event processing
If miss isoc event happens, the current code just move the
current req to the tail of the pending list, and then stop
the active transfer with cmd DWC3_DEPCMD_ENDTRANSFER. After
these operations, the isoc endpoint wait for a XferNotReady
event to restart the transfer with the first pending req
from the pending_list.

If there are already reqs in the pending list when move the
miss isoc reqs to the tail of the pending list, some of the
reqs are out of order.

This patch first moves all of the reqs in the started list
to the tail of the cancelled list, and then move all of the
reqs in the pending list to the tail of the cancelled list.
At last move all of the reqs in the cancelled list to the
pending list. This can make sure all of the reqs are in order
when restart the isoc transfer later.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Idf38d9fd4d483854473c18f792d1996fb5fcab4b
2021-09-27 14:29:15 +08:00
Zorro Liu
10a836e900 drm/rockchip: ebc_dev: release version v2.12
add EPD_AUTO_DU and EPD_AUTO_DU4 mode

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I663dce6978a922fff2afe73327b0f8dc8c83f58a
2021-09-27 10:34:11 +08:00
Tao Huang
089105b205 rk: scripts/mkimg: Support Create U-Boot FIT Image use ${BOOT_ITS}
Change-Id: Id878ebf13606f1be324b11d89cb803ec9ed6c209
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-09-26 17:39:30 +08:00
Sugar Zhang
8df01b9fa0 arm64: dts: rockchip: rk3566-box: Fixup inputclkfs for hdmi audio
Fixes: 1232b84288 ("arm64: dts: rockchip: add rk3566 box dts")

Change-Id: I36b5b09149dfd3537e500925134a49f777b6b0b0
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-09-26 17:32:05 +08:00
Ziyuan Xu
f86904e7fe ASoC: es7202: provide configuration for i2c_bus_num/mic_max_channels
Configuration is flexible than hard code, and minimal changes.

Change-Id: I15835fcbf198252410feb3feb6080ca047388ce1
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2021-09-26 17:16:33 +08:00
Zefa Chen
1ac27c2f80 media: rockchip: cif fix errors in rgb24 data format
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I0766997860f06dc25e604c2ea8425049a987fdc5
2021-09-26 16:28:50 +08:00
Wyon Bi
6adc164ec8 mfd: Drop unused rk610/rk616 driver
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I76c73d0c565b04261a099373c7a9200d6058b8ec
2021-09-26 14:26:45 +08:00
Ding Wei
00b8be6742 video: rockchip: mpp: fix issue for CONFIG_IOMMU_SUPPORT=n
if CONFIG_IOMMU_SUPPORT=n, log:
 error: 'const struct iommu_ops' has no member named 'flush_iotlb_all'
   if (domain && domain->ops && domain->ops->flush_iotlb_all)

Change-Id: I8268e0b5d5a513d1c55b0c755c479049b13bdeb7
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-09-26 11:50:46 +08:00
David Wu
56f6b33ef0 net: ethernet: stmmac: Add config option for full driver
Add this config option to reduce memory usage, if it was not necessary.

./ksize.sh drivers/net/ethernet/stmicro/

before size: 82879 Bytes
after  size: 59075 Bytes
save   size: 23804 Bytes

Change-Id: I5f6b4573d7358c3b6f046e960c7ddf7d53541b14
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-09-26 10:32:31 +08:00