More notes on USB OTG charging Nexus 7 (2013)

in msm_chg_aca_detect(), we always end up in the default case when the cable is plugged in.

The function calls ulpi_read(phy, 0x87).

This always returns 0 (even tho I think ID_A is set based on my 124K resister from pin 4 to 5), which other parts of the system seem to agree, e.g. the smb345 etc.

The value is driven from ulpi_read(phy, 0x87). I don’t know what register 0x87 is, but its always returning 0.

The PHY type is SNPS_28NM_INTEGRATED_PHY (referred to as Synopsis 28nm integrated phy, presumably a typo of SYNOPSYS), and presumably referring to e.g. http://www.synopsys.com/IP/InterfaceIP/USB/Pages/default.aspx

I think new code has recently been added (e.g. see http://lwn.net/Articles/564011/) that might prove fruitful here.

It uses the ULPI interface an1917.

This would be a lot simpler w/ datasheets. I guess starting with the APQ8064

drivers/usb/gadget/ci13xxx_msm* are involved here as well.


Posted

in

by

Comments

7 Responses to “More notes on USB OTG charging Nexus 7 (2013)”

  1. Paul

    Hello, I am working on a project that I need USB host mode and charging with the Nexus 7 (2013). I have read over your work and I am very interested. I was under the impression that the Nexus 7 did not support the USB charging spec, but your work sort of indicates that it may support the charging spec.

    I also have noted that you seem to indicate that you could make the Nexus 7 (2013) charge OR act as host. Is this without unplugging the OTG cable. If so, I think your work could give me a starting point to make my project work. I am using the Nexus 7 to control stepper motors. It probably would only have to be in host mode for ~10 minutes then off for hours. If via software I can enable OTG, not charge, do the work, disable OTG (Charge mode), repeat, that would work…..

    Can you confirm that you can make the Nexus 7 (2013) turn off and on OTG mode in software without unplugging the OTG cable?

    Thank you VERY much. I would be willing to donate to your work.

    -Paul

  2. Don Bowman

    so yes you can toggle between the two modes.
    i can make it charge. i can make it host. but i have not figured out how to be both simultaneously.

  3. Steve

    Hi, Someone has added usb OTG charging in the ElementalX 1.5 kernel for nexus 7 2013 and wants testers. I will be once I get a y cable:

    http://forum.xda-developers.com/showthread.php?t=2389022&page=94

      1. Don Bowman

        so this works in 1 scenario.
        If you take the cable, add the usb device, then add the power, then plug into tablet.
        if the order is not right, it doesn’t detect.
        if the tablet goes to sleep it doesn’t rediscover.
        but progress. this diff is one of the things I tried, but i did not try the specific cable order.

  4. quizqu

    Hi,
    I’m also interested to install n7 2013 to my car.
    However, lack of easycap driver and otg cable charging solution holds me back.

    I’d love to see your progress in future!

    1. Don Bowman

      you can get a no-driver capture USB from http://febon.blogspot.com/2012/02/1.html . It uses standard linux UVC class, no ‘easycap’. I also had the easycap problem and gave up on it.

Leave a Reply

Your email address will not be published. Required fields are marked *