Profile cover photo
Profile photo
Ian Buck
255 followers -
You don't need a parachute to skydive; you just need a parachute to skydive twice.
You don't need a parachute to skydive; you just need a parachute to skydive twice.

255 followers
About
Posts

Post is pinned.Post has attachment
When you buy a piece of media, you should be able to do whatever you want with it, right? Not if DRM has anything to say about it!
Add a comment...

Post has shared content
This post is a detailed writeup of the protocol errors noticed on the +Nintendo Switch.

Good news: the +Innergie / +InnergieEurope / +Delta Electronics 45w charger is robust and works to power both the Switch and Switch Dock!
Bad news: the Nintendo Switch and Dock are chock full of USB-C protocol errors and flaws. See the attached.

Although long in tooth, the Innergie is one of the few chargers that will actually properly power the Nintendo Switch and Dock. It is a USB-PD "v1.0" supply -- meaning it was designed around the 5v/12v/20v levels. (12v was split to 9v/15v in "v2.0".)

However, because it was USB-C compliant (followed the darn spec) and robustly engineered, it will work with the Switch even though it came out nearly two years before the Switch was released. (Hooray!) Innergie had the foresight to add 15v as an "optional and extra" voltage level and now it reaps the rewards. (It also has $3k $1mil in connected device insurance, so I can recommend it.)

I've attached traffic logs highlighting the multiple errors in the Switch. I first tested the PSU side of the dock, then INSIDE the dock (Switch side of the dock), then on the Switch alone.

Issues noted:

[PSU side of dock:]

* This is more of a quirk, but the Switch (and Dock) always request 0.5a before upgrading to the full amperage. However, this behavior is buggy and causes problems. (See below.)
* The dock doesn't listen to the charger. The charger says "I can't do Dual-Role Data", but the dock ignores that and tries a DR_SWAP anyway. ("50 DKP minus.")
* The dock does not properly discharge Vbus to vSafe0v within the set time. Although this isn't strictly necessary since the dock's external port isn't Dual-Role Power, it means there is excessive capacitance in the Vbus line. This is strictly regulated in the Type-C spec.
* The dock does not respond properly to DISC_ID requests from its port partner.

