Commit 9e24df6c authored by David Boddie's avatar David Boddie

Merge branch 'update-usb-host-info' into 'master'

Update USB host mode instructions

See merge request Librem5/developer.puri.sm!328
parents a62de3eb 081b6bc2
......@@ -18,24 +18,64 @@ composite gadget which provides both serial and networking support.
Alternate Configuration - USB C Host
------------------------------------
.. warning:: Using the board in this mode means that you will lose access to
the USB serial console, so it is important to have set up SSH
access via Ethernet before following these steps.
In this configuration, USB host mode is used to allow keyboard, mouse and flash
memory sticks to be connected to the development board.
**Note:** Using the board in this mode means that you will lose access to the
USB serial console, so it is important to have set up SSH access via Ethernet
before following these steps.
The `J5 Create JCA374`_ USB Type-C Multi-Adapter is known to work as a hub and
power the board using USB Power Delivery.
Follow the instructions for the kernel you are running on the development board.
Linux 4.18
~~~~~~~~~~
1. On the target, backup the device tree and copy in the USB host version::
#. On the development board, backup the device tree and copy in the USB host
version::
cp /boot/dtbs/librem5-evk.dtb /boot/dtbs/librem5-evk.dtb.bak
cp /boot/dtbs/librem5-evk-usbhost.dtb /boot/dtbs/librem5-evk.dtb
2. Attach a USB C hub to the development board.
3. Attach power to the USB C hub.
4. Plug in USB devices and they should appear in the output of the ``dmesg``
#. Attach a USB C hub to the development board.
#. Attach power to the USB C hub.
#. Plug in USB devices and they should appear in the output of the ``dmesg``
and ``lsusb`` tools.
Linux 5.2
~~~~~~~~~
The following steps will work for the specific version of the kernel you are
using. When the kernel is updated, you will need to perform these steps again.
#. On the development board, backup the device tree binary file::
sudo cp /boot/dtbs/`uname -r`/imx8mq-librem5-devkit.dtb /boot/dtbs/`uname -r`/imx8mq-librem5-devkit.dtb.bak
#. Extract the device tree sources from the binary::
dtc /boot/dtbs/`uname -r`/imx8mq-librem5-devkit.dtb > /tmp/imx8mq-librem5-devkit.dts
#. Find this line in the newly created ``/tmp/imx8mq-librem5-devkit.dts``::
dr_mode = "otg";
Change it to this::
dr_mode = "host";
Save the file.
#. Generate a new device tree binary file::
sudo dtc /tmp/imx8mq-librem5-devkit.dts > /boot/dtbs/`uname -r`/imx8mq-librem5-devkit.dtb
#. Attach a USB C hub to the development board.
#. Attach power to the USB C hub.
#. Plug in USB devices and they should appear in the output of the ``dmesg``
and ``lsusb`` tools.
The `J5 Create JCA374`_ USB Type-C Multi-Adapter is known to work as a hub and
power the board using USB Power Delivery.
.. include:: /links.txt
Markdown is supported
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