Commit Graph

95 Commits

Author SHA1 Message Date
he.he 48e96cc4a5 usb: black screen display after monkey test [1/1]
PD#SWPL-173442

Problem:
Memory leakage
open usb 2.0 camera fail:SH-20175

Solution:
related host 011

Verify:
t3

Change-Id: I3bd52c35f2aef31f3cb4dbb2eb50f97962d0b032
Signed-off-by: he.he <he.he@amlogic.com>
2024-06-17 03:53:20 -07:00
dian.shao 23fbeb25e1 usb: nak retry time too long [1/1]
PD#SWPL-173238

Problem:
Nak retry time too long.

Solution:
Modify reg params.

Verify:
s7.

Change-Id: I9ab30914f44125e967ec9047e6cdb5884faf1e91
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-06-13 22:40:40 -07:00
he.he ba15d0cf42 usb: special disk causing hub_set_address hang up [1/1]
PD#SWPL-171027

Problem:
Command completion event does not match command,
since when xhci_abort_cmd_ring and
the other command enqueue at the same time
casue to wait_for_completion stuck:

xhci-hcd xhci-hcd.2.auto:
ERROR mismatched command completion event
SET ADDRESS, command->status=25
xhci-hcd xhci-hcd.2.auto:

Timeout while waiting for setup device command
address--E: hub_port_init, 4952
address--S: hub_port_init, 4950
que:CMD-TRB=000000000bd71186, deq=000000000bd71186
xhci_cleanup_command_queue, 1672
SET ADDRESS, command->status=25

xhci-hcd xhci-hcd.2.auto:
Timeout while waiting for setup device command
address--E: hub_port_init, 4952
usb 6-1: device not accepting address 67, error -62
que:CMD-TRB=00000000063428ae, deq=00000000063428ae
irq:CMD-TRB=00000000063428ae, deq=000000000bd71186

xhci-hcd xhci-hcd.2.auto:
Command completion event does not match command

xhci-hcd xhci-hcd.2.auto:
ERROR mismatched command completion event

Solution:
when xhci_complete_del_and_free_cmd must dequeue the command

Verify:
t5m

Change-Id: I401fba241bf5e0f22a680c684853ec1ec2124fe4
Signed-off-by: he.he <he.he@amlogic.com>
2024-05-28 01:48:47 -07:00
dian.shao 19397c740d usb: s7d phy pll update [1/1]
PD#SWPL-163063

Problem:
s7d phy eye diagram.

Solution:
off:0x50 val update

Verify:
bm201

Change-Id: I9f5a1e5233175f666a45e76c1a65709bc5bb12f6
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-05-22 21:59:48 -07:00
Yue Wang 46fe122eaf USB: dequeue do not delay in ISOC mode [1/1]
PD#SWPL-170453

Problem:
1.When UAC dequeue ISOC OUT,the mdelay will block ISOC IN transfer.

Solution:
1.dequeue do not delay in ISOC mode.

Verify:
AV400

Change-Id: I05bc712fecdc7d47e069191aed9efe2e804d5d8c
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2024-05-21 06:29:59 -07:00
Yue Wang a4b790051b t5m: usb: fix usb bus resume timeout [1/1]
PD#SWPL-170131

Problem:
T5m usb bus resume timeout.

Solution:
fix usb bus resume timeout.

Verify:
T903D4

Change-Id: Id0deb5af437d70a294424b2033deb7b846947e52
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2024-05-20 06:40:17 -07:00
he.he 611d5d8720 usb: clean usb coverity [1/1]
PD#SWPL-168326

Problem:
clean usb coverity

Solution:
clean usb coverity

Verify:
t5

Change-Id: I71938d22497dc0824c4a677dae0d9cd94cb70519
Signed-off-by: he.he <he.he@amlogic.com>
2024-05-07 06:02:30 -07:00
dian.shao f4716bd83b usb: std [1/1]
PD#SWPL-165147

Problem:
kernel5.15 STD for General Drivers - usb

Solution:
udc
Add thaw&pm_nb in crg_udc.c

host
Modify phy-aml-crg-drd-usb3.c, remove "return" in init.
STR: crg_suspend -> crg_resume
STD: crg_suspend -> crg_shutdown -> hw power off-> crg_resume
Since the regs lose content when powered off, phy init should be
done again. This is test to be compatible with the STR flow.

