Commit Graph

1060131 Commits

Author SHA1 Message Date
Allon Huang
85614bd955 media: platform: rockchip: cif: fix panic when frm0/frm1 end occurr at the same time
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I0f77fbd0c8e847f88df921fa70f817fa79672634
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 12:34:29 +08:00
Wang Panzhenzhuan
cab7ed686c media: platform: rockchip: cif: distinguish multi id mode 2 & 4
According test, if sensor output 2mux mode, cif needs to be
configured BT656_1120_MULTI_ID_MODE_2, nor no interrupts will be
triggered. So BT656_1120_MULTI_ID_MODE_2 & BT656_1120_MULTI_ID_MODE_4
is different, distinguish it.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I8e1959131708d2cab87ab086e03023a718f5b807
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 12:34:23 +08:00
Wang Panzhenzhuan
7f1ef00ce6 media: platform: rockchip: cif: fix rk3568 missing reg
rk3568 CIF_REG_GRF_CIFIO_CON1 reg has been omitted, fix it.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ib489312ae129fd522c7d23f55d14a7852086df25
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 12:34:16 +08:00
Allon Huang
d78e75dd6f media: platform: rockchip: cif: optimize dts parameters config
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I2a8f471e52c2099f562f1bf765ea0c3e5d9e5845
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 12:34:12 +08:00
Allon Huang
077f52e6d2 media: rockchip: cif: add dynamic cropping function
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: Ied69eef87b59f088e8e160b2631ad29127b03254
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 12:34:09 +08:00
Vicent Chi
6a7992e122 media: platform: cif: not allow reset work after all streams off
Change-Id: Ifceccb3788dae7a95dae09a0c524a52b33808a26
Signed-off-by: Vicent Chi <vicent.chi@rock-chips.com>
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 12:34:03 +08:00
Allon Huang
82cb10f7bc media: platform: rockchip: cif: support bt656/bt1120 multi channels function
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I0eb7c4d2a9d5d99eb69627741febedc09133ff21
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 12:33:59 +08:00
Allon Huang
719446d5ff media: rockchip: cif: fix rk356x dvp pclk polarity
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: Ia5a41bf7b428c61d4b79911a88f9b93928de0ac6
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 12:33:55 +08:00
Allon Huang
dd88cbecb3 media: platform: rockchip: cif: support YUYV for y swap in bt1120
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I7a38f3a881be0689f3bf37736944cd7563c644ea
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 12:33:50 +08:00
Allon Huang
de6d5e60bd media: platform: rockchip: cif: register sd itf when cif pipeline completed
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I4025d325f0e5dee52a692a302a5cef699adfd6c9
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 12:33:44 +08:00
Yiqing Zeng
5da02d2d36 media: i2c: os02g10 fix set flip/mirror failed bug and fix wrong vts_def
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ie143b7311798eb328f665772caeaaf49f412b8f3
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 11:38:35 +08:00
Yiqing Zeng
ef3281ea22 media: i2c: os02g10 update init setting
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: If0465c723970e5027d051eabfc039d9c29c68295
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 11:38:28 +08:00
Zhichao Yu
26155ac228 media: i2c: jx_h62: fix set gain bug
Signed-off-by: Zhichao Yu <zhichao.yu@rock-chips.com>
Change-Id: I2375125c5eafea26c983ef6f08a0ba88c4ccec7d
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 11:38:24 +08:00
Zhenke Fan
6d8f26ae16 media: i2c: imx415 add 1080p binning mode
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: I5b4a1f2c728d6f45406c2efd5c3cc9c9306ccb3a
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 11:38:19 +08:00
Zefa Chen
eb6475f317 media: i2c: imx415: support get sony BRL
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I6045b794e7c482ee63058ded7f654b55c2f604d8
2021-09-08 11:38:14 +08:00
Vicent Chi
37b1459ded media: i2c: imx415: support thunderboot mode
Change-Id: I1634a985880d63c1f1d2873a63923fe87dc7fe68
Signed-off-by: Vicent Chi <vicent.chi@rock-chips.com>
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 11:38:11 +08:00
Zefa Chen
1e8335c0a1 media: i2c: imx415 add HDR exposure exception handling
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I76dea27e13442d5907cead4c7d7bd9d8b6e0696b
2021-09-08 11:38:02 +08:00
Wang Panzhenzhuan
dfd3780492 media: i2c: gc2375h: fix vblank set issue
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Idf54706a751766fd4a0221eb42a7035989c45c34
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 11:37:54 +08:00
Wang Panzhenzhuan
6cc30a8d4e media: i2c: gc2093: update sensor driver
1. fix linear mode ae flicker issue.
2. add hdr mode exposure limit issue.
3. fix hdr mode highlighting pink issue.
4. add some debug info.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I270501bfc382f6d811d4267469cc9406cf6e99c7
2021-09-08 11:37:36 +08:00
Yiqing Zeng
41229eb2d3 media: i2c: imx347 fix setting flow error and fix hdr gain error
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ib0f17bc1ce74dea8caad414c1d3b66a81c10e85c
2021-09-08 11:35:33 +08:00
Zefa Chen
b77efbebd4 media: i2c: imx335 increase hdr exposure restrictions
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ia097778ddd050a566801cede46f575f6954b01d7
2021-09-08 11:33:49 +08:00
Zefa Chen
724748e1be media: i2c: imx317 fixed g_mbus_config error
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I5e66d8f19740bb5c309b037fc6e706fc8b215b15
2021-09-08 11:33:22 +08:00
Wang Panzhenzhuan
b16882debb media: i2c: gc032a: set default stream off state
Set sensor in stream off state by default,
to avoid sending abnormal data in the early stage.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Iaae2fd3be95a5fcac05ebaf39a68614b7b807d4a
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 11:33:17 +08:00
Zhenke Fan
3994ca3b66 media: i2c: gc4c33 update init register array
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: I39690784108651e2ea63cbcd71ac5215f60d9db7
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 11:33:11 +08:00
Wang Panzhenzhuan
c6b3b80825 media: i2c: gc2385 match vts and 30fps strictly for cts
fix cts  CaptureRequestTest#testEdgeModeControl[1] &
CaptureRequestTest#testNoiseReductionModeControl[1]  failed
failed log:
Frame duration must be in the range of [33333333, 66666666],
value 32813000 is out of range [32833332, 67666664])

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Icdc6a89f33d6d0fd8332c51033afe6303e246ce3
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 11:32:56 +08:00
Zefa Chen
19c55f5526 media: i2c: gc02m2 fixes the base value of digital gain to avoid purple in the light
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I524ba475291fd6d0e154b9276e099f81c1fae301
2021-09-08 11:32:31 +08:00
Wang Panzhenzhuan
2052425b68 media: i2c: gc8034: add 2lane support
1. add 2lane support
2. add some debug info
3. adjust gc8034_g_mbus_config function

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I7f40c2c9ce0aea543ea629efb46585ebee387515
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-09-08 11:32:27 +08:00
David Wu
3b595992f2 arm64: dts: rockchip: rk3588: Add gmac0 and gmac1 nodes at dtsi level
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I53f1f378b9c524ddf6d1da7da6e2bf2d498162ad
2021-09-08 10:57:00 +08:00
David Wu
2627dcd2c9 net: ethernet: stmmac: dwmac-rk: Add gmac support for rk3588
Add constants and callback functions for the dwmac on RK3588 soc.
As can be seen, the base structure is the same, only registers
and the bits in them moved slightly.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I17665f22972d2eeba40241af4f6a8634c71733f4
2021-09-08 10:55:49 +08:00
Simon Xue
19cb6e3579 iommu: rockchip: optimise getting clocks
Use devm_clk_bulk_get_all instead of devm_clk_bulk_get. So we don't need
the complicated operation.

