Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds sysfs interfaces that allows charging while in otg #11

Open
wants to merge 1 commit into
base: lineage-20.0
Choose a base branch
from

Conversation

Kethen
Copy link

@Kethen Kethen commented Mar 8, 2023

During the galaxy s3 days samsung sold an "audiodock" with the model number EDD-D200BEGSTA, it very likely houses an audio card that would only power from micro usb connected to the dock. It IDs itself with a 64.9K ohm resister on id pin, and once a samsung device detects it, it will go into a special dock mode where usb data pins are in host mode, but vbus would stay as a client device, effectively "otg while charging".

I'm a little scared of this however, because I don't know why samsung disabled the audiodock in dts (same for s6, driver support is there but disabled in dts).

To enable audiodock (id - 64.9K ohm - gnd):
echo 1 > /sys/devices/virtual/sec/switch/force_enable_audiodock

Other than that, this commit also allows one to spoof normal otg as audiodock. That would allow an OTG cable with an active vbus but without a resister mod to provide charging to the device with otg enabled. The active vbus would also be powering client devices.

To enable otg audiodock spoofing:
echo 1 > /sys/devices/virtual/sec/switch/force_otg_audiodock

During the galaxy s3 days samsung sold an "audiodock" with the
model number EDD-D200BEGSTA, it very likely houses an audio card
that would only power from micro usb connected to the dock. It
IDs itself with a 64.9K ohm resister on id pin, and once a samsung
device detects it, it will go into a special dock mode where usb
data pins are in host mode, but vbus would stay as a client device,
effectively "otg while charging".

I'm a little scared of this however, because I don't know why
samsung disabled the audiodock in dts. Use it at your own risk.

To enable audiodock (id - 64.9K ohm - gnd):
echo 1 > /sys/devices/virtual/sec/switch/force_enable_audiodock

Other than that, this commit also allows one to spoof normal otg
as audiodock. That would allow an OTG cable with an active vbus
but without a resister mod to provide charging to the device with
otg enabled. The active vbus would also be powering client
devices.

To enable otg audiodock spoofing:
echo 1 > /sys/devices/virtual/sec/switch/force_otg_audiodock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant