Commit Graph

1086968 Commits

Author SHA1 Message Date
Guochun Huang
92f7012d3c misc: rk628: post_process: add scaler color_bar debugfs node
Enable horizontal color bar
echo 1 > /sys/kernel/debug/rk628/2-0050/scaler_color_bar

Enable vertical color bar
echo 2 > /sys/kernel/debug/rk628/2-0050/scaler_color_bar

Disable color bar
echo 0 > /sys/kernel/debug/rk628/2-0050/scaler_color_bar

Change-Id: Ic47d7edf27f174b16ea1c2841cbf7b9df8c63546
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:18 +08:00
Guochun Huang
f459a547f8 misc: rk628: dsi: add color bar debugfs node
enable dsi color bar
echo 1 > /sys/kernel/debug/rk628/2-0050/dsi_color_bar

disable dsi color bar
echo 0 > /sys/kernel/debug/rk628/2-0050/dsi_color_bar

Change-Id: Ib3eabeab685ab0f2ab9c5bcef8034117d7b513a7
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:18 +08:00
Algea Cao
a5f5b21bec misc: rk628: hdmirx: Support rk628f hdmirx
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ib397faca675031b104bba77b598504ad3d16aa5f
2024-01-19 10:11:18 +08:00
Zhibin Huang
435983a791 misc: rk628: dsi: cmd_size is limited to 2048 in command mode
Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I62a0808cb31860b4713079069b974c0fe4fd3b57
2024-01-19 10:11:18 +08:00
Zhibin Huang
e92dac8dbe misc: rk628: dsi: added support for non-continuous clocks
Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ib8ccb97375e56ab3ae98491797f5a7b93f47226f
2024-01-19 10:11:18 +08:00
Sandy Huang
86141e171e misc: rk628: gvi: add color depth config
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I0faab0e23cb8b22cd5c31a4bf60a1571acae0818
2024-01-19 10:11:18 +08:00
Zhibin Huang
d9ae4cc5e6 misc: rk628: dsi: specify the rate per line of dsi
Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I475909661de3827b8e8ea6c7c36ee0c39726be53
2024-01-19 10:11:18 +08:00
Guochun Huang
b55b68026c misc: rk628: bt1120 rx: configure bt1120 timing
Change-Id: Id0997a79c3c6132e2e6c5f456e733b982e72d177
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:18 +08:00
Sandy Huang
9b99adc51a misc: rk628: gvi: enable 8 pixel align for gvi compatibility
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I86422a7bfe5fc2165cd04003665c6b76af21338b
2024-01-19 10:11:18 +08:00
Sandy Huang
7199ce284d misc: rk628: gvi: add timing offset for gvi two section mode
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I51c618cdb15fadb89bba3a04f233b37f254101c0
2024-01-19 10:11:18 +08:00
Weixin Zhou
efb812d4a7 misc: rk628: Add efuse driver
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Icba495ce256d62a1e94dd4168b19d4d303160a23
2024-01-19 10:11:18 +08:00
Guochun Huang
8b6abe2beb misc: rk628: check display route after get version info
Change-Id: I397c835c249223ca1f9e071bafa9377a2b0cfa71
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:18 +08:00
Guochun Huang
c69c5cf7f1 misc: rk628: hdmitx: compatible with rk628f
Change-Id: I9db10ee75e1bf099d39c3926f7cd66c0bb4e3b84
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:18 +08:00
Guochun Huang
9ee4c002c1 misc: rk628: dsi: select phy which share by dsi and csi as dsi phy
Change-Id: If44f15cd23d16bd017a4740dadbf4bdc12ea20a2
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:18 +08:00
Guochun Huang
5723ff1f5e misc: rk628: hdmitx: disable/enable display when system suspend/resume
Change-Id: I7cbd1bfeff186d3333473f3944ae1d15f78ae31d
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:17 +08:00
Guochun Huang
673444991a misc: rk628: display: compatible with rk628f
Change-Id: I51e0ea03baa92e5e7083779b7a59fbe81d104ec5
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:17 +08:00
Algea Cao
c046c02467 misc: rk628: Supports different versions of the rk628
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I7f5102a81648abbacfbd90caf3e186649e219d2b
2024-01-19 10:11:17 +08:00
Guochun Huang
bc81dfef6e misc: rk628: enable/disable display by fb .notifier_call helper
Change-Id: I485d374d1441f6e04a9adc20f4d5fab77782059e
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:17 +08:00
Guochun Huang
8856e9b434 misc: rk628: rgb/bt1120: optimize drivers details
Change-Id: I277649833b4394f7f8437b7453df441f3e067a45
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:17 +08:00
Guochun Huang
97776a2a9f misc: rk628: panel: make power on/off sequence delay can be configured
Change-Id: Iacfee7fc1c734a98727e34108bf6da8515f91499
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:17 +08:00
Jianwei Fan
b21f534802 arm64: dts: rockchip: rk3588-evb7-rk628: add rk628 config for evb7
Change-Id: Ibf63df6826ee0a3affbb1e139c568de3d2708aef
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-19 09:55:12 +08:00
Chen Shunqing
83e4ca2355 arm64: dts: rockchip: rk3588-evb1-lp4-v10-rk628-hdmi2csi: set i2c rate to 400k for rk628f
Change-Id: Ib1b7c6fc3ddc95180bbf0eaa73c280993ae2eebd
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-19 09:55:12 +08:00
Jianwei Fan
c278e3df44 arm64: dts: rockchip: rk3588-evb1: modify rk628 config adapt to rk628f
Change-Id: I052b6a08f441f876235b8f8fd2b202c698b562a5
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-19 09:55:12 +08:00
Guochun Huang
abc2b514b2 arm64: dts: rockchip: rk3568-evb-rk628: add more hdmi in route
1. hdmi2dsi(1080x1920)
2. hdmi2dsi-dual(1440x2560)
3. hdmi2lvds(800x1280)
4. hdmi2lvds-dual(1920x1080)

