Commit Graph

859451 Commits

Author SHA1 Message Date
Guochun Huang
78779053e9 phy/rockchip: mipi-dphy: support rk3568
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ica831e28362ca89869d951761b8562482d39f7ff
2020-11-03 16:45:43 +08:00
Sandy Huang
2631e39729 drm/rockchip: lvds: add support rk3568
support the following work mode:

1. vop video port  -> lvds0 -> dphy0  -> single channel lvds panel
2. vop video port  -> lvds1 -> dphy1  -> single channel lvds panel
                  |-> lvds0 -> dphy0-|
3. vop video port |                  |-> dual channel lvds panel
	          |-> lvds1 -> dphy1-|

                  |-> lvds0 -> dphy0  -> single chanenl lvds panel0
4. vop video port |
	          |-> lvds1 -> dphy1  -> single chanenl lvds panel1

5. vop video port0 -> lvds0 -> dphy0  -> single chanenl lvds panel0
   vop video port1 -> lvds1 -> dphy1  -> single channel lvds panel1

Change-Id: I4e9a677fc2a3f265cb67ee9fb79f720f5e806924
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-11-03 15:43:35 +08:00
Sugar Zhang
6f16cbd3e6 clk: rockchip: rv1126: Fix MCLK_I2Sx_OUT2TO rate
This patch allows user to set MCLK_I2Sx_OUT2IO freq
by CLK_SET_RATE_PARENT.

Change-Id: Ie8f3163726d34c7cf3ee206bbc1d0866049d6eda
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2020-11-03 15:40:06 +08:00
Xu Hongfei
cb3d3f5e4c media: rockchip: isp: enable LDCH in 2th frame
LDCH will compete with LSC/3DLUT for the DDR bus,
which may cause LDCH to read the map table exception.
so isp enable LDCH in 2th frame.

Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
Change-Id: If84139362ee9ca8de43714915f4387923cf21000
2020-11-03 15:27:53 +08:00
Ding Wei
d53bd4a922 video: rockchip: mpp: rkvenc issue for iommu irq repeat
when iommu pagefault, mark_irq to disable iommu interrupt,
then handle the fault, and unmark_irq to enable hardware.

