Greybus

Introduction

Greybus is a lightweight, message-based protocol framework that provides a standardized way for hosts to access hardware functions implemented on remote modules. It was originally developed for modular systems and defines a set of well-specified operation protocols for common peripheral classes such as GPIO, I²C, SPI, PWM, and firmware updates.

The Greybus module for Zephyr provides an implementation of the Greybus protocol layers that map Greybus operations to Zephyr subsystems. When enabled, a Zephyr device can expose its hardware capabilities to a host using the Greybus protocols. The host discovers available functionality through Greybus manifest data, then issues class-specific requests that the Zephyr module processes and responds to.

Initially, Greybus was designed for use over Unipro [8]. However, the protocol itself is mostly independent of underlying transport. Currently, the Greybus module supports TCP socket as transport. However, any transport such as UART, I2C, etc should work fine. See the contents of this directory [9] for the current supported transport backends. Feel free to create PRs for new transport backends.

Greybus is licensed under a combination of Apache-2.0 and BSD-3-Clause license.

Usage with Zephyr

To pull in the Greybus for Zephyr as a Zephyr module, either add it as a West project in the west.yaml file or pull it in by adding a submanifest (e.g. zephyr/submanifests/greybus.yaml) file with the following content and run west update:

manifest:
  projects:
    - name: Greybus-Zephyr
      path: modules/lib/greybus
      revision: main
      url: https://github.com/beagleboard/greybus-zephyr

For instructions regarding greybus subsystem usage, refer to the Greybus module repository [4] and Greybus samples [5].

All current development and real-world testing is done using BeaglePlay [6] and BeagleConnect Freedom [7].

Reference

  1. Greybus Specification [1]

  2. Christopher Friedt, LPC 2020