Commit Graph

10 Commits

Author SHA1 Message Date
Nick Sanders
26090a142b servo: add usb_console to chroot
add usb_console, console.py to chroot install.
This tool allows directly accessing the usb
console of servo v4, servo micro, cr50, etc.

BUG=b:69016431
BRANCH=None
TEST=usb_console -d 18d1:501b

Change-Id: If9d5d49cf31d785ea9a7cec0a4eeeb34abae9cd1
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/773400
2017-11-16 21:07:40 -08:00
Nick Sanders
8bb2d9fbf0 usb_serial: add python console
console.py can access a Google USB serial endpoint
specified by vid:pid and serial number

BUG=chromium:608039
TEST=open console to send and receive text.
BRANCH=None

Change-Id: I735692b7031d73506be2745a2cd5225bfcefd396
Reviewed-on: https://chromium-review.googlesource.com/405030
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Kevin Cheng <kevcheng@chromium.org>
2016-11-08 17:11:15 -08:00
Brian Norris
e098622de7 extra: usb_serial: correct doc pointer
BUG=none
TEST=none
BRANCH=none

Change-Id: I64ac1c13fca055c6f7149744754ffe51d28383ff
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360665
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2016-07-15 16:51:40 -07:00
Anton Staaf
3a382417d1 USB Serial: Add README and update CCD docs
The README points the reader back to the docs directory where the
CCD documentation lives.  I've added information about the install
script, and about how the raiden module identifies a CCD serial
console.

Signed-off-by: Anton Staaf <robotboy@chromium.org>

BRANCH=None
BUG=None
TEST=make buildall -j

Change-Id: I8714dffcad0b8c30f46529a8f2d670b5d432cda6
Reviewed-on: https://chromium-review.googlesource.com/352787
Commit-Ready: Anton Staaf <robotboy@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2016-06-15 17:54:51 -07:00
Anton Staaf
4e3cbd845b USB Serial: Add fallback rule and script
This rule makes it easier to use CCD devices when the raiden module
can't be installed for some reason.  The rule informs the usbserial
module that it should handle anything that looks like a simple serial
port for any CCD compatible USB devices.

The install script now detects failure when building and installing
the raiden module and offers the --fallback option in that case.

Signed-off-by: Anton Staaf <robotboy@chromium.org>

BRANCH=None
BUG=None
TEST=make buildall -j

Change-Id: I617bbdfb4c5cb9e9803f4088c651f84e3f72bd28
Reviewed-on: https://chromium-review.googlesource.com/351873
Commit-Ready: Anton Staaf <robotboy@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2016-06-15 13:08:22 -07:00
Anton Staaf
b756628c7e USB Serial: Add simple install script
The install script builds and installs the raiden module, it also copies
the udev rules file into /etc/udev/rules.d and updates the module alias
and dependency information.

The install script will also retrigger udev to process rules for all
devices that have the Google Vendor ID (0x18d1).  This ensures that
any devices that are connected when the install is run will immediately
be available for use (as opposed to requiring that these devices be
unplugged and replugged before use).

Signed-off-by: Anton Staaf <robotboy@chromium.org>

BRANCH=None
BUG=None
TEST=Remove udev rules file
     Remove raiden.ko module, aliases, and dependency information
     Reboot workstation
     Run ./install
     Plug in CCD capable device
     ls /dev/google

Change-Id: I7bcb02f05ee84738a6259800afc4d0c69bea9e69
Reviewed-on: https://chromium-review.googlesource.com/347092
Commit-Ready: Anton Staaf <robotboy@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2016-05-25 22:55:43 -07:00
Vadim Bendebury
535ccc66ff usb_serial: ignore make byproducts
It is not trivial to direct output of this make file into a different
directory, let's just add the byproducts to a local .gitignore.

BRANCH=none
BUG=none
TEST='git status' after running make does not show any junk any more.

Change-Id: Id04822102d788c6883cff36f26fd8f9d50c996aa
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346746
Reviewed-by: Anton Staaf <robotboy@chromium.org>
2016-05-24 10:19:01 -07:00
Anton Staaf
9bdffe0513 CCD: Disable ModemManager for CCD USB consoles
ModemManager likes to play with serial ports it shouldn't
play with, mark our serial ports as off limits.

This also bumps the ordering of this rules file just past
the udev default rules because it uses environment variables
populated by that file.

Signed-off-by: Anton Staaf <robotboy@chromium.org>

BRANCH=None
BUG=None
TEST=install new rules file, delete old rules file
     verify that symlinks to TTY's are still created
     verify that ModemManager leaves them alone now

Change-Id: I4ded95192d78b5b1bbc661ca5b762e18307d2d60
Reviewed-on: https://chromium-review.googlesource.com/269743
Trybot-Ready: Anton Staaf <robotboy@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
2015-05-06 22:53:18 +00:00
Anton Staaf
fa671e6591 USB: Add udev rule to handle CCD devices
This udev rule creates a directory in /dev/google for each
device attached.  The name of the directory is unique to the
device and is prefixed with the device product name.  Within
the directory there is a serial directory that contains
symlinks to each USB serial port exposed by the device.  The
symlinks are named based on the USB interface name provided
by the EC.  Additional subdirectories can be added for I2C,
JTAG, GPIOs, and SPI as needed.

Signed-off-by: Anton Staaf <robotboy@chromium.org>

BRANCH=None
BUG=None
TEST=Verify that two different CCD devices generate uniquely named
     entries.

Change-Id: I7e6f2ace29b7302c7c072bcf6aab7c8f060b993a
Reviewed-on: https://chromium-review.googlesource.com/260420
Trybot-Ready: Anton Staaf <robotboy@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
2015-03-16 23:04:39 +00:00
Anton Staaf
ac375d000e USB-console: Add Linux USB serial kernel module
This is a simple kernel module and Makefile for
building it out of tree.  This module just uses
the existing kernel usb serial driver and probes
for the Google VID/Class/SubClass/Protocol that
identifies a valid simple serial interface.

This code should be rolled into the existing kernel
driver at: drivers/usb/serial/usb-serial-simple.c

While that happens, this module is still useful to
developers.

Signed-off-by: Anton Staaf <robotboy@chromium.org>

BRANCH=None
BUG=None
TEST=cd extra/usb_serial; make; sudo insmod raiden.ko
     Connect the discovery-stm32f072 over USB and see
     that its console is discovered and works.

Change-Id: I83661b816643c43b3e2dc9fdc825bc3a796af2f4
Reviewed-on: https://chromium-review.googlesource.com/225923
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
2014-10-29 18:38:27 +00:00