Commit Graph

1272426 Commits

Author SHA1 Message Date
David Wu
cd4a1dca2f i3c: master: Add driver for Rockchip IP
Add driver for Rockchip I3C master IP

Change-Id: I73ca38117c0e0e603da23586c7b5c93f80917b2e
Signed-off-by: David Wu <david.wu@rock-chips.com>
2024-08-13 15:17:31 +08:00
Lin Jianhua
3dea18690f ARM: rk3506_defconfig: enable rk801/gslX680/hym8563/stk3332 for rk3506g demo board
before:
   text	   data	    bss	    dec	    hex	filename
4880931	2116804	 107272	7105007	 6c69ef	vmlinux
after:
   text	   data	    bss	    dec	    hex	filename
4922448	2288868	 118408	7329724	 6fd7bc	vmlinux

Change-Id: If066c764f6f17c35041f9f6a12afe255334b4f46
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2024-08-13 10:38:03 +08:00
Zain Wang
59482a3a75 ARM: dts: rockchip: add rk3506g-demo-display-control.dts
Change-Id: I2b0b5d31694168c37ba122a49ded99da64dbe3dc
Signed-off-by: Zain Wang <wzz@rock-chips.com>
2024-08-13 10:33:06 +08:00
Hongming Zou
17a4e1cf2a input: touchscreen: gslx680_pad support gsl1686
Change-Id: If1ffbb172b63b046496340fd7e90c51dc64d7abf
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2024-08-13 10:31:17 +08:00
XiaoTan Luo
54359b56ca arm64: dts: rockchip: rk3576: Add pinctrl idle for pdm
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: Ia1aaf014ae5c393d3e1cc9155c6b7135acc12eb7
2024-08-13 09:31:44 +08:00
Tao Huang
793f93d85a ASoC: rk817: Sync with upstream
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I6162f1b433fd6bef619f6cad8df3b1ac8e734c06
2024-08-13 09:27:52 +08:00
Jon Lin
4c9bb4b7cc arm64: dts: rockchip: rk3576: Define fspi max-dll
Change-Id: I01ab52ee7f0368bb08b86307ffb44561f07331b9
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-08-13 09:27:36 +08:00
Joseph Chen
c98ecc8caa ARM: dts: rockchip: rk3506-evb1: Update rockchip-suspend node
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9fb7eb37e3540aaa1ca3b1ba3e6792ef8655f53f
2024-08-13 09:21:52 +08:00
Joseph Chen
d9e3721dae ARM: dts: rockchip: rk3506: Add rockchip-suspend node
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2ee72633c016d83d8655f4172252bd1c0c41cd14
2024-08-13 09:21:22 +08:00
Joseph Chen
3a23e8876c dt-bindings: suspend: Add rk3506 support
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I89e5bb2a806e0848ef97db6535d9b458d145c361
2024-08-13 09:21:11 +08:00
Jon Lin
66f11090f1 ARM: dts: rockchip: rk3506: Define fspi max-dll
Change-Id: I913a406bd3992f24fd437c905bc8b0c304f7befa
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-08-13 09:16:45 +08:00
Jon Lin
7f0be18516 dt-bindings: spi: rockchip-sfc: Add rockchip,max-dll property
Change-Id: I8b559635082a1a5785cc5075afba5de13cde8d89
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-08-13 09:11:10 +08:00
Jon Lin
2b1b24b4f0 spi: spi-rockchip-sfc: Support maximum dll cell setting for chips
Change-Id: I9bee5b29db8c1eb657720101f32c8d057328451c
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-08-13 09:11:10 +08:00
Cai YiWei
ec95dade2e media: rockchip: isp: fix isp39 sensor mode config
Change-Id: I9a98a86c1173392a1e44c0accecd769c3bf320db
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-08-12 19:18:05 +08:00
Yu Qiaowei
ad9aebd65b video: rockchip: rga3: optimize 'time' debug log
1. Add flush cache cost time
2. Fix wrong time-consuming statistics of set_reg

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I35254e49cd18e49d3ac691fc06ff67d2e36d3149
2024-08-12 19:02:50 +08:00
Joseph Chen
14ce427bb0 mfd: rk808: Add rk801 PMIC support
PMIC RK801 consists of:
  - 4 x BUCK
  - 2 x LDO
  - 1 x SWITCH
  - 1 x Pwrkey

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If65c2c3ac41cd6c6199e22c65c54e8600c113148
2024-08-12 17:59:54 +08:00
Joseph Chen
1e9b96e375 ARM: rk3506_defconfig: Set CONFIG_ROCKCHIP_SUSPEND_MODE=y
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9d1ffbc35c318a75ad165ad004e53637f9edd992
2024-08-12 14:31:39 +08:00
Cai YiWei
a07115527b media: rockchip: isp: isp39 add api to get params
enable CONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V39_DBG in kernel config
to enable api, disable default

