Commit Graph

1066490 Commits

Author SHA1 Message Date
Jon Lin
d591c3f6ef PCI: Add ROCKCHIP PCIe ASPM interface
Change-Id: I1156bd10e352145d745899067bf43afda92d5a30
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-06-22 15:03:47 +08:00
Zefa Chen
22a6df2388 media: rockchip: vicap support capture raw in hdr mode with online
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I3a41cb22e68f21808485d7ba1c4cc6b62dfbd017
2022-06-22 14:53:04 +08:00
Zefa Chen
7040478a95 media: rockchip: vicap fixed bug of capture raw online
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I515e1ae1893f9bee36a8a67e0e4eb4a68d393657
2022-06-22 14:50:33 +08:00
Zefa Chen
50d0e0a002 media: rockchip: isp: support free rx buffer
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I3d8aef3f27f8e419c6ed02426735e03be8787998
2022-06-22 14:49:53 +08:00
Caesar Wang
480c29a809 arm64: dts: rockchip: Add mmc aliases for rk3588-linux.dtsi
With this series, adjust MMC alias and see mmcblk id change.
This patch is still useful on ChromeOS.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I384e49606c5623a403c93e62e9e7165b61e4ca80
2022-06-22 10:42:16 +08:00
Zhang Yubing
befdf06c03 drm/rockchip: vop2: print the correct vp id
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ic3728c72715ab6ab5cab0fd8acf20d754feab51a
2022-06-22 09:27:40 +08:00
Wangqiang Guo
33df088602 media: i2c: it66353: add it66353 HDMI switch bridge driver
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: I4365641c2d088a5bce4c0b69ed98b864831db9d5
2022-06-21 17:29:53 +08:00
Dingxian Wen
1ee5d90938 arm64: dts: rockchip: rk3588: modify hdmirx pinctrl
add hdmim1_rx pinctrl group, set hdmirx detect pin to pull up.

Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I637d5d432d5879ed69077f00907667102e83153d
2022-06-21 16:36:07 +08:00
Wang Panzhenzhuan
e1489b2e38 media: i2c: gc8034: fix power on & off sequence
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ia2b28d49662290de2784f9340a405b5061c6d76f
2022-06-21 15:06:48 +08:00
Ziyuan Xu
e654f9bb99 media: i2c: fixes sc230ai i2c transfer error when thunderboot
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I6c033c7e2c25ffa74f8b62465b63ae42814ae206
2022-06-21 14:19:51 +08:00
Dingxian Wen
f7a599ce64 arm64: dts: rockchip: modify hdmirx cma memory to 128MB for rk3588 boards
cma memory reserved for hdmirx reduced to 128MB

Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I80d909c5bba1769cf34a649e8482a905375c2512
2022-06-21 14:18:01 +08:00
Dingxian Wen
3e4a122e08 media: rockchip: hdmirx: correct image format to V4L2_PIX_FMT_BGR24
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I45bcd0450d1a85ed51261f47c282cc3f03b4c5b5
2022-06-21 14:15:06 +08:00
Zhen Chen
ab86d8ad07 MALI: rockchip: upgrade bifrost DDK to g12p0-01eac0, from g11p0-01eac0o
Change-Id: Ifde51336daa7c735118a314fcfc2fde38d7132b3
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2022-06-21 11:27:08 +08:00
Wang Panzhenzhuan
624d3eb4f8 media: i2c: s5kjn1: fix power off reset & pwdn state
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I14b40260cf0ea9e2beeeafc2a0ef0a1ffcc362df
2022-06-20 08:27:07 +00:00
Bian Jin chen
9659d6d260 arm64: configs: rockchip_defconfig: enable HID_PLAYSTATION by default.
Add support for PS5 gamepad controllers.

According to gki commit 6b7cc871d2 ("ANDROID: GKI: enable hid-playstation driver")
and commit c3bf09a68b ("ANDROID: GKI: enable hid-playstation FF").

