Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit f7836570 authored by Alexandre Bailon's avatar Alexandre Bailon
Browse files

es2: add entry in debugfs to control endpoint to cport mapping


Create one entry in cport debugfs for each cport connected.
A read on entry will return the number of the bulk endpoint
set mapped to this cport.
A write will map the bulk set of bulk endpoint to this cport.

Example:
To map ep3 and ep4 to cport 12 of interface id 2 (APB2)
echo 1 > /sys/kernel/debug/greybus/intf2/CP12

Valid values: 0 to 6
- 0 is the muxed endpoint set (ep2 and ep3).
  APBridgeA firmware will extract from Greybus header
  the cport number and send data to the right cport.
  By default, all cports are mapped to this one.
- 1 to 6 are dedicated endpoin set
  (2 endpoints are used only by one cport).

Note:
* bulk endpoint value mean:
  0 => ep1 and ep2
  1 => ep3 and ep4
  ...
  6 => ep13 and ep14
* Be aware that CPx debugfs entry use hd_cport_id,
  ie it may be different from the cport id in manifest.

Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
parent 84e66ff0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment