Commit Graph

1066321 Commits

Author SHA1 Message Date
Chen Shunqing
8cd9b111b1 media: rockchip: hdmirx: fix get timing fail after set edid
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I8459fb4a57f83e4f301cdfb9215ba052a97c1f12
2022-06-01 11:20:33 +08:00
Tao Huang
ae520a187c ARM: rv1106-evb.config: Update by diffconfig
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I15631c039350f58d64e14331f7b75fd8a3703ee4
2022-06-01 09:48:10 +08:00
Lin Jinhan
8d6900a1f5 ARM: configs: rv1106-smart-door: add camera module driver enable
CONFIG_RK803=y
CONFIG_VIDEO_GC2093=y
CONFIG_VIDEO_SC132GS=y

Startup time  : increased by 34ms.
Firmware size : increased by 6KByte.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I1697803d36d1cecaee46b0f91097c52b72cfa9cb
2022-06-01 09:47:03 +08:00
Lin Jinhan
9d79315abd ARM: dts: rockchip: rv1106-smd-cam: add rk803 & sc132gs node
RMSL132 module contains RK803 and SC132GS.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ifc7d36c76c319645d5f7d8dce2c2ddff018bc306
2022-06-01 09:44:31 +08:00
Lin Jinhan
0cb5f462d0 misc: rk803: add power supplies control
The RK803 in the RMSL312 needs power control to work properly.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Icc8a60e1a87dd2c3b32bda8598dc65d73e28f917
2022-06-01 09:40:26 +08:00
Lin Jinhan
93e191ebba media: i2c: add SC132GS driver
add reset gpio control

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I3b39752bddb2035bbd61828c8c86427901c973db
2022-06-01 09:36:20 +08:00
Algea Cao
50f3fd6b3d drm/rockchip: dw_hdmi: Update RK3588 color selection policy
1.If mode can't support yuv420, change color to rgb.
2.If mode is 10 bit color deep mode, tmds clk is greater than
tv's max tmds clk and mode can't support yuv420, change color
deep to 8bit.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I947f68b75c5dedaf9e8b4db2c87bb2381186a63a
2022-06-01 09:24:50 +08:00
Algea Cao
e1cf1f3db7 drm/bridge: synopsys: dw-hdmi-qp: Fix 4K30 vic is zero
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I6d25db1643ae93ea11e1a3503d5632c1f8ae8906
2022-06-01 09:11:00 +08:00
XiaoDong Huang
517c153a8d dt-bindings: suspend: rk3588: add RKPM_PMUMCU_CEC_WKUP_EN RKPM_PMUMCU_VAD_WKUP_EN macro
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I3cd999f7a29b6b30514316593e73e4e16aa19a51
2022-05-31 17:52:29 +08:00
Wang Panzhenzhuan
d6c8e143e8 media: i2c: otp_eeprom: fix crash when otp info is null
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ia1a8e76349f61698db23ab994265945c73cc9714
2022-05-31 17:40:56 +08:00
William Wu
acf136a642 usb: dwc2: reinit for host mode during resume if lost power
If the dwc2 controller lost power in suspend, we need to
reinit the core when the dwc2 in host mode. There are two
methods to set the dwc2 in host mode, and we need to reinit
the dwc2 to host mode separately during resume.

1. Set the dr_mode to otg, and plug in OTG cable with
   the ID pin conneted to GND.

   In this case, we can reinit the core to device mode
   firstly, and later after do dwc2_hsotg_resume, it can
   trigger the ID status change interrupt if the OTG cable
   is still connected, then we can init for Host mode in
   the ID status change interrupt handler.

2. Set the dr_mode to host, and force the dwc2 to Host
   mode irrespective of ID input pin.

   In this case, we can't depend on the ID status change,
   so we do force host mode and init the core during resume.

With this patch, it can fix the kernel panic if the dr_mode
is set to host mode during resume.

