Commit graph

17 commits

Author SHA1 Message Date
RD Babiera
52d276e80f Merge "usb: enable/disable displayport alt mode through enableUsbData" into main 2023-10-13 21:23:36 +00:00
RD Babiera
435c89be86 Merge "usb: check for port partner Thunderbolt capability" into main 2023-10-05 23:09:55 +00:00
RD Babiera
e1a03c3dd0 usb: check for port partner Thunderbolt capability
Query the port partner's SVIDs when the DisplayPort driver sysfs
is not recognized so that the USB HAL can identify whether or not
the port partner supports Thunderbolt.

Test: manual verification on device - test to see that cableStatus
is set to NOT_CAPABLE on hub that supports Thunderbolt but not
DisplayPort Alt Mode. Then verify that device not capable of being
a DisplayPort sink but does support Thunderbolt does not trigger
this status.
Bug: 288150501
Change-Id: Iaba60ecc5510acecee1e1d3241611906c738a263
Signed-off-by: RD Babiera <rdbabiera@google.com>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:873766c6f0c668ba526eaefe18ecc5e51ce87d67)
2023-10-05 20:01:02 +00:00
Roy Luo
5f6a61e1a4 Merge "usb: upgrade stats AIDL to v2" into main 2023-10-03 20:49:36 +00:00
Treehugger Robot
81b7f5cfc6 Merge "Usb.cpp: Fix typos when unable to disable USB data" into udc-qpr-dev am: 206ecbd71d am: 96d8442f91
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zumapro/+/24800352

Change-Id: I33e7c8ed998a03b4b23047347581b26254fa78e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-21 11:30:59 +00:00
Roy Luo
7d8e108a00 usb: upgrade stats AIDL to v2
Upgrade stats AIDL to v2 following pixelstats lib.

Bug: 297224564
Test: Build
Change-Id: I3ff3a761467651a6550ec0c07419844189216a2e
2023-09-20 23:37:33 +00:00
RD Babiera
7fbcdf0237 usb: enable/disable displayport alt mode through enableUsbData
Adds functionality for enabling and disabling DisplayPort Alt Mode
on the port through enableUsbData in the USB HAL to comply with USB
restrictions for heightened security mode.

Test: manual test on device - use enableUsbData dumpsys command to
      turn off DisplayPort and then turn it back on while connected to a
      partner sink.
Bug: 297208252
Change-Id: I9f071bce802b728f2229abc08efb2204e4c2505a
Signed-off-by: RD Babiera <rdbabiera@google.com>
2023-09-20 19:51:03 +00:00
Kuen-Han Tsai
20d7a3bcc3 Usb.cpp: Fix typos when unable to disable USB data
If Usb.cpp cannot write a zero value to the USB_DATA_PATH file, display
the message of "Not able to turn off usb connection notification".

Test: refactoring CL. Existing tests still pass.
Bug: 301016122
Change-Id: I4e2a920a67b022496c5332d260ff53cd6400a9f9
2023-09-19 18:57:13 +08:00
RD Babiera
2323e69cf4 usb: populate USB aidl hal AltModeData
Populates AltModeData within PortStatus with DisplayPort
Alt Mode statuses for pin assignment, hpd, link training
status, and port partner capability.

Test: manual test on device
Bug: 297286558
Change-Id: I52a56f7090ed6dbef6211f19d6350cecac58e4fa
(cherry picked from commit c2c37bf3a81e4138bd2c0e82275d363dce2220ec)
Signed-off-by: RD Babiera <rdbabiera@google.com>
2023-09-11 21:22:05 +00:00
RD Babiera
d14e37d77d Usb: shutdown old displayport poll thread when multiple start up
Better enforces that only one DisplayPort poll thread should be
active at once. If a new call to setup is made from additional
bind uevents before a disconnect occurs, tells the old thread
to shutdown and awaits signaling before a new worker thread spins
up.

Test: manual testing on device
Bug: 286593610
Change-Id: I1707970c500915fd4abb161d0b3a424bbb2bddca
(cherrypicked from commit 78f6294e381ca4df70b28d1d0f07aff77b73574c)
Signed-off-by: RD Babiera <rdbabiera@google.com>
2023-09-11 21:22:01 +00:00
Badhri Jagan Sridharan
8e5daebb44 Usb: Check for displayport when booting
When booting check whether displayport driver has been probed and
signal hpd events as needed. Pin config and orientation needs to
be queried before signalling hpd.

Test: Manual verification on device
Bug: 297286558
Change-Id: Iddb0921b363e49c41c0f6f635887b4daf4d19561
(cherry picked from commit 574d046bd7c3a2d81f48caf3881a61ad0d283e9a)
Signed-off-by: RD Babiera <rdbabiera@google.com>
2023-09-11 21:21:57 +00:00
Badhri Jagan Sridharan
9df9887bd1 Usb: Signal irq_hpd to drm stack
Monitor typec stack for irq_hpd events and signal irq_hpd when the
irq_hpd counter value read is not the same as the previously cached
value.

Test: Manual verification on device
Bug: 297286558
Change-Id: Id4a72afcf85550cabbc2f9469bb0ccb92cd02ad2
(cherry picked from commit 412f31194c8b169806a2c0df85ef6bf69cf7af0b)
Signed-off-by: RD Babiera <rdbabiera@google.com>
2023-09-11 21:21:53 +00:00
RD Babiera
667ff0cf59 usb: Fix HAL build warnings related to DisplayPort
Adds proper error handling go-to points to remove warnings arising
from uninitialized variables, and removes unused
queryDisplayPortStatus() method.

Test: manual test on device, verify compiler warnings
Bug: 297286558
Change-Id: I54f7b710a0805b32c894d741e473d64814200134
(cherry picked from commit 4e29924d3d5ef1e9e13df46bf249f91593c73946)
Signed-off-by: RD Babiera <rdbabiera@google.com>
2023-09-11 21:21:50 +00:00
RD Babiera
94dac0240c usb: provide usb reference to DisplayPort shutdown thread
Passes usb object reference to thread creation of
mDisplayPortShutdownHelper so that it can properly call DisplayPort
shutdown method instead of calling on NULL reference.

Test: manual test on device
Bug: 297286558
Change-Id: Ie4dabb5e3ae9065f57cc0fbf2593fbe399097472
(cherry picked from commit cc50d9950807280653973a0dd9cd3b22e323bcd5)
Signed-off-by: RD Babiera <rdbabiera@google.com>
2023-09-11 21:21:43 +00:00
RD Babiera
fe0c40802e Port dp changes to drm sysfs
Write pin assignment, hpd, and orientation from type-c class to
drmdp platform device attributes using epoll when displayport
driver binds to device, and determine whether or not to shut down
epoll on displayport driver change uevents.

Test: manual testing with form factor device
Bug: 297286558
(cherry picked from commit de0fc9d2201685b5eb4c3905e652911b192a542f)
Change-Id: Iec9fc76166481a4611bb2fc023aea044b497f2c0
Signed-off-by: RD Babiera <rdbabiera@google.com>
2023-09-08 22:46:43 +00:00
Chien Kun Niu
2d27d7b453 usb: add all i2c number
Add all I2c number to change the permission

Bug: 297109635
Test: limit 1.3A work
Change-Id: I5ca8301da72ea848154f5382265ea06fa432fea2
2023-08-24 15:45:35 +08:00
Robin Peng
dec234f475 init zumapro from zuma sha 4daedb8feb4d4
Bug: 272725898
Change-Id: I1e1ab5d15e7f4b2b59e28f2e52e07cd7e12f25b3
2023-03-31 15:10:16 +00:00