Long Strange Trip

  • 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.…

  • more battery charging

    So reading the Battery Charging Implementers spec, and in particular, this doc, Section 6 is the gory details. (and table 5.3). Table 5.3 suggests that RID_A  should be 124K (oops, I used 100K), RID_B = 68K, and RID_C = 36.5K. And, it says that RID_A is 122 < RID_A < 126K, so there’s no way…

  • Even more OTG charging

    Time to dig in to the differences in the various code branches. On AOSP for MSM,  https://android.googlesource.com/kernel/msm.git, there is a ‘newer’ branch. Newer in the sense that it is a newer kernel. To diff the version shipped w/ the Nexus 7 vs the newer one, run git diff remotes/origin/android-msm-3.9-usb-and-mmc-hacks — msm_otg.c (or just from the top…

  • More on the charging USB OTG Nexus 7

    So i can reliably charge now with the USB OTG cable. I found I had a problem wit the cable I had bought: it should have 100K between pin 4 & pin 5, but pin 4 was No-Connect. E.g. see here. I cut the shield off the cable i was using with an xacto knife…

  • USB OTG charging Nexus 7 (2013) flo: some success!

    OK, enabled CONFIG_USB_MSM_ACA=y, and made the diffs as per previous post, and echo enabled > /sys/kernel/debug/msm_otg/aca now the device recognises (and starts charging) when I plug in the Y cable and to the power. And it recognises it is not charging when I unplug the power. However, the OTG function itself is not powered unless the external…