Change-Id: Ie69541841a90c66806ba532c1b2254d3046e0369
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 09:55:12 +08:00
Jianwei Fan
442fb91b48 arm64: dts: rockchip: add rk3568-evb-rk628-hdmi2bt1120 config
Change-Id: Iee766114453976b2bc71687ae884b977a228e3a8
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-19 09:55:12 +08:00
Guochun Huang
4aa2482688 arm64: dts: rockchip: add support rk3568-evb-rk628-ddr4-v10 board
The PWM on the RK3568 with RK628 board has a hardware inverting
circuit to improve drive strength.

Therefore, software needs to change the PWM polarity to get
the desired PWM output.

Change-Id: I3a87d6aa16c4e09780a566117e4864d8d235038e
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-01-19 09:51:47 +08:00
Algea Cao
3710e830ff drm/bridge: dw-hdmi-qp: Support hdmi force output
Support hdmi output specific resolution and color format
regardless of whether hdmi is connected.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I3f18aeb04427846e06b6a4397a4c6df77bbbcab2
2024-01-19 09:43:56 +08:00
Algea Cao
6ea5afc91a dt-bindings: display: rockchip: dw_hdmi-rockchip: Add force output property
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I3218c9f827712540fbb5daac59d660aaebc453b4
2024-01-19 09:43:56 +08:00
Algea Cao
9a139f8771 drm/bridge: synopsys: Support hdmi force output
Support hdmi output specific resolution and color format
regardless of whether hdmi is connected.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I228a74d128aa818166f589798897729473d97610
2024-01-19 09:43:56 +08:00
Guochun Huang
334c7192e6 drm/rockchip: drv: display logo when specify force output mode
resolve the following error when displaying the boot logo.

 rockchip-drm display-subsystem: bound fe0a0000.hdmi (ops dw_hdmi_rockchip_ops)
 rockchip-drm display-subsystem: connector[HDMI-A-1] can't found any match mode
 [drm] HDMI-A-1 support modes:

 [drm] "1280x720": 60 74250 1280 1390 1430 1650 720 725 730 750 0x8 0x5
 [drm] "4096x2160": 60 556744 4096 4104 4136 4176 2160 2208 2216 2222 0x40 0x9
 [drm] "4096x2160": 60 556188 4096 4104 4136 4176 2160 2208 2216 2222 0x40 0x9
 [drm] "2560x1600": 60 348500 2560 2752 3032 3504 1600 1603 1609 1658 0x40 0x6
 [drm] "2560x1600": 60 268500 2560 2608 2640 2720 1600 1603 1609 1646 0x40 0x9
 [drm] "1920x1440": 60 234000 1920 2048 2256 2600 1440 1441 1444 1500 0x40 0x6
 [drm] "1856x1392": 60 218250 1856 1952 2176 2528 1392 1393 1396 1439 0x40 0x6
