CM4 USB Mode USB 2.0 port
# │forum
d
Just for questions on it. I couldn't see a thread already apart from the one about flashing firmware. Described here it's the one next to the HDMI port https://help.turingpi.com/hc/en-us/articles/8685766680477-Specifications-and-I-O-Ports
My question though from the docs. "CM4 USB Mode - USB 2.0 that can be assigned to any Node via $tpcli (in BMC). Please note that USB 2.0 and PCIe share the same resource, it is recommended to remove PCIe devices before using USB 2.0 for flashing."
Does that mean we shouldn't plug a keyboard into the port when there is a miniPCI card in at the same time? I had hoped to use it with a miniPCIe SATA drive now I fear drive corruption.
And if that's the case I'll reconfigure my node2 as node1 and switch the miniPCIe card back to node2.
d
Good question and I'd like clarification on that also. As I read it, its purely when loading an OS onto a device, I certainly hope its not saying that if I have a PCIe device of some sort installed I can't use the usb for keyboard, etc.
d
The USB_OTG on the back, the one that can be routed to any port, indeed can stop working while there's a Mini PCIe card inserted, but it depends. The problem is there's only a single USB lane that can be used and it's routed both to the Mini PCIe and USB on the back. If the Mini PCIe card is not using USB to anything and does not interfere with it, the port on the back should work.
d
@DhanOS (Daniel Kukiela) Thanks for the clarification. I figured you'd probably say something like that. I moved my miniPCIe card anyway. Decided I wanted the SATA drive on a kubernetes worker node rather than the master.
d
Did this SATA controller cause issues with the USB port on the back?
d
@DhanOS (Daniel Kukiela) Well no issues that I could tell but I don't really want to find out the hard way.
d
OK, makes sense
d
This newbie needs a bit more clarity, lol. So even in a normal operating situation, maybe I have a PCIe SATA adapter or NVME adapter on node 1, and want to use the usb port for node 1 (we're talking the vertical one @daboone72 referenced), I might have an issue? If different nodes, say PCIe device on node 1, usb assigned to node 2, better situation, worse situation, or unknown?
d
Sure. Module's USB lane is connected both to Mini PCIe and to the multiplexers that can route it to the USB_OTG port on the back. The multiplexers are used to set which node's USB lane is connected to this port on the back. What this means is if you set USB mode to host and to node 1, the multiplexers will be set so the USB_OTG port's USB connection will be routed to the node 1. Since the same USB lane is shared with the Mini PCIe, if the card in the Mini PCIe interferes with USB lane in any way, both the Mini PCIe USB function and the port at the back won't work. If the Mini PCIe card does not interfere with the USB lane (and only with, for example PCIe lane), all should be fine. This includes Mini PCIe SATA adapter. The NVMe adapters usually route the USB connection further which might cause the signal integrity issue if you also try to use the USB_OTG port. If, however, you set the USB mode for any other node, this means the USB lane will be connected to the Mini PCIe only and the module which utilizes the USB connection (like BT part on some of the BT/WiFi cards) should work ok. I might have explain it better or cause more confusion, so feel free to ask more questions to clarify it
d
Thank you, that clarified, you explained it very well, as usual. I need to do some testing and experimenting to see for myself just what I might run into.
a
Blast from the past. There is a solution to use a keyboard with node1 after all. But you are going to need need to use a few GPIO pins and PS keyboard 🙂 https://blog.adafruit.com/2016/01/15/from-the-forums-using-a-ps2-keyboard-with-raspberry-pi-gpios-piday-raspberrypi-raspberry_pi/
c
@DhanOS (Daniel Kukiela) so I need a little bit of help here, I'm trying to connect a usb mouse/keyboard on the USB_OTG port on the node 1 ( soquartz ). I already falshed it using plebian/manjaro but I cannot get the keyboard to work. I used the command tpi -u host -n 1 to try to map it but so far I get hdmi output but cannot get keyboard/mouse to work. I do not have any mini-pci card on the slots. Any recommendation to make it work ?
d
As much as I'm aware, this feature only works with the RPi CM4. I haven't heard of any other module types that can put their USB interface into the host mode. Please also note that even with CM4 this may not work on some boards with Node 1 and this is being investigated. The best thing you could do is to get a Mini PCIe USB controller. We did not test them with SOQuartz, but these based on Reneseas D720201 or D720202 work out of the box with CM4 and Jetson modules. Just make sure you get one with the mounting point also in the middle of the card so it'll be easier to mount.
c
Thanks for the quick reply I already ordered https://www.amazon.com/gp/product/B07GTD763C/ hopefully it will fit if not will return and get another one
d
You are going to have a small issue with this one
It does not have mounting holes in the middle of the board
If you look at your TPi2, it has a standoff in 2 positions - half and full size of the card and you cannot remove the middle one unless you have a soldering iron and can de-solder it
c
I tried the one on the TuringPi page but it was not available for fast delivery ...
d
Yes, this one will be a much better choice
I have one like this one and it works great
c
yea I could not find it for fast delivery I will have to see if I can isolate the standoff so I don't short anything if not will have to figure out something else or wait till august to get the one that have the correct holes...
d
I tried this at some point and it works

https://cdn.discordapp.com/attachments/1100882739147833384/1132569366559469619/2023-04-25_23.22.09.jpg

Of course you do not need it this thick and an insulation tape or capton tape will be better
Also do not bend it this much
This was more of a test
c
so I got the module but still no keyboard/mouse
they keyboard and the mouse are not even power up once connected
do I need to enable something to power up the mini-pcie ?
any advice ?

https://cdn.discordapp.com/attachments/1100882739147833384/1133511420739325962/20230725_162323.jpg

https://cdn.discordapp.com/attachments/1100882739147833384/1133511421100048425/20230725_162225.jpg

https://cdn.discordapp.com/attachments/1100882739147833384/1133511421590769686/20230725_161014.jpg

t
The mPCIe card requires power. You'll need to plug a SATA power connector into the card. Use some care when plugging in or removing the SATA power cable because you can damage the connector. I did break a small tab off one of mine, but it still works.
c
talkin about being careful I think I will need some glue for the turingpi usb connector
looks like it's not properly fixed :/

https://cdn.discordapp.com/attachments/1100882739147833384/1133520399917928468/20230725_155324.jpg

https://cdn.discordapp.com/attachments/1100882739147833384/1133520483023851660/20230725_155408.jpg

I will try this right now
t
Yeah. Mine did that too when I was trying to remove my USB-C adapter. Probably should have been glued on. Be careful putting that shell back on so as not to bend any pins.
c
after powering the mini-pcie card it work
now I will try to get the wifi working but my expectation are low I read somewhere that the driver was not yet available
thanks guys
s
So what's the point of having an HDMI port if you can't use a keyboard and mouse on the same node?
d
CM4 modules can use a keyboard and a mouse, although this sometimes does not work and the cause is being investigated. You can also add a Mini PCIe USB controller to Node 1. You can also still use a display to display things in remote-controllable node
s
I just got my Jetson Nano CM flashed so I guess I'll order one. CM4 modules are much harder to source at the moment.
11 Views