[Switch side of the dock:]
This is a bit of a mess. :( So I've numerically coded the errors where possible.

* (1a) The dock tells the Switch it is Dual-Role Power capable on the internal port. Meaning it is claiming the Switch tablet can theoretically power the dock itself, backwards! I don't know if this is a future planned addon for the Switch or not, but ....
* (1b) ... in the Alternate Mode Adapter product descriptor (more on this later) it claims it does not need Vbus to operate. These two points (1a) and (1b) are contradictory. (Perhaps it switches the flag as necessary?)

* (2) The dock "neuters" the USB-PD advertisements from the AC adapter. It only passes through the 5v and 15v levels. This just seems like poor future planning, especially since the Switch itself can accept multiple input voltages. Also, this means the dock passthrough is not Power Rules compliant.

* (3a) The dock remembers to "subtract" some amperage from the 5v level (3a to 0.5a) to account for its own power use, like most other hubs. (Or, it only leaves a stub since 5v/0.1a is mandatory for "error message" signaling with USB-PD.) However, it forgets to deduct the same wattage from the 15v level! (15v/3a from the Innergie 45w should be reduced to around 15v/2.4a. The Switch 39w PSUs 15v/2.6a should be reduced to around 15v/2.0a.)
* (3b) The Switch tablet is a power hog! Its maximum draw should be 2.6a, yet it hogs the whole 3.0a from the adapter. (This is similar to the bad behavior the +Made by Google Pixel phone had -- it only needs 9v/2a=18w max, but it hogged 9v/3a=27w.)

* (4a) The Switch and Dock use a proprietary "Nintendo AltMode". This is fine. However, what's not fine is jumping the gun and entering the AltMode before even querying the Dock via a DISCover_SVID probe to see if it supports it!
* (4b) The DISC_SVID probe exposing DisplayPort and "Nintendo" AltModes appears after the entry at (4a). This is bad because it means the Switch is assuming the presence of the AltMode merely because of the USB VID and PID in the DISC_ID above! This strongly hints the motivation was DRM, vendor-lockout, and shows poor consideration of forwards-compatibility. (Remember, Nintendo may release a different dock in the future... with different USB VID and PID! Hardcoding it is a bad idea, and instead it should rely on USB-PD commands to do it.)

* (5) The Switch tablet itself also has the excess capacitance on Vbus and vSafe0v time problem the dock has. This is a much greater concern since it is a "Dual-Role Power" device. (It can accept power or give power.) This vSafe0v delay problem causes significant Power-Role Swap issues with safe, compliant hardware that correctly checks for 0v before swapping power. It can take up to 2 minutes for the Switch to naturally discharge Vbus.

* (6) When the Switch finally does issue a DISC_SVID, and the dock replies, the dock messes up the reply. When you respond to a DISC_SVID request, you are supposed to "terminate" and pad the VDO message with "0000" (or "0000 0000"). Nintendo completely forgot to do that here, and tells me their chipset is bad. This noncompliant behavior means even third-party docks will have to emulate this wrong behavior to work.... which is bad for everyone, especially the ecosystem. (Race to the bottom for "compatibility".)

[Switch itself:]

* The Switch tablet always requests 0.5a before moving on to the full amperage. I don't know why it does this. Especially since this behavior causes major errors with the Switch if the charger does a SRC_CAP re-advertisement, as mentioned in my previous post.
* The Switch doesn't listen to the charger. (Yes, this is the same as the dock.) The charger says "I can't do Dual-Role Data", but the Switch ignores that and tries a DR_SWAP anyway. ("100 DKP minus.")
* The Switch does not respond properly to DISC_ID requests from its port partner.

[Interesting notes from decoding the Dock DISC_ID command:]

* The dock claims to be a dongle! No joke. "Alternate Mode Adapter". All this means it is a USB-PD device that supports AlternateModes, and there is no "cable" in-between it and the device. (No SOP'.) It also suggests there are few obstacles to using a plain-jane USB-C-over-DisplayPort-to-HDMI adapter as a mobile dock. (There were no heatsinks or fans in the dock itself, to my observation. So I don't see why not.) I hope it may be possible to hook up a Switch directly to a USB-C monitor that has >39w USB-PD and DisplayPort. (I need to test this.)

[More notes:]

* Certain chargers crash the Switch and Dock outright. (87w Apple.)
* Only 2 adapters I tested work. (The Innergie is one, I hesitate to name the other due to other flaws.)
* If your Switch bugs out, it will refuse to charge with anything until it is hard-rebooted.
* Most (80%) of chargers cause the dock to hard-crash. Instead of (properly) negotiating a 5v/0.1a "error message" to the Switch, the charge controller in the dock locks up and does not negotiate with the Switch at all.
* The Switch and dock do not properly use the CAP_MISMATCH flag. Rather, they don't use it at all. This seems like the greatest oversight, since that's specifically why it's there. USB-PD has a requirement for flashing an error LED, or displaying an error, if there is a power problem. That's what the CAP_MISMATCH bit in a REQUEST is for.



This has been a bit of a long-winded post, but it helps explain A LOT of the problems I've heard about. Hopefully Nintendo takes this post seriously and addresses these issues before ramping up production, per their recent notice. Some of these issues are chipset- and hardware- level, meaning they can only be fixed via a hardware revision ASAP.

It's really, really hard to fix a problem after you've shipped a product. Given their recent notice, it seems it may muddy the waters of the USB-C ecosystem quite severely if left unchecked. And once again, I'm just a freelance volunteer engineer doing this testing -- dedicated teams should be the ones to look at this and implement it correctly.

Comments or corrections are welcome, as always.

#USB #TypeC #USBC #NintendoSwitch
PhotoPhotoPhotoPhotoPhoto
5/29/17
6 Photos - View album
Add a comment...

Post has attachment
Another year, another Star Wars movie! I liked it more than The Force Awakens, but it's still got some weird stuff going on that distracted me during the movie.
Add a comment...

Post has attachment
I made a silly thing! I noticed there are a lot of close-up shots of Gandalf in Fellowship of the Ring, so I thought it would be fun to have a cut of the movie that's just Gandalf.
Add a comment...

Post has attachment
It's always important to know what changes to expect and what new capabilities your device will have after a software update. Come learn what's new in iOS 11 with +Brian Mitchell and I!
Add a comment...

Post has attachment
Those of us in the United States recently had our election day. I wanted to know why it's 2017 and I still can't vote using my phone from wherever I am, so I talked to +Ryan Rampersad (who researched this in college) to find out.
Add a comment...

Post has attachment
Another episode where we tackle a big, expansive topic that impacts all of human society. NBD, right?
Add a comment...

Post has attachment
It's that time of year again: time to review the new iPhone! And this year we've got a new guest: Evan Haldeman!
Add a comment...

Post has attachment
Yesterday Google announced the next phone I will own! Here are thoughts from +Ryan Rampersad and I about the new lineup.
Add a comment...

Post has attachment
A classic gesture with a uniquely "Subashri" twist!
Add a comment...
Wait while more posts are being loaded