Test: CtsHardwareTestCases
android.hardware.input.cts.tests.SonyDualSenseBluetoothTest
android.hardware.input.cts.tests.SonyDualSenseUsbTest

Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Change-Id: I49a40d2375ccc9c58a09736bf729db6cb6f438af
2022-06-20 14:35:08 +08:00
Ziyuan Xu
7e65de47b2 ARM: dts: rockchip: delete unused nodes for rv1103g-battery-ipc board
It makes sense to reduce the number of device nodes.

Before:
[    0.150197] initcall of_platform_default_populate_init+0x1/0x6a returned 0 after 13020 usecs

After:
[    0.144482] initcall of_platform_default_populate_init+0x1/0x6a returned 0 after 9765 usecs

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I9896b9d673e92310cc3e0839bd02d55056b0bed3
2022-06-20 14:26:53 +08:00
Ziyuan Xu
259831a2de ARM: dts: rockchip: rv1103g-battery-ipc: reserved 6MB for 1080p@2f yuv
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Iabe42fa186c095f6fa7ac00a9c9aa36e8f23cddd
2022-06-20 14:25:07 +08:00
Jianwei Fan
7bd7fdc8c3 media: i2c: imx577: fix gain and exp errors and add 30fps support
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I3f519c9a3efa57b10981cee60e5f5df9b1d46124
2022-06-20 14:18:50 +08:00
Chen Shunqing
da83a0167a arm64: rockchip_defconfig: enable CONFIG_REGULATOR_WL2868C
Add WL2868C Ldo for camera on rk3588s tablet.

Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I7023dcd20b6716436ceffcdf389b4c566d0278bb
2022-06-20 11:17:24 +08:00
Finley Xiao
8729c661d5 soc: rockchip: power-domain: Fix panic when reset memory domain
rockchip-pm-domain fd8d8000.power-management:power-controller: failed to get mem status 'venc0', target_on=0, val=1
Kernel panic - not syncing: panic_on_set_domain set ...
CPU: 7 PID: 1 Comm: swapper/0 Not tainted 5.10.66 #1598
Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
Call trace:
 dump_backtrace+0x0/0x1c8
 show_stack+0x1c/0x2c
 dump_stack_lvl+0xdc/0x12c
 dump_stack+0x1c/0x64
 panic+0x150/0x3a4
 rockchip_do_pmu_set_power_domain+0x39c/0x3a0
 rockchip_pd_power+0xcc/0x1bc
 rockchip_pd_power_on+0x28/0x38
 genpd_power_on+0x104/0x294
 __genpd_dev_pm_attach+0x138/0x1f0
 genpd_dev_pm_attach+0x50/0x6c
 dev_pm_domain_attach+0x24/0x38
 platform_drv_probe+0x3c/0xc4
 really_probe+0x204/0x510
 driver_probe_device+0x80/0xc0
 device_driver_attach+0x70/0xb4
 __driver_attach+0xc8/0x150
 bus_for_each_dev+0x80/0xd0
 driver_attach+0x28/0x38
 bus_add_driver+0x108/0x1e8
 driver_register+0x7c/0x118
 __platform_driver_register+0x48/0x58
 rk_iommu_init+0x20/0x30
 do_one_initcall+0x98/0x2dc
 do_initcall_level+0xa8/0x160
 do_initcalls+0x58/0x9c
 do_basic_setup+0x28/0x38
 kernel_init_freeable+0xf4/0x16c
 kernel_init+0x18/0x190
 ret_from_fork+0x10/0x30