Change-Id: I37aafc3f10023ab4cf2791de34bb5ad8855fe1f3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-08-12 11:06:05 +08:00
Cai YiWei
df4d3676e7 media: rockchip: isp: fix isp39 params
Change-Id: Ia9e0e79964072464f068e426f2cfaef30d2414ed
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-08-12 11:06:05 +08:00
Cai YiWei
37a90dcc03 media: rockchip: isp: frame buf default to ddr for isp39 multi sensor
Change-Id: I628d8eae0969c5c0f4ba9c405f6254e4063557a5
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-08-12 11:06:05 +08:00
Wu Liangqing
11ed525680 arm64: dts: rockchip: rk3562-android: enable rockchip_suspend
Change-Id: I934e210b35d9cbf9b80c374569ff5bba53ffb87d
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2024-08-12 10:53:19 +08:00
XiaoTan Luo
6e848cbd34 ASoC: rk817: Fix no sound issue on first switch from 48K to 16K/8K
When switching sample rates, the clock settings are as follows:
- For 48K, MCLK = 256fs = 256 * 48K = 12288K
- For 16K, MCLK = 256fs = 256 * 16K = 4096K
- For 8K, MCLK = 256fs = 256 * 8K = 2048K

The `set_sysclk` function in the soc i2s_tdm controller does not
actually perform `clk_set_rate`; it merely passes the parameters.
The actual `clk_set_rate` is called during `i2s_tdm_hw_params`.
However, `rk817_hw_params` performs `restart_clk_apll` inside,
which sets the PLL parameters that do not match the MCLK,
resulting in silence. To resolve this, clk_set_rate for the MCLK
frequency should be called within the set_sysclk function.

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I3ad233542a5e8b16ae72f829e086a25f5be4a095
2024-08-09 18:48:35 +08:00
Wu Liangqing
cfe645f143 arm64: dts: rockchip: add rk3576-test5-v10.dts for rk3576 test5 evb
Type: Fix/Function/PerOpt
Redmine ID: #N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: I39b177c63773753ee8efe68446f2d7c532cf831c
2024-08-09 18:13:39 +08:00
Liang Chen
0895030273 Revert "arm64: dts: rockchip: rk3576: set limit rate and offline cpus for early suspend"
This patch will impact performance, so disable this feature by default.

This reverts commit 980a9f6834.

Change-Id: I8f7e2413049f92e87b4a915e9e597172ecb955ce
Signed-off-by: Liang Chen <cl@rock-chips.com>
2024-08-09 16:34:26 +08:00
Xuhui Lin
68cf3d9c46 ARM: dts: rockchip: rk3506-pinctrl: Increase driver strengths of some SPI IOs
According to SPI signal test results:
(1) When using SPI IOs under 3.3V power domain, need to increase
    driver strength to level3.
(2) When using SPI IOs under 1.8V power domain, use default driver
    strength(level2) is best.

