Commit Graph

1060114 Commits

Author SHA1 Message Date
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
Tao Huang
09bf3f24b1 arm64: rockchip_defconfig: Enable CONFIG_RT_SOFTINT_OPTIMIZATION
According to gki commit a0e331ecd3 ("ANDROID: GKI: Enable CONFIG_RT_SOFTINT_OPTIMIZATION").

This config helps address audio buffer underrun issues on arm64 targets.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1d75b165a8f7afc9e53a28f89e1922c0d4deb726
2021-09-06 18:16:00 +08:00
Liang Chen
dc824982a5 softirq: retrieve wakeup_softirqd()
We need call wakeup_softirqd() for the softirqs not completed in irq_exit()
when CONFIG_RT_SOFTINT_OPTIMIZATION is not defined.

Fixes: 0578248bed ("ANDROID: softirq: defer softirq processing to ksoftirqd if CPU is busy with RT")
Change-Id: Id71afcd252ddc69d97ec5167845c602f3aaba3ac
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-09-06 16:18:59 +08:00
Sugar Zhang
8bce8175e3 UPSTREAM: ASoC: rockchip: i2s: Fix concurrency between tx/rx
This patch adds lock to fix comcurrency between tx/rx
to fix 'rockchip-i2s ff070000.i2s; fail to clear'

Considering the situation;

       tx stream              rx stream
           |                      |
           |                   disable
         enable                   |
           |                    reset

After this patch:

         lock
           |
       tx stream
           |
         enable
           |
        unlock
       --------               ---------
                                lock
                                  |
                              rx stream
                                  |
                               disable
                                  |
                                reset
                                  |
                               unlock

Change-Id: Idc2f7586772a1051b6926ad1558f401b87f71978
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1630674434-650-1-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit fcb958ee8e)
2021-09-06 16:16:00 +08:00
Sugar Zhang
723a615b45 UPSTREAM: ASoC: rockchip: i2s: Add support for frame inversion
This patch adds support for frame inversion.

Change-Id: I008686fe3084b7805dacede76350a4c6a696e36b
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1629950594-14345-2-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 917f07719b)
2021-09-06 16:16:00 +08:00
Sugar Zhang
c2a7461c38 UPSTREAM: ASoC: dt-bindings: rockchip: Add compatible strings for more SoCs
This patch adds compatible strings for more SoCs.

Change-Id: Ic68c30d38fc086f7c38a2deff2abd88ee4cbc14d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1629950594-14345-1-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit d5ceed036f)
2021-09-06 16:16:00 +08:00
Sugar Zhang
f0cde942a2 UPSTREAM: ASoC: rockchip: i2s: Add compatible for more SoCs
This patch adds more compatible strings for SoCs.

Change-Id: I4238842f559d89b24fefc1d3bfebb9e8a64de3bd
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1629950562-14281-5-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit f005dc6db1)
2021-09-06 16:16:00 +08:00
Sugar Zhang
ca35f030a7 UPSTREAM: ASoC: rockchip: i2s: Make playback/capture optional
There are some controllers which support playback only or
capture only. so, make it optional. and initial capability
by 'dma-names' of DT.

Change-Id: I6e3b519217e02db49ea7593cf356d138c14741d3
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1629950562-14281-4-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 4455f26a55)
2021-09-06 16:16:00 +08:00
Xiaotan Luo
6f28200648 UPSTREAM: ASoC: rockchip: i2s: Fixup config for DAIFMT_DSP_A/B
- DSP_A: PCM delay 1 bit mode, L data MSB after FRM LRC
- DSP_B: PCM no delay mode, L data MSB during FRM LRC

Change-Id: I9af4d98cf3c9fd9699093c44dba600d2fcfebdeb
Signed-off-by: Xiaotan Luo <lxt@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1629950562-14281-3-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 1bf56843e6)
2021-09-06 16:16:00 +08:00
Sugar Zhang
f1e03c22c5 UPSTREAM: ASoC: dt-bindings: rockchip: Document reset property for i2s
This patch documents reset property for i2s.

Change-Id: I758123e579195ffbe6f6dfe5550a751d880c4a1b
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1629950562-14281-2-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 296713a360)
2021-09-06 16:16:00 +08:00
Sugar Zhang
25fb9fce0e UPSTREAM: ASoC: rockchip: i2s: Fix regmap_ops hang
API 'set_fmt' maybe called when PD is off, in the situation,
any register access will hang the system. so, enable PD
before r/w register.

Change-Id: I142537194d0ee279118a1d8d1377ca3c88ef68a9
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1629950520-14190-4-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 53ca9b9777)
2021-09-06 16:16:00 +08:00
Sugar Zhang
3752871a8c UPSTREAM: ASoC: rockchip: i2s: Improve dma data transfer efficiency
This patch changes dma data burst from 4 to 8 to improve
data transfer efficiency.

Change-Id: I0c33b4c37581ff4212dd86a936c7215fab9207b1
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1629950520-14190-3-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 7a2df53bc0)
2021-09-06 16:16:00 +08:00
Sugar Zhang
559b95ba2c UPSTREAM: ASoC: rockchip: i2s: Fixup clk div error
MCLK maybe not precise as required because of PLL,
but which still can be used and no side effect. so,
using DIV_ROUND_CLOSEST instead div.

e.g.

set mclk to 11289600 Hz, but get 11289598 Hz.

Change-Id: If622b02308860ef731047c05b675239554b7879e
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1629950520-14190-2-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 6b76bcc004)
2021-09-06 16:16:00 +08:00
Sugar Zhang
2ca4af8b6d UPSTREAM: ASoC: rockchip: i2s: Add support for set bclk ratio
This patch adds support for set bclk ratio from machine driver.

Change-Id: Id2ffa4f0e50fa0c2c36fa3eace4d47b901a7820c
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1629950520-14190-1-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit ebfea67125)
2021-09-06 16:16:00 +08:00
Sugar Zhang
e09d949bc7 UPSTREAM: ASoC: dt-bindings: rockchip: Add compatible for rk3568 spdif
This patch adds compatible string for rk3568 spdif.

Change-Id: Idf2ed43ca8186f62efa732ca7e0be5377709c1d1
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1629800162-12824-5-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit e79ef3c2cf)
2021-09-06 16:16:00 +08:00
Sugar Zhang
8d8d68847f UPSTREAM: ASoC: rockchip: spdif: Add support for rk3568 spdif
This patch adds support for rk3568 spdif which is the same
with rk3366.

Change-Id: I0b874471afda6c48283131aeb02e10de893673a7
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1629800162-12824-4-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit c5d4f09feb)
2021-09-06 16:16:00 +08:00
Sugar Zhang
d2f314d9f5 UPSTREAM: ASoC: rockchip: spdif: Fix some coding style
This patch fix some coding style.

Change-Id: I41dfa8a6b04cfdcd716a929a9eec7f27dee49fcb
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1629800162-12824-3-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit acc8b9d117)
2021-09-06 16:16:00 +08:00
Sugar Zhang
ef49a84f7a UPSTREAM: ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatile
This patch marks SPDIF_SMPDR as volatile to make it resaonable,
which also requires marking it as readable, even though it isn't.

Change-Id: If74b1f79da6695af05ac08028c6637d8cfc5c4c9
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1629800162-12824-2-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 023a3f3a1c)
2021-09-06 16:16:00 +08:00