[  134.975352] Unable to handle kernel write to read-only memory at virtual address 0000000000000068
...
[  134.981681] CPU: 0 PID: 1646 Comm: Binder:157_3 Not tainted 4.19.193 #37
[  134.982290] Hardware name: Rockchip rk3326 S1002 avb board (DT)
[  134.982836] pstate: 60400085 (nZCv daIf +PAN -UAO)
[  134.983286] pc : kill_all_requests+0x20/0xe8
[  134.983685] lr : dwc2_hsotg_core_init_disconnected+0x24/0x770
...
[  135.098090]
[  135.098248] Call trace:
[  135.098503]  kill_all_requests+0x20/0xe8
[  135.098876]  dwc2_hsotg_core_init_disconnected+0x24/0x770
[  135.099377]  dwc2_resume+0x108/0x110
[  135.099722]  dpm_run_callback+0x48/0x230
[  135.100099]  device_resume+0xb4/0x250
[  135.100448]  dpm_resume+0x104/0x398
[  135.100784]  dpm_resume_end+0x14/0x28
[  135.101142]  suspend_devices_and_enter+0x15c/0xa68
[  135.101586]  pm_suspend+0x458/0x6d8
[  135.101927]  state_store+0x84/0x108
[  135.102271]  kobj_attr_store+0x14/0x28
[  135.102637]  sysfs_kf_write+0x48/0x58
[  135.102988]  kernfs_fop_write+0xf4/0x220
[  135.103367]  __vfs_write+0x34/0x158
[  135.103708]  vfs_write+0xb0/0x1d0
[  135.104027]  ksys_write+0x64/0xe0
[  135.104346]  __arm64_sys_write+0x14/0x20
[  135.104726]  el0_svc_common.constprop.0+0x64/0x178
[  135.105172]  el0_svc_compat_handler+0x18/0x20
[  135.105580]  el0_svc_compat+0x8/0x34
[  135.105929] Code: a90153f3 aa0003f6 f9001bf7 2a0203f7 (f900343f)
[  135.106485] ---[ end trace ddc1f4a0765afacd ]---
[  135.253494] Kernel panic - not syncing: Fatal exception

Change-Id: Ibfcd1c9176d8b4abb2fc8b3b5c8b0b6a866db4e7
Signed-off-by: William Wu <william.wu@rock-chips.com>
2022-05-31 16:34:35 +08:00
Maxim Devaev
52ec93c3af UPSTREAM: usb: gadget: f_hid: optional SETUP/SET_REPORT mode
f_hid provides the OUT Endpoint as only way for receiving reports
from the host. SETUP/SET_REPORT method is not supported, and this causes
a number of compatibility problems with various host drivers, especially
in the case of keyboard emulation using f_hid.

  - Some hosts do not support the OUT Endpoint and ignore it,
    so it becomes impossible for the gadget to receive a report
    from the host. In the case of a keyboard, the gadget loses
    the ability to receive the status of the LEDs.

  - Some BIOSes/UEFIs can't work with HID devices with the OUT Endpoint
    at all. This may be due to their bugs or incomplete implementation
    of the HID standard.
    For example, absolutely all Apple UEFIs can't handle the OUT Endpoint
    if it goes after IN Endpoint in the descriptor and require the reverse
    order (OUT, IN) which is a violation of the standard.
    Other hosts either do not initialize gadgets with a descriptor
    containing the OUT Endpoint completely (like some HP and DELL BIOSes
    and embedded firmwares like on KVM switches), or initialize them,
    but will not poll the IN Endpoint.

This patch adds configfs option no_out_endpoint=1 to disable
the OUT Endpoint and allows f_hid to receive reports from the host
via SETUP/SET_REPORT.