Change-Id: I0404418256d4f9671393345bf44ffd4e285af584
Signed-off-by: Xuhui Lin <xuhui.lin@rock-chips.com>
2024-08-09 16:17:06 +08:00
Ye Zhang
63cfe63d81 gpio: rockchip: Prevent underflow unsigned variables.
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I2910fe7c57683bbd175cbc4b28584ff84f037d07
2024-08-09 15:01:28 +08:00
Ye Zhang
dc86ccfba0 gpio: rockchip: release reference to device node
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I2f755fe900a54d9c82c9e6a3e889330ea6c298ac
2024-08-09 15:01:15 +08:00
David Wu
64aac2b25c arm64: dts: rockchip: rk3576: Add reset nodes for i3c
Change-Id: I0bb82b9c271e7f5409aae0203b7816e4678d4dc0
Signed-off-by: David Wu <david.wu@rock-chips.com>
2024-08-09 09:21:11 +08:00
Ye Zhang
62dec0a878 rockchip: gpio: fix debounce config error
1. Prevent data from crossing boundaries
2. Support GPIO_TYPE_V2_2 debounce config

Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I57e295806a4f0f4002527daf77fe41f584a7e9e1
2024-08-09 09:21:10 +08:00
Sugar Zhang
e8c26e3dfa arm64: dts: rockchip: rk3399: Remove mclk define in i2s_8ch_bus
mclk pin has been addressed in i2s_8ch_mclk, and used by
codec, so, do not redefine it again in i2s_8ch_bus.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I74a3c3f817142ff4c313bbf9a39ced215f04feb6
2024-08-09 09:21:10 +08:00
Jianwei Fan
faf5d48659 media: rockchip: vicap fix bug of tasklet disable when tasklet not enable
Change-Id: Ibf700123ace0227990b68b01d0919034ecb53904
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-08-09 09:21:10 +08:00
Jianwei Fan
fc5d560717 media: i2c: rk628: DSI mode add 4096x2160 res support
1.mipi date rate need to set 1850Mbps
2.DSI RGB output need to set skip first frames

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I0a339e339bd94dae66be682a4481a4b0cef8ff99
2024-08-09 09:21:10 +08:00
Jianwei Fan
4fb1432e67 media: i2c: rk628: fix YUV420-10bit hdmirx input support
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ifa0880c563d04a44f43054596a48d622155e491d
2024-08-09 09:21:10 +08:00
Jianwei Fan
ae0bee6029 media: i2c: rk628: fix user set csc color range
Change-Id: Ibc35c8bbbc54c9b4de4977d9500083afa2857b36
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-08-08 16:42:55 +08:00
Weixin Zhou
af06e7267a rtc: hym8563: i2c read once at the probe/resume entry
In some manufacturers, we have found that the i2c clk/data
pullup power is disabled when the system is shutdown or suspended,
As a result, the first i2c communication fails when probing
or resuming. Therefore, it is necessary to perform i2c
communication once by default when probing or resuming.

Change-Id: I0819d733ff3a6f9172c1d3bf7b8e5bf72bc52730
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2024-08-08 16:38:04 +08:00
XiaoTan Luo
48aa220b8b ASoC: rockchip: pdm_v2: Fix clk glitch on runtime PM
For controller which is managed by PD (power-domain),
when PD off, the controller is reset to the default
status, and the FRAC-DIV is a fixed value(1/20).

Once the mclk is enabled, there are some high freq cycle
leak, to fix this issue, we use the pinctrl-idle to
block these cycles until the config has been come back
to the normal state.

Ref: commit 1f8e86a5ea ("ASoC: rockchip: pdm: Fix clk glitch on runtime PM")

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I8b1226896d8ca20293335a879452df732801f712
2024-08-08 14:21:01 +08:00
Jon Lin
746acc7fa8 mtd: spinand: dosilicon: The nand flash does not support 84H and 34H command
Change-Id: Ibd3ad538f453d2baf0f1ae1e622cb7a04aa1af6c
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-08-08 14:06:43 +08:00
Zhang Yubing
f9166c5c1d drm/rockchip: vop2: config csc parameters from bcsh defaultly
If "POST_CSC_DATA" property is used to transfer the csc
parameters, it need config the csc registers by the
parameters from "POST_CSC_DATA". Otherwise, It should
config the csc register by the parameters from the
connector bcsh property.

Change-Id: Ia126941d15d4403c6b690fcc6b7937f03ca71951
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-08-08 10:09:19 +08:00
XiaoDong Huang
13c1f36652 arm64: dts: rockchip: rk3576: enable RKPM_SLEEP_PIN1_EN by default
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Iddf9ec665372501774bdf37d01d77f4d58a5c6c1
2024-08-08 10:06:56 +08:00
Sugar Zhang
ce549629cf ARM: dts: rockchip: rk3506g-test1: Add property 'cpu-supply'
Fix no cpufreq entry.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I65de403ddc229d02e553d248ce906178773a805c
2024-08-08 09:46:53 +08:00
Sugar Zhang
3f4436826e ASoC: rockchip: i2s-tdm: Fix 1-Bit offset case
There is a ASYNC bridge between HCLK and SCLK domain.

On AUPLL case, we found RX data shift ahead 1-Bit on
TRCM-TX sometime (0.00x%), but it success on GPLL(50w+).

The root cause:

HCLK Domain: Config the XFER-3, pull up SIGNAL to HIGH.