Change-Id: Idbe7668bd26b744f8d8b7d79d5eb99fa891bd0be
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-09-08 10:45:44 +08:00
David Wu
701fbf7d72 dt-bindings: net: rockchip-dwmac: add rk3588 compatible string
Add compatible string for RK3588 gmac, and constrain it to
be compatible with Synopsys dwmac 4.20a.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I6d36dffc9f33d15cb87c19e93d7e07ca47ea73f4
2021-09-07 18:59:19 +08:00
Yu Qiaowei
c1a0c8a181 video/rockchip: rga2: Add RGA debugger.
1. Support procfs, both debugfs and procfs.
2. Modify the debug node name:
   /sys/kernel/debug/rga2_debug/rga2
   -> /sys/kernel/debug/rkrga/debug
   -> /proc/rkrga/debug (add)
3. Add a node to view the driver version number: driver_version.
4. Add CONFIG_ROCKCHIP_RGA2_PROC_FS/ROCKCHIP_RGA2_DEBUG_FS/
   ROCKCHIP_RGA2_DEBUGGER, Where CONFIG_ROCKCHIP_RGA2_PROC_FS
   defaults to n, CONFIG_ROCKCHIP_RGA2_DEBUGGER defaults to y.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I89a971f18301ffa9cc7ac1962ebeee5e97d209aa
