InsertTitle
Posts: 85
Joined: Sun Jul 16, 2017 3:43 pm

Carrier Board RPI CM3 USB_OTGID help?

Fri Sep 21, 2018 9:30 am

Been trawling through the forums to find out how I can get USB_OTGID working so I can access the terminal over PuTTY on a carrier board design for the CM3.
I have the understanding that you need to connect pin 4 on USB AB connector to the USB_OTGID pin on the CM3 and I've also got the VREF pins for 0-27 & 28-45 each powered by an 3.3v connection.

Is there anything else I'm require to connect up or missing something, as I don't want to suddenly rush out into fabrication/assembly of a carrier board only to find I've missed something?

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1347
Joined: Sat Sep 10, 2011 11:43 am

Re: Carrier Board RPI CM3 USB_OTGID help?

Fri Sep 21, 2018 2:35 pm

If you're happy with software solution then you can ignore the OTG_ID pin completely and just add dr_mode=peripheral to the dtoverlay line

dtoverlay=dwc2,dr_mode=peripheral

Otherwise if you want to be able to use the special host cable in the uUSB plug so you can use OTG to switch between host and device then you will need to wire pin 4 on the uUSB connector to the OTG_ID pin on the compute module.

Don't forget to wire a pull up to the HPD (hotplug detect) pin if you're not using HDMI)

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

InsertTitle
Posts: 85
Joined: Sun Jul 16, 2017 3:43 pm

Re: Carrier Board RPI CM3 USB_OTGID help?

Sun Sep 23, 2018 7:48 pm

gsh wrote:
Fri Sep 21, 2018 2:35 pm
If you're happy with software solution then you can ignore the OTG_ID pin completely and just add dr_mode=peripheral to the dtoverlay line

dtoverlay=dwc2,dr_mode=peripheral

Otherwise if you want to be able to use the special host cable in the uUSB plug so you can use OTG to switch between host and device then you will need to wire pin 4 on the uUSB connector to the OTG_ID pin on the compute module.

Don't forget to wire a pull up to the HPD (hotplug detect) pin if you're not using HDMI)

Gordon
Thanks for both options. I would of liked to have used the software solution but as I plan to sell this product, rather make it easier to just wire up the pin then give consumer cable for powering and then keep a USB OTG cable for debugging.

HPD I'm assuming according to the datasheet you're talking about pin 88 - GPIO46_1V8
I know this might sound daft but what resistance would you reccomend for the pull up and I'm assuming the resistor would have to be powered by 1.8v? Or could I simply connect it into the 3.3v/5v I've already got connected into the cm3?

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1347
Joined: Sat Sep 10, 2011 11:43 am

Re: Carrier Board RPI CM3 USB_OTGID help?

Mon Sep 24, 2018 8:39 am

I would suggest you check the CMIO schematic for the pullup connection and value.
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

aBUGSworstnightmare
Posts: 1097
Joined: Tue Jun 30, 2015 1:35 pm

Re: Carrier Board RPI CM3 USB_OTGID help?

Mon Sep 24, 2018 12:15 pm

Still not clear what needs to be done (see here as well: https://www.raspberrypi.org/forums/view ... 8#p1355658 and https://www.raspberrypi.org/forums/view ... 8&t=222093 )?
OTG receptacles and plugs contain a fifth pin, added to the standard four USB pins (VBUS, GND, D+, and D–). This is a fifth pin in the connector, not a fifth wire in the cable. The mini-A plug has the fifth pin tied to its ground pin, and the mini-B plug leaves the fifth pin unconnected. A dual-role device requires circuitry to read the state of this fifth pin (with, for example, the aid of a pull-up resistor) to determine which end of the cable is inserted. The dual-role device receiving the mini-A plug is the default host.

For the cable the USB OTB spec defines RB_PLUG_ID as:
Mini-B plug: 100k Ohm
Mini-A plug: 10 Ohm
I would try with a 10k-47k pull-up to 3.3V. If you now ask yourself 'why the hell is this stupid guy telling me to use 3.3V and not 1.8V or 5V?' than I Need to say (sorry, again: RETUFM): refer to page 12 of the CM users Manual.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1347
Joined: Sat Sep 10, 2011 11:43 am

Re: Carrier Board RPI CM3 USB_OTGID help?

Mon Sep 24, 2018 12:46 pm

You do not need a pullup on the OTG_ID line, the pin on the 2835/6/7 has one integrated. Just wire the USB_OTGID pin to pin 4 on the uUSB connector.

You will need a 100k pullup to 1v8 on the HDMI_HPD_N_1V8 line
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

aBUGSworstnightmare
Posts: 1097
Joined: Tue Jun 30, 2015 1:35 pm

Re: Carrier Board RPI CM3 USB_OTGID help?

Mon Sep 24, 2018 1:25 pm

gsh wrote:
Mon Sep 24, 2018 12:46 pm
You do not need a pullup on the OTG_ID line, the pin on the 2835/6/7 has one integrated. Just wire the USB_OTGID pin to pin 4 on the uUSB connector.

You will need a 100k pullup to 1v8 on the HDMI_HPD_N_1V8 line
Hi gsh,
thanks for the info! Might be worth to add this to table 3 (page 12 of Rev 2 CM users manual) in next UM revision.

Return to “Compute Module”