Add basic Plankton DP mux test

USB type C mux DP and USB3 signals. This test switches the mux between
DP and USB3 and checks if USB3 device is detected.

BUG=chrome-os-partner:33362
TEST=manual
  test_that --fast -b host_board dut_ip firmware_TypeCProbeUSB3

Change-Id: I875b6084556ed237f86313b15a7980efa51706e0
Reviewed-on: https://chromium-review.googlesource.com/257946
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Pin-chih Lin <johnylin@chromium.org>
Tested-by: Pin-chih Lin <johnylin@chromium.org>
diff --git a/server/cros/servo/plankton.py b/server/cros/servo/plankton.py
index 8154f34..0caa646 100644
--- a/server/cros/servo/plankton.py
+++ b/server/cros/servo/plankton.py
@@ -31,6 +31,7 @@
     USBC_COMMAND_DELAY = 0.5
     # Plankton USBC commands.
     USBC_ROLE = 'usbc_role'
+    USBC_MUX = 'usbc_mux'
     RE_USBC_ROLE_VOLTAGE = re.compile(r'src(\d+)v')
     USBC_CHARGING_VOLTAGES = {
         0: 'sink',
@@ -148,3 +149,16 @@
                                          (self.USBC_PD_STATES[state],
                                           self.POLL_STATE_SECS)),
             timeout=self.POLL_STATE_SECS)
+
+
+    def set_usbc_mux(self, mux):
+        """Sets Plankton usbc_mux.
+
+        @param mux: Specified mux state name.
+        """
+        if mux not in ['dp', 'usb']:
+            raise PlanktonError('Invalid mux name: %s, '
+                                'should be either \'dp\' or \'usb\'.' % mux)
+        self.set(self.USBC_MUX, mux)
+        time.sleep(self.USBC_COMMAND_DELAY)
+