@@ -1536,6 +1536,175 @@ Arguments:
15361536Used by:
15371537 - `NFSProviderDriver `_
15381538
1539+ LAA Resources
1540+ ~~~~~~~~~~~~~
1541+ Resources for devices connected via a `Linaro Automation Appliance (LAA)
1542+ <https://hub.linaro.com/library/laa/laa> `_.
1543+ Requires the ``laam `` package, install with ``pip install labgrid[laa] ``.
1544+ For a working example test suite, see `labgrid-laa-examples
1545+ <https://gitlab.com/Linaro/lava/appliance/labgrid-laa-examples> `_.
1546+
1547+ LAASerialPort
1548+ +++++++++++++
1549+ A :any: `LAASerialPort ` describes a serial port on the LAA.
1550+
1551+ .. code-block :: yaml
1552+
1553+ LAASerialPort :
1554+ laa_identity : ' laa-00175'
1555+ serial_name : ' ttymxc3'
1556+
1557+ Arguments:
1558+ - laa_identity (str): LAA identity for connection
1559+ - serial_name (str): name of the serial port on the LAA
1560+
1561+ Used by:
1562+ - `LAASerialDriver `_
1563+
1564+ LAAPowerPort
1565+ ++++++++++++
1566+ A :any: `LAAPowerPort ` describes the power control for a device on the LAA.
1567+ Power on and off are sequences of (vbus, state) tuples that are executed
1568+ in order.
1569+
1570+ .. code-block :: yaml
1571+
1572+ LAAPowerPort :
1573+ laa_identity : ' laa-00175'
1574+ power_on :
1575+ - ['3v3', 'on']
1576+ - ['5v', 'on']
1577+ power_off :
1578+ - ['3v3', 'off']
1579+ - ['5v', 'off']
1580+ power_cycle :
1581+ - ['3v3', 'off']
1582+ - ['5v', 'reset']
1583+ - ['3v3', 'on']
1584+
1585+ Arguments:
1586+ - laa_identity (str): LAA identity for connection
1587+ - power_on (list): sequence of [vbus, state] pairs for power on
1588+ - power_off (list): sequence of [vbus, state] pairs for power off
1589+ - power_cycle (list, optional): sequence for power cycle, if not set
1590+ the driver does off + delay + on
1591+
1592+ Used by:
1593+ - `LAAPowerDriver `_
1594+
1595+ LAAUSBGadgetMassStorage
1596+ ++++++++++++++++++++++++
1597+ A :any: `LAAUSBGadgetMassStorage ` describes a USB gadget mass storage device
1598+ on the LAA. This can be used to simulate a USB stick being plugged in or out.
1599+
1600+ .. code-block :: yaml
1601+
1602+ LAAUSBGadgetMassStorage :
1603+ laa_identity : ' laa-00175'
1604+ image : ' boot.img'
1605+
1606+ Arguments:
1607+ - laa_identity (str): LAA identity for connection
1608+ - image (str): mass storage image filename
1609+
1610+ Used by:
1611+ - `LAAUSBGadgetMassStorageDriver `_
1612+
1613+ LAAUSBPort
1614+ ++++++++++
1615+ A :any: `LAAUSBPort ` describes USB ports on the LAA that can be toggled.
1616+
1617+ .. code-block :: yaml
1618+
1619+ LAAUSBPort :
1620+ laa_identity : ' laa-00175'
1621+ usb_ports : [1, 2]
1622+
1623+ Arguments:
1624+ - laa_identity (str): LAA identity for connection
1625+ - usb_ports (list): list of USB port numbers to control
1626+
1627+ Used by:
1628+ - `LAAUSBDriver `_
1629+
1630+ LAAButtonPort
1631+ +++++++++++++
1632+ A :any: `LAAButtonPort ` describes virtual buttons on the LAA.
1633+
1634+ .. code-block :: yaml
1635+
1636+ LAAButtonPort :
1637+ laa_identity : ' laa-00175'
1638+ buttons : ['power', 'reset']
1639+
1640+ Arguments:
1641+ - laa_identity (str): LAA identity for connection
1642+ - buttons (list): list of button names available
1643+
1644+ Used by:
1645+ - `LAAButtonDriver `_
1646+
1647+ LAALed
1648+ ++++++
1649+ A :any: `LAALed ` describes an LED on the LAA.
1650+
1651+ .. code-block :: yaml
1652+
1653+ LAALed :
1654+ laa_identity : ' laa-00175'
1655+
1656+ Arguments:
1657+ - laa_identity (str): LAA identity for connection
1658+
1659+ Used by:
1660+ - `LAALedDriver `_
1661+
1662+ LAATempSensor
1663+ +++++++++++++
1664+ A :any: `LAATempSensor ` describes a temperature sensor on the LAA.
1665+
1666+ .. code-block :: yaml
1667+
1668+ LAATempSensor :
1669+ laa_identity : ' laa-00175'
1670+
1671+ Arguments:
1672+ - laa_identity (str): LAA identity for connection
1673+
1674+ Used by:
1675+ - `LAATempDriver `_
1676+
1677+ LAAWattMeter
1678+ ++++++++++++
1679+ A :any: `LAAWattMeter ` describes a power meter on the LAA.
1680+
1681+ .. code-block :: yaml
1682+
1683+ LAAWattMeter :
1684+ laa_identity : ' laa-00175'
1685+
1686+ Arguments:
1687+ - laa_identity (str): LAA identity for connection
1688+
1689+ Used by:
1690+ - `LAAWattDriver `_
1691+
1692+ LAAProvider
1693+ +++++++++++
1694+ A :any: `LAAProvider ` describes file storage on the LAA. Files uploaded
1695+ here are served via TFTP to the device under test.
1696+
1697+ .. code-block :: yaml
1698+
1699+ LAAProvider :
1700+ laa_identity : ' laa-00175'
1701+
1702+ Arguments:
1703+ - laa_identity (str): LAA identity for connection
1704+
1705+ Used by:
1706+ - `LAAProviderDriver `_
1707+
15391708RemotePlace
15401709~~~~~~~~~~~
15411710A :any: `RemotePlace ` describes a set of resources attached to a labgrid remote
@@ -3516,6 +3685,177 @@ Arguments:
35163685 setup/teardown the interface on activate/deactivate. Set this to ``False ``
35173686 if you are managing the interface externally.
35183687
3688+ LAA Drivers
3689+ ~~~~~~~~~~~
3690+ Drivers for devices connected via a `Linaro Automation Appliance (LAA)
3691+ <https://hub.linaro.com/library/laa/laa> `_.
3692+ Requires the ``laam `` package, install with ``pip install labgrid[laa] ``.
3693+
3694+ LAASerialDriver
3695+ +++++++++++++++
3696+ The :any: `LAASerialDriver ` connects to a serial port on the LAA via
3697+ a WebSocket bridge provided by laam.
3698+
3699+ Binds to:
3700+ port:
3701+ - `LAASerialPort `_
3702+
3703+ Implements:
3704+ - :any: `ConsoleProtocol `
3705+
3706+ .. code-block :: yaml
3707+
3708+ LAASerialDriver :
3709+ txdelay : 0.0
3710+ timeout : 3.0
3711+
3712+ Arguments:
3713+ - txdelay (float, default=0.0): time in seconds to wait after each write
3714+ - timeout (float, default=3.0): default read timeout in seconds
3715+
3716+ LAAPowerDriver
3717+ ++++++++++++++
3718+ The :any: `LAAPowerDriver ` controls power to the device via the LAA.
3719+ It executes the power on/off sequences from the resource.
3720+
3721+ Binds to:
3722+ port:
3723+ - `LAAPowerPort `_
3724+
3725+ Implements:
3726+ - :any: `PowerProtocol `
3727+
3728+ .. code-block :: yaml
3729+
3730+ LAAPowerDriver :
3731+ delay : 2.0
3732+
3733+ Arguments:
3734+ - delay (float, default=2.0): time in seconds between off and on during
3735+ power cycle (only used when no power_cycle sequence is set)
3736+
3737+ LAAUSBGadgetMassStorageDriver
3738+ ++++++++++++++++++++++++++++++
3739+ The :any: `LAAUSBGadgetMassStorageDriver ` controls a USB gadget mass storage
3740+ device on the LAA. It can simulate a USB stick being plugged in or out.
3741+
3742+ Binds to:
3743+ port:
3744+ - `LAAUSBGadgetMassStorage `_
3745+
3746+ .. code-block :: yaml
3747+
3748+ LAAUSBGadgetMassStorageDriver : {}
3749+
3750+ Arguments:
3751+ - None
3752+
3753+ LAAUSBDriver
3754+ ++++++++++++
3755+ The :any: `LAAUSBDriver ` toggles USB ports on the LAA.
3756+
3757+ Binds to:
3758+ port:
3759+ - `LAAUSBPort `_
3760+
3761+ .. code-block :: yaml
3762+
3763+ LAAUSBDriver : {}
3764+
3765+ Arguments:
3766+ - None
3767+
3768+ LAAButtonDriver
3769+ +++++++++++++++
3770+ The :any: `LAAButtonDriver ` controls virtual buttons on the LAA.
3771+
3772+ Binds to:
3773+ port:
3774+ - `LAAButtonPort `_
3775+
3776+ .. code-block :: yaml
3777+
3778+ LAAButtonDriver : {}
3779+
3780+ Arguments:
3781+ - None
3782+
3783+ The driver provides ``press(button) `` and ``release(button) `` methods.
3784+ The button name must match one of the names in the resource.
3785+
3786+ LAALedDriver
3787+ +++++++++++++
3788+ The :any: `LAALedDriver ` controls an LED on the LAA.
3789+
3790+ Binds to:
3791+ port:
3792+ - `LAALed `_
3793+
3794+ .. code-block :: yaml
3795+
3796+ LAALedDriver : {}
3797+
3798+ Arguments:
3799+ - None
3800+
3801+ LAATempDriver
3802+ +++++++++++++
3803+ The :any: `LAATempDriver ` reads a temperature sensor on the LAA.
3804+
3805+ Binds to:
3806+ port:
3807+ - `LAATempSensor `_
3808+
3809+ .. code-block :: yaml
3810+
3811+ LAATempDriver : {}
3812+
3813+ Arguments:
3814+ - None
3815+
3816+ The driver provides a ``get_temp(probe) `` method that returns a dict
3817+ with the temperature reading.
3818+
3819+ LAAWattDriver
3820+ +++++++++++++
3821+ The :any: `LAAWattDriver ` reads a power meter on the LAA.
3822+
3823+ Binds to:
3824+ port:
3825+ - `LAAWattMeter `_
3826+
3827+ .. code-block :: yaml
3828+
3829+ LAAWattDriver : {}
3830+
3831+ Arguments:
3832+ - None
3833+
3834+ The driver provides a ``get_watts(vbus) `` method that returns a dict
3835+ with the power reading.
3836+
3837+ LAAProviderDriver
3838+ +++++++++++++++++
3839+ The :any: `LAAProviderDriver ` manages files on the LAA file storage
3840+ where they are served via TFTP. The ``stage() `` method accepts a local
3841+ file path or a URL. The ``list() `` method returns the files on the LAA
3842+ and ``remove(name) `` deletes a file.
3843+
3844+ Binds to:
3845+ provider:
3846+ - `LAAProvider `_
3847+
3848+ .. code-block :: yaml
3849+
3850+ LAAProviderDriver : {}
3851+
3852+ Arguments:
3853+ - None
3854+
3855+ The ``stage() `` method returns the filename as stored on the LAA.
3856+ The ``list() `` method returns a list of filenames. The ``remove(name) ``
3857+ method removes a file by name.
3858+
35193859.. _conf-strategies :
35203860
35213861Strategies
0 commit comments