Fixes: 69b9adc8ad ("soc: rockchip: power-domain: fix panic when pd power on for rk3588")
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Idc22efbd87cbc0cd694720bfb48373c81c5d8c83
2022-06-17 18:59:40 +08:00
Liang Chen
c037294fbd arm64: configs: add rockchip_rt.config for kernel-rt
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I4abd6275cf12df0be8898d3bab2a3db6cefd73e6
2022-06-17 18:25:54 +08:00
Wyon Bi
bcde211e70 arm64: dts: rockchip: rk3588s-tablet: Limit DP PHY link rate to 5.4Gbps
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I7dfc211eaf69e0515581c9fd3ccd1b5062fbfcef
2022-06-17 18:20:06 +08:00
Wyon Bi
15fdfc37fa drm/rockchip: dw-dp: Add DP PHY max_link_rate limit
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I2f4522af3b997cb0c3a6209bbe142e550782e2fc
2022-06-17 18:20:06 +08:00
Guochun Huang
8cfe3a4ed8 drm/rockchip: dsi2: fix DSI_VID_TX_CFG configuration errors
Change-Id: Ibc7483323fc50985eb2542af3ab4193b7c7ad04e
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2022-06-17 18:18:18 +08:00
Guochun Huang
d416f690ee drm/panel: simple: delay init time after panel reset
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ifb9b57bb7ce84263dea96958f6a4da9c7a6af545
2022-06-17 18:15:50 +08:00
shengfei Xu
65debf2d91 regulator: rk806: fix the min_sel and max_sel from struct linear_range
the wrong value cause the BUCK output voltage to be systematically
higher by 1 steps (= 25mV).

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I5be5749a87908e6a03ade7603f939bdf59eaec8b
2022-06-17 18:14:00 +08:00
Kever Yang
648e467e07 pcie: rockchip: dw: Add debugfs support
Add dump fifo and RASDES Error event count;
Enable all event by default;

Usage:
1. enter /d/fxxx0000.pcie
2. cmd
  cat dumpfifo
  cat err_event
  echo disable > err_event // disable all err event
  echo enable > err_event // enable all err event
  echo clear > err_event // clear all counter

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I3705812bf2bf2c71fb55bf3281854e4619070922
2022-06-17 17:59:12 +08:00
Chen Shunqing
d9cbb03ca5 phy: rockchip-samsung-hdptx-hdmi: Fix phy lane can't ready
Priority select the config of larger fvco.

Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: If56db2eef60472760de3b010712a340bbf8cb30d
2022-06-17 16:49:09 +08:00
William Wu
fb52286670 phy: rockchip: inno_usb2: add bvalid control regs for rk3588 OTG1
This patch adds bvalid control registers for RK3588 OTG1 USB2.0
PHY. Then RK3588 Type-C1 can support USB Charger detection if
the TYPEC1_USB20_VBUSDET is always pull up to 3.3V, note that
add property "rockchip,typec-vbus-det" in DTS u2phy1_otg node.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Icee95425fa2671a02bdc999339437009469100c3
2022-06-17 16:48:57 +08:00
Lin Jinhan
55a06b8113 ARM: dts: rockchip: rv1106-smd-cam: modify gc2093 lens name
rockchip,camera-module-lens-name = "60IRC_F20";

Change-Id: I4759a824cbadd335c1794c5649ab152a5c03a824
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2022-06-17 16:46:26 +08:00
Zain Wang
c2cb19bf1e power: supply: sc8886: fixed otg_voltage formula
OTG voltage is Reg0x07/0x06 bit<2-13> by 8mV per step,
<bit0-1> are 0 for reserved.
OTG voltage = 1.28V + (Reg0x07/0x06 bit<2-13>) * 8mV.
And OTG voltage would be ignored if it's not in
4.28V-20.8V.

In order to keep same to bq25703, it can be expressed as
1280000uV + (Reg0x07/0x06 bit<6-13>) * 128mV

Signed-off-by: Zain Wang <wzz@rock-chips.com>
Change-Id: I0275eeded4cf86a208bf46d7a3f1dbd6d0e37b63
2022-06-17 16:46:18 +08:00
Yu Qiaowei
77de161fde video: rockchip: rga3: batch mode supports asynchronous calls
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I0d38d9a478a77a79d85cac0eb91906ebfae59544
2022-06-17 16:41:26 +08:00
Yu Qiaowei
17638eab67 video: rockchip: rga3: fix alpha channel loss in ABC mode
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I54adb160f0dcf934a4001169ad3a7545948e4209
2022-06-17 16:41:04 +08:00
Yu Qiaowei
45fe385055 video: rockchip: rga3: Fix RGA2 getting the wrong size of dma-buf
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ice6b7ca67d04af8187b1b3d4438b2097223f9e04
2022-06-17 16:40:53 +08:00
Ziyuan Xu
ec9af67c8e ARM: dts: rockchip: rv1103: remove gpio2
Change-Id: Id17a5c2098252a108e211cf7c19e669c83d0c173
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2022-06-17 16:33:08 +08:00
Cai YiWei
1f99442699 media: rockchip: isp: check rockit pointer
Change-Id: I205b6f4faf47554afc21b056d45c81458e942db6
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-17 15:08:05 +08:00
Ziyuan Xu
c978cebad4 ARM: configs: rockchip: rv1106-tb.config: disable CONFIG_SLUB_SYSFS
size vmlinux:
before:
   text    data     bss     dec     hex filename
