Commit Graph

60 Commits

Author SHA1 Message Date
dian.shao 27c3afa3ac 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-27 15:09:31 +08:00
Yue Wang 0b1b861890 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-18 14:53:41 +08:00
dian.shao 4aff6fa195 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 20:07:04 +08:00
yao zhang1 8e51095535 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 21:15:51 +08:00
qi duan 55ad5c2ea9 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-22 19:31:39 +08:00
Hanjie Lin 2acee0d5bb usb: can not recognize U disk. [1/1]
PD#SWPL-139784

Problem:

Solution:
Revert "usb: IDT test failed with replacing gki [1/2]"

This reverts commit 8dd2c1a590.

Revert "usb: IDT test failed with replacing gki [2/2]"

This reverts commit 9221d31343.

Revert "usb: IDT test failed with replacing gki [2/2]"

This reverts commit 7867188971.

Verify:
verify by ohm.

Change-Id: Ic4b6853719ff17d49c366feccbaff3320cadc464
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
2023-09-14 20:08:43 +08:00
Hanjie Lin 8dd2c1a590 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-14 13:40:07 +08:00
dian.shao 2e2a2ea093 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-09-13 16:03:18 +08: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
dian.shao 97714850f7 usb: txhd2 bringup [1/1]
PD#SWPL-125787

Problem:
txhd2 bringup

Solution:
modify dts

Verify:
be311

Change-Id: Id436d9725824e7761c6ed09fe4fb094936f39abb
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-06-29 10:34:00 +08:00
Yue Wang 87e7193d48 usb: optimize m31 phy setting. [1/1]
PD#SWPL-128971

Problem:
optimize m31 phy setting.

Solution:
optimize m31 phy setting.

Verify:
S928X.

Change-Id: I3ea881a42f606f05811fc7fbeb3e9f6e7def2eee
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2023-06-25 00:06:52 -07:00
Yue Wang 5353eee195 usb: usb disconnect and can't be resumed when USB suspend [1/1]
PD#SWPL-125412

Problem:
Don't disconnect USB according the U3,
when USB suspend, otherwise will cause disconnect.

Solution:
CRG_UDC: add a module parameter:
eltest_flag for suspend and resume test

Verify:
t3x

Change-Id: Ifc86db9c9cb704c37c9618feac68a2959b152c25
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2023-05-30 03:33:57 -07:00
Yue Wang ab5f946be7 t5m: usb: fix usb shutdown [1/1]
PD#SWPL-124341

Problem:
fix usb shutdown

Solution:
fix usb shutdown

Verify:
t5m

Change-Id: I82d3852b5bc894f48d882af1bad0a698cae3dfd8
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2023-05-18 21:49:56 -07:00
Yue Wang 2e4f6d715c usb: porting t3x usb. [1/1]
PD#SWPL-117207

Problem:
porting t3x usb.

Solution:
porting t3x usb.

Verify:
T968D4.

Change-Id: I83ab5fb37dec6f89c299f3dffbf8a0ac5dc667dc
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2023-05-18 21:08:38 +08:00
he.he fac7871b2e usb: set_usb_phy_trim_tuning cause system stuck [1/1]
PD#SWPL-123725

Problem:
set_usb_phy_trim_tuning cause system stuck,
since the PHY has been shutdown

Solution:
if PHY has been shutdown, set_usb_phy_trim_tuning
need do nothing.

Verify:
t7c

Change-Id: Ibe277b87f30cdcab35e87e18785c6600e01f87e9
Signed-off-by: he.he <he.he@amlogic.com>
2023-05-17 01:40:56 -07:00
qinglin.li bce5471ebe upgrade: android P upgrade [1/1]
PD#SWPL-122569

Problem:
android not vendor boot

Solution:
builtin all vendor boot modules

Verify:
local

Change-Id: I40b3a29e4cc7e3510193df91bd7af326bb999dad
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
2023-05-16 03:01:29 -07:00
Yue Wang 07a7d58527 usb: m31 phy optimization. [1/1]
PD#SWPL-120931

Problem:
m31 phy optimization.

Solution:
m31 phy optimization.

Verify:
T968D4.

Change-Id: I3b854a3c55484fe22ab107d764f13d30648c34ac
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2023-04-23 01:54:20 -07:00
Yue Wang cb71ce1383 t5m: usb: usb power [1/1]
PD#SWPL-110463

Problem:
usb power is too high

Solution:
test usb power

Verify:
t5m

Change-Id: I976f1550619d535017abbf59848df2b3089508cb
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2023-04-17 20:27:37 -07:00
Yue Wang cb568a8c13 t5m: usb: usb wifi suspend time too long [1/1]
PD#SWPL-118259

Problem:
usb wifi suspend time too long

Solution:
usb wifi suspend time too long

Verify:
T963D4

Change-Id: Ibac60e431b8ac314654a1965a726a6efd7392363
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2023-04-12 22:24:55 -07:00
he.he b2f16b4642 usb: boot panic [1/1]
PD#SWPL-115828

Problem:
Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP ARM
PC is at _raw_spin_unlock_irqrestore

Solution:
the parameter flags of spin_unlock_irqrestore and spin_lock_irqsave
must be the same

Verify:
c3

Change-Id: I71746cdaa3ff55fb3121889566c14b0424e5450d
Signed-off-by: he.he <he.he@amlogic.com>
2023-04-12 14:07:37 -07:00
he.he d784877b35 usb: USB Accessory Test fail [1/1]
PD#SWPL-115828

Problem:
1. USB Accessory Test fail, because there is no 0 data package in
the bulk in transmission
2. A deadlock occurred during USB Accessory test

Solution:
1. Queue a trb for 0 length data when need zero length data package;
2. Using spin_lock_irqsave instead of spin_lock.

Verify:
t7c

Change-Id: Ic4810f5a6163e6aa772bfd4d1cc566b33952a5eb
Signed-off-by: he.he <he.he@amlogic.com>
2023-04-09 23:06:22 -07:00
yao zhang1 47b2ab6395 bringup: Fixed g12b sm1 build error. [1/1]
PD#SWPL-104242

Problem:
g12b sm1 build error

Solution:
Fixed g12b sm1 build error.

Verify:
g12b & sm1

Change-Id: I82173262fe8f6876164e6445b234a53eeda90ac2
Signed-off-by: yao zhang1 <yao.zhang1@amlogic.com>
2023-04-04 19:48:18 +08:00
dian.shao f740f9446e usb: G12B & SM1 Bringup [1/1]
PD#SWPL-104286

Problem:
g12b_a311d_w400 & sm1_s905d3_ac200 bringup on kernel5.15.

Solution:
mod the dts and module load sequence.

Verify:
local.

Change-Id: I5eafb423114620bc0f261e85164a105c91be0212
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2023-04-04 19:35:44 +08:00
qinglin.li 101e177c32 gki_20: modify break gki_20 [2/3]
PD#SWPL-101048

Problem:
break GKI 2.0 configs add depends on CONFIG_AMLOGIC_BREAK_GKI_20

Solution:
break GKI 2.0 configs add depends on CONFIG_AMLOGIC_BREAK_GKI_20

Verify:
local

Change-Id: I31aa00603f41a734f881a77a932dbfbbfe1a7a81
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
2023-02-28 06:10:46 -08:00
he.he df566591b7 usb: adb don't work [1/1]
PD#SWPL-112833

Problem:
adb don't work in A1

Solution:
dwc_otg.ko must be insmod after dwc3.ko,
otherwise the device mode will not work

Verify:
sc2, a1

Change-Id: I1a6ed433bebe7a89a464275fd9387fd846df3cb9
Signed-off-by: he.he <he.he@amlogic.com>
2023-02-27 21:56:25 -08:00
Yue Wang 43dd7aee7f usb: test mtp bug [1/1]
PD#SWPL-105619