otg
Add freeze/thaw/restore methods in phy-aml-crg-drd-otg.c
Fix init/exit broken flag by introducing self-recorded flags
in crg-drd.c&crg_udc.c.

Verify:
a311d2_an400

Change-Id: I686463fd3a4167bd216aa29bfdd5c8e8c2358faa
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-04-30 02:35:45 -07:00
he.he 6d277277bc usb: when suspend and resume xhci died [1/1]
PD#SWPL-165169

Problem:
plug-in usb3.0 u-disk and suspend, change another usb 3.0 u-disk,
and then resume, xhci died:
xhci-hcd-meson xhci-hcd-meson.0.auto:
Abort failed to stop command ring: -110
xhci-hcd-meson xhci-hcd-meson.0.auto:
xHCI host controller not responding, assume dead
xhci-hcd-meson xhci-hcd-meson.0.auto:
HC died; cleaning up
xhci-hcd-meson xhci-hcd-meson.0.auto:
Unsuccessful disable slot 1 command, status 25

Solution:
disable port before disable slot

Verify:
CRG IP

Change-Id: Ife1f374c849cfe16482ae151d57c6d6e7dc23c9d
Signed-off-by: he.he <he.he@amlogic.com>
2024-04-26 03:54:12 -07:00
dian.shao 29af4c6a55 usb: u3pciephy portnum err [1/1]
PD#SWPL-165972

Problem:
The the portnum of u3phy recorded in the host controller
is not zero when the phy is  switched to the pcie.

Solution:
Modify xhci code.

Verify:
sc2_ah212

Change-Id: I0e9e5fce6a51edb835a02f965dd91edabd31ddce
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-04-24 00:41:55 -07:00
he.he f480baa1d6 usb: can't connect PC after suspend and resume repeatedly [1/1]
PD#SWPL-163918

Problem:
can't connect PC after suspend and resume repeatedly

Solution:
restart udc when resume

Verify:
t7

Change-Id: I9a7b6a872b0ffa07cd69c42d52e88ad01503ec97
Signed-off-by: he.he <he.he@amlogic.com>
2024-04-23 04:08:34 -07:00
dian.shao a8a5147363 usb: s7d hs handshake err [1/1]
PD#SWPL-163063

Problem:
s7d usb hs handshake err.

Solution:
modify squelch value to 0xe.

Verify:
s7d.

Change-Id: I0428739c949f89d3c72ddb5137ec2f1e76097b94
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-04-17 19:31:22 +08:00
dian.shao e23dbf6aaf usb: s7d phy disc&squelch [1/1]
PD#SWPL-163063

Problem:
S7d usb hs handshake failed.

Solution:
Adjust disc&squelch.

Verify:
s7d bh209.

Change-Id: I2d15550f60fa48ed4dafed4a5ec0a29c64da2e8c
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-04-17 19:31:21 +08:00
dian.shao fbc617eac4 usb: s7d bringup [1/1]
PD#SWPL-163063

Problem:
s7d bringup usb

Solution:
1. dts proting
2. add new pll config driver code for new process

Verify:
s7d.

Change-Id: I265022b2032867a9c186cbcc633f9a8ffea7e5ff
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-04-17 19:31:20 +08:00
he.he 364cc722c2 usb: xhci not responding [1/1]
PD#SWPL-155224

Problem:
irq: nobody cared (try booting with the irqpoll option)
handlers:
[<0000000065ca241a>] usb_hcd_irq
Disabling IRQ #usb

Solution:
usb interrupt is coming,
but the op_regs->status register equals 0, if exit directly,
it may cause the status to remain at 0 and cause xhci to
falsely hang.

Verify:
t3x

Change-Id: I9b643c13b364ab86bb38384551bcb5008680c1ec
Signed-off-by: he.he <he.he@amlogic.com>
2024-04-07 03:51:05 -07:00
dian.shao b0608a6bad usb: race between unbind&setup [1/1]
PD#SWPL-158524

Problem:
CTS-V usb accessory test unplug&plug too
quickly leading to the racing between unbind
and setup.

Solution:
Add udc_async_callbacks().

Verify:
t7.

Change-Id: I5c4f362583b1e9e3d385fbad0b36da3b92d38eee
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-03-25 03:13:07 -07:00
he.he a12f4e2915 usb: xhci died [1/1]
PD#SWPL-154920

Problem:
when suspend, xhci died

Solution:
After stopping ep completed, processing xhci suspend

Verify:
t3x

Change-Id: I0e013164acebb1516938245bb2997c20790bc71c
Signed-off-by: he.he <he.he@amlogic.com>
2024-03-11 21:09:42 -08:00
song.han 76e8391454 iotrace: module init_layout and data structure [1/1]
PD#SWPL-158475

Problem:
delete module layout base function
synchronous release module init layout
modify iotrace data struct

Solution:
as above

Verify:
sc2_ah212

Change-Id: Ifb186f768a4427f32f32625c4df86cd286dc30c5
Signed-off-by: song.han <song.han@amlogic.com>
2024-03-11 02:57:39 -08:00
dian.shao 44278d887a usb: s7 disconnect logic update [1/1]
PD#SWPL-157221

Problem:
s7 disconnect analog logic has updated.

Solution:
Change usb2_disc_trim at usb2 config reg off 0x0c.

Verify:
bh201

Change-Id: Ie1733d10b9ab783f4b7495d124e1a711200446ca
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-02-17 22:03:31 -07:00
qiankun.wang 89a73decb1 iotrace: iotrace vendor hooks and optimization [2/2]
PD#SWPL-142603

Problem:
iotrace read/write use vendor hooks.
iotrace optimization

Solution:
iotrace read/write use vendor hooks.
iotrace optimization

Verify:
sc2_ah212

Change-Id: If69ed5dce03ffa53f1c4819659fb80dfcad767c5
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2024-01-25 22:27:19 -07:00
dian.shao 67bc8f3603 usb: s7 bringup [1/1]
PD#SWPL-152414

Problem:
otg mode fixed & pll code changed.

Solution:
Fix crg otg driver & soc dts using
analog_process_nm props.

Verify:
s7_s905y5_bh209
txhd2_t950s_be319

Change-Id: I542eaf05b50812842f150609ec136d3e1ccc26b2
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-01-22 12:48:44 +08:00
dian.shao da6290cfda usb: s7 bringup [1/1]
PD#SWPL-152414

Problem:
s7 silicon bringup

Solution:
dts

Verify:
s905y5_bh201

Change-Id: Ide0e60d7c064628981e8990e3879083e342b0e04
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-01-22 12:48:44 +08:00
he.he a15918b950 usb: Delet usb auto-patch and config CONFIG_AMLOGIC_COMMON_USB [1/1]
PD#SWPL-134919

Problem:
cts failed for gki_20

Solution:
Delet usb auto-patch and
config CONFIG_AMLOGIC_COMMON_USB for gki

Verify:
t7c

Change-Id: I2ad79946ea15c946eff51653f174137fd561102a
Signed-off-by: he.he <he.he@amlogic.com>
2024-01-09 08:13:08 -07:00
dian.shao c8c2f99684 usb: tm2 [1/1]
PD#SWPL-143644

Problem:
tm2 dwc3 driver default driver

Solution:
change to dwc3-meson

Verify:
ab301

Change-Id: If4f36109845563937879f0e3c3fb5aa4bd4fcbb6
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-01-08 00:19:55 -07:00
dian.shao d5c2cc7a38 usb: tm2 bringup [1/1]
PD#SWPL-143618

Problem:
TM2 Bringup
-Kernel 5.15
-High speed peripheral driver
-USB

Solution:
Add dts nodes & modify aml usb driver.

Verify:
ab301(revb)

Change-Id: I5ae840e3cf312a37138924fd2e405323c0a7c009
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-12-22 16:08:59 +08:00
he.he 41521bf1cd usb: open usb camera fail [1/1]
PD#SWPL-149974

Problem:
Too many judgments in xhci_queue_isoc_tx, these could
cause to failure to open camera

Solution:
change

Verify:
sm1

Change-Id: I592bf554e930319c6801af081922272230bac522
Signed-off-by: he.he <he.he@amlogic.com>
2023-12-19 00:19:21 -07:00
dian.shao c2f45ca637 usb: dwc3 phy shutdown missing [1/1]
PD#SWPL-149894

Problem:
poweroff
Dump pll status...
NOTICE:  Warning: ANACTRL_PCIEPLL_CTRL0 is not disabled!

Solution:
Add shutdown to menson dwc3 driver.

Verify:
sc2.

Change-Id: I0ee18112e8023cfe64464efaa7850f63ece27940
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-12-18 00:25:03 -07:00
Jianxiong Pan 453a5c3c11 mm: initialize kprob symbols at definition time. [1/1]
PD#SWPL-149407

Problem:
const variables cannot be assigned a value after definition.

Solution:
initialize kprob symbols at definition time.

Verify:
t7c.

Change-Id: I9741da633db166750e51f0580f2bc6c02bb821e7
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2023-12-14 22:31:20 -07:00
he.he 66f87be1d7 usb: support CRG HOST problem [1/1]
PD#SWPL-134919

Problem:
support CRG HOST problem for host-003, host-008, host-007,
host-010, host-011, host-014, host-hub-died, host-016, host-71

Solution:
support CRG HOST problem

Verify:
t3,t7,t5d

Change-Id: Iedb229fe5861f09178a1b96facf21a67d0ca1668
Signed-off-by: he.he <he.he@amlogic.com>
2023-12-13 02:43:19 -07:00
he.he 9bb31af931 usb: support CRG HOST problem [1/1]
PD#SWPL-134919

Problem:
make error for linux, IPC-C3-NBR-PB

Solution:
debug

Verify:
t3,t7,t5d

Change-Id: I5057ce341122af61f513e91b7125d981bdee265f
Signed-off-by: he.he <he.he@amlogic.com>
2023-12-12 02:26:25 -07:00
he.he 99069eab13 usb: move xhci and dwc3 code to common_drivers [1/1]
PD#SWPL-142854

Problem:
move xhci and dwc3 code to common_drivers

Solution:
move xhci and dwc3 code to common_drivers

Verify:
all

Change-Id: I9351b3cb5bf515b89c8e9c62a7070947a6a18968
Signed-off-by: he.he <he.he@amlogic.com>
2023-12-10 22:45:19 -07:00
qi duan ae6498c40e usb: txhd2 otg usb wr_outstanding tune [1/1]
PD#SWPL-146713

Problem:
data read from udisk on otg usb port is error

Solution:
set u2drd wr_outstanding as 0

Verify:
be311

Change-Id: I12a5e155f73526f31afd0f4ae48b9ee031fe2450
Signed-off-by: qi duan <qi.duan@amlogic.com>
2023-12-01 00:13:27 -07:00
dian.shao 46ce70eb57 usb: txhd2 phy [1/1]
PD#SWPL-147762

Problem:
phy config & driver fix.

Solution:
fix them.

Verify:
be311.

Change-Id: I4f1524b67f64f2cfc52d8cee76acc037a07b81b4
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-11-28 22:15:26 -07:00
dian.shao a5998d5c09 sc2: usb: fix SC2 suspend power consumption [1/1]
PD#SWPL-143832

Problem:
fix SC2 suspend power consumption.

Solution:
fix SC2 suspend power consumption.

Verify:
AH212

Change-Id: I8596d84d5cefbb8281245450922be86653d680cf
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-10-26 05:11:48 -07:00
dian.shao cb3b9ec440 usb: reboot crg_exit panic [1/1]
PD#SWPL-142791

Problem:
Reboot cause crg_exit panic.

Solution:
Prevent multi platform device remove.

Verify:
ax208-s928x

Change-Id: I8575d60713ed9fcf406b35e7636bafd22b0fb14d
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-10-20 04:44:08 -07:00
Yue Wang 98e178e303 usb: usb2 squelch level setting 125mv [1/1]
PD#SWPL-98861

Problem:
usb2 squelch level setting 125mv

Solution:
usb2 squelch level setting 125mv

Verify:
t5 test, all chip need this setting

Change-Id: I421413f3e859ddfa5ef6e56351321a3367ca6227
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2023-10-17 22:24:05 -07:00
dian.shao 1e255c3182 usb: dwc pcd dma unmap direction bug [1/1]
PD#SWPL-141703

Problem:
The dwc pcd dma unmap direction is wrong for
control transfer.

Solution:
Fix the direction.

Verify:
Local.

Change-Id: I47516c69ef9f42600baa986b1852f4ca5b7f7672
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-10-09 02:28:58 -07:00
yao zhang1 eb02482bfd Compile: Fix linux-meson compile warning while use gcc > 7.5 [1/2]
PD#SWPL-140857

Problem:
linux-meson compile warning while use gcc > 7.5

Solution:
Fixed some code styles

Verify:
local build server