2669029 1176004   87432 3932465  3c0131 vmlinux

after:
   text    data     bss     dec     hex filename
2667557 1174620   87808 3929985  3bf781 vmlinux

reduce boot time
[    0.171059] initcall slab_sysfs_init+0x1/0xac returned 0 after 2649 usecs

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I4f39be5bff88d3d7a2c6300f7b069810a5bed1ba
2022-06-17 10:15:20 +08:00
Cai YiWei
e920d65384 media: rockchip: isp: isp32: fix wrap error for fast stream
Change-Id: I4a7719fb00104c3c1c43fed82c8e5e2439d1f766
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-17 10:12:50 +08:00
Huibin Hong
b188b3c687 fs: pstore: add mcu log
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Iaa73a2826f5f4d52095399fb7879b8d099676b4e
2022-06-16 16:04:39 +08:00
Jianqun Xu
88970bdcdb dma-buf: heaps: system_heap: fix to sg_dma_address
The rknpu driver creates a sg without page link, so sg_phys(sg) will
crash due to page null.

Fixes: 33b98bf612 ("dma-buf: system_heap: do force sync only if attachment list empty")

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I679122dd4c1663d0520429638565c6cc8b5a2c90
2022-06-16 15:08:44 +08:00
Finley Xiao
a77b9747b5 soc: rockchip_system_monitor: Fix mem volt error when low temp
The memory volt may be different from vdd voltage, for example the dmc.

Fixes: eb910e20ee ("soc: rockchip_system_monitor: Add support to change mem volt when low temp")
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I4485d4218e3e1fb22aaba0f0ce388036e50d52ff
2022-06-16 15:06:06 +08:00
Kever Yang
13ddb9150c phy: rockchip: naneng-combophy: Add pcie ext clk support
Modify the dts for the combophy:
1. assign clock to 100MHz
2. add "rockchip,ext-refclk"

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I72c125ac6aa42dcf00761f32e20b10042fd9985d
2022-06-16 15:03:29 +08:00
Simon Xue
be0c00efdc media: common: videobuf2: fix begin_cpu_access and end_cpu_access call back
scatterlist nents would change to 1 after dma_map_sg if iommu enabled.
So invalid or clean should use orig_nents to indicate the scatterlist
true nents if user miss the callback prepare and finish of struct vb2_mem_ops.

Change-Id: Iabb4c140d64e79eb16b93cab0fee488fe4ba4b68
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2022-06-16 15:02:49 +08:00
Liang Chen
f0777fbf8e ARM: dts: rockchip: rv1106: adjust clock rate for crypto
Change-Id: Id77c12bf42d8925fd89aba3040a4a3dcd641d8dc
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-06-16 14:52:44 +08:00
Weixin Zhou
97667ca86f arm64: dts: rockchip: rk3588s-tablet-rk806-single: rm SYS_STATUS_VIDEO_4K
DMC_FREQ_LEVEL_LOW is enough for 4k30fps video

Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I1656274d4c0beb8167ea0a41505bd6742e79f83c
2022-06-16 14:37:49 +08:00
Zhang Yubing
6fef59b51b phy: rockchip: usbdp: Add DP PHY max_link_rate limit
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I34ad3f0183358ecf7474fe51a40352ac47cf286c
2022-06-15 20:05:58 +08:00
Tao Huang
ff4142e509 mm: slub: Add SLUB_SYSFS
Make slub sysfs interface selectable.
Save about 4.8ms of boot time on RK1808 EVB if unselected.