Problem:
test mtp bug.

Solution:
test mtp bug.

Verify:
t7

Change-Id: I55d0c1a8c1fecfab655371b5a00ab88f782b5de1
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2023-02-16 08:06:18 -08:00
qi duan fadd56589a USB: crg: add property_entry count [1/1]
PD#SWPL-107420

Problem:
usb initial failed for super-speed port

Solution:
add property_entry count when prop

Verify:
T7c

Change-Id: I686962364d331558b09ead86198d23d382f4853a
Signed-off-by: qi duan <qi.duan@amlogic.com>
2023-01-06 02:17:19 -08:00
qi duan 8697c95e2f USB: crg: setting usb2-lpm-disable property [1/1]
PD#SWPL-104483

Problem:
some ssd disk can not work long time because LPM

Solution:
disable LPM for crg usb IP

Verify:
S905Y4

Change-Id: Ic3e92692af9f03bffc60de366133fea403fa7502
Signed-off-by: qi duan <qi.duan@amlogic.com>
2023-01-04 06:15:54 -08:00
Yue Wang c1fb13b2bf t5m: usb: usb support [2/2]
PD#SWPL-104754

Problem:
usb support

Solution:
usb support

Verify:
AY309

Change-Id: I696d30dd32b0e21ea81ce86b76928e732e5db6e0
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2022-12-30 17:18:40 +08:00
Yue Wang 5da4a6f757 t5m: usb: usb support [1/1]
PD#SWPL-104754

Problem:
usb support

Solution:
usb support

Verify:
AY309

Change-Id: Icf8f250e59f52d44d655099120ef05cedf495a34
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2022-12-30 15:46:45 +08:00
Wanwei Jiang a4d53fed35 usb: optimize log [1/1]
PD#SWPL-95684

Problem:
optimize usb log

Solution:
optimize usb log

Verify:
sc2

Change-Id: I3f8526bd89d729164ceb7275020c1c41b838dbd1
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2022-12-21 22:15:27 -08:00
dian.shao d0a8426d15 usb: fix kernel5.15 typo err [1/1]
PD#SWPL-103669

Problem:
typo check report errors

Solution:
fix according to the prompt

Verify:
AR321

Change-Id: I5ab217c1f665afa5c7334df344ac70671c2a980b
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2022-12-07 02:03:19 -07:00
Yue Wang 0198bf0bd8 usb: porting t3 usb. [1/1]
PD#SWPL-97878

Problem:
porting t3 usb.

Solution:
porting t3 usb.

Verify:
AR321.

Change-Id: I6d3cae1f97632c6641eacdc386d97b23e1f39993
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2022-12-02 14:04:54 +08:00
Yue Wang 7ea2e91979 usb: porting t7c usb. [1/1]
PD#SWPL-94150

Problem:
porting t7c usb.

Solution:
porting t7c usb.

Verify:
t7_an400.

Change-Id: I2e4b777fa36468144a552f2d75bd5f45856df674
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2022-12-02 14:04:53 +08:00
dian.shao ae8e23ed34 coverity: usb and ethernet driver [1/1]
PD#SWPL-100740

Problem:
10897  Whitelist.
12436  added a null ptr check.
141141 added a return value check.
225361 Deleted the dead code.

Solution:
10897  Whitelist.
12436  added a null ptr check.
141141 added a return value check.
225361 Deleted the dead code.

Verify:
coverity.

Change-Id: I31a85828a1d0890d06348d415ce5a6da1ac0e932
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2022-11-22 05:03:09 -07:00
yao zhang1 1ac00b909a usb: Fix C3 usb adb issue. [1/1]
PD#SWPL-100843

Problem:
C3 usb adb can not connect.

Solution:
Fix C3 usb adb issue

Verify:
c3 pass

