Commit Graph

87 Commits

Author SHA1 Message Date
dian.shao be5286294d usb: s6 u3phy pll parameters updates [1/1]
PD#SWPL-196777

Problem:
s6 u3phy pll parameters updates.

Solution:
Modify driver(hard coded).

Verify:
S6

Change-Id: I17326e0e6e867e7671788753df023e163dd1f9be
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-12-18 00:10:17 -08:00
dian.shao 268c7818ea usb: dwc2 shutdown err [1/1]
PD#SWPL-195276

Problem:
dwc_otg_flush_tx_fifo() HANG
dwc_otg_flush_rx_fifo() HANG

Solution:
cancel disconnect detect work.

Verify:
sc2

Change-Id: I76223fd78fc16f967a23e4d4e8caaf0da0af5cbc
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-12-06 23:55:12 -08:00
he.he 289071f1f3 usb: call dwc_otg.ko in the usb_main [1/1]
PD#SWPL-194662

Problem:
USB host mode work abnormal in the abnormal USB mode switching.

Solution:
Call dwc_otg.ko in the usb_main.

Verify:
sc2

Change-Id: Ia6cef0fed214c279edbf4c5ab70b6e4901ecb709
Signed-off-by: he.he <he.he@amlogic.com>
2024-11-27 18:34:58 -08:00
shufei.zhao 3afb9d9fec build: fix error for smarthome build [1/1]
PD#SWPL-189048

Problem:
support smarthome build for k6.12

Solution:
fix error

Verify:
A1

Test:
A1

Change-Id: I0b3450388e458c090a944ab220329bb4f1ecea55
Signed-off-by: shufei.zhao <shufei.zhao@amlogic.com>
2024-11-08 04:05:33 -08:00
he.he c9a70f3567 usb: clean usb coverity [1/1]
PD#SWPL-190835

Problem:
clean usb coverity

Solution:
clean usb coverity

Verify:
all

Change-Id: I28cacb1084f626146b68c7ab4103b49ad93f0fe5
Signed-off-by: he.he <he.he@amlogic.com>
2024-11-07 05:53:19 -08:00
he.he a062b79c44 usb: Lock system infers dwc_otg deadlock [1/1]
PD#SWPL-190195

Problem:
Lock system infers dwc_otg deadlock

Solution:
This inference is unreasonable, and ignore it.

Verify:
sc2

Change-Id: Iae8505d4ff38e230d725e9d86e5783d7c1f766c5
Signed-off-by: he.he <he.he@amlogic.com>
2024-10-31 19:02:58 -07:00
he.he e254f5683a usb: clean usb coverity [1/1]
PD#SWPL-190835

Problem:
clean usb coverity

Solution:
clean usb coverity

Verify:
all

Change-Id: I0522381ae418c83e1024c4edc1ca31eec2f6870b
Signed-off-by: he.he <he.he@amlogic.com>
2024-10-30 18:59:20 -07:00
he.he 5eb7e67aa3 usb: add some patches [1/1]
PD#SWPL-188390

Problem:
add some patches

Solution:
add some patches

Verify:
all

Change-Id: Iea01df348e0363d77c5673395d5f4b0689adbe03
Signed-off-by: he.he <he.he@amlogic.com>
2024-10-22 00:18:03 -07:00
he.he e148bae334 usb: move xhci and dwc3 to common_drivers [1/1]
PD#SWPL-188390

Problem:
move xhci and dwc3 to common_drivers

Solution:
move xhci and dwc3 to common_drivers

Verify:
sc2

Change-Id: Ie40bf88170c03820ae7cd2746172536d5e947ff7
Signed-off-by: he.he <he.he@amlogic.com>
2024-10-15 00:00:01 -07:00
Wanwei Jiang a73692ccfe bringup: upgrade kernel from 6.11 to 6.12 [1/1]
PD#SWPL-188184

Problem:
upgrade kernel from 6.11 to 6.12

Solution:
AML_KERNEL_VERSION	3
UPSTREAM_VERSION	"5a81cc3248a2"
AML_PATCH_VERSION	"5a81cc3248a2"
MERGE_DATE		"2024-10-09"
1. modify build script
2. port auto patch and move common-mainline to common16-6.12
3. modify the code due to the change of
the remove output_poll_changed in struct drm_mode_config_funcs
4. modify the code due to the change of the remove GPIOF_DIR_OUT
5. modify the code due to the change of the remove no_llseek
6. modify the code due to the change of the struct fd
7. modify the code due to the change of the struct mem_cgroup_reclaim_iter
8. modify the code due to the change of the file unaligned.h

Verify:
local

Test:
bootup to console in fatload mode

Change-Id: I98629ea9e68fca121176682d31dc73b8a8c936f8
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2024-10-09 18:51:40 -07:00
Wanwei Jiang 911eeadc02 bringup: upgrade kernel from 6.6.10 to 6.6.11 [1/1]
PD#SWPL-183292

Problem:
upgrade kernel from 6.6.10 to 6.6.11

Solution:
1. modify auto patches
2. modify the code due to the change of
the remove function in struct platform_driver
3. modify the code due to the change of
the match function in struct bus_type
4. modify some page function to folio function
5. modify spi module due to some functions changed

Verify:
local

Change-Id: I92c266b6a1bbae363abd0ff50d7f3037e90bc624
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2024-09-26 15:05:50 +08:00
Wanwei Jiang 621ac2f55c bringup: porting usb and wireless modules [1/1]
PD#SWPL-183292

Problem:
porting usb and wireless modules

Solution:
1. porting usb and wireless modules
2. setting the default value of CONFIG_AMLOGIC_KERNEL_VERSION as 16612
3. modify the reset Makefile

Verify:
local

Change-Id: Ie3c99a75a1f3f439ebaa8d5cc852a654465fb379
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2024-09-14 19:27:18 -07:00
Dezhen Wang 490f387893 upgrade: android15-6.6 in 2024/03 [2/2]
PD#SWPL-177341

Problem:
record merge upstream information

Solution:
AML_KERNEL_VERSION      6
UPSTREAM_VERSION        "a8759911ea10"
AML_PATCH_VERSION       "a8759911ea10"
MERGE_DATE              "2024-07-16"

Verify:
a4/a5

Change-Id: Iceb68a4d0088ff692d57aeaac7ceadd571756e6d
Signed-off-by: Dezhen Wang <dezhen.wang@amlogic.com>
2024-07-30 12:46:50 +00:00
dian.shao c7686fae30 usb: k6.6 boottime & misc [1/1]
PD#SWPL-173263

Problem:
amlogic_usb boottime longer than old kernel(5.15).
xhci trace sys name error.

Solution:
downgrade driver code.
change xhci-menson trace name.

Verify:
sm1

Change-Id: I8d412509f54a9fb236349393af939f944f5ed948
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-06-27 12:15:06 +00:00
dian.shao 2e9dc03156 usb: sm1/sc2 bringup [1/1]
PD#SWPL-160521

Problem:
The dwc3 meson is not default to xhci-meson

Solution:
Default it to xhci-menson

Verify:
Sm1&sc2.

Change-Id: Ib0034e968b1d27c5824c828d766c4e13c66275de
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-06-27 07:47:47 +00:00
song.han 57ec7b9e8b 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-06-27 07:40:34 +00:00
dian.shao 3f16fd4405 usb: f_rndis dereference removed udc gadget dev [1/1]
PD#SWPL-161854

Problem:
[  346.423099][2 T3213  d.] Unable to handle kernel NULL pointer
dereference at virtual address 0000000000000000
...
[  346.608963][2 T3213  d.]  __pi_strlen+0x14/0x150
[  346.609536][2 T3213  d.]  rtnl_dump_ifinfo+0x294/0x5a0
[  346.610175][2 T3213  d.]  netlink_dump+0x110/0x310
[  346.610771][2 T3213  d.]  netlink_recvmsg+0x2a8/0x2e0
[  346.611399][2 T3213  d.]  sock_recvmsg+0x78/0xd0
[  346.611974][2 T3213  d.]  ____sys_recvmsg+0x8c/0x3c8
[  346.612591][2 T3213  d.]  ___sys_recvmsg+0x84/0xf0
[  346.613187][2 T3213  d.]  __sys_recvmsg+0x6c/0xd0
[  346.613772][2 T3213  d.]  __arm64_sys_recvmsg+0x2c/0x40
The otg port udc structure is removed when the otg plug is inserted
to probe xhci host driver afterwards. However the remove func clears
the crg_udc_dev, so the device structure embedded as the crg_udc_dev.gadget.dev
is wrongly cleared before kref goes down to 0 thus the f_rndis dereferences
null pointer crg_udc_dev.gadget.dev.kobj.name.

Solution:
Don't clear crg_udc_dev in remove.

Verify:
av400

Change-Id: Ie69626de5b83700e743eb079be19ce72535cfd5e
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2024-04-16 04:09:56 -07:00
qiankun.wang 39148c4643 iotrace: iotrace vendor hooks and optimization [1/1]
PD#SWPL-149337

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-29 04:02:16 -07:00
Dezhen Wang bcfa0ee2e4 bring up: revert compatibility code for kernel 6.6 [1/1]
PD#SWPL-151245

Problem:
kernel6.6 will not distinguish different versions of kernel.
so we do not make compatibility code in 6.6.

Solution:
revert compatibility code for kernel 6.6.

Verify:
local

Test:
local

Change-Id: I24b8acac62cec05ffb2f637a86f91789f1d0b905
Signed-off-by: Dezhen Wang <dezhen.wang@amlogic.com>
2024-01-11 18:46:45 -07:00
he.he bc924e8231 usb: some errors while compiling xhci and dwc3 trace [1/1]
PD#SWPL-149504

Problem:
some errors while compiling xhci and dwc3 trace
./mk.sh --gki_20

Solution:
modified

Verify:
a4

Change-Id: I290eff0a29b476305ff846eb5222ebcef9f86307
Signed-off-by: he.he <he.he@amlogic.com>
2023-12-27 01:19:58 -07:00
he.he 19c1b404b2 usb: move xhci and dwc3 code to common_drivers [1/1]
PD#SWPL-149504

Problem:
move xhci and dwc3

Solution:
move xhci and dwc3

Verify:
a4

Change-Id: I50b09d317b63f7f449a2b3ed57037228b7a3c0db
Signed-off-by: he.he <he.he@amlogic.com>
2023-12-26 00:36:51 -07:00
he.he a030a2c9d1 usb: support USB for a4/a5 [1/1]
PD#SWPL-149504

Problem:
support USB for a4/a5

Solution:
support USB for a4/a5

Verify:
A4

Change-Id: I0510166908b6d9094269cb72f632348ab13a03b8
Signed-off-by: he.he <he.he@amlogic.com>
2023-12-18 04:59:09 -07:00
Wanwei Jiang 43461aec82 kernel6.6: bring up [1/1]
PD#SWPL-145682

Problem:
bring up kernel6.6

Solution:
1. porting kernel6.6
2. compatible with different kernel versions
3. bring up kernel6.6

Verify:
sc2 c2 a4 a5

Test:
None

Change-Id: Ie22af0abc8ea96261e8a8cc7804b58565aedd904
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2023-12-14 16:55:55 +08: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
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