...
[drm] "640x480": 60 25175 640 656 752 800 480 490 492 525 0x40 0xa
 [drm] uboot set mode: h/v display[1080,1920] h/v sync_end[1180,1940] vfresh[57], flags[0x5], aspect_ratio[0]
 rockchip-vop2 fe040000.vop: [drm:vop2_crtc_atomic_disable] Crtc atomic disable vp0
 rockchip-drm display-subsystem: can't not find any logo display

Change-Id: Ia32189311d87f5d5ab5f7fdc5c14d5e2ddf24d8d
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 09:43:56 +08:00
Cai Wenzhong
1eef5bddea arm64: dts: rockchip: rk3588-vehicle-maxim-cameras-s66.dtsi: camera module and lens name using default
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: If0d997d4f37fb0c39da7179073527dc3a363d73e
2024-01-18 15:48:17 +08:00
Cai Wenzhong
0816368cf2 arm64: dts: rockchip: rk3588-vehicle-evb-maxim-max9671(/2)2-d(c)phy0(/3).dtsi: camera module and lens name using default
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: I2d24ca79fa856e7280df9d0d3d48a3d998712663
2024-01-18 15:12:49 +08:00
Luo Wei
4aacfcb8ba arm64: dts: rockchip: rk3588-vehicle-evb: move port dts to bridge node for evb20
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I220a8b1afbc4396219f98652ca27d9595ebbacf8
2024-01-18 15:12:02 +08:00
Sugar Zhang
0d8cce351f ASoC: rockchip: i2s-tdm: Fix stuck on probe
Fixes: 13c446a390 ("ASoC: rockchip: i2s-tdm: Handle HCLK with runtime PM")

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I07ac58ecee8488d941cf2cbec8d4433db4b18702
2024-01-18 10:35:53 +08:00
Sugar Zhang
bba2c5a220 arm64: dts: rockchip: rk3308: Assign 'i2s-lrck-gpio' for SOF
This patch assign the LRCK pin for TDM_ONE_FRAME on Slave mode.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I2ef950170d6646f3d04115662099918942c3cf9d
2024-01-16 19:05:35 +08:00
Sugar Zhang
618ed5561f arm64: dts: rockchip: rk3568: Assign 'i2s-lrck-gpio' for SOF
This patch assign the LRCK pin for TDM_ONE_FRAME on Slave mode.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I0f0e1a1c778e1e42a5bb5471148358815f6d7b2a
2024-01-16 19:05:35 +08:00
Sugar Zhang
9252b6c35b arm64: dts: rockchip: rk3588: Assign 'i2s-lrck-gpio' for SOF
This patch assign the LRCK pin for TDM_ONE_FRAME on Slave mode.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I28bd554d64f9c63073d2c7f67b9e101c63266c8f
2024-01-16 19:05:35 +08:00
Sugar Zhang
9b3626c630 ASoC: rockchip: i2s-tdm: Fix channels order for TDM_ONE_FRAME
This patch fix multi-channels order for TDM_ONE_FRAME on SLAVE
mode.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ib6543cf0740516d5df1570245abf07fcce9082c3
2024-01-16 19:05:35 +08:00
Sugar Zhang
16e6fedff0 ASoC: rockchip: i2s-tdm: Use GPIOD_ASIS for TDM_MULTI_LANES
Situation for 'i2s-lrck':

Should use flag GPIOD_ASIS not to reclaim LRCK pin as GPIO function,
because we use the same PIN and just read EXT_PORT value which show
the pin status.

Situation for 'tdm-fsync':

A. when the pin is a generic gpio as the ref signal pin which is drived from
   external. should use flag GPIOD_IN to reclaim as GPIO_IN function.

B. when the pin is the same pin from the 'clk-src' on the same SoC, we can
   use the 'clk-src' fsync out signal as the 'tdm-fsync' to query status.
   in this case, should use flag GPIOD_ASIS not to reclaim it as GPIO.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I529d982a7e49cb90c02b7670a58759607f4e4f32