2021-09-07 15:50:53 +08:00
Jon Lin
e51271b834 spi: rockchip_sfc: support dll traning
The dll threshold is 50MHz and traning from spiflash JEDEC id.

Change-Id: I042a4826531cc399ef0ed129b2933cad92462e55
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-07 15:36:19 +08:00
Hans de Goede
03bf239b59 UPSTREAM: usb: typec: tcpm: Add support for altmodes
Add support for altmodes described in the usb-connector fwnode
associated with the Type-C controller by calling the new
typec_port_register_altmodes_from_fwnode() helper for this.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210409134033.105834-3-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I0d7de11b08f1c297e78c7f4cbea90b6d85f8abe5
Signed-off-by: yubing.zhang <yubing.zhang@rock-chips.com>
(cherry picked from commit 55d8b34772)
2021-09-06 20:16:51 +08:00
Tao Huang
afaeb74a36 usb: typec: typec_port_register_altmodes() depends on CONFIG_NO_GKI
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I030231375933eabe85c2c15cc6e9bd96748fa934
2021-09-06 20:16:51 +08:00
Hans de Goede
9cf9c33b76 UPSTREAM: usb: typec: Add typec_port_register_altmodes()
This can be used by Type-C controller drivers which use a standard
usb-connector fwnode, with altmodes sub-node, to describe the available
altmodes.

Note there are is no devicetree bindings documentation for the altmodes
node, this is deliberate. ATM the fwnodes used to register the altmodes
are only used internally to pass platform info from a drivers/platform/x86
driver to the type-c subsystem.

When a devicetree user of this functionally comes up and the dt-bindings
have been hashed out the internal use can be adjusted to match the
dt-bindings.

Currently the typec_port_register_altmodes() function expects
an "altmodes" child fwnode on port->dev with this "altmodes" fwnode having
child fwnodes itself with each child containing 2 integer properties:

1. A "svid" property, which sets the id of the altmode, e.g. displayport
altmode has a svid of 0xff01.

2. A "vdo" property, typically used as a bitmask describing the
capabilities of the altmode, the bits in the vdo are specified in the
specification of the altmode.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210409134033.105834-2-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Ib78f0b67b985751a32b6f42e79c7976f5515f6b2
Signed-off-by: yubing.zhang <yubing.zhang@rock-chips.com>
(cherry picked from commit 7b458a4c5d)
2021-09-06 20:16:51 +08:00
Zefa Chen
5f3c2be123 phy: rockchip: mipi-rx-dphy: fix compile error
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Id883341c7d91dda5d45a36442bd504393dd8fd76
2021-09-06 19:38:30 +08:00
Tobias Schramm
555b11d168 UPSTREAM: spi: rockchip: handle zero length transfers without timing out
Previously zero length transfers submitted to the Rokchip SPI driver would
time out in the SPI layer. This happens because the SPI peripheral does
not trigger a transfer completion interrupt for zero length transfers.

Fix that by completing zero length transfers immediately at start of
transfer.

(cherry picked from commit 5457773ef9)
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Change-Id: I0c14eee10fbf0ffd2938d52b6d0c88910d8fd9d7
2021-09-06 19:37:12 +08:00
Jon Lin
d54e777875 UPSTREAM: spi: rockchip-sfc: Remove redundant IO operations
Coherent dma buffer is uncached and memcpy is enough.

(cherry picked from commit 8d00f98194)
Change-Id: Ie11dae881c4a51f783f00c628442092cd9be81a5
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-06 19:37:12 +08:00
Colin Ian King
f396f06dcd UPSTREAM: spi: rockchip-sfc: Fix assigned but never used return error codes
Currently there are two places where the error return variable ret is
being assigned -ETIMEDOUT on timeout errors and this value is not
being returned. Fix this by returning -ETIMEDOUT rather than redundantly
assigning it to ret.

