VAR-SOM-MX6 USB OTG host: Difference between revisions

From Variscite Wiki
(Created page with "{{PageHeader|VAR-SOM-MX6 - USB OTG HOST}} {{DocImage|category1=VAR-SOM-MX6|category2=Yocto}} __toc__")
 
No edit summary
Line 1: Line 1:
{{PageHeader|VAR-SOM-MX6 - USB OTG HOST}} {{DocImage|category1=VAR-SOM-MX6|category2=Yocto}} __toc__
{{PageHeader|VAR-SOM-MX6 - USB OTG Host}} {{DocImage|category1=VAR-SOM-MX6|category2=Yocto}} __toc__
 
By default the OTG is configure to be "host". You can switch it to  "peripheral" if you change the dr_mode in the device tree.<br>
<pre>
&usbotg {
vbus-supply = <&reg_usb_otg_vbus>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg_var>;
disable-over-current;
/* dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg" */
dr_mode = "host" ;
status = "okay";
};
</pre>
* build Linux out of tree.
* edit arch/arm/boot/dts/imx6qdl-var-som.dtsi
* Change the dr_mode in usbotg section
* re build the device tree with
<pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- imx6q-var-som.dtb
</pre>
copy the file to the sd-card or re flash it to nand. See the relevant section in the WIKI.

Revision as of 06:19, 14 December 2015

VAR-SOM-MX6 - USB OTG Host

By default the OTG is configure to be "host". You can switch it to "peripheral" if you change the dr_mode in the device tree.

&usbotg {
	vbus-supply = <&reg_usb_otg_vbus>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usbotg_var>;
	disable-over-current;
	/* dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg" */
	dr_mode = "host" ;
	status = "okay";
};
  • build Linux out of tree.
  • edit arch/arm/boot/dts/imx6qdl-var-som.dtsi
  • Change the dr_mode in usbotg section
  • re build the device tree with
$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- imx6q-var-som.dtb

copy the file to the sd-card or re flash it to nand. See the relevant section in the WIKI.