platform_kernel-5.15/drivers/usb
Li Jun 2d18a97422 BACKPORT: FROMGIT: usb: dwc3: add power down scale setting
Some SoC(e.g NXP imx8MQ) may have a wrong default power down scale
setting so need init it to be the correct value, the power down
scale setting description in DWC3 databook:

Power Down Scale (PwrDnScale)
The USB3 suspend_clk input replaces pipe3_rx_pclk as a clock source to
a small part of the USB3 core that operates when the SS PHY is in its
lowest power (P3) state, and therefore does not provide a clock.
The Power Down Scale field specifies how many suspend_clk periods fit
into a 16 kHz clock period. When performing the division, round up the
remainder.
For example, when using an 8-bit/16-bit/32-bit PHY and 25-MHz Suspend
clock,
Power Down Scale = 25000 kHz/16 kHz = 13'd1563 (rounder up)

So use the suspend clock rate to calculate it.

Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Link: https://lore.kernel.org/r/1654568404-3461-1-git-send-email-jun.li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 234219431
(cherry picked from commit 3497b9a5c8c3d4efaa15ab542cc6a774b0e0a7c6
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing)
[jindong: rebase to v5.15, get "suspend" clk from of to replace nonexistent dwc->susp_clk]
Change-Id: I0ce2c8041810d4add84b628fc8c3964063aacd5c
Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
2022-06-10 15:48:18 +00:00
..
atm
c67x00
cdns3 usb: cdns3: Fix issue for clear halt endpoint 2022-05-09 09:14:29 +02:00
chipidea usb: chipidea: ci_hdrc_imx: fix potential error pointer dereference in probe 2021-12-01 09:04:40 +01:00
class usb: cdc-wdm: fix reading stuck on device close 2022-05-18 10:26:54 +02:00
common usb: ulpi: Call of_node_put correctly 2022-02-16 12:56:34 +01:00
core Merge 5.15.38 into android13-5.15 2022-05-18 09:00:50 +02:00
dwc2 usb: dwc2: drd: fix soft connect when gadget is unconfigured 2022-03-02 11:48:05 +01:00
dwc3 BACKPORT: FROMGIT: usb: dwc3: add power down scale setting 2022-06-10 15:48:18 +00:00
early Revert "usb: early: convert to readl_poll_timeout_atomic()" 2021-12-22 09:32:45 +01:00
gadget UPSTREAM: usb: gadget: f_mass_storage: Make CD-ROM emulation work with Mac OS-X 2022-06-09 17:46:07 +00:00
host This is the 5.15.41 stable release 2022-05-18 11:31:34 +02:00
image
isp1760 usb: isp1760: otg control register access 2021-08-27 16:11:39 +02:00
misc usb: misc: fix improper handling of refcount in uss720_probe() 2022-05-09 09:14:28 +02:00
mon
mtu3 usb: mtu3: fix USB 3.0 dual-role-switch from device to host 2022-05-09 09:14:27 +02:00
musb usb: musb: tusb6010: check return value after calling platform_get_resource() 2021-11-25 09:48:25 +01:00
phy usb: phy: generic: Get the vbus supply 2022-05-09 09:14:29 +02:00
renesas_usbhs usb: renesas_usbhs: Fix spelling mistake "faile" -> "failed" 2021-08-27 10:29:32 +02:00
roles
serial USB: serial: option: add Fibocom MA510 modem 2022-05-18 10:26:55 +02:00
storage USB: storage: ums-realtek: fix error code in rts51x_read_mem() 2022-04-08 14:23:40 +02:00
typec This is the 5.15.41 stable release 2022-05-18 11:31:34 +02:00
usbip usbip:vhci_hcd USB port can get stuck in the disabled state 2021-08-26 13:29:27 +02:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c