Change-Id: I2587cc259c3c31a209604d99640d8e84a4ba78f4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-06-15 14:21:09 +08:00
Elon Zhang
70d2349c7c ARM: configs: rv1106-smart-door: enable UVC related drivers
Kernel image size and bootup time are almost unchanged
because the drivers are compiled as modules.

Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
Change-Id: I2aa77be64be0a96b7a944ded07922de073aa6d60
2022-06-15 10:33:49 +08:00
Liang Chen
99c02a0206 media: rockchip: hdmirx: use devm_request_irq() and remove invalid IRQF_ONESHOT
The flag IRQF_ONESHOT is only for irq thread, so remove IRQF_ONESHOT for
devm_request_irq().

And with IRQF_ONESHOT, when enable CONFIG_PREEMPT_RT, kernel will report bug:
[    4.953930][    C4] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:970
[    4.953932][    C4] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 1, name: swapper/0
[    4.953936][    C4] INFO: lockdep is turned off.
[    4.953937][    C4] irq event stamp: 2481260
[    4.953938][    C4] hardirqs last  enabled at (2481259): [<ffffffc0113a5504>] _raw_spin_unlock_irqrestore+0x60/0xb8
[    4.953946][    C4] hardirqs last disabled at (2481260): [<ffffffc01139b7c0>] enter_el1_irq_or_nmi+0x20/0x54
[    4.953951][    C4] softirqs last  enabled at (2334926): [<ffffffc010056c20>] __local_bh_enable_ip+0x1f4/0x258
[    4.953957][    C4] softirqs last disabled at (2334920): [<ffffffc010123444>] local_bh_disable+0x4/0x30
[    4.953963][    C4] Preemption disabled at:
[    4.953964][    C4] [<ffffffc0100de3d0>] __raw_spin_lock_irqsave+0x3c/0x138
[    4.953971][    C4] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 5.10.66-rt53 #9
[    4.953974][    C4] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[    4.953976][    C4] Call trace:
[    4.953977][    C4]  dump_backtrace+0x0/0x1c4
[    4.953983][    C4]  show_stack+0x18/0x24
[    4.953989][    C4]  dump_stack_lvl+0xec/0x148
[    4.953992][    C4]  dump_stack+0x18/0x64
[    4.953996][    C4]  ___might_sleep+0x1b4/0x1c4
[    4.954002][    C4]  rt_spin_lock+0x70/0xd8
[    4.954005][    C4]  hdmirx_hdmi_irq_handler+0x44/0xcf4
[    4.954008][    C4]  __handle_irq_event_percpu+0xa8/0x1b4
[    4.954015][    C4]  handle_irq_event+0x8c/0x180
[    4.954021][    C4]  handle_fasteoi_irq+0x128/0x228
[    4.954025][    C4]  __handle_domain_irq+0xb0/0x11c
[    4.954030][    C4]  gic_handle_irq+0x74/0x14c
[    4.954034][    C4]  el1_irq+0xd0/0x1c0
[    4.954037][    C4]  _raw_spin_unlock_irqrestore+0x64/0xb8
[    4.954043][    C4]  __setup_irq+0x474/0x6a8
[    4.954046][    C4]  request_threaded_irq+0xfc/0x164
[    4.954049][    C4]  devm_request_threaded_irq+0x84/0xd4
[    4.954054][    C4]  hdmirx_probe+0xa2c/0x128c
[    4.954057][    C4]  platform_drv_probe+0x94/0xbc
[    4.954061][    C4]  really_probe+0x200/0x508
[    4.954067][    C4]  driver_probe_device+0x7c/0xb8
[    4.954072][    C4]  device_driver_attach+0x6c/0xac
[    4.954078][    C4]  __driver_attach+0xc4/0x148
[    4.954084][    C4]  bus_for_each_dev+0x7c/0xc8
[    4.954089][    C4]  driver_attach+0x24/0x30
[    4.954095][    C4]  bus_add_driver+0x100/0x1e0
[    4.954099][    C4]  driver_register+0x78/0x110
[    4.954106][    C4]  __platform_driver_register+0x44/0x50
[    4.954109][    C4]  hdmirx_init+0x44/0x50
[    4.954113][    C4]  do_one_initcall+0x98/0x188
[    4.954116][    C4]  do_initcall_level+0xa0/0xc0
[    4.954121][    C4]  do_initcalls+0x54/0x94
[    4.954125][    C4]  do_basic_setup+0x24/0x30
[    4.954130][    C4]  kernel_init_freeable+0x98/0xf0
[    4.954134][    C4]  kernel_init+0x14/0x184
[    4.954139][    C4]  ret_from_fork+0x10/0x30

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I32d3d7588e1eddc3f88fd5c1f47b6efef5da9e32
2022-06-15 09:58:55 +08:00
Liang Chen
9ee2b2d154 usb: typec: fusb302: remove invalid flag IRQF_ONESHOT for request_irq()
The flag IRQF_ONESHOT is only for irq thread, so remove IRQF_ONESHOT
for request_irq().

