Commit Graph

1087010 Commits

Author SHA1 Message Date
Jianwei Fan
08ffa240c1 media: i2c: rk628: read raw state must delay some time when clear interrupt
Change-Id: Ieccfd9135edf3a94d1b74d8c3492984c1b30d6e3
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-19 10:11:21 +08:00
Jianwei Fan
ff0626fcc2 media: i2c: rk628: move some function to rk628_mipi_dphy.c
Change-Id: I01a826edaf8c766f616a997d7c83f2009d10adac
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-19 10:11:21 +08:00
Jianwei Fan
47faf865bc media: i2c: rk628: add csc matrix support
Change-Id: If48350f4e9555852785bb2188ab29ae3c0b99961
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-19 10:11:21 +08:00
Jianwei Fan
8468446c8a media: i2c: rk628: add csi1 support and dual mipi mode for rk628f
Change-Id: I64907270bcc85ece125f61a6991cfd9d949fe58d
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-19 10:11:21 +08:00
Jianwei Fan
4ef6752418 media: i2c: rk628: bt1120: fix g_mbus_config for dual edge
Change-Id: I7c1d264d4f93157d9881bd55119e48bebca4463b
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-19 10:11:20 +08:00
Jianwei Fan
94ab144534 media: i2c: rk628: fix r2y_csc_mode when RGB color format input
Change-Id: I63ab2e27ef17dc0d4af4446da4e6ec50fba8624b
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-19 10:11:20 +08:00
Chen Shunqing
08be2e3816 media: i2c: rk628: optimized get resolution probability abnormal
Change-Id: I99433dc24d993a6ceae8fbc1472cb39d43a72ad1
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-19 10:11:20 +08:00
Chen Shunqing
2ef107a7a5 media: i2c: rk628: set background when no signal
Change-Id: Id7832b2287a4c6eb1747e5ff7dd103d41c762821
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-19 10:11:20 +08:00
Chen Shunqing
749fe7836d media: i2c: rk628: bt1120: compatible with rk628f
Change-Id: Ia7064e107a326d79bb40381cba3b1dfed31a72c1
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-19 10:11:20 +08:00
Chen Shunqing
6e006e21ca media: i2c: rk628: csi: compatible with rk628f
Change-Id: I94b7bcf6e2bc5487b34f09961f2294f939ca302c
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-19 10:11:20 +08:00
Chen Shunqing
b96278ea87 media: i2c: rk628: hdmirx: compatible with rk628f
Change-Id: I82c1159ed5307c9bad695fdc8e66dfa1724768e3
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-19 10:11:20 +08:00
Chen Shunqing
60857b5b0e media: i2c: rk628: add version parse func
Change-Id: I079bcf7a95d38d1e902543fbc522e75a7695db72
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:20 +08:00
Guochun Huang
e22969020a arm64: configs: rockchip_defconfig: enable CONFIG_RK628_MISC
1.enable the rk628 misc driver use on rk3568-evb-rk628
2.disable the rk628 drm driver

Change-Id: I0fbeb1e56915cf25a0db460c76378a5ccf628518
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:20 +08:00
Algea Cao
266aa947bf misc: rk628: Compatible with both kernel-5.10 and kernel-6.1
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ib170fb0b1a03a211564c88aaad62aa6adf2dd1b1
2024-01-19 10:11:20 +08:00
Zhibin Huang
2daa256567 misc: rk628: rgb/bt1120: optimize dts parsing rgb/bt1120 properties
1. change the "bt1120_dual_edge" property from macro definition to
parsing in dts
2. "bt1120_dual_edge" and "vccio_rgb" are unique to rk628 rgb, so put
them in the rk628_rgb structure.
3. dts property related to rk628 rgb are parsed in rk628_rgb_parse
function, including those related to rgb in/out and bt1120 in/out.

Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I1bd7edb9dd28a13cd298142e067e851ef98f83c5
2024-01-19 10:11:20 +08:00
Guochun Huang
fe62e532d4 misc: rk628: fix display anormal after resume form suspend
rk628->fb_nb.notifier_call helper will be called multi times in
Multi-display suspend/resume scenario, process fb_event with
FB_BLANK_UNBLANK/FB_BLANK_POWERDOWN only once.

