Files
cdba/schema.yaml
Stephan Gerhold 720922913c drivers: ftdi-gpio: Add second USB disconnect GPIO
Some boards have more than one USB port. In that case, there is a second
GPIO on the debug board to simulate a USB disconnection for those.

Add the option to describe both USB disconnect GPIOs using
"usb0_disconnect" and "usb1_disconnect" and change both of them
when disabling USB power.

In the future it might be useful to control them separately, but for now
this ensures that power to the board is cut properly when the board is
powered off.
2025-02-14 11:42:59 +01:00

212 lines
5.5 KiB
YAML

"$schema": https://json-schema.org/draft/2020-12/schema#
title: CDBA Configuration Schema
type: object
properties:
devices:
type: array
items:
type: object
properties:
board:
description: board identifier to be used by cdba client
type: string
name:
description: board pretty name to be printed by cdba client when querying boards
type: string
description:
description: board verbose description for reference
type: string
console:
description: console TTY device path
$ref: "#/$defs/device_path"
fastboot:
description: fastboot id
type: string
pattern: "^[0-9a-f]{8}$"
fastboot_set_active:
description: run fastboot set active before each boot, slot can be selected
oneOf:
- type: boolean
- enum:
- a
- b
broken_fastboot_boot:
description: Is fastboot boot broken, in this case boot is flashed and board is rebooted
type: boolean
usb_always_on:
description: mark USB as always on
type: boolean
fastboot_key_timeout:
description: timeout of the fastbook key press
type: integer
minimum: 1
cdba:
description: CDB Assist device path
$ref: "#/$defs/device_path"
voltage:
description: CDB Assist voltage in microvolt
type: integer
conmux:
description: conmux service string
type: string
external:
description: path to the program that handles board power, usb and key controls
type: string
ppps_path:
description: USB device name, like 2-2:1.0/2-2-port2
type: string
ppps3_path:
description: USB device name, like 2-2:1.0/2-2-port2
type: string
status-cmd:
description: Command to execute for generating status updates
type: string
qcomlt_debug_board:
description: Qlt Debug Board control tty device path
$ref: "#/$defs/device_path"
alpaca:
description: Alpaca board control device path
$ref: "#/$defs/device_path"
users:
description: User access allowance for the board
type: array
uniqueItems: true
minItems: 1
items:
type: string
ftdi_gpio:
description: GPIO control over FTDI chip
oneOf:
- type: string
# <libftdi description>;[<interface>[;<gpios>...]]
# - libftdi description: ftdi_usb_open_string() formats
# - interface: A, B, C or D (default A)
# - gpios: type,id,polarity
# - type: POWER, FASTBOOT_KEY, POWER_KEY or USB_DISCONNECT
# - id: 0, 1, 2, 3, 4, 5, 6 or 7
# - polarity: ACTIVE_HIGH or ACTIVE_LOW
pattern: "^(d:/.*)|(i:0x[0-9a-fA-F]{4}:0x[0-9a-fA-F]{4}(:[0-9]+)?)|(s:0x[0-9a-fA-F]{4}:0x[0-9a-fA-F]{4}:FT[0-9a-zA-Z]{6})(;[A-D](;(POWER|FASTBOOT_KEY|POWER_KEY|USB_DISCONNECT),[0-7],(ACTIVE_HIGH|ACTIVE_LOW)){0,4})?$"
deprecated: true
- type: object
properties:
vendor:
type: string
pattern: "^0x[0-9a-fA-F]{4}$"
product:
type: string
pattern: "^0x[0-9a-fA-F]{4}$"
serial:
type: string
pattern: "^FT[0-9a-zA-Z]{6}"
index:
type: integer
minimin: 0
devicenode:
$ref: "#/$defs/device_path"
patternProperties:
"^power|fastboot_key|power_key|usb[01]?_disconnect|output_enable$":
$ref: "#/$defs/ftdi_gpio"
additionalProperties: false
dependentRequired:
index:
- product
- vendor
serial:
- product
- vendor
local_gpio:
description: Local GPIO
type: object
additionalProperties: false
patternProperties:
"^power|fastboot_key|power_key|usb_disconnect$":
$ref: "#/$defs/local_gpio"
laurent:
description: KernelChip Laurent relays
type: object
additionalProperties: false
properties:
server:
type: string
relay:
type: integer
password:
description: password to access the relays, defaults to 'Laurent'
type: string
required:
- server
- relay
required:
- board
- name
additionalProperties: false
required:
- devices
additionalProperties: false
$defs:
device_path:
type: string
pattern: "^/dev/.*$"
ftdi_gpio:
type: object
properties:
interface:
enum:
- A
- B
- C
- D
line:
type: integer
minimum: 0
maximum: 7
active_low:
type: boolean
required:
- interface
- line
local_gpio:
type: object
properties:
chip:
type: string
pattern: "^gpiochip[0-9]+$"
line:
type: integer
minimum: 0
active_low:
type: boolean
required:
- chip
- line