Commit Graph

865194 Commits

Author SHA1 Message Date
Yu Qiaowei
9310dee775 video/rockchip: rga2: Add format support
Add BGR565/BGRA5551/BGRA4444.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I248c739d96afa2ec65a7092c7b584fb4730fb0f3
2021-07-19 16:32:07 +08:00
Andy Yan
97e31ffa5d drm/rockchip: vop2: Disable all other multi area when disable area0
When area0 is disabled, all other sub multi area must be
disabled, or the win may run into unexpected situlation:
such as post_buf_empty or iommu fault.

Change-Id: I8a92e45849cfc31af029ba0e86562751be92ddbd
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-19 16:32:07 +08:00
Andy Yan
2c9cf24286 drm/rockchip: vop2: fix hdr delay number setting when port_mux is not at last
HDR window is fixed(not move in the overlay path with port_mux change)
and is the most slow window. And the bg is the fast. So other windows
and bg need to add delay number to keep align with the most slow window.
The delay number list in the trm is a relative value for port_mux set at
last level.

Change-Id: I731b909c0a3f483be081e16610536b4ce5b9b8b0
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-19 16:32:07 +08:00
Wyon Bi
939c0d8b5b drm/bridge: analogix_dp: Add HBR2 support for RK3399
Change-Id: I3999e4fa0b83ede5719f341d1e9a9a8797c7576b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-19 16:32:07 +08:00
Wyon Bi
10aad71a4d drm/bridge: analogix_dp: Add support for SSC (Spread-Spectrum Clock)
DPTX implements the programmable SSC down-spreading with up to
0.5% modulation amplitude and 30k/33k modulation frequency.

Change-Id: I2c3eae8f27c84eb1b22eac8973691e0276c1588e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-19 16:32:07 +08:00
YouMin Chen
d307d5d0d3 clk: rockchip: rk3568: remove sclk_ddrc
ddr clk using SCMI that it no longer need sclk_ddrc.

Change-Id: I5cee84896083610d9b1a5bc6bcd23ac628ec5c73
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-19 16:32:07 +08:00
YouMin Chen
442c41d343 arm64: dts: rockchip: rk3568: modify dmc clk
ddr clk using SCMI, replace <&cru SCLK_DDRCLK> with <&scmi_clk 3>

Change-Id: Ibce1779718c6800d3ce3e334ce0ed5151b9a6eec
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-19 16:32:07 +08:00
YouMin Chen
c44c498d08 PM / devfreq: rockchip_dmc: rk3568: add rockchip_ddr_set_rate
Add rockchip_ddr_set_rate to support ddr frequency switching.
This function wraps the SMC call and frequency switching is
implemented in ATF. Afterwards it will call clk_get_rate to
update the rate in clock framework.
Set dmcfreq->is_set_rate_in_dmc=true to enable this process.

Change-Id: I9349a2e8413751360bf105a70e46d1453791194c
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-19 16:32:07 +08:00
YouMin Chen
36f9f4c98c arm64: dts: rockchip: rk356x: dmc: Replace system-status-freq by system-status-level
"system-status-level" property define only frequency level, not the
actual frequency. In dmc driver, it will switch from frequency level
to actual frequency base on available frequencies table which get
from ATF.

Change-Id: I489b671da5e56912d4f970d32174bdc8b1f86a08
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-19 16:32:07 +08:00
YouMin Chen
0649d01df7 PM / devfreq: rockchip_dmc: rk3568: get available frequencies from ATF
Add the function of rockchip_get_freq_info to get available ddr
frequencies info via SMC call. The frequency info include available
frequencies count and frequencies table(sort by rate from low to high).
Afterwards it will update the dmc_opp_table base on frequencies info.

If have "system-status-level" property in dmc, the function of
rockchip_get_system_status_level will get the frequency for
system-status base on frequency level and available frequencies table.

Change-Id: I73d0f999e718ba9426ad75e48ac2a4ec3fe5f496
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-19 16:32:07 +08:00
YouMin Chen
23302741aa dt-bindings: soc: rockchip: add dram frequency level support
Change-Id: I57b14a8682f9987327ff83f6c98708abd3ec8d8b
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-19 16:32:06 +08:00
Sandy Huang
d77e94bb00 drm/rocckhip: vop2: fix compile warning
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I15818e57a0f07a37ee4670df3a9fd22ef8970b72
2021-07-19 16:32:06 +08:00
Sandy Huang
4f24751267 drm/rockchip: vop2: rk356x three vp share one gamma
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Iddaf85a902feaa1c2a6004a1b8c2f419135cd039
2021-07-19 16:32:06 +08:00
Sugar Zhang
714a0e457d ASoC: rockchip: spdifrx: Replace dmaengine with rockchip pcm
rockchip pcm is a wrapper of snd dmaengine pcm with customize
config, to achieve flexible config.

Change-Id: I3a4f4571962fb694814173db294891d842749983
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-19 16:32:06 +08:00
Sugar Zhang
469895dbd8 ASoC: rockchip: spdif: Replace dmaengine with rockchip pcm
rockchip pcm is a wrapper of snd dmaengine pcm with customize
config, to achieve flexible config.

Change-Id: I35c8058c929c9e23992010655e2f9b7bc49f632d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-19 16:32:06 +08:00
Sugar Zhang
e2346e901b ASoC: rockchip: audio_pwm: Replace dmaengine with rockchip pcm
rockchip pcm is a wrapper of snd dmaengine pcm with customize
config, to achieve flexible config.

Change-Id: I01ffe93ed90700cb0634a8b53d5fe044c0415f00
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-19 16:32:06 +08:00
Sugar Zhang
d575667194 ASoC: rockchip: pdm: Replace dmaengine with rockchip pcm
rockchip pcm is a wrapper of snd dmaengine pcm with customize
config, to achieve flexible config.

Change-Id: Ie073d9e94c740fec5b0d398ccd3e212af7fba519
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-19 16:32:06 +08:00
Sugar Zhang
9e9874fa39 ASoC: rockchip: i2s-tdm: Replace dmaengine with rockchip pcm
rockchip pcm is a wrapper of snd dmaengine pcm with customize
config, to achieve flexible config.

Change-Id: I164e22dc3716075ccd520b74f03f554c075f25ec
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-19 16:32:06 +08:00
Sugar Zhang
808eed080d ASoC: rockchip: Make rockchip_pcm depends on SND_SOC_ROCKCHIP
This patch make rockchip_pcm.c compiled depends on SND_SOC_ROCKCHIP,
because all the dai of rockchip will switch to use it, and we can
do much more customize, such as minimize the prealloc buffer size.

Change-Id: Ia7a3923db6760273d2291b41c194f28b43de83b2
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-19 16:32:06 +08:00
YouMin Chen
b49ce3c9c7 soc: rockchip: rockchip_sip: add get dram frequency info support
Change-Id: Ib51fba2f3c507ebaa8d6f2f028cda78353b4e9d6
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-19 16:32:06 +08:00
Zefa Chen
54d80797a4 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-07-19 16:32:06 +08:00
Zorro Liu
84a4932359 drm/rockchip: ebc_dev: release version v2.06
1.improve buf manager to aovid memleak and buf lost
2.don't refresh overlay image when overlay disabled

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Ib3ef89752549cf89230827ed91440b831a0544e2
2021-07-19 16:32:06 +08:00
Hu Kejun
90ab8d6626 media: spi: ms41908: support focus/zoom reinit run simultaneously
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: Ic18db2b2b5ad7f9c12ad80276c4605695711a210
2021-07-19 16:32:06 +08:00
Hu Kejun
41dbb1d0d4 media: i2c: fp5501: set phase index to 0 after reinit zoom/focus
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I13af0263c587ed19f29f5f8f45e4ba9fd0f82204
2021-07-19 16:32:06 +08:00
Zefa Chen
39e7cf8ad3 media: i2c: imx335: fixed short exposure calc err in DOL2 mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I43ace096af7571b2bc4ef5f2bc2f47d5d0d89163
2021-07-19 16:32:06 +08:00
Elaine Zhang
0328e70fce clk: rockchip: rk3288: use COMPOSITE_DCLK for dclk_vop1
The CLK_SET_RATE_PARENT flag make the parent clock and the child clk is 1:1.
If the DCLK frequency is too low, the PLL frequency will be very
low, which will affect the output waveform quality of PLL, and PLL
locking may be abnormal, so add a new COMPOSITE_DCLK clock-type to
handle that.