And with IRQF_ONESHOT, when enable CONFIG_PREEMPT_RT, kernel will report bug:

[  789.709834][    C0] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:970
[  789.709862][    C0] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/0
[  789.709879][    C0] INFO: lockdep is turned off.
[  789.709885][    C0] irq event stamp: 25194
[  789.709892][    C0] hardirqs last  enabled at (25193): [<ffffffc01139bd30>] exit_el1_irq_or_nmi+0x20/0x54
[  789.709929][    C0] hardirqs last disabled at (25194): [<ffffffc0100a236c>] do_idle+0x94/0x10c
[  789.709954][    C0] softirqs last  enabled at (2818): [<ffffffc010056c20>] __local_bh_enable_ip+0x1f4/0x258
[  789.709982][    C0] softirqs last disabled at (2812): [<ffffffc01015f6ac>] local_bh_disable+0x4/0x30
[  789.710009][    C0] Preemption disabled at:
[  789.710014][    C0] [<ffffffc0113a05e8>] schedule_preempt_disabled+0x20/0x2c
[  789.710042][    C0] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W         5.10.66-rt53 #7
[  789.710061][    C0] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[  789.710070][    C0] Call trace:
[  789.710075][    C0]  dump_backtrace+0x0/0x1c4
[  789.710099][    C0]  show_stack+0x18/0x24
[  789.710119][    C0]  dump_stack_lvl+0xec/0x148
[  789.710135][    C0]  dump_stack+0x18/0x64
[  789.710150][    C0]  ___might_sleep+0x1b4/0x1c4
[  789.710172][    C0]  rt_spin_lock+0x70/0xd8
[  789.710188][    C0]  fusb302_irq_intn+0x28/0x6c
[  789.710210][    C0]  __handle_irq_event_percpu+0xa8/0x1b4
[  789.710234][    C0]  handle_irq_event+0x8c/0x180
[  789.710255][    C0]  handle_level_irq+0x148/0x1e4
[  789.710272][    C0]  generic_handle_irq+0x30/0x48
[  789.710293][    C0]  rockchip_irq_demux+0x154/0x224
[  789.710316][    C0]  __handle_domain_irq+0xb0/0x11c
[  789.710336][    C0]  gic_handle_irq+0x74/0x14c
[  789.710354][    C0]  el1_irq+0xd0/0x1c0
[  789.710369][    C0]  cpuidle_enter_state+0x184/0x2d0
[  789.710386][    C0]  cpuidle_enter+0x38/0x50
[  789.710401][    C0]  cpuidle_idle_call+0x188/0x278
[  789.710419][    C0]  do_idle+0xb8/0x10c
[  789.710436][    C0]  cpu_startup_entry+0x24/0x28
[  789.710453][    C0]  rest_init+0x1ec/0x1fc
[  789.710471][    C0]  arch_call_rest_init+0x10/0x1c
[  789.710492][    C0]  start_kernel+0x3f0/0x524

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: Ifb3bf4e6f20a705b4a13beaa3f0fee9be8709ac9
2022-06-15 09:54:10 +08:00