Commit Graph

1060311 Commits

Author SHA1 Message Date
Cai YiWei
79b33b499e media: rockchip: isp: fix input crop config for isp21 multi device
Change-Id: I6185273f8474e151ee26c938b8825af383fb73e3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-26 10:42:25 +08:00
Cai YiWei
c6fc3119d6 media: rockchip: isp: remove associated of cproc and ie
Change-Id: Ic4d6171398322e24993e4a0419fd43fae85672b8
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-26 10:42:25 +08:00
Cai YiWei
bbeb468d79 media: rockchip: isp: add frame loss info to procfs
Change-Id: Idecd94535da352fcde5f2a462d4596316f9ea049
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-26 10:42:25 +08:00
Cai YiWei
6bb1c3663d media: rockchip: isp: selfpath bytesperline 16 align
Change-Id: I39b36e7e3a8c483f5c77ddbea0f6bebb4e1a0b0a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-26 10:42:25 +08:00
Cai YiWei
4ab1cc1b50 media: rockchip: isp: off unused interrupt of csi
Change-Id: Iecbd33f2f48dc73fc34af8ee90738db031ee2ffe
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-26 10:42:25 +08:00
Jon Lin
ae928f50c7 spi: rockchip: Preset cs-high and clk polarity in setup progress
After power up, the cs and clock is in default status, and the cs-high
and clock polarity dts property configuration will take no effect until
the calling of rockchip_spi_config in the first transmission.
So preset them to make sure a correct voltage before the the first
transmission comming.

Change-Id: Ib00336a3ebda6e04bdb33c56c7da419bfb6efdd9
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-24 17:28:24 +08:00
Simon Xue
6a355e5f9a iommu/rockchip: fix vop blocked and screen black on RK356X and RK3588
RK3568 and RK3588 has the same issue as RV1126/RV1109 that caused by
dte fetch time limit, So we can set BIT(31) of register 0x24 default
to 1 as a workaround.

Change-Id: Ib0d1fd110aa0349145a63f7c4be5ce77ed6ab4e4
Fixes: 7f8158fb41 ("iommu: rockchip: disable fetch dte time limit")
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-09-24 17:27:27 +08:00
Wyon Bi
bd4cd9a4c9 arm64: dts: rockchip: rk3588: Add hdptxphy1 node
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ie8f483dd86e7279beed2b7e9aa7c00ec2be930e6
2021-09-24 17:27:27 +08:00
Yu Qiaowei
b41b6ffed6 video/rockchip: rga2: Modify the memory check of dma buffer.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I9f51a0ec08c49a86b70c775cc9e81f3d70384553
2021-09-24 17:27:27 +08:00
Andy Yan
585789020e drm/rockchip: vop2: configure half_block_en bit in all mode
First we thought the half_block_en bit in AFBCD_CTRL register
only work in afbc mode. But the fact is it control the line buffer
in all mode(afbc/tile/line), so we need configure it in the
all case.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Ib8cd5fbfd0a898eea738423685fbcdc0ab6d00ad
2021-09-24 17:27:27 +08:00
Andy Yan
240d8a3bd7 drm/rockchip: set output_if for rgb connector
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I6c832a1e7fd8cca69da5f6cfdd9681d72696d67a
2021-09-24 17:27:27 +08:00
Andy Yan
dc3a451bf1 drm/rockchip: set output_type as DRM_MODE_CONNECTOR_DPI for RGB interface
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I81cce6e4f3323ae2b6ba2b20916a0875c36d41fb
2021-09-24 17:27:27 +08:00
Andy Yan
1ec9f0640d drm/rockchip: Specific port_id when use of_graph_get_port_by_id in rgb
This is prepare for vop2 which has multi ports.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Ibca577d7738705fa425a07fbc5ea5d867b7693d7
2021-09-24 17:27:27 +08:00
Andy Yan
74fb3941eb drm/rockchip: make VOP_FEATURE_ definitions public for all vop versions
Definition VOP_FEATURE_OUTPUT_RGB10 and VOP_FEATURE_INTERNAL_RGB
are from upstream, so we move our private definition VOP_FEATURE_AFBDC
and VOP_FEATURE_ALPHA_SCALE to other bits.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I44a4f4864bd7d82af120dfe361b9af700d7d8ae9
2021-09-24 17:27:27 +08:00
Yu Qiaowei
1b8283e911 video/rockchip: rga2: Added support for ARGB format
Add ARGB8888/XRGB8888/ARGB5551/ARGB4444/ABGR8888/XBGR8888/ABGR5551/ABGR4444.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I9eb8f5fbcc1a87a5750b7dc2eaf808f8395856a0
2021-09-24 17:27:27 +08:00
Yu Qiaowei
50ec41b5c2 video/rockchip: rga2: Optimize the process of mapping dma.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ie8d140d8fc102c9a3677b266ac7848c4c3ade78e
2021-09-24 17:27:27 +08:00
Sandy Huang
c15fbd9827 drm/rockchip: vop: add support yuv10bit format
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I720fd9809ed2b628afae086aa64958fdbe4ee2de
2021-09-24 17:27:27 +08:00
Sandy Huang
f4725608d9 drm/rockchip: vop: add support afbc format
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Idff1ac169854d7338eb63ae49a8ed0496659298e
2021-09-24 17:27:27 +08:00
Sandy Huang
3c95a80fe2 drm/rockchip: drv: delete some unused property
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I6802fe7b92ac8993cb48135fa3a77547ee44b43a
2021-09-24 17:27:27 +08:00
Sandy Huang
110feb525a drm/rockchip: vop: add and remove some property
add and remove some property to compatibility with hwc 2.0

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I8239ce40e30da6e2be55e0ccfa6748816c0fcf2a
2021-09-24 17:27:27 +08:00
Sandy Huang
a2fcc90d0d drm/rockchip: vop2: use property create by rockchip drm drv
As some property can be used by both of rockchip_drm_vop2.c and rockchip_drm_vop.c,
so we delete some property create at vop2.c and instead by rockchip drm driver
common property.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: If4f327db79a455da75c7d4af04d2fe3aab19a6f0
2021-09-24 17:27:26 +08:00
Sandy Huang
cd392c00db drm/rockchip: drv: add common property for vop and vop2
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ied641fcf9843c1a39500ece1d15913a5405efa38
2021-09-24 17:27:26 +08:00
Wyon Bi
7efebce0d3 arm64: dts: rockchip: rk3588s: Add hdptxphy0 node
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I7e0ffe2338ac26c7c006312d5689d5f6f3fbebea
2021-09-23 11:42:20 +08:00
Frank Wang
bfc9c2149e usb: dwc3: core: fix runtime suspend at probe
Just put runtime suspend synchronously for otg mode at dwc3 probe time.

We found that the USB3.0 HUB which integrated in rk3399-evb-ind board
could not be enumerated at the system boot time, and the reason is
the USB controller has been suspended when the HUB gets ready.

Fixes: d8b7417bea ("usb: dwc3: core: allow pm runtime for rockchip platform")
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I19600f327d97cb992994d280645a00069dc9e8d2
2021-09-23 11:40:37 +08:00
Jon Lin
dac6b60a6b drivers: rkflash: Not recheck the cache for XTX devices
Change-Id: I440b3a07d86bbdcbeaa6ab4b5282623bf6cb74c7
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-23 11:08:14 +08:00
Jon Lin
f70babda2a spi: rockchip-sfc: Wait for SFC DMA finished when thunder boot
Change-Id: Ia7b47231a1a3fabb059d734228443e52fa4ffa99
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-23 10:20:39 +08:00
Jon Lin
7c03ed057c mtd: spinand: core: Support suspend/resume/shutdown
Spinand may power off after suspending, so the corresponding resume
process is necessary.

Change-Id: I36c7dbf23877b342dfe9e7fb0c8eb4885bd46d71
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-22 16:53:58 +08:00
Jon Lin
eac6cdbe01 spi: rockchip-sfc: Support pm ops
Support system_sleep and runtime_pm ops.

Change-Id: I804e8349a018a10a0d242bb4baed4a99eebdc761
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-22 16:53:22 +08:00
Jon Lin
ad26535135 mtd: spi-nor: gigadevice: Add support gd25lq255e
Change-Id: Iee74cbf20dbdbc00637d77a17369b837cbfc29c6
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-22 11:44:22 +08:00
Jon Lin
50d9b0f00d arm64: dts: rockchip: rk3588s: add fspi node
Change-Id: I2ed03186dd44df514807fd478d41f11b8377ff27
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-20 18:23:33 +08:00
Wangqiang Guo
50b7c0d91b input: sensor: light/proximity sensor: support stk3332
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: Ie95e465c424c9a9fb0845a1bf202c1ac8f5384bb
2021-09-18 19:45:46 +08:00
Zefa Chen
1b8544199b media: i2c: gc4663 support get channel info by ioctl
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ifa2c09a1037d904a5a2e830f89d638e97c9287e8
2021-09-18 18:24:26 +08:00
Zefa Chen
353786437f media: i2c: gc4c33 support get channel info by ioctl
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Idf494c4f1165aa366a12c89debdafbc4050914de
2021-09-18 16:36:40 +08:00
Zefa Chen
7b2d30900b media: i2c: gc8034 support get channel info by ioctl
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I022c952ea91dce5e05fb2e1d3d519b110bedfd4d
2021-09-18 16:29:17 +08:00
Zefa Chen
852184c799 arm64: rockchip_gki.config: Enable CONFIG_VIDEO_ROCKCHIP_CIF
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I490384a059f308f0c1ed16b6bf0adba78cab51ef
2021-09-18 15:51:46 +08:00
Zefa Chen
7040b686df media: rockchip: cif: fix compile error
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I56537c637deb714f186e163227c194b65968c187
2021-09-18 15:47:08 +08:00
Zefa Chen
b40c3ebafe media: rockchip: cif get channel info for sensor driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I696fd8faf01251760771bfaefde9d5d1a1e27c46
2021-09-18 15:43:32 +08:00
Andy Yan
8e78917c6f drm/rockchip: vop2: Remove prepare_fb/cleanup_fb callback
According to commit 9bde4e671f ("drm/rockchip: vop: fix iommu crash
with async atomic")
These two callback were added to avoid iommu crash on async
commit caused by drm_atomic_clean_old_fb after drm_atomic_async_commit.

drm_atomic_clean_old_fb was removed after commit
e00fb8564e ("drm: Stop updating plane->crtc/fb/old_fb on atomic drivers")

So we can remove them to make life  simpler.

Change-Id: Iea1f2dbadd9bcfad5b8447831c0d31068d4fa97b
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-09-18 15:37:53 +08:00
Andy Yan
83b7c391d7 drm/rockchip: vop2: Use macro for window phys_id
Change-Id: I91ff9d169f5713e38c994f56980dfcf0cba0fe40
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-09-18 15:36:36 +08:00
Andy Yan
d201a63d39 drm/rockchip: vop2: No need to check active vp in layer_map_initial
We assign window between vp by plane_mask now, no
need to check which vp is activated from register.

Change-Id: I89d22f253dcd26898dc79304d51b8a8d9e802bb2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-09-18 15:34:28 +08:00
Zefa Chen
d6c2a1cabb media: uapi: rk-camera-module: add cmd to get channel info
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I1a82d1ecce860abd0098404bdee015ced527f5cc
2021-09-18 15:12:52 +08:00
Wang Panzhenzhuan
2f002ed1c4 media: i2c: ov5695: sync from kernel-4.19
1. using kernel-4.19 driver
2. adapt to kernel-5.10

kernel 4.19 drivers/media/i2c/ov5695.c ends
commit 1cb6be0adb ("media: i2c: sensor driver add g_mbus_config for
isp2")

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Id6d48840f0b1d924c7b9f036bcdfdbcbbdbe292f
2021-09-16 10:47:08 +08:00
Finley Xiao
cd953b4324 arm64: dts: rockchip: rk3308b-evb-v10: Remove invalid configuration for tsadc
Change-Id: I9eecd97f7a4df74f696fa6c8e337829800d3fcd0
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-09-16 10:36:52 +08:00
Tudor Ambarus
9c9cd780f9 UPSTREAM: mtd: spi-nor: macronix: Fix name for mx66l51235f
According to macronix website, there is no mx66l51235l part number.
The chip detected as such is actually mx66l51235f. Rename the flash.
Do not update the mx66l51235l name from the spi_nor_dev_ids[], since
there are dt that are using this compatible.

Change-Id: I23594ca8301572df8024b413379e1d688f8ca793
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit d406f49b05)
2021-09-16 10:35:45 +08:00
Shuhao Mai
6676caeae1 UPSTREAM: mtd: spi-nor: winbond: Add support for w25q512jvq
Add support for w25q512jvq. This is of the same series chip with
w25q256jv, which is already supported, but with size doubled and
different JEDEC ID.

Tested on Intel whitley platform with dd from/to the flash for
read/write respectly, and flash_erase for erasing the flash.

Change-Id: I3b4243a0391ae994af131062a8a21f659494fccb
Signed-off-by: Shuhao Mai <shuhao.mai.1990@gmail.com>
[ta: put flash_info flags in order, first SPI_NOR_DUAL_READ, then
SPI_NOR_QUAD_READ]
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20210208075303.4200-1-shuhao.mai.1990@gmail.com
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit ff013330fb)
2021-09-16 10:35:44 +08:00
Reto Schneider
8d2673c6a0 UPSTREAM: mtd: spinand: gigadevice: Support GD5F1GQ5UExxG
The relevant changes to the already existing GD5F1GQ4UExxG support has
been determined by consulting the GigaDevice product change notice
AN-0392-10, version 1.0 from November 30, 2020.

