lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Oct 2019 16:50:15 +0200
From:   Stephan Gerhold <>
To:     Chanwoo Choi <>
Cc:     MyungJoo Ham <>,
Subject: extcon: sm5502: USB-HOST (OTG) detection not working

Hi Chanwoo,

after getting interrupts working on my Samsung Galaxy A5 (2015),
I am now trying to make the extcon device detect USB-HOST=1
when I plug in an USB OTG adapter.

At the moment, the driver can sucessfully detect:
  - USB=1 + SDP=1 when I detect the phone to a PC
  - DCP=1 when I connect it to an AC charger
but it does not set USB-HOST=1 when I connect the USB OTG adapter.

It seems to be a problem in the sm5502 driver, since I do get an
SM5502_IRQ_INT1_ATTACH interrupt when I plug in the USB OTG adapter.

In this case, SM5502 reports:
    SM5502_REG_ADC = 0x00 (SM5502_MUIC_ADC_GROUND)

However, at the moment the sm5502 driver ignores all attach events with

	 * If ADC is SM5502_MUIC_ADC_GROUND(0x0), external cable hasn't
	 * connected with to MUIC device.
	cable_type = adc & SM5502_REG_ADC_MASK;
	if (cable_type == SM5502_MUIC_ADC_GROUND)
		return SM5502_MUIC_ADC_GROUND;

However, I definitely have a cable attached in this case...

The sm5502 driver seems to expect SM5502_REG_ADC == SM5502_MUIC_ADC_OPEN.
Any idea why my hardware reports ADC_GROUND for the USB OTG adapter
instead of ADC_OPEN?

Confusingly, the driver used in the original downstream kernel of
the Samsung Galaxy A5 [1] calls ADC = 0x00 "ADC_OTG" instead of
So getting ADC = 0x00 may not be entirely unexpected here...

Thanks in advance,


Powered by blists - more mailing lists