4.9 USB调试
4.9.1 硬件原理分析
根据上图可得出
USB接口名称 USB接口类型 供电电压名称 OTG0 USB3.0 OTG VCC5V0_USB_OTG0 HOST1 USB3.0 HOST 在5G模块配置 HOST2 USB2.0 HOST VCC5V0_USB_HOST2 HOST3 USB2.0 HOST VCC5V0_USB_HOST31、VCC5V0_USB_OTG由GPIO0_5控制
2、VCC5V0_USG_HOST2和VCC5V0_USB_HOST3由GPIO0_A6控制
3、USB_HUB_RST由GPIO3_A3控制4.9.2 DTS配置
知道上面的信息,我们就可以来配置USB了
{ vcc5v0_host: vcc5v0-host-regulator { compatible = “regulator-fixed”; regulator-name = “vcc5v0_host”; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc5v0_usb>; pinctrl-names = “default”; pinctrl-0 = <&vcc5v0_host_en>; }; usb_hub_rst: usb-hub-rst { compatible = “regulator-fixed”; regulator-name = “usb_hub_rst”; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc5v0_usb>; pinctrl-names = “default”; pinctrl-0 = <&usb_hub_rst_gpio>; }; vcc5v0_otg: vcc5v0-otg-regulator { compatible = “regulator-fixed”; regulator-name = “vcc5v0_otg”; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc5v0_usb>; pinctrl-names = “default”; pinctrl-0 = <&vcc5v0_otg_en>; }; }; &u2phy0_host { phy-supply = <&vcc5v0_host>; status = “okay”; }; &u2phy0_otg { vbus-supply = <&vcc5v0_otg>; status = “okay”; }; &u2phy1_host { phy-supply = <&vcc5v0_host>; status = “okay”; }; &u2phy1_otg { phy-supply = <&vcc5v0_host>; status = “okay”; }; &usb2phy0 { status = “okay”; }; &usb2phy1 { status = “okay”; }; &usb_host0_ehci { status = “okay”; }; &usb_host0_ohci { status = “okay”; }; &usb_host1_ehci { status = “okay”; }; &usb_host1_ohci { status = “okay”; }; &usbdrd_dwc3 { dr_mode = “otg”; vbus-supply = <&vcc5v0_otg>; extcon = <&usb2phy0>; status = “okay”; }; &usbdrd30 { status = “okay”; }; &usbhost_dwc3 { status = “okay”; }; &usbhost30 { status = “okay”; };<
由于USB用途比较广泛, RK3568_ANDROID11_SDK中默认已经有驱动和在rockchip_defconfig中已配置,我们只需要根据硬件配置好dts,烧写固件后即可通过插入鼠标、键盘、U盘等USB设备验证
4.9.3 详细参考文档
USB的详细配置说明及常见问题分析请参考《Rockchip_RK356X_User_Guide_USB_CN.pdf》。
文档路径:rk356x_android11_sdk/RKDocs/common/usb/免责声明:文章内容来自互联网,本站不对其真实性负责,也不承担任何法律责任,如有侵权等情况,请与本站联系删除。
转载请注明出处:RK3568 开发板-安卓系统之USB调试(十二)-rk3399开发板怎么用 https://www.yhzz.com.cn/a/9718.html