Selda_bagcan Posted December 29, 2017 Posted December 29, 2017 Orange pi zero using mainline latest image. Somehow i couldn't manage to set up a c++ project with libusbgx so I am using console commands for gadgetfs for hid device emulation. I want to disable otg dual role functionality of micro usb port . I think i need to mess with overlay but i have no experience and i think i should change the usb for micro usb port but i am not sure how to do. Removing usb otg descriptor is enough too. Thanks
Selda_bagcan Posted December 30, 2017 Author Posted December 30, 2017 I will try to go back to the legacy image and try to edit fex file according to here https://linux-sunxi.org/Fex_Guide#USB_control_flags All i want to do is removing otg functionality and use it device only. I wont ever need usb host in micro usb port.
Selda_bagcan Posted January 2, 2018 Author Posted January 2, 2018 Update http://elixir.free-electrons.com/linux/latest/source/drivers/usb/musb/musb_gadget.c#L1868 https://www.kernel.org/doc/htmldocs/gadget/otg.html i will edit the kernel and see if that works.
Selda_bagcan Posted January 7, 2018 Author Posted January 7, 2018 I edited musb_gadget.c sunxi-next conf file and selected gadget only when building the kernel and it works like i wanted. Not sure if all these modifications are required so there is no more otg descriptor.
Recommended Posts