21

Can the currently announced new member of the Pi family - the Pi Zero - act as an USB peripheral device?

Obviously the schematics are not yet available and the blog entry linked above does not go too much into detail, other than:

"Micro-USB sockets for data and power"

Pi-supply suggests that:

Micro USB data port for linking to accessories and peripherals like an external USB hub, or for connecting to your PC (Micro USB “On the Go” adapter is supplied to connect your standard USB devices)

But does it mean that the Pi can be connected to an USB host using the USB OTG standard without additional circuitry?

200_success
  • 427
  • 1
  • 4
  • 9
Ghanima
  • 15,855
  • 15
  • 61
  • 119

3 Answers3

8

As far as I can tell, the answer will be the same as for the A/A+/CM. The hardware is capable of device mode but I haven't seen anyone figure out how to make it work under linux.

Edit: this answer was correct at the time of writing but the situation has changed, please see (and upvote) https://raspberrypi.stackexchange.com/a/40626/35618

Peter Green
  • 6,476
  • 1
  • 19
  • 24
8

Data USB port can be used for OTG and “power”. As of time of this writing Serial and Ethernet were tested, but others should work with proper amount of efforts (keyboard, disk, camera, etc.) Composite devices should work as well. See more info at

The work is expected to be merged into rpy-4.4 version of kernel for OTG functionality to be available OOTB for simpler hacking.

Majority of heavylifting was conducted in Github raspberrypi/linux Issue #1212.

P.S. This is copy/paste from my other answer on the topic at https://raspberrypi.stackexchange.com/a/40623/39346

myroslav
  • 328
  • 2
  • 6
  • It's new to me, that the power one is a usb port as well. Is anything special needed to use it? And can it be used as host-port too (some usb hubs power a pi via host-port, even when the spec forbids it) – allo Jul 02 '16 at 20:22
  • This answer is incorrect. The links don't provide any supporting evidence for the claim that the power jack can be used for data. Most of them are simply about implementing OTG gadget mode in the kernel, which is now standard and can be done but not via the power jack. The power one can only be used to supply power. The other one can be used for data and to either supply or draw power. – goldilocks Oct 30 '16 at 20:23
  • From visual inspection of the power port of a Pi compared to the data port I feel confident to confirm @goldilocks claim that the power port indeed carries no data lines. While we still have no official schematics for the Zero it is safe to say that the "both USB ports can be used for OTG" is indeed wrong. – Ghanima Oct 31 '16 at 19:07
  • I'd corrected the answer. The fact is that data port can be used to power Raspberry PI Zero and as OTG port. – myroslav Nov 24 '16 at 20:16
3

It ought to.
But no one's done it...yet.

A USB OTG (On The Go) cable is required for the RPI to work is host mode, unlike the other Raspberry Pi's. Unless it's actually using a micro-A plug, this implies that it should also operate in device mode. In fact micro/mini USB plugs have an extra pin just for this. According to the BCM2835 processor datasheet, the video core uses the Synopsys DesignWare protocol stack which supports both host and device mode.

The largest problem with device mode on the Raspberry Pi Model A was that according to the schematic the USB_OTGID pin was tied directly to ground. This made sense because a Type-A USB plug doesn't have this pin whereas the micro USB does. (It could be impossible to become a USB device through software when this pin is held low.) Unfortunately, I couldn't find the Pi Zero schematics. Device mode was requested in this forum three years ago, and hopefully the designers took note.

It's still Nov 27, 2015, and with luck, this answer will become outdated really soon.

Glorfindel
  • 620
  • 1
  • 8
  • 15
nathan
  • 139
  • 2