-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable USB gadgets with sun8i/legacy, small nand-sata-install fix
- Loading branch information
ThomasKaiser
committed
Jun 17, 2016
1 parent
2a79527
commit 24ea1d3
Showing
2 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24ea1d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Printer and Mass Storage gadgets appear then like this on the connected host (OS X in my case) after switching
otg_role
to2
:dmesg
output on the OPi (without doing any of the necessary configuration, just switching/sys/bus/platform/devices/sunxi_usb_udc/otg_role
between0
and2
):Ethernet gadget:
Printer gadget:
Mass Storage gadget (see also USBootPi based on Armbian)
24ea1d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you try serial gadget too?
24ea1d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was to have all this stuff ready with 5.15 and then let our users join in, test and provide documentation for all these (quite cool) features. Personally I'm just interested in Ethernet and am writing a sort of tutorial right now where g_ether gets handy.
24ea1d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... if I understood correctly we could use either
g_ether
org_serial
to allow access to H3 devices with legacy kernel by default. If I also understood correctly then usingg_ether
is PITA when trying it from Windows (which the majority of our users might use) so maybe enablingg_serial
on sun8i and providing a root shell on/dev/ttyGS0
might help setting up H3 boards without an USB-UART dongle (not a real replacement though since u-boot and kernel booting are missing).24ea1d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's easy with clear instructions (like xda-developers post I linked) and more or less modern Windows version (Win 7 should be modern enough)
It's easy to add serial-getty on ttyGS0, but I
won'twouldn't enable loading kernel modules by default since seems like there are issues when unloading and reloading gadget modules24ea1d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, then making these modules available is enough for now and everything else stuff for improved documentation (maybe adding both modules in commented form to
/etc/modules
on all H3 devices to give a hint?)24ea1d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have OTG on all Allwinner devices (well, except Pine64 and Beelink X2, where you need special cable to use OTG features), so I don't know about adding this only for H3.
24ea1d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... seems this stuff is enabled everywhere with sunxi legacy kernels except in
linux-sun5i-default.config
(huh? we support A13 devices?!). So you're right and we could handle all sunxi devices equal but on the other hand it seems not that simple to get this gadget support with mainline kernel (I read something from ssvb) so we simply leave everything as it is now and maybe this stuff will be covered by improved documentation later.