2024-01-16 19:05:35 +08:00
Sugar Zhang
e1d8735a43 ASoC: rockchip: i2s-tdm: Fix warning
This patch fix resources from of_iomap() not released.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I46a7f4996bc751ade34071727a350137a313b446
2024-01-16 19:05:35 +08:00
Sugar Zhang
13c446a390 ASoC: rockchip: i2s-tdm: Handle HCLK with runtime PM
This patch handle HCLK with runtime PM to simplify code.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I4a75b0998053e7ef1edb3ecf3bc50ab84eddce70
2024-01-16 19:05:35 +08:00
Sugar Zhang
5f7f65028a ASoC: rockchip: i2s-tdm: Simplify clk sync on TRCM mode
There are clk sync issue on TRCM mode for RK3308/RK1808/PX30,
and the previous soluation is to make TX/RX reset at the same
time to fix that. Unfortunately, it fails on PX30-I2S0, because
the reset-TX and reset-RX bits can't be addressed at the same time.

Now, we use another way to fix it:

  reset_control_assert(i2s_tdm->tx_reset);
  reset_control_assert(i2s_tdm->rx_reset);
                   |
          gate the i2s src clk
                   |
  reset_control_deassert(i2s_tdm->tx_reset);
  reset_control_deassert(i2s_tdm->rx_reset);
                   |
         ungate the i2s src clk

as shown above, use the pair gate/ungate src clk to make the
TX/RX reset at the same time.

Change-Id: Ib320ad13350516100eb11c7717e1bd9005abaf39
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2024-01-16 19:05:35 +08:00
Sugar Zhang
7ae6fd2b0e ASoC: rockchip: i2s-tdm: Fix multi-channels order for TRCM
TRCM on Master mode require TX/RX enabled at the same time,
or need the one which provide clk enabled at first. In this
situation, one direction's FIFO maybe XRUN which may break
the channels order.

This patch add dmaengine for this mode to handle this situation.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I831aead0371228661620b54188048e4f3daa717e
2024-01-16 19:05:35 +08:00
Sugar Zhang
e99961f4af ASoC: rockchip: Add dmaengine for TRCM mode
TRCM require TX/RX enabled at the same time, or need the one
which provide clk enabled at first. In this situation, one
direction's FIFO maybe XRUN which may break the channels order.

This patch add dmaengine for this mode to handle this situation.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I30b4ec134b06516d80de4c1d0ccaf916513294ab
2024-01-16 19:05:35 +08:00
Su Yuefu
ca4e22208b media: i2c: sc530ai: update gain map according to datasheet
Change-Id: I842a776b4f668848a81a2b928f136df1acc5227f
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
2024-01-16 18:26:25 +08:00
Frank Wang
99111d8fb2 hwspinlock: rockchip: object to unlocking someone else's lock
Check hwlock user id and object to unlocking someone else's lock
when invoking unlock() API.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I46c256fd703fa56ce3d175ff2d721f53d3615ec0
2024-01-16 16:19:07 +08:00
Frank Wang
3229c7d5d5 hwspinlock: rockchip: support to set hwlock user in dt
With this commit, we can set hwlock user id in DT with
"rockchip,hwlock-user-id" property, if it is not set, the driver
use default value 0x01 instead.

Change-Id: Ib7ecc3eaf23ba79d85dc82182a9db0760c6d830c
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2024-01-16 16:18:54 +08:00
Frank Wang
fa524e432a dt-bindings: hwlock: rockchip: add hwlock user id property
Set hwlock user id with the "rockchip,hwlock-user-id" property.

Change-Id: I46327ff4146e9c0999def48d67a3538462b82bfb
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2024-01-16 16:18:41 +08:00
Zhang Yubing
0a30d6ee1e drm/rockchip: dw-dp: filter yuv420 when display mode not support
Change-Id: I1aead8dcd05dffdf89c62c162524bfde9c63f86e
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-01-16 15:45:21 +08:00
Luo Wei
f13fe816e0 arm64: dts: rockchip: rk3588-vehicle-evb: move port dts to bridge node for rohm
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I7c51267923b82791a6f70b8086f08d5b661399fa
2024-01-16 15:44:38 +08:00