Change-Id: Ia1f47cfa32291602747d7c0788a6362cf48af023
Signed-off-by: yao zhang1 <yao.zhang1@amlogic.com>
2023-09-27 00:19:06 -07:00
qi duan f6218e3177 usb: IDT test failed with replacing gki [1/2]
PD#SWPL-139422

Problem:
IDT test failed with replacing GKI

Solution:
using kprobe method to solve problem

Verify:
oppen

Change-Id: Iccdbb2d0a8529a43b2df638b2423ce21580319be
Signed-off-by: qi duan <qi.duan@amlogic.com>
2023-09-21 20:34:24 -07:00
Qinglin Li e95fa9a592 Revert "usb: IDT test failed with replacing gki [1/2]"
This reverts commit 16e98f321b.

SWPL-139422: USB owner submits these patches themselves

Change-Id: I1128ff5da7f97165925dd5fd1bad056e8d3ab010
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-09-17 23:10:08 -07:00
dian.shao 6d86a65eda usb: mtp mem out [1/1]
PD#SWPL-139388

Problem:
mtp receive file error.

Solution:
enlarge udc request buffer.

Verify:
local.

Change-Id: I88c97f09e499c7795611988ea6da8a132e3a3b86
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-09-17 22:49:15 -07:00
Hanjie Lin 16e98f321b usb: IDT test failed with replacing gki [1/2]
PD#SWPL-139422

Problem:
IDT test failed with replacing gki

Solution:
using the kprobe method to solve this problem

Verify:
oppen

Change-Id: I0d640fd1d171f1303a34265a54fd790444a21c90
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-09-11 16:03:35 -07:00
dian.shao 60a9080e8a usb: crg udc panic [1/1]
PD#SWPL-136723

Problem:
The cts test reports crg udc related panics originated from recent
regression. The new version of the crg_udc_alloc_request() is not
serialized, when concurrently called, the race condition occurs thus
the used flag is damaged.

Solution:
Protect used flag by atomic operations.

Verify:
a31d2_an400

Change-Id: Iab1e55c60247776a5d7a6b9ac3feb5e5ff4a845c
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-08-29 01:59:17 -07:00
Yue Wang aceb7de3e8 usb: fix crg udc panic [2/2]
PD#SWPL-111936

Problem:
crg udc panic.

Solution:
fix crg udc panic

Verify:
t7c

Change-Id: I2d2e3e19b03840c8806d99e2b6c8a8b458d818d4
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2023-08-22 04:24:06 -07:00
dian.shao 61f4ba0aee usb: coverity [1/1]
PD#SWPL-134414

Problem:
coverity errors

Solution:
fix errors

Verify:
local

Change-Id: I761cb7b77490ab7b16ec86fe68bbbded84810fde
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-08-16 02:28:55 -07:00
dian.shao 4b70375bab usb: s1a bringup [1/1]
PD#SWPL-133129

Problem:
s1a k5.15 bringup

Solution:
modify dts&configs

Verify:
bg201

Change-Id: Ifc4a6781eb1a25e9e32e5edac41020ee31b20a08
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-08-15 10:36:49 +08:00
Yue Wang 46a82af907 usb: fix crg udc panic [1/1]
PD#SWPL-111936

Problem:
crg udc panic.

Solution:
fix crg udc panic

Verify:
t5m

Change-Id: Ia5b76787127851376d99a594166e2ca9f4b3df66
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2023-07-31 22:18:39 -07:00
Jianxiong Pan e61f35dc14 zapper: memory optimization about usb3, defconfig. [2/2]
PD#SWPL-126879

Problem:
memory optimization.

Solution:
disable usb3
delete useless config

Verify:
t215.

Change-Id: Ie23b7cd2e1ca96100a2534928293d8211917622a
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2023-07-05 21:03:06 -07:00
dian.shao cec9486c8f usb: txhd2 bringup [1/1]
PD#SWPL-125787

Problem:
phy pll not set

Solution:
set phy pll

Verify:
be319

Change-Id: I9dd272fccebda8059654e398416874ae4ab4924e
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-06-29 10:34:03 +08:00
dian.shao 5ce3489736 usb: txhd2 bringup [1/1]
PD#SWPL-125787

Problem:
txhd2 bringup udc err

Solution:
add udc vbus detect disable code.

Verify:
be311

Change-Id: I2c270792d154b8f8e83754210eec6a0f08116e7a
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-06-29 10:34:00 +08:00