Skip to content

Instantly share code, notes, and snippets.

@x-magic
Created August 10, 2019 11:36
Show Gist options
  • Save x-magic/884ff3d9321adf9f2ff450164a94a7c0 to your computer and use it in GitHub Desktop.
Save x-magic/884ff3d9321adf9f2ff450164a94a7c0 to your computer and use it in GitHub Desktop.
Device Tree overlay to enable OTG host on Orange Pi Zero
/*
* Device Tree overlay to enable OTG host on Orange Pi Zero
* Tested on Armbian Buster latest
* Run 'armbian-add-overley usbotg2host.dts' in root to use
*/
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun8i-h3";
fragment@0 {
target = <&usb_otg>;
__overlay__ {
status = "okay";
dr_mode = "host";
};
};
fragment@1 {
target = <&usbphy>;
__overlay__ {
usb0_id_det-gpios = <&pio 6 12 0>; /* PG12 */
usb0_vbus-supply = <&reg_usb0_vbus>;
status = "okay";
};
};
fragment@2 {
target = <&reg_usb0_vbus>;
__overlay__ {
gpio = <&r_pio 0 2 0x0>; /* PL2 */
status = "okay";
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment