I've discovered that plugging in a microB to female A adapter that has the ID pin grounded kicks the OTG code. The s3c_udc driver kicks out a message that it's initializing and it attempts to bring up vbus power. That's where it stops. I never get vbus.
I've tried kicking on the regulators (ldo3 and ldo8 for vUSB 3.3V and VUSB 1.1V in the mach-herring.c file but that doesn't seem to kick them on. I see no power on the pins. (I've verified that the code is being called to enabled them at boot).
My suspicion is that the regulators are just not wired. It's a microB port so maybe it's not able to drive VUSB.
Comments?
Steve
--
Steve Modica
CTO - Small Tree Communications
www.small-tree.com
phone: 651-209-6509 ext 301
mobile: 651-261-3201
Thanks for the response! I've seen Sven's page and a couple of the guys I'll be working with next week have this hack working.
The first problem I see with his method is that he's pulling in ehci-hcd. The Nexus S doesn't have any host drivers. I would need something for the S5Pv210.
I've found a tree that includes drivers for this for 2.6.32 over on tarot.com.tw. There's a Samsung guy that has been updating it. It appears it's for Galaxy Tab or something. I have a tree with these included and they initialize, but no joy. (I have yet to try my power on hack below at the same time)
I dropped Sven a note asking about the modules. I'm not sure why he built the USB stuff independent of the kernel.
Lastly, it appears that the voltage regulators on the part are being wired up for the s3c_usb OTG infrastructure. You can find the declarations in arch/arm/mach-s5pv210/mach-herring:
static struct regulator_consumer_supply ldo3_consumer[] = {
REGULATOR_SUPPLY("pd_io", "s3c-usbgadget")
};
static struct regulator_consumer_supply ldo8_consumer[] = {
REGULATOR_SUPPLY("pd_core", "s3c-usbgadget")
};
I actually can get otg_enable_phy to get called (very encouraging!) and it attempts to kick power on with regulator_enable for these two guys. However I get no power because my regulators don't support: REGULATOR_CHANGE_DRMS
This is checked in the valid ops mask and the call is basically ignored.
/* check voltage and requested load before enabling */
if (rdev->constraints &&
(rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_DRMS))
drms_uA_update(rdev);
These regulators only support REGULATOR_CHANGE_STATUS (on or off):
static struct regulator_init_data herring_ldo3_data = {
.constraints = {
.name = "VUSB_1.1V",
.min_uV = 1100000,
.max_uV = 1100000,
.apply_uV = 1,
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
.state_mem = {
.disabled = 1,
},
},
.num_consumer_supplies = ARRAY_SIZE(ldo3_consumer),
.consumer_supplies = ldo3_consumer,
};
static struct regulator_init_data herring_ldo8_data = {
.constraints = {
.name = "VUSB_3.3V",
.min_uV = 3300000,
.max_uV = 3300000,
.apply_uV = 1,
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
.state_mem = {
.disabled = 1,
},
},
.num_consumer_supplies = ARRAY_SIZE(ldo8_consumer),
.consumer_supplies = ldo8_consumer,
};
So, as a complete hack, I enabled the registers at boot with ".boot_on" and verified that the mx8998 LDO3 and LDO8 regulators are enabled at boot. (VUSB 3.3V and VUSB 1.1V). However I get no power. So I'm starting to believe you're right and those regulators are happily cranking power, but they are not wired :(
Steve
> --
> unsubscribe: android-kerne...@googlegroups.com
> website: http://groups.google.com/group/android-kernel