Commit Graph

865208 Commits

Author SHA1 Message Date
Shawn Lin
e81fbbddde arm64: dts: rockchip: rk356x-evb: fix pcie supply to regulator-fixed
Commit 6de4caa7df ("arm64: dts: rockchip: rk356x-evb: fix pcie supply
to regulator-fixed") cleanup these stuff but we still have some left.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I29ebb92cc3dd0eaccfa610c7d526e46a0c33f320
2021-07-20 18:16:13 +08:00
Sugar Zhang
c0cb36f806 ASoC: rockchip: i2s-tdm: Add support for 16ch tdm mode
TDM_I2S_ONE_FRAME:
support: [4, 8, 12, 16] channels

TDM_I2S_HALF_FRAME:
support: [2, 4, 6, 8] channels

TDM_PCM_XXX:
support: [2, 4, 6, 8] channels

Change-Id: If9d4205977ee09b993d32759353794c101dc281e
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-20 14:43:06 +08:00
Sugar Zhang
b45d966014 ASoC: rockchip: i2s-tdm: Silence warning by adding parentheses
This patch place parentheses around 'x' to silence potential warning.

Change-Id: I7c6cd70c03f71e85bd39faa092f2d0eb61409431
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-07-20 14:34:17 +08:00
William Wu
016b6c5734 phy: rockchip-naneng-usb2: keep utmi clk on during charge detection
When do charge detection, the phy specification suggests that
it needs to holds the phy in reset state to avoid USB data
communication. However, the utmi clk60_30 will be disabled at
the same time, that's causing a synchronization issue between
the phy and the USB controller.

I test on RV1126 EVB Linux SDK, do usb device hot plug test
quickly. The USB dwc3 controller may fail to enable ep0 because
of no clk60_30 is supplied by the phy.

This patch sets the phy utmi in normal mode by GRF to keeps the
utmi clk on for USB controller.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I8958a491130faeb9ac361b8639e4c3d3190fad1b
2021-07-19 17:03:46 +08:00
Cai YiWei
f6569d395b media: rockchip: isp: disable params when it stream off
Change-Id: I534c6052217e3bec01d1abb9efd1eaf1c97a1f7b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-07-19 16:32:08 +08:00
Cai YiWei
29db17b825 media: rockchip: isp: add lock for isp stream
Change-Id: I25f128a59eaf953d8b8c42313ea8afd82e7229ae
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-07-19 16:32:08 +08:00
Tao Huang
ffb0dcfe50 iommu: remove unused rk-iommu/iovmm driver
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ieca1544f10c294303d0d40c6b4c5e1a797e577a2
2021-07-19 16:32:08 +08:00
Jon Lin
e867387ca2 drivers: rkflash: Notice it when the storage device is not support
When the related print appears, it means that the SDK is too old
and the storage driver needs to be updated.

Change-Id: I63f45fba4cf52108c628f225ee23aa0819ca256f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-07-19 16:32:07 +08:00
Jianqun Xu
12df382a94 staging: android: ion: fix error return for ion_sgl_sync_range
Fixes: 975372e2cb ("staging: android: ion: support partial cpu access")
Change-Id: I0517c42ec552d584d6961baa5ac0965d5f5c5650
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-07-19 16:32:07 +08:00
Jianqun Xu
e2b7ae56ad drm/rockchip: fix error return for rockchip_gem_prime_sgl_sync_range
Fixes: e68e6d1a35 ("drm/rockchip: add dmabuf sync partial to dma_buf_ops")
Change-Id: Iaeb2ec6ad605ed06c5f6cbad0705b7977a3f7cfa
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-07-19 16:32:07 +08:00
Sandy Huang
04725d0283 drm/rockchip: drv: enable power before direct close crtc
make sure vop power is enabled before use priv function crtc_close() to
close current crtc plane.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I928e5f0f38692fbb8a134e6938ec28f8c1f41285
2021-07-19 16:32:07 +08:00
Zorro Liu
bfbc1155ac drm/rockchip: ebc_dev: release version v2.08
add EPD_A2_DITHER different from EPD_A2

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I49954553452df6dbbf2b5fa885957c22053710bd
2021-07-19 16:32:07 +08:00
Zorro Liu
61050cb9e4 arm64: dts: rockchip: rk3566-eink: change dmc freq level
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I8b06eff47c6a7e07a375d818c9f4c1833dd77cd5
2021-07-19 16:32:07 +08:00
Zorro Liu
87c011cb82 drm/rockchip: ebc_dev: release version v2.07
overlay mode: black and white use du framecount,
to fix trailing smear when draw line on grey background

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: If02bd8edb0c02a159a5359a231b487b09dfd26d2
2021-07-19 16:32:07 +08:00
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