dts 修改了sun8i-h3-nanopi-m1.dts
&ehci0 {
status = "okay";
};
&ohci0 {
status = "okay";
};
&usb_otg {
status = "okay";
dr_mode = "peripheral";
};
&usbphy {
usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
status = "okay";
};
make kernel_menuconfig
打开了
Device Drivers
USB support
<*> Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...)
MUSB Mode Selection (Dual Role mode)
*** Platform Glue Layer ***
<*> Allwinner (sunxi)
<*> USB Gadget Support
[*] Serial gadget console support
<*> USB Gadget precomposed configurations (Serial Gadget (with CDC ACM and CDC OBEX support))
启动后每次都提示
[ 1.087159] udc-core: couldn't find an available UDC - added [g_serial] to list of pending drivers
[ 1.910676] g_serial gadget: Gadget Serial v2.4
[ 1.915232] g_serial gadget: g_serial ready
离线