(cherry picked from commit 745649c59a)
Addresses-Coverity: ("Unused value")
Fixes: 0b89fc0a36 ("spi: rockchip-sfc: add rockchip serial flash controller")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Change-Id: I0d92c38cbc2c0d9b663c6e5107ee8b4b73290c74
2021-09-06 19:37:12 +08:00
Chris Morgan
b7f1f596d1 UPSTREAM: spi: rockchip-sfc: add rockchip serial flash controller
Add the rockchip serial flash controller (SFC) driver.

(cherry picked from commit 0b89fc0a36)
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Tested-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20210812134546.31340-3-jon.lin@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Change-Id: I9accd02b355d9c9ea4cf05f7bd1216d01df12aa2
2021-09-06 19:37:12 +08:00
Chris Morgan
ccafbb753c UPSTREAM: spi: rockchip-sfc: Bindings for Rockchip serial flash controller
Add bindings for the Rockchip serial flash controller. New device
specific parameter of rockchip,sfc-no-dma included in documentation.

(cherry picked from commit 538d7c2ed7)
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Link: https://lore.kernel.org/r/20210812134546.31340-2-jon.lin@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Change-Id: I3126a6f39044c6c5dce4a92ba04b1b93c784c6a5
2021-09-06 19:37:12 +08:00
Elaine Zhang
de8a7dc11e clk: rockchip: rk3588: export clk_gmac id
The mux of Clk_gmac is special and is in the php_grf register.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I678f87a48b04a9701029f455d2e67378ca9072b6
2021-09-06 19:18:27 +08:00
Elaine Zhang
f2e0ab3238 arm64: dts: rockchip: rk3588: add rockchip,grf for cru node
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I0d6091f0a3efd672acf8a21cb0b3244e51ef475c
2021-09-06 19:18:13 +08:00
David Wu
91dd9f5729 arm64: boot: dts: rockchip: Add i2c6 ~ i2c8 nodes for rk3588
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ic123685e5814a1e814a3cd16e18c6885aeec90df
2021-09-06 19:04:19 +08:00
David Wu
4927ac44de dt-bindings: net: rockchip-dwmac: add rv1126 compatible string
Add compatible string for RV1126 gmac, and constrain it to
be compatible with Synopsys dwmac 4.20a.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I1df64ba422fc44dc4887ab1de3916fbfb165a4e7
2021-09-06 18:58:53 +08:00
Ezequiel Garcia
21cada760c UPSTREAM: dt-bindings: net: rockchip-dwmac: add rk3568 compatible string
Add compatible string for RK3568 gmac, and constrain it to
be compatible with Synopsys dwmac 4.20a.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry-picked from f9da1c9d7f)
Change-Id: Ied235b90f32a368f434280f9233c2446bdcd40d3
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-09-06 18:58:33 +08:00
Tobias Schramm
c372cd663c UPSTREAM: dt-bindings: net: rockchip-dwmac: add rk3308 gmac compatible
The Rockchip RK3308 has a gmac that is not fully compatible with any of the
other Rockchip gmacs.
This patch adds a compatible string for it.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry-picked from 2cc8c910f5)
Change-Id: Ia9aaf7af18175b814a95252376fd299a6156f7d1
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-09-06 18:58:33 +08:00
Ezequiel Garcia
91df479e31 UPSTREAM: dt-bindings: net: convert rockchip-dwmac to json-schema
Convert Rockchip dwmac controller dt-bindings to YAML.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry-picked from b331b8ef86)
Change-Id: Ibb8e639fea8532260df3444e0deccf108affe70f
2021-09-06 18:58:33 +08:00
Ezequiel Garcia
e3a2a37fa6 UPSTREAM: dt-bindings: net: dwmac: Add Rockchip DWMAC support
Add Rockchip DWMAC controllers, which are based on snps,dwmac.
Some of the SoCs require up to eight clocks, so maxItems
for clocks and clock-names need to be increased.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 517a882aa2)
Change-Id: Ie758eda2091dac5081bed325e2169a23ee3dc311
2021-09-06 18:58:33 +08:00