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>
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>
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>
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>
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>
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
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>
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
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
The dll threshold is 50MHz and traning from spiflash JEDEC id.
Change-Id: I042a4826531cc399ef0ed129b2933cad92462e55
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
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)
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
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>
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
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
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
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>
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>
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
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