Change-Id: Id95a14c0fbd0ad2799a77190a5d21dd490c6ede8
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-07-19 16:32:06 +08:00
Sandy Huang
1ceb8de4b1 ARM: dts: rockchip: Add rk3288-evb-rk628-rgb2gvi-avb.dts
Change-Id: I367dbee5502424566d85fd14717e3c4fbf9cf07f
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-07-19 16:32:06 +08:00
Sandy Huang
7948876081 ARM: dts: rockchip: Add rk3288-evb-rk628-hdmi2gvi-avb.dts
Change-Id: I65b0812ddbc1f19f8f22735b17b8f3f6c6e253ac
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-07-19 16:32:06 +08:00
Sandy Huang
22306fbd20 drm/rockchip/rk628: max input resolution is 4k yuv420
Change-Id: I154b72b9ce3e975e62e9f107346eb57451dbb76d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-19 16:32:06 +08:00
Wyon Bi
34f2cb9eac clk/rockchip: rk3288: Add support for sclk_testout
Change-Id: Ibd521712a6517300984db4199ac0164a499dc0f7
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-07-19 16:32:05 +08:00
Liang Chen
4995463204 arm64: dts: rockchip: rk3568: adjust opp-table
Change-Id: Icbae16ac2c077555326c1d44b0df87161e929ea6
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-07-19 16:32:05 +08:00
Zorro Liu
b9ccd4db49 drm/rockchip: ebc_dev: release version v2.05
1.full/a2/du/du4: check part also
2.auto mode use full gc16 waveform to reduce ghosting

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I3a2156ccecc5d630b1adb2425d647fb8efb090be
2021-07-09 17:09:13 +08:00
Elaine Zhang
94e452359f clk: rockchip: rk3568: add CLK_GATE_NO_SET_RATE flag for some clks
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I222f9038a96071b6e12601e5fe91779721e19a46
2021-07-09 16:23:33 +08:00
Elaine Zhang
c56568e8bf clk: rockchip: add flag CLK_GATE_NO_SET_RATE
Add CLK_GATE_NO_SET_RATE for gate clks not allowed to support setting
rate.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Iddd1c958661f8ff9217b8781426314b0619367db
2021-07-09 16:23:33 +08:00
Yu Qiaowei
d7fb9ec48d video/rockchip: rga2: Modify blend formula
The maximum alpha is 255, but after the product of color and alpha
in the blend formula, the final result is >> 8 (/256) instead of
/255, which will introduce errors.
This fix is that when alpha is 0x80~0xff, then +1.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ibba964f29a11eb226aa008a0dd5bf89048524b43
2021-07-08 14:42:49 +08:00
Caesar Wang
9e44a98d4c arm64/configs: update rockchip_linux_defconfig
1) Enable rknpu module
2) Enable CONFIG_ARM_ROCKCHIP_DMC_DEBUG=y

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I7d6a8b1aa5311030e689a19a4712d8b8dc657b09
2021-07-07 15:15:05 +08:00
Zefa Chen
ea02130e2f media: rockchip: cif: remove dummy buffer
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ib1cdf85020d37a7a4a06b726fb88597797806411
2021-07-07 09:17:28 +08:00
Zefa Chen
cdead10da7 media: i2c: imx415: support get sony BRL
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I6045b794e7c482ee63058ded7f654b55c2f604d8
2021-07-06 17:58:16 +08:00
Zefa Chen
506e3e2788 include: uapi/linux/rk-camera-module.h add RKMODULE_GET_SONY_BRL command
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I55bbf4c5e5163286e1f8c68b1a1734bcefcf2b22
2021-07-06 17:58:12 +08:00
Roger Chen
f412d2e4aa media: i2c: add driver for ov9281@30fps
Signed-off-by: Roger Chen <roger.chen@rock-chips.com>
Change-Id: I78132163e1fba4fb3fb531040df629b347ab0fa4
2021-07-06 17:41:19 +08:00
Sandy Huang
d2fa3651f8 drm/bridge: synopsys: dw-hdmi: add 1024x768p60 to default mode
Some traditional display devices like use 1024x768p60 resolution, so we
add this mode to default mode when parse edid failed.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ibb67898f8b0cc7b98f988a783f8eb4c28aa18359
2021-07-06 16:41:04 +08:00
Sandy Huang
6619bf068a drm/rockchip: add 1024x768p60 to default output mode
Some traditional display devices like use 1024x768p60 resolution,
so we add this mode to default mode when parse edid failed.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I0acd1241d84ae65d415f595d6147fed3da0b2f20
2021-07-06 16:41:04 +08:00
Sandy Huang
a5952d0f07 drm/bridge: analogix_dp: add default mode when get edid failed
This will used when product use edp2hdmi or edp2vga output.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Idf02a0d1e1bcef579fb3d6117a5e89744bdaac8a
2021-07-06 16:41:04 +08:00
Zefa Chen
8eed8785c4 media: i2c: ov8858 increase vts by add sensor PLL clk
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I38e65fb4bfa6021b5f8cea3c2314cacf334dda6d
2021-07-06 11:59:57 +08:00
Yifeng Zhao
7b891c4c10 drivers: rk_nand: zftl: fix unexpected gfp: 0x4 (GFP_DMA32) printf
bug:
[    0.980989] rknandbase v1.2 2021-01-07
[    0.981645] rknand fe330000.nandc: rknand_probe clk rate = 148500000
[    0.981862] Unexpected gfp: 0x4 (GFP_DMA32). Fixing up to gfp: 0x6000c0 (GFP_KERNEL). Fix your code!
[    0.981875] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.19.193 #35
[    0.981889] Hardware name: Rockchip RK3566 EVB1 DDR4 V10 Board (DT)
[    0.981901] Call trace:
[    0.981921]  dump_backtrace+0x0/0x15c
[    0.981934]  show_stack+0x14/0x1c
[    0.981949]  dump_stack+0xb8/0xf0
[    0.981963]  ___slab_alloc+0x5c4/0x5d8
[    0.981975]  __kmalloc+0x230/0x348
[    0.981989]  ftl_malloc+0x18/0x20
[    0.982002]  rk_ftl_init+0x5c/0x33c
[    0.982017]  rknand_dev_init+0x64/0x3e0
[    0.982028]  rknand_driver_init+0x3c/0x40
[    0.982040]  do_one_initcall+0x90/0x270
[    0.982053]  do_initcall_level+0xbc/0x160
[    0.982064]  do_basic_setup+0x30/0x48
[    0.982074]  kernel_init_freeable+0xb0/0x134
[    0.982085]  kernel_init+0x14/0x290
[    0.982096]  ret_from_fork+0x10/0x18

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I8fe8eaee13a63e8d6df077ab9d5d004d583f2aa6
2021-07-05 20:17:25 +08:00
Zefa Chen
2a520d73f0 media: add motor driver fp5501 for camera focus/zoom
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ia417598fb196e320d82ff03fcfd921d89c6a762b
2021-07-05 15:03:48 +08:00
Steven Liu
e4b2ee8a88 serial: 8250_port: reset LSR DLAB before set MCR
When setting the 16550 serial port baud rate, you need
to configure the UART to loopback mode. After setting
the DLL and DLH, you need to reset the LSR first,
and then configure the MCR to make the UART return
to the normal mode. If you do not reset the LSR
first, an error will occur when the UART RX is still
receiving data.

Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: Ia940b278554ef1d4e7a6c4550fe4a4600407a57e
2021-07-05 10:21:21 +08:00
Finley Xiao
eccf16e835 soc: rockchip: opp_select: Export rockchip_nvmem_cell_read_u8/u16()
Change-Id: I1c231afce31da9f42cd92839540d8dcb675778ce
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-05 09:42:36 +08:00
Finley Xiao
fcf284298c soc: rockchip: opp_select: Remove non-essential conditions for getting pvtm
Change-Id: I929046fa5c36f9cbc01e30edaa68f9abdfccdfd6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-05 09:42:36 +08:00
Frank Wang
a7613ef6cd usb: gadget: f_uac1: adds support for SS and SSP
This adds UAC1 support of SS and SSP speed.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I896d9e36f05eef9bb3eacfc56ef7d32aa7c89044
2021-07-05 09:13:32 +08:00