Change-Id: I3f966384222e8e5b212ec92a80af956b5e4200a9
Signed-off-by: yao zhang1 <yao.zhang1@amlogic.com>
2022-11-10 06:18:11 -07:00
Yue Wang e480c10322 usb: cts: USB Device Test module fail [2/2]
PD#SWPL-99116

Problem:
cts: USB Device Test module fail

Solution:
Don't use IDT transmissions for CRG control

Verify:
t3

Change-Id: I45aebbecde50fdb4dd566aa278dd2b61897a9f60
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2022-11-07 05:55:18 -07:00
Jianxin Pan 0acd77d8e8 usb: merge multi usb kos to reduce boottime [1/1]
PD#SWPL-95684

Problem:
combine input modules

Solution:
merge amlogic-usb.ko from
amlogic_usb2_crg_drd_phy.ko
amlogic_usb2_phy.ko
amlogic_usb3_crg_drd_phy.ko
amlogic_usb3_v2_phy.ko
amlogic_usb_crg_drd.ko
amlogic_usb_crg_drd_otg_v2.ko
amlogic_usb_crg.ko
amlogic_usb_crg_udc.ko
amlogic_usb_otg.ko
amlogic_usb_bc.ko
amlogic_usb_cc.ko
dwc_otg.ko
amlogic_usb3_v3_phy.ko
amlogic_usb_otg.ko
amlogic_usb3_c2_phy.ko
amlogic_usb2_c2_phy.ko

Verified:
SC2 aarch64
S4 aarch32

Change-Id: Ia61ee929ab6e385ab1c17954259d75974fb1e488
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
2022-11-07 04:01:04 -07:00
qi duan 5e3ff806ef 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

Signed-off-by: qi duan <qi.duan@amlogic.com>
Change-Id: I7c361d17cd7bfa846c32018a6fd4add38e6b269b
2022-10-25 22:12:42 -07:00
yao zhang1 37365df098 config: C3 Kernel size optimize. [1/1]
PD#SWPL-95000

Problem:
Kernel size is too big

Solution:
Remove some CONFIGs

Verify:
c3 pass

Signed-off-by: yao zhang1 <yao.zhang1@amlogic.com>
Change-Id: I13303e5e1e967961c6d1cc32a67465c423816276
Signed-off-by: yongbing.he <yongbing.he@amlogic.com>
2022-09-29 19:58:15 +08:00
qi duan 69305b09c2 usb: move crg_otg_write_UDC from common to common_driver for gki [1/1]
PD#SWPL-94449

Problem:
for gki, put crg_otg_write_UDC in common_driver

Solution:
put crg_otg_write_UDC in common_driver

Verify:
ah212 aw419

Signed-off-by: qi duan <qi.duan@amlogic.com>
Change-Id: I74a8fefcca65fd0141182ea0be6fe53041905d5d
2022-09-22 02:10:58 -07:00
pengzhao.liu c2a22ec002 typo: fix typo issue [1/1]
PD#SWPL-89627

Problem:
typo check issue

Solution:
fix typo issue

Verify:
Typo

Change-Id: I388cdac5f7d1e4448225c13aa91bb5d641e5d146
Signed-off-by: pengzhao.liu <pengzhao.liu@amlogic.com>
2022-09-20 22:15:28 -07:00
Wanwei Jiang bbf114354c gki: build fail [1/1]
PD#SWPL-93926

Problem:
./mk.sh --gki, build fail

Solution:
wrap with config

Verify:
sc2

Change-Id: Ib436e277df6d63258e378b85853fd5580ce41d8a
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2022-09-09 06:06:02 -07:00
pengzhao.liu b946ffb848 typo: clear typo problem [1/1]
PD#SWPL-89627

Problem:
clear typo problem

Solution:
clear typo problem

Verify:
s4d

Signed-off-by: pengzhao.liu <pengzhao.liu@amlogic.com>
Change-Id: I9121c9d4b54df9b9a7c244182693e0fd616f5a9e
2022-09-07 20:06:45 +08:00