Previously, there was such a feature in f_hid, but it was replaced
by the OUT Endpoint [1] in the commit 99c5150058 ("usb: gadget: hidg:
register OUT INT endpoint for SET_REPORT"). So this patch actually
returns the removed functionality while making it optional.
For backward compatibility reasons, the OUT Endpoint mode remains
the default behaviour.

  - The OUT Endpoint mode provides the report queue and reduces
    USB overhead (eliminating SETUP routine) on transmitting a report
    from the host.

  - If the SETUP/SET_REPORT mode is used, there is no report queue,
    so the userspace will only read last report. For classic HID devices
    like keyboards this is not a problem, since it's intended to transmit
    the status of the LEDs and only the last report is important.
    This mode provides better compatibility with strange and buggy
    host drivers.

Both modes passed USBCV tests. Checking with the USB protocol analyzer
also confirmed that everything is working as it should and the new mode
ensures operability in all of the described cases.

Link: https://www.spinics.net/lists/linux-usb/msg65494.html [1]
Change-Id: I5cd93f642e5696a84e58afc63aaaaf8e27c7d514
Reviewed-by: Maciej Żenczykowski <zenczykowski@gmail.com>
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Maxim Devaev <mdevaev@gmail.com>
Link: https://lore.kernel.org/r/20210821134004.363217-1-mdevaev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit d7428bc26f)
2022-05-31 16:34:35 +08:00
Jianqun Xu
98712c141d arm64: dts: rockchip: rk3399-linux enable fiq mode
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I648680971d7b3841046c65bcfdffbcb808ede498
2022-05-31 16:24:12 +08:00
Wyon Bi
2185f7dbbe mfd: max96752f: Mark regcache as dirty at power-on-reset
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ifefad0dc1538188e07f33eb9621990f099f0036c
2022-05-31 16:22:40 +08:00
Finley Xiao
9fc3eb23a7 arm64: dts: rockchip: rk3568: increase register map size for nocp
Fixes: e866f07afb ("arm64: dts: rockchip: rk3568: Add nocp device node")
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I567e061d42b72aabc2a8148b1a5e89993c8de1ca
2022-05-31 15:53:25 +08:00
Tao Huang
7146449306 ARM: configs: Remove unused rk3308_linux_aarch32_debug_defconfig
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I98c40127ee5a897f63a9457736c3bf88220d69d8
2022-05-31 15:38:05 +08:00
Liang Chen
f3c5ed723d ARM: dts: rockchip: rv1106: use pvtpll for RKVENC/NPU
Change-Id: I29372d60facb9a48689b78774067404ff1e1fd93
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-05-31 14:36:58 +08:00
Liang Chen
ddacbfc334 ARM: dts: rockchip: rv1106: assign clock frequency for pvtpll
Change-Id: Ib48f003b4ce5a0cc55f60eb8aa121750588e5837
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-05-31 14:36:53 +08:00
Liang Chen
236ba7b878 clk: rockchip: rv1106: enable cru pvtpll0/1
Change-Id: I828d3764cab23581272828c325bc35d42ed27ed4
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-05-31 14:36:46 +08:00
Jianqun Xu
054f4604ae ARM: configs: rk3308_linux_aarch32_defconfig: CONFIG_EXTCON=y
Select extcon for headset jack report.
+CONFIG_EXTCON=y

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ie3568d2a9f9e31131cd1129a2d2f5154aaf45844
2022-05-31 14:31:47 +08:00
Jianqun Xu
f838c5cd3d ARM: configs: rk3308_linux_aarch_defconfig: CONFIG_ROCKCHIP_CPUINFO=y
Select cpuinfo for soc_is_rk3308().
+CONFIG_ROCKCHIP_CPUINFO=y

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: If08b8ea38bff175dc7f44a7afa170ea9f520089d
2022-05-31 14:30:29 +08:00
Jianqun Xu
f3b1b38810 arm64: configs: rk3308_linux_defconfig: CONFIG_EXTCON=y
Select extcon for headset jack report.
+CONFIG_EXTCON=y

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ib9c1ad99a0cf864b88dc54ac2a83c045a2c354b2
2022-05-31 14:24:24 +08:00
Shaoxing Chen
34aecd9b60 ARM: configs: rv1106-smart-door: enable wireless
Signed-off-by: Shaoxing Chen <csx@rock-chips.com>
Change-Id: Ie1bf2961b299c87bb5ccd496435071b30edb57c5
2022-05-31 11:40:21 +08:00
Weiwen Chen
acb5b4e86e ARM: dts: rockchip: rv1103: limit highest frequency
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I89624e16b0bcabc106042313bfd14e263a454620
2022-05-31 11:06:49 +08:00
Andy Yan
de1b8efb44 drm/rockchip: use drm_format_info_min_pitch calculate pixel pitch
According to comment in drm_format_info, drm_format_info_min_pitch
has better compatibility than calculate by cpp.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I246f29bc6a5482242ff8d533c0416101a04c7550
2022-05-30 16:29:57 +08:00
Hu Kejun
001467a8bc media: i2c: dw9714: support advanced mode
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: Iaf1350acd5df59b6eed00ae3c276f97a248b2c75
2022-05-30 16:28:04 +08:00
Hu Kejun
ec83376701 include: rk_vcm_head: add advance mode config
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I6cb4837fd0557e9c903b132b67913f67723a461c
2022-05-30 16:28:04 +08:00
Guochun Huang
a4522af56f drm/rockchip: dsi2: find possible connector from connector_list
DSI may not int a connector when attach a bridge, to support
uboot/kernel logo, drivers can find possible connector from
connector_list to register a rockchip_drm_sub_dev which specify
loader_protect helper.

Change-Id: I8a72192f252e17d4003da24d89326a55f0f3f578
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2022-05-30 16:23:13 +08:00
Damon Ding
f10608b5d1 drm/rockchip: vop: add support for color key on rk3399
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I0f46b27d41e33a540a6fda1b165f01407dc0d613
2022-05-30 15:52:08 +08:00
Damon Ding
ff41712dcf drm/rockchip: unify the color key flag in vop and vop2
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I4f0130b4c47e6d83bdf78161a4c01388fde66742
2022-05-30 15:49:51 +08:00
Yiqing Zeng
9e445581db ARM: dts: rockchip: rv1106-evb-cam: support ircut for sc530ai/sc3336
and change sc530ai to 4lane

Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ib5c1a99920512a6497b4995dcac39eed4ae01331
2022-05-30 15:43:27 +08:00
Lin Jinhan
4481fb8b8a ARM: dts: rockchip: Add rv1106-smd-cam.dtsi
Move camera node from rv1106g-smart-door-lock-rmsl-v10.dts
 to rv1106-smd-cam.dtsi.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Id5ba57db302c5a20af1796cf147f186a6df34467
2022-05-30 15:42:02 +08:00
Wyon Bi
437e0a901b drm/bridge: analogix_dp: Support split mode for bridge chain
Fixes: c1754005a3 ("drm/bridge: analogix_dp: Support split mode for bridge chain")
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Iceb575560b1e6a9257f31e8370c8139afaae20b0
2022-05-30 10:32:49 +08:00
Guochun Huang
d79cdc989f drm/bridge: MAX96752F: add support attach bridge or panel
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: If2a9c7beb73a63af9af252fa007e6628e73e702b
2022-05-30 09:36:30 +08:00
Guochun Huang
81e27b972c mfd: MAX96745: disable remote control-channel link on this link
there can be multiple SerDes applications on the same I2C BUS.
the serializer can attach multiple deiserializers which have
the same I2C slave device address, to avoid I2C communication
conflicts, driver should disable remote control-channel link
after accessing.

Change-Id: I099caf597835cc34f34231231fbaddf2c5d03288
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2022-05-30 09:36:30 +08:00
Guochun Huang
4f64073a92 mfd: MAX96752F: add stream id for each link
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I7e512351db58050c8550100c7a79c046dda5ea4e
2022-05-30 09:36:30 +08:00
Guochun Huang
2fa624200c drm/bridge: Add support for Maxim MAX96755F
The MAX96755F convert MIPI DSI 4-lane input port
data to GMSL2 high-speed serial link protocol.

Display route example

DSI --> MAX96755F ---> MAX96752F --> LVDS

                      ---> MAX96752F --> LVDS
                     /
DSI --> MAX96755F -->
                     \
                      ---> MAX96752F --> LVDS

Change-Id: Ic465c12d163cc0ab4de0cbcaeebcfd462b2560b0
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2022-05-30 09:34:37 +08:00
Guochun Huang
b564d3921a mfd: Add support for Maxim MAX96755F
The MAX96755F convert MIPI DSI 4-lane input port
data to GMSL2 high-speed serial link protocol.
They also send and receive control channel and
peripheral control data, enabling bidirectional
transmission of video and data over cables in
excess of 15 meters in length.

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I540bd4ca61ae6b6e77cb9635567690fe3367a281
2022-05-30 09:34:37 +08:00
Guochun Huang
6a4a40a39d pinctrl: Add support for Maxim MAX96755f pin controller
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Idddb8c689bc40d852402deb0a97509484c67b5d1
2022-05-30 09:34:37 +08:00
Shaoxing Chen
45a0941261 ARM: dts: rockchip: rv1106g-smart-door-lock-rmsl: add sdio node for wireless
Signed-off-by: Shaoxing Chen <csx@rock-chips.com>
Change-Id: I2f51f4ba0a0d20debf7cd2eef076cc650183d513
2022-05-30 09:27:08 +08:00
Elaine Zhang
5d818839f7 clk: rockchip: rk3588: optimized Pll automatic calculation
support more special frequency setting.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ied62bb6460fd4bc2d3f03ee14f3faf6a0ec8f908
2022-05-30 09:19:08 +08:00
Jon Lin
7e91bfc9fc PCI: rockchip: dw: Disabeld ASPM L1SS when supports_clkreq not config
PCIe ASPM L1SS feature should be enabled with supports_clkreq configured.

Change-Id: I5ec112f55994503a445d9f1346bf436dadbc11c6
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-05-30 09:16:27 +08:00
Wang Xiaobin
a114d946f2 ARM: configs: rv1106-smart-door: enable JFFS2_FS
Signed-off-by: Wang Xiaobin <xb.wang@rock-chips.com>
Change-Id: I960582c03c8d8612e174ca7f622093069a7a98c2
2022-05-27 20:05:12 +08:00
Wang Xiaobin
45092931e7 ARM: configs: rv1106-smart-door: enable SPI and MTD_SPI_NOR
Signed-off-by: Wang Xiaobin <xb.wang@rock-chips.com>
Change-Id: I3d91b111d381989831da7cbc70a6427f6de48e93
2022-05-27 20:05:04 +08:00
Chen Yifu
3c5411b673 ARM: configs: rockchip: add rv1106-smart-door.config
Enable USB function as module.

Generated by:

	make ARCH=arm rv1106_defconfig rv1106-tb.config
	cp .config tmp.config
	make ARCH=arm menuconfig
	bala...
	./scripts/diffconfig -m tmp.config .config > arch/arm/configs/rv1106-smart-door.config

Update by:

	make ARCH=arm rv1106_defconfig rv1106-tb.config
	cp .config tmp.config
	make ARCH=arm rv1106_defconfig rv1106-tb.config rv1106-smart-door.config
	make ARCH=arm menuconfig
	bala...
	./scripts/diffconfig -m tmp.config .config > arch/arm/configs/rv1106-smart-door.config

Signed-off-by: Chen Yifu <chenyf@rock-chips.com>
Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
Change-Id: I20d4d75dbf33de1c2b392bbcdfe9dbec63bf5384
2022-05-27 19:48:11 +08:00
Ziyuan Xu
8e307b1774 ARM: configs: rockchip: Add rv1106-battery-ipc.config
Updated by:
make ARCH=arm rv1106_defconfig rv1106-tb.config
cp .config rv1106.config
make ARCH=arm menuconfig
./scripts/diffconfig -m rv1106.config .config > arch/arm/configs/rv1106-battery-ipc.config

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I6dabcffd1724bbe25ca95f7cd9b61502ce6b4662
2022-05-27 19:42:35 +08:00
Ziyuan Xu
e93d35cd23 ARM: rv1106-tb.config: CONFIG_ROCKCHIP_MULTI_RGA=y
-CONFIG_VIDEO_SC3336=y

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: If882886c88bb8e2e08556404f9cfe22a7af8fc7f
2022-05-27 19:42:25 +08:00
Jianqun Xu
713d5a769d soc: rockchip: io-domain: fix module compile error
Fix compile error when build to module:
ERROR: modpost: "of_find_regulator_by_node" [drivers/soc/rockchip/io-domain.ko] undefined!

Fixes: bc2ba01c88 ("soc: rockchip: io-domain: dump power supply-map when probe")

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I38490ed4129b500c3b3828c4f689a93c7ba93a67
2022-05-27 19:01:51 +08:00
Finley Xiao
f7995f721a PM / devfreq: rockchip_dmc: Fix cpufreq_cpu_acquire/release undefined
Fix build error when build as module.

Fixes: a2328c4f99 ("PM / devfreq: rockchip_dmc: Get policy when need to increase cpu frequency")
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I61ce3457355c10f91ce43ae6d1fb5b6dab0d424d
2022-05-27 18:55:03 +08:00
Tao Huang
08fecbccac ARM: rv1106-evb.config: Update by diffconfig
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Idd786ea7e44bf422fcb7196cb57d9635fa71e5c4
2022-05-27 18:06:21 +08:00