SCLK Domain: SCLK_RX/TX samples the HIGH level to start.

Because HCLK Domain is async to SCLK Domain, So, there
is a risk that RX samels the HIGH Level, but RX not.
(at the edge XFER from LOW to HIGH)

Solution:

1, Gate the SCLK
2, Config the XFER-3
3, Ungate the SCLK

Thus, TX/RX Always samples the right Level at the same
time.

After this patch, Test passed over 50w+.

Test Script:

  #!/bin/sh

  count=0

  killall aplay
  sleep 1

  while true
  do
      yes `echo -en "\x11\x11\x22\x22"` | tr -d '\n' | \
      aplay -D hw:2,0 --period-size=1024 --buffer-size=4096 -r 192000 -c 2 -f s16_le &>/dev/null &
      sleep 0.1
      rxd=`io -4 0xfe470028 | awk '{print $2}'`
      echo "[$count]: $rxd"
      if [ "$rxd" != "22221111" ]; then
          echo "FAIL: mismatch: $rxd, expected: 22221111"
          break
      fi
      count=$((count + 1))
      killall aplay
      sleep .1
  done

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I10258b92d2f62ab36b5ccc55e8bcc752f3af9d4f
2024-08-08 09:45:47 +08:00
Sugar Zhang
36730a6e09 ASoC: rockchip: utils: Add rockchip_utils_clk_gate_endisable helper
Similar to the API clk_gate_endisable.

Can be replaced by API clk_gate_endisable directly
once the symbol exported been merged.

It's workaround for GKI.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I91a53734add53b3156afc2b03b25cdc207822331
2024-08-08 09:45:47 +08:00
Sugar Zhang
b6f0f8c611 ASoC: rockchip: i2s-tdm: Add support for comp resume deferred
Slave Resume Situation:
i2s-tdm acts as slave, and the external device, such as dsp
acts as master.

aplay -D hw:0,0 --period-size=1024 --buffer-size=4096 t.wav &

echo mem > /sys/power/state

the aplay was freeze and system go to sleep.

press the power-key to wakeup system, and now the aplay will
resume playback.

But, there is a case the external dev resume too slow to provide
clk to i2s-tdm, so, we need add a delay to make it resume well.

e.g.

&i2s {
	rockchip,resume-deferred-ms = <1000>;
};

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: If9a82c8357cef23bd50305c585ee28794f45d347
2024-08-08 09:45:47 +08:00
Chen Shunqing
61632fe66b media: i2c: rk628: reset hdmirx when HDMI mode change to DVI mode
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: Iee807f52bd2a3a78b51ad7dfec6d4bd010ad8299
2024-08-07 18:43:34 +08:00
Chen Shunqing
dd812e1c19 media: i2c: rk628: set CPLL_REF_CLK to 1194M
Fix CTS HF2-6/HF2-23

Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I90f56fbeb6917841208ac9b6b82ec2fdb3566354
2024-08-07 18:43:25 +08:00
Chen Shunqing
8826fbcc1d media: i2c: rk628: fix no display because clear avmute is not received
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: Iede1b6f196747eea5864b853c28b1cccaa7baa6c
2024-08-07 18:43:25 +08:00
Sandy Huang
d56a729dca drm/rockchip: vop: fix lut_res init error
Fixes: 07bceaca58 ("drm/rockchip: vop: add support write regs")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Icddbba0edff100a09b22724d05afc19461b6e8e8
2024-08-07 16:57:19 +08:00
Sandy Huang
bf023b7cd6 drm/rockchip: vop: add aclk info to dri summary
VOP aclk freq is very important info for our debug, so add it to
drm dri summary.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Iad97b5b81752e970622f55888fcc4327d2bb4c93
2024-08-07 16:53:57 +08:00
Sandy Huang
973c554999 drm/rockchip: vop2: add aclk info to dri summary
VOP aclk freq is very important info for our debug, so add it to
drm dri summary.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I197e64104c49bd62d85d5dba4b0c4e1763fd62e2
2024-08-07 16:53:57 +08:00
Sandy Huang
0ab8cd7ddb drm/rockchip: vop2: add active_display_mask to mask active display
active_vp_mask mask the active vp, and at rk3588 splice mode, vp0 and
vp1 will be mask, it can't indicate display number, so we add the
active_display_mask to record it.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I7bebf21b4d844d92956d6e7427162cdbe694fe7a
2024-08-07 16:53:57 +08:00