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-prev] [day] [month] [year] [list]
Date:   Fri, 14 Feb 2020 14:07:55 +0100
From:   Stephan Gerhold <>
To:     Chanwoo Choi <>
Cc:     MyungJoo Ham <>,
Subject: Re: extcon: sm5502: USB-HOST (OTG) detection not working

Hi Chanwoo,

On Fri, Oct 11, 2019 at 04:50:21PM +0200, Stephan Gerhold wrote:
> 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)
>     SM5502_REG_DEV_TYPE1 = 0x80 (SM5502_REG_DEV_TYPE1_USB_OTG_MASK)
> 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,
> Stephan
> [1]:

This mail is quite old now but I am still confused by this.
Any idea what could be wrong here?

I was not able to find any datasheet for SM5502 unfortunately...


Powered by blists - more mailing lists