As the overlaps are huge, variable names have been generalized
accordingly.

Apart from the lowered ECC strength (4 instead of 8 bits per 512 bytes),
the new device ID, and the extra quad IO dummy byte, no changes had to
be taken into account.

New hardware features are not supported, namely:
 - Power on reset
 - Unique ID
 - Double transfer rate (DTR)
 - Parameter page
 - Random data quad IO

The inverted semantic of the "driver strength" register bits, defaulting
to 100% instead of 50% for the Q5 devices, got ignored as the driver has
never touched them anyway.

The no longer supported "read from cache during block erase"
functionality is not reflected as the current SPI NAND core does not
support it anyway.

Implementation has been tested on MediaTek MT7688 based GARDENA smart
Gateways using both, GigaDevice GD5F1GQ5UEYIG and GD5F1GQ4UBYIG.

Change-Id: I0e819a07711e58542af2bcf753b4ecb10eb9f882
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210211113619.3502-1-code@reto-schneider.ch
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 469b992489)
2021-09-16 10:35:44 +08:00
Thirumalesha Narasimhappa
408217c2f7 UPSTREAM: mtd: spinand: micron: Add support for MT29F2G01AAAED
The MT29F2G01AAAED is a single die, 2Gb Micron SPI NAND Flash with 4-bit
ECC

Change-Id: I6b1baaef7e092bf932a8fdbcb66d3db2e36ef900
Signed-off-by: Thirumalesha Narasimhappa <nthirumalesha7@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20201108113735.2533-3-nthirumalesha7@gmail.com
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 8c573d9419)
2021-09-16 10:35:44 +08:00
Thirumalesha Narasimhappa
f9df464e4c UPSTREAM: mtd: spinand: micron: Use more specific names
Rename the read/write/update of SPINAND_OP_VARIANTS() to more
specialized names.

Change-Id: I5c02b9bf76376ea4ed320cf49be1f7630329dfc3
Signed-off-by: Thirumalesha Narasimhappa <nthirumalesha7@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20201108113735.2533-2-nthirumalesha7@gmail.com
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit bdb84a22b0)
2021-09-16 09:50:33 +08:00
Miquel Raynal
91915f631e UPSTREAM: mtd: spinand: Fill a default ECC provider/algorithm
The SPI-NAND layer default is on-die ECC because until now it was the
only one supported. New SPI-NAND chip flavors might use something else
as ECC engine provider but this will always be the default if the user
does not choose explicitly something else.

Change-Id: Ia437dda2d2a43007bf04e2e6a072610c283c97d6
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200930154109.3922-6-miquel.raynal@bootlin.com
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit c8efe01028)
2021-09-16 09:36:51 +08:00
Miquel Raynal
a516594d0c UPSTREAM: mtd: spinand: Instantiate a SPI-NAND on-die ECC engine
Make use of the existing functions taken from the SPI-NAND core to
instantiate an on-die ECC engine specific to the SPI-NAND core. The
next step will be to tweak the core to use this object instead of
calling the helpers directly.

Change-Id: I91c0f9cd7da6f805fdd21b1a014c3446c6fa8813
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200930154109.3922-4-miquel.raynal@bootlin.com
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 945845b54c)
2021-09-16 09:35:17 +08:00