Extend laurent driver, allowing using a relay to control USB circuits.
For example, the relay might be connected to the DIP switch on RB1 / RB2
boards.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
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.
Observed instability in controlling devices when OUTPUT_ENABLE wasn't
enabled in the first step. I couldn't find any documented reason why
this is, but the documentation does say: "FtdiOutput Pin always kept at
1".
Alpaca always keeps OUTUT_ENABLE as 1, and never turns it off. The
documentation seems to imply it should always be left on. This change
updates the open sequence so that the OUTPUT_ENABLE bit is set first.
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Replace all license headers with the SPDX-License-Identitier headers to
follow the current recommendations.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
In order to stop clobbering the root directory, move all device and
console backends to drivers/ subdir.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>