mdel Posted August 11, 2016 Share Posted August 11, 2016 hi, having power problems with the two usb ports of my pcduino3 nano, i checked the schematics and it appears the otg port is not powered by the USB_5V rail but directly from the VCC_5V input rail, so i was hoping it would solve my problem. Unfortunately it seems the port acts as an OTG port by default and i can't find a way to restore the otg host mode as advertised in the vanilla kernel features. The documentation only details how to use various OTG modes but not how to revert it back to host. I'm using xenial vanilla image. thank you. Link to comment Share on other sites More sharing options...
zador.blood.stained Posted August 11, 2016 Share Posted August 11, 2016 On cubietruck with mainline kernel it works this way: you have to "activate" OTG port first by loading, for example, g_serial module modprobe g_serial or adding it (g_serial) to /etc/modules to be loaded at boot automatically after reboot After that the port will switch to host mode automatically when you plug in standard OTG cable (with ID pin connected to ground) Example dmesg output: loading g_serial and plugging OTG cable with USB flash drive [333555.269324] g_serial gadget: Gadget Serial v2.4 [333555.274114] g_serial gadget: g_serial ready [333574.130202] usb 5-1: new high-speed USB device number 2 using musb-hdrc [333574.278413] usb 5-1: New USB device found, idVendor=058f, idProduct=6387 [333574.285273] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [333574.292552] usb 5-1: Product: Mass Storage [333574.296753] usb 5-1: Manufacturer: Generic [333574.301006] usb 5-1: SerialNumber: 203543EC [333574.306622] usb-storage 5-1:1.0: USB Mass Storage device detected [333574.315545] scsi host2: usb-storage 5-1:1.0 [333575.322968] scsi 2:0:0:0: Direct-Access Generic Flash Disk 8.07 PQ: 0 ANSI: 4 [333575.333621] sd 2:0:0:0: Attached scsi generic sg2 type 0 [333575.345811] sd 2:0:0:0: [sdc] 7864320 512-byte logical blocks: (4.03 GB/3.75 GiB) [333575.354807] sd 2:0:0:0: [sdc] Write Protect is off [333575.359749] sd 2:0:0:0: [sdc] Mode Sense: 23 00 00 00 [333575.366483] sd 2:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [333575.399815] sdc: sdc1 [333575.413331] sd 2:0:0:0: [sdc] Attached SCSI removable disk Link to comment Share on other sites More sharing options...
tkaiser Posted August 11, 2016 Share Posted August 11, 2016 having power problems with the two usb ports of my pcduino3 nano, i checked the schematics and it appears the otg port is not powered by the USB_5V rail but directly from the VCC_5V input rail, so i was hoping it would solve my problem. The problem is that both OTG and DC-IN are Micro-USB (crappy connector mostly used with crappy cables leading to heavy voltage drops under load). Unlike other boards that have the same type of connectors (Banana Pi and Banana Pro for example) the board can not be powered through USB (I did some experiments a while ago since Lime2 for example only lists consumption of USB consumers when it's powered through USB OTG). On the PcDuino Nano the power connector of both Micro USB jacks are interconnected using tiny PCB traces. I tried to power the board through the OTG connector just to realize AXP209 will still be feed through the DC-IN rail but instead of 5.1V only 4.7V were reported. So in case you already suffer from undervoltage be prepared that USB consumers on the OTG port will be fed with a voltage that is way below USB specs. In post #26 is explained how you get voltage/consumption monitoring up and running in 5 minutes (thanks to Zador's work providing AXP209 driver for mainline kernel!) Link to comment Share on other sites More sharing options...
mdel Posted August 11, 2016 Author Share Posted August 11, 2016 @zador.blood.stained thx it worked as you described. Unfortunately having to leave the otg cable in place won't help me much as it certainly can't drive a USB hdd and so won't let my disks power up. Back to square one. @tkaiser yeah you're right i should be getting the full 1A on any of the two USB ports. I can get one of my usb3 enclosures to power up but only with a dual USB cable, which would indeed point out that those usb tracks can't drive 1amp on their own, not really a design flaw but still not very DiY friendly. Placing the sd card port right on the opposite side of the usb/rj45 ports was another fun idea. Anyways, i'll order some dual usb3 cables to see if it can solve the problem and in the meantime i'll power that usb cable directly from the DC rail. thx for the additional info, i was interested in learning more about that AXP209 power monitoring so it'll be for a future session. Link to comment Share on other sites More sharing options...
Recommended Posts