Change-Id: Id40868bfab67ac27e12c181d83a8e70a09a1e498
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-03 10:03:44 +08:00
Vicent Chi
7e3569ff9f media: rockchip: cif: fixup crop size calculation
Change-Id: I0bc33acf0a9b096e19b92fc6f010044ae4aac9b5
Signed-off-by: Vicent Chi <vicent.chi@rock-chips.com>
2020-11-03 09:32:10 +08:00
Zhenke Fan
bb0c5d7b4b media: spi: update 1608 driver
1. update safe read, limit max op size.
2. add dsp time init.
3. add dsp frame control msg.
4. support flip.
5. support file export/import, calib data read/write.
6. add align calculate func.

Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: I714aec690d00c9aa6f7f4ef58c3616bfcbf238bb
2020-11-03 09:17:52 +08:00
Cai YiWei
9e8d6dd9f8 media: rockchip: ispp: fec read yuyv format
Change-Id: I026d3c1ba6c114c67d8e589dc11990e004dcd144
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-11-02 20:10:10 +08:00
Cai YiWei
29bb0fb6a2 media: rockchip: ispp: tnr/nr/fec sync to start
Change-Id: I54efdb97cea33b4abd5ed5513f05c5d23af9d0a1
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-11-02 20:09:58 +08:00
Cai YiWei
228a86aac6 media: rockchip: isp: normal read back to enable hdr merge
Change-Id: I65ece8474522ca6c141728e4fcf08dc732f30ad4
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-11-02 20:09:47 +08:00
Shunqing Chen
8b21466cd5 drm: rockchip: dw-hdmi: add RK3568 support
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I24ec9a60d915b71281362b0b2d67fb8c288cdd14
2020-11-02 16:57:15 +08:00
Cai YiWei
e1549bec10 ARM: dts: rv1126: monitor en to ispp
Change-Id: I1ec65cf63011e1618077c198591920efc00630c2
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-11-02 16:49:06 +08:00
Jon Lin
83d107c070 spi: rockchip: Support cs-gpio
Change-Id: I8f839189038afd77d534d767d938c845aa54fedb
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-11-02 16:48:11 +08:00
Xing Zheng
5aa131bc74 ASoC: es8311: Ensure select Mic1p-Mic1n by default
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I02a0a474d5aa1d7945a0cfa9cd3b4eeeb72f2118
2020-11-02 14:44:46 +08:00
Xing Zheng
5f63961294 ASoC: es8311: fix filling others bits
The width of ADC PGA gain is 4 and we need to mask them.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I8b8f76a7feb4fa9c9e2066385f73035c1797730d
2020-11-02 14:44:46 +08:00
Wu Liangqing
b558f4e090 net: rockchip_wlan: rtl8723cs: work around clang older than 11
/tmp/rtl8703b_phycfg-53954c.s: Assembler messages:
/tmp/rtl8703b_phycfg-53954c.s:3071: Error: selected processor does not support `bfc w0,#4,#4'

Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: Ia24c316c385b7b0bea2c1cb2a0d639cf0a0b17d9
2020-11-02 14:43:15 +08:00
Olivier Moysan
29d1702c92 UPSTREAM: drm/bridge: sii902x: add audio graph card support
Implement get_dai_id callback of audio HDMI codec
to support ASoC audio graph card.
HDMI audio output has to be connected to sii902x port 3.
get_dai_id callback maps this port to ASoC DAI index 0.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Reviewed-by: Philippe Cornu <philippe.cornu@st.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1562141052-26221-1-git-send-email-olivier.moysan@st.com
(cherry picked from commit 17224cf29c)
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ib9cb418eadd29b6652cc27dd567d9f45dd79f7d7
2020-11-02 14:26:17 +08:00
Olivier Moysan
967396b05d UPSTREAM: drm/bridge: sii902x: make audio mclk optional
The master clock on i2s bus is not mandatory,
as sii902X internal PLL can be used instead.
Make use of mclk optional.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Reviewed-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1563811560-29589-4-git-send-email-olivier.moysan@st.com
(cherry picked from commit 6b72c7a98b)
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Iff673d88a7105dbe7f5a53cca51c9ec3e530d2f2
2020-11-02 14:26:17 +08:00
Olivier Moysan
c832f80310 UPSTREAM: drm/bridge: sii902x: fix missing reference to mclk clock
Add devm_clk_get call to retrieve reference to master clock.

Fixes: ff5781634c ("drm/bridge: sii902x: Implement HDMI audio support")

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Reviewed-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1563811560-29589-2-git-send-email-olivier.moysan@st.com
(cherry picked from commit 365d28c92f)
Saigned-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Icb2b1221efa8444a133c54c469f8ed5d7dba81e6
2020-11-02 14:26:17 +08:00
YueHaibing
e17f43e5e9 UPSTREAM: drm/bridge: sii902x: Make sii902x_audio_digital_mute static
Fix sparse warning:

drivers/gpu/drm/bridge/sii902x.c:665:5: warning:
 symbol 'sii902x_audio_digital_mute' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614153623.28708-1-yuehaibing@huawei.com
(cherry picked from commit f1513d20b9)
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I0a8ca9cfdcf45ed39f5b6656857c581698277ed8
2020-11-02 14:26:17 +08:00
Colin Ian King
8e24b8a7aa UPSTREAM: drm/bridge: sii902x: fix comparision of u32 with less than zero
The less than check for the variable num_lanes is always going to be
false because the variable is a u32.  Fix this by making num_lanes an
int and also make loop index i an int too.

Addresses-Coverity: ("Unsigned compared against 0")
Fixes: ff5781634c ("drm/bridge: sii902x: Implement HDMI audio support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190603142102.27191-1-colin.king@canonical.com
(cherry picked from commit 382d8dfe8b)
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ib9bda96d9add452e026f4ddb49d8998e7226f1d5
2020-11-02 14:26:17 +08:00
Dan Carpenter
b1c277ba1b UPSTREAM: drm/bridge: sii902x: re-order conditions to prevent out of bounds read
This should check that "i" is within bounds before checking reading from
the array.

Fixes: ff5781634c ("drm/bridge: sii902x: Implement HDMI audio support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190607072704.GA25229@mwanda
(cherry picked from commit 955f03a7d0)
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ib129c19feb7a9dc57df4ae5792416a5b81da25d0
2020-11-02 14:26:17 +08:00
Jyri Sarha
e12b5c868d UPSTREAM: drm/bridge: sii902x: Implement HDMI audio support
Implement HDMI audio support by using ASoC HDMI codec. The commit
implements the necessary callbacks and configuration for the HDMI
codec and registers a virtual platform device for the codec to attach.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ef6895d016554b1e0c8b388d4993bcd6a3699341.1558964241.git.jsarha@ti.com
(cherry picked from commit ff5781634c)
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I461b8d48d2dea35876b297512de3b2cb3787c184
2020-11-02 14:26:17 +08:00
Jyri Sarha
9555cc32ff UPSTREAM: drm/bridge: sii902x: Set output mode to HDMI or DVI according to EDID
Set output mode to HDMI or DVI according to EDID HDMI signature.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c42838073b83185a5cf9949caab3c70ee093b791.1558964241.git.jsarha@ti.com
(cherry picked from commit bceee9bb89)
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I2d81387000a5a3785a6b9e91adf251077391a3e1
2020-11-02 14:26:17 +08:00
Fabrizio Castro
39c14ed602 UPSTREAM: drm/bridge/sii902x: Fix EDID readback
While adding SiI9022A support to the iwg23s board, it came
up that when the HDMI transmitter is in pass through mode the
device is not compliant with the I2C specification anymore,
as it requires a far bigger tbuf, due to a delay the HDMI
transmitter is adding when relaying the STOP condition on the
monitor i2c side of things.

When not providing an appropriate delay after the STOP condition
the i2c bus would get stuck. Also, any other traffic on the bus
while talking to the monitor may cause the transaction to fail
or even cause issues with the i2c bus as well.

I2c-gates seemed to reach consent as a possible way to address
these issues, and as such this patch is implementing a solution
based on that. Since others are clearly relying on the current
implementation of the driver, this patch won't require any DT
changes.

Since we don't want any interference during the DDC Bus
Request/Grant procedure and while talking to the monitor, we
have to use the adapter locking primitives rather than the
i2c-mux locking primitives.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Peter Rosin <peda@axentia.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Yannick Fertré <yannick.fertre@st.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1541505156-8097-1-git-send-email-fabrizio.castro@bp.renesas.com
(cherry picked from commit 21d808405f)
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Idb1a4b5d3c12b47d89693790fb03486ba0021ab5
2020-11-02 14:26:17 +08:00
Lin Jianhua
37bcf2634e ARM: dts: rockchip: Add rv1109-evb-ddr3-v13-facial-gate
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: I2fb322cc88950b0b538fbd97d13e1cf42267f57a
2020-11-02 10:20:01 +08:00
Tao Huang
f95633e02b arm64: dts: rockchip: Fix usb2phy clk for rk3568
Fixes: 3fefaf4ac8 ("arm64: dts: rockchip: Add usb2 phy nodes for RK3568 Soc")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib5603aa1c610e3aa9225c2733c48da8941baaf63
2020-11-02 10:10:30 +08:00
Tao Huang
041cc34247 Revert "ARM: configs: rv1126_defconfig: enable ROCKCHIP_BUS_DEVFREQ"
This reverts commit 60005ae6b0.
Which make cpu unstable now.

Change-Id: Ib22d3ca75709f810a22d8754aac40cfab120022b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-11-02 09:53:03 +08:00
Zefa Chen
97365bb2d2 media: i2c: sensor driver support quick stream on/off
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ic22acdf7617458d3a27eeb040e14ed60e05e1c90
2020-10-30 19:16:53 +08:00
Mark Huang
351c77f873 ARM: configs: Add rv1126-uvc-spi-nand.config
make ARCH=arm rv1126_defconfig rv1126-uvc-spi-nand.config

Signed-off-by: Mark Huang <huangjc@rock-chips.com>
Change-Id: I0ff024ad52b1a94e44cdccb3716f44a91f01e4ef
2020-10-30 19:11:45 +08:00
Guochun Huang
38ba7fc4b1 drm/rockchip: dsi: add rk3568 support
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I46fde807047123a23efaa56d4c0e941b2ce80640
2020-10-30 19:05:52 +08:00
Andy Yan
647ef72a42 drm/rockchip: Add vop output interface id
Before vop 2.0, the display sub system only
support one RGB/LVDS/eDP/HDMI/MIPI connector
for one vop, so we can find which output interface
should be enabled by output_type(DPI/LVDS/HDMI).

But for the VOP 2.0 display subsystem, we may
have two connector (LVDS/eDP/HDMI/MIPI) of the
same output_type(HDMI0,HDMI1) enabled at same time,
so the output_type is not enough to give the interface
information, we need to know HDMI0 or HDMI1, eDP0 or eDP1
should be enabled.

So we add output interface id here, every connector
driver should set it correctlly to tell vop driver
to enable the corresponding output interface.

Change-Id: Ic22863f0f18f160b0df7d8f4c3b71b17ef987ea9
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-10-30 19:01:56 +08:00
Wyon Bi
07d5225f75 arm64: dts: rockchip: Add edp device node for rk3568
Change-Id: I1870e078c11813ad242b6bdf8838908cb333c713
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-10-30 18:56:24 +08:00
Wyon Bi
1c5f91260f arm64: dts: rockchip: Add edp phy device node for rk3568
Change-Id: I57495a25bed36750b1a90d605cd04ad2350a10c7
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-10-30 18:51:22 +08:00
Liang Chen
1bdf8f7722 ARM: dts: rockchip: rk312x: adjust opp-table for chips with low performance
Change-Id: I6be525c33f6dfd9fc3724c37e88d288e6d2e921a
Signed-off-by: Liang Chen <cl@rock-chips.com>
2020-10-30 18:49:58 +08:00
Wu Liangqing
3fb89274c9 net: rockchip_wlan: fix clang compile error
drivers/net/wireless/rockchip_wlan/*/core/rtw_debug.c:45:44:
error: expansion of date or time macro is not reproducible [-Werror,-Wdate-time]
            RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__);

Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: I506498ea3013ee3458dc1f8d2a88d9aac76c149e
2020-10-30 18:36:05 +08:00
Simon Xue
b1d5730217 iommu/rockchip: add irq mask cb
Change-Id: I5d2d565340395fb3573c7f25d764ed9f66333aeb
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-10-30 09:20:50 +08:00
shengfei Xu
4ed3b978b0 arm64: dts: rockchip: rk3568: bring up secondary CPUs
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ibace3899afc0381ad147e9ba7e0e342c112afb8e
2020-10-30 09:13:06 +08:00
Zefa Chen
984595c7be media: i2c: sc2310 fixed bug
1.fixed time limit error
2.fixed gain conversion function
3.fixed test pattern error
4.add quick stream on/off

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Id2f0701f6bc1a2e99a37d0400692d6f45649930b
2020-10-30 09:10:34 +08:00
Jon Lin
008340a82d drivers: rkflash: Change to use the api which the oob area available
Fixes: 69f3c341d9 ("drivers: rkflash: Support spinand non aligned read")
Change-Id: I3146cd574ac77c2d1a0b5b6563440d86766a0a9a
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-10-29 19:28:55 +08:00
Zhenke Fan
57cb778635 media: i2c: preisp-dummy: add preisp-dummy driver
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: Iaea69ab976713d7fb7eb3c63baa1bb73643bf360
2020-10-29 18:29:22 +08:00
Ding Wei
fca74dc112 video: rockchip: mpp: add query hw_id via client_type
if device in session has initialized, return hw_id directly.
otherwise, return hw_id via client_type which user set.
cat /proc/mpp_service/supports-device will show the hw_id.

Change-Id: Ie5e7c0227774ff5cacc8654f048c1447857e9e9d
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-10-29 11:10:46 +08:00
Ding Wei
fff0f25956 video: rockchip: mpp: rename for read only procfs node
using "-" instead of "_", which means the node is read only.

Change-Id: If66764daca51f96bdccd5324e251fc9bd956691d
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-10-29 11:10:42 +08:00
Cai YiWei
f0a4f6e6c8 media: rockchip: ispp: fix monitor thread exit
Change-Id: Ia94fca25013170b89902c787585c38ecb8d6059a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-10-29 08:56:05 +08:00
Cai YiWei
bfdc2e9135 media: rockchip: isp: resolution write directly to reg for first dev
Change-Id: I75f2aced1de968eb0bb16f9643b93bb5709550c3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-10-28 19:00:46 +08:00
Allon Huang
591e626b0e media: rockchip: cif: fix compile warning in rkcif_assign_new_buffer_oneframe
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: Iba2422c099d9ebadd8eb8da28a4693c80f57883a
2020-10-28 16:06:16 +08:00
Ding Wei
f28a4dea35 video: rockchip: mpp: add feature for show support devices
usage:
    cat /proc/mpp_service/support_device

Change-Id: Id5403c2d7ae1f43578d9f216e51dcdbf4996d2fc
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-10-27 18:24:22 +08:00
Yifeng Zhao
4c18d0c66b drivers: mtd: nand: rockchip: add mtd ooblayout config
Fix "No oob scheme defined for oobsize" issue for Some
NAND devices.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I76eb57becd6d01060d770e7f969bc693bf694bc0
2020-10-27 18:24:05 +08:00
Ding Wei
89ad830065 video: rockchip: mpp: add iommu pagefault handle for rkvenc
method: When iommu read/write pagefault is caused by insufficient buffer,
map a 4K buffer to keep the hardware running normally, so as to avoid
hardware timeout.

Change-Id: Ib55f92e5e63224f789c2e9dbeba51d413a600d3c
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-10-27 18:23:50 +08:00
Finley Xiao
d5d6b8da7b ARM: dts: rv1126: Add 25mV for CPU 1200MHz
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ibf6faf3ed890817af6ce58cb78f2d049e59d15d9
2020-10-27 16:44:05 +08:00