Type: Fix
Redmine ID: #462145
Associated modifications: gerrit links
Test: pass

Change-Id: Id323a392b28892c8440c813571a7808bb6e860ed
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:20 +08:00
Zhibin Huang
57be89d348 misc: rk628: dsi: fix bug in dsi signal optimization settings
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: pass

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Icc494d1c4c345ca01c9636ad8a2b47e0d9351972
2024-01-19 10:11:20 +08:00
Zhibin Huang
e39eb26f17 misc: rk628: rgb/bt1120: optimize signal
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: pass

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ib3fdaf00bc666535a68ccb424dc09619d4319360
2024-01-19 10:11:20 +08:00
Zhibin Huang
efcb534a24 misc: rk628: fix rk628 summary
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: cat /d/rk628/2-0050/summary

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ifdd75679d65a4b6887b1f9909ae194125f2cbf1a
2024-01-19 10:11:20 +08:00
Chaoyi Chen
7fa3e04a00 misc: rk628: lvds: Add support for media bus format dt-bindings
In previous versions, the bus-format of lvds could be set with prop
"vesa_24", "jeida_24", etc.

In order to maintain consistency with the panel node, this patch adds
support to for set bus-format via the `MEDIA_FORMAT` number macro.

rk628-lvds {
	/* Equivalent to
		bus-format = "vesa_24";
	*/
	bus-format = <MEDIA_BUS_FMT_RGB888_1X7X4_SPWG>;
};

Change-Id: I3a8e51c58cfb52ff6b03917d9b33e96fa419bea1
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-01-19 10:11:20 +08:00
Sandy Huang
331fc6de1e misc: rk628: gvi: enable panel/backlight after gvi locked
This can avoid display splash screen before gvi locked.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Id32d637cd4af8c33f9629abd7c788db6b7e13df9
2024-01-19 10:11:20 +08:00
Chen Shunqing
cf1aff5f72 misc: rk628: hdmitx: set hdmitx sync polarity
Change-Id: Ife56c57ff98bc76c41fa1b4a4d6f9375be8bf527
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-19 10:11:19 +08:00
Shunhua Lan
41bb51d59e misc: rk628: cru: compatible with rk628d hdmirx audio clock from gpll
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ie6e3a10d43c7f26600d3fecda8bd26aa5fddacc1
2024-01-19 10:11:19 +08:00
Guochun Huang
8531dbdb73 misc: rk628: cancel delayed_work_audio in hdmirx suspend
Change-Id: I03593dba070f0167e3412e6e80ac7abe2a8e2240
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:19 +08:00
Chaoyi Chen
f6920cb1ef misc: rk628: add register debugfs node
This patch adds support for register debugfs nodes to allow access to
the registers without modifying the regmap subsystem configuration.

An example output is as follows:

$ ls /d/rk628/2-0050/registers
adapter    combtxphy  csi   dsi1   gpio0  gpio2  grf  hdmi
combrxphy  cru        dsi0  efuse  gpio1  gpio3  gvi  hdmirx

dump register:
$ cat cru

write to register:
$ echo addr val > cru

Additionally, incorrect GVI regmap_range was fixed.
Because `GVI_COLOR_BAR_VTIMING1` is already defined as `GVI_BASE + 0x7C`

Change-Id: I3f19d02b5119958fe2dafd04dff5efcc4d28d6d0
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-01-19 10:11:19 +08:00
Zhibin Huang
c1973e4a06 misc: rk628: dsi: optimize HS signal
Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I66b395fac4da5469ac88430d9063a1c9c2d90dec
2024-01-19 10:11:19 +08:00
Guochun Huang
1677e33dc9 misc: rk628: reduce power consumption optimization
Change-Id: Iacc7e206d5b05b2c0ae2bd33ecb70d991739db95
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:19 +08:00
Sandy Huang
7b983b2ecf misc: rk628: gvi: check gvi state when enable
Try to disable and enable GVI and TX phy when GVI lock failed.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I190ed60884850946091185c89e54a7bb551eb03d
2024-01-19 10:11:19 +08:00
Algea Cao
8676e40d7f misc: rk628: post_process: Support csc matrix
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Icaef18f17bf35c4aff99489a0479f520bbc89a9b
2024-01-19 10:11:19 +08:00
Zhibin Huang
aafe1548f1 misc: rk628: fix the problem of finding child nodes
Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ic7f58324415b0db7bc3953d09fddb8b3bcc95e99
2024-01-19 10:11:19 +08:00
Algea Cao
278b6977e2 misc: rk628: post_process: Fix scaler timing calcalculation error
Assume that Fout is the output pixel clock frequency
and Fin is the input pixel clock frequency:

