William Wu 0b1d72b40c phy: rockchip: usbdp: Avoid access usb grf during dp phy power on
The power domain of the usb grf belongs to PD_USB
on both RK3576 and RK3588 platforms. The PD_USB is
managed by the USB controller driver, and it maybe
powered down if USB is not working.

Test on RK3576 EVB2 which supports Type-A USB3.1 +
DP 2xLanes, connect DP to Display screen, meanwhile,
USB not used, SError happens with the following log:

[  224.958079][    C0] Kernel panic - not syncing: Asynchronous SError Interrupt
[  224.958084][    C0] CPU: 0 PID: 132 Comm: kworker/0:2 Tainted: G           O       6.1.57 #11
[  224.958089][    C0] Hardware name: Rockchip RK3576 EVB2 V10 Android Board (DT)
[  224.958092][    C0] Workqueue: events dw_dp_hpd_work
[  224.958101][    C0] Call trace:
[  224.958103][    C0]  dump_backtrace+0xf4/0x114
[  224.958115][    C0]  show_stack+0x18/0x24
[  224.958122][    C0]  dump_stack_lvl+0x6c/0x90
[  224.958132][    C0]  dump_stack+0x18/0x38
[  224.958137][    C0]  panic+0x14c/0x338
[  224.958145][    C0]  check_panic_on_warn+0x0/0x90
[  224.958155][    C0]  arm64_serror_panic+0x68/0x74
[  224.958160][    C0]  do_serror+0xc4/0xcc
...
[  224.958218][    C0]  regmap_write+0x54/0x78
[  224.958224][    C0]  udphy_power_on+0x16c/0x1b0
[  224.958233][    C0]  rockchip_dp_phy_power_on+0x58/0x1bc
[  224.958240][    C0]  phy_power_on+0x8c/0x108
[  224.958248][    C0]  dw_dp_bridge_detect+0x58/0x348
[  224.958256][    C0]  drm_bridge_detect+0x28/0x34
[  224.958264][    C0]  dw_dp_connector_detect+0x34/0x4c
[  224.958272][    C0]  drm_helper_probe_detect+0xd0/0x1a0
[  224.958281][    C0]  check_connector_changed+0x50/0x1b0
[  224.958288][    C0]  drm_helper_hpd_irq_event+0x78/0x134
[  224.958295][    C0]  dw_dp_hpd_work+0x58/0x818

This patch moves udphy_u3_port_disable() from the
udphy_power_on() to rockchip_u3phy_init(), it can
avoid access usb grf during dp phy power on, and
the rockchip_u3phy_init() is called from the USB
controller driver, this can make sure the PD_USB
is powered on if it access usb grf in the USBDP
PHY driver.

Change-Id: I434b2efbbbb5b513ec668bca1c8800d0f7f18e12
Signed-off-by: William Wu <william.wu@rock-chips.com>
2024-04-29 14:31:40 +08:00
2024-04-09 16:10:43 +08:00
2024-01-02 14:38:47 +08:00
2024-01-02 14:38:47 +08:00
2023-10-10 22:00:46 +02:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%