V853 的 USB 如何设置成开机默认 Host 模式?
-
如题,每次开机都要输入一次 cat /sys/devices/platform/soc/usbc0/usb_host 实在是太麻烦了
-
@netube 在开机自启脚本中增加命令
-
@null037 我试过弄成开机设置,感觉切换不了。
-
@fawen
board.dts 可以修改 -
&usbc0 { device_type = "usbc0"; usb_port_type = <0x2>; usb_detect_type = <0x1>; usb_detect_mode = <0x0>; usb_id_gpio = <&pio PH 14 0 1 0xffffffff 0xffffffff>; /*usb_det_vbus_gpio = <&pio PH 3 0 1 0xffffffff 0xffffffff>;*/ usb_det_vbus_gpio = "axp_ctrl"; det_vbus_supply = <&gpio_charger>; usb_regulator_io = "nocare"; usb_wakeup_suspend = <0x0>; usb_luns = <0x3>; usb_serial_unique = <0x0>; usb_serial_number = "20080411"; status = "okay"; };
是改这里吗?whycan晕哥!需要改哪个参数。
-
/* *usb_port_type: usb mode. 0-device, 1-host, 2-otg. *usb_detect_type: usb hotplug detect mode. 0-none, 1-vbus/id detect, 2-id/dpdm detect. *usb_detect_mode: 0-thread scan, 1-id gpio interrupt. *usb_id_gpio: gpio for id detect. *usb_det_vbus_gpio: gpio for id detect. gpio or "axp_ctrl"; *usb_wakeup_suspend:0-SUPER_STANDBY, 1-USB_STANDBY. */
usb_port_type改成1就可以
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号