dsp_in_vtotal * dsp_in_htotal * (1 / Fin) = dsp_out_vtotal * dsp_out_htotal * (1 / Fout)

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I77055cdf47f49de5ae7b5eb94b257e07171dd347
2024-01-19 10:11:19 +08:00
Algea Cao
066a4c46ac misc: rk628: gvi: Fix GVI frequency division calculation error
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I2bb0b29ab1cc34c1b7bb1accadf799fc2a0517de
2024-01-19 10:11:19 +08:00
Algea Cao
5e1e1727d0 misc: rk628: hdmirx: Fix rk628d combrxphy can't lock.
1.If phy lock failed, rk628d combrxphy may retry multiple times.
2.YUV420 hdmirx frequency needs to be divided by 2.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I10dfaa8530f97fe564ce45a96d81e5702b211bd8
2024-01-19 10:11:19 +08:00
Shunhua Lan
5a3f5bc278 misc: rk628: enable rk628 hdmirx audio
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ifd5fc3d15399b8eeca616c4f64b34956727bcd06
2024-01-19 10:11:19 +08:00
Shunhua Lan
0e43d25527 misc: rk628: cru: fix postdiv calc
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ib9ee62f80c09428f33994b9cdf79972ee0e0927b
2024-01-19 10:11:19 +08:00
Chaoyi Chen
ab740d1249 misc: rk628: combtxphy: Modify to meet LVDS standard requirement
This patch Modify TX common output voltage to
meet LVDS standard requirements.

Change-Id: I78275ad02b556c80d23dc20b915603a3e2295289
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-01-19 10:11:19 +08:00
Shunhua Lan
457130662d misc: rk628: add apll regmap_range
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ib5ef51265385d1e3f741d66a89b34255b013c23d
2024-01-19 10:11:19 +08:00
Shunhua Lan
cf0b23abaf misc: rk628: cru: add sclk_hdmirx_aud api config
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I7ec66204a4e2e4724b644f796ce7f4ee4f26b23e
2024-01-19 10:11:19 +08:00
Algea Cao
a7d429b725 misc: rk628: cru: Add rk628f APLL
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ib7237bfbd83012fa0d1d5290bc69e59beaf0f04c
2024-01-19 10:11:19 +08:00
Guochun Huang
a582b21754 misc: rk628: hdmitx: add color_bar debugfs node
Enable normal color bar
echo 1 > /sys/kernel/debug/rk628/2-0050/hdmitx_color_ba

Enable special color bar
echo 2 > /sys/kernel/debug/rk628/2-0050/hdmitx_color_bar

Enable black color bar
echo 3 > /sys/kernel/debug/rk628/2-0050/hdmitx_color_bar

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

Change-Id: Ie2a17a43bc2bb112d8a9653e87a86cb2c80bb67a
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:18 +08:00
Guochun Huang
2d89162015 misc: rk628: rgb rx: add debugfs node for parse resolution
RGB/BT1120 RX parse resolution information
can be show by the command follow:

cat /sys/kernel/debug/rk628/2-0050/rgb_resolution

1920x1080 pclk:148500000

Change-Id: Ie411db65e09c539fe733ae431c32e5ee402636a7
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:18 +08:00
Guochun Huang
9fe9c3f878 misc: rk628: gvi: add color_bar debugfs node
Enable color bar
echo 1 > /sys/kernel/debug/rk628/2-0050/gvi_color_bar

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

Change-Id: Ieb12d4160a90f27f505aa9c537b9005e35aa7c41
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-01-19 10:11:18 +08:00
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