【海思应用篇】-(3)USB3.0 配置
USB3.0配置
1.管脚复用
USB3.0向下兼容USB2.0,但是管脚接线不同。
himm 0x047B8048 0x00001001
himm 0x047B804C 0x00001001
himm 0x047B8010 0x00001a02; 并且SENSOR_HS2 要上拉。
2.模式配置
在kernel/linux-4.9.y/arch/arm/boot/dts默认port0 为host,port1为device模式
见《外围设备驱动开发指南.pdf》中USB操作指南
#默认配置port0 为host,port1为device模式
#if 1
xhci_0@0x04110000 {#host模式
compatible = “generic-xhci”;
reg = <0x04110000 0x10000>;
interrupts = <0 111 4>;
usb2-lpm-disable;
};
#endif
#if 1
hidwc3_1@0x04120000 {#device模式
compatible = “snps,dwc3”;
reg = <0x04120000 0x10000>;
interrupts = <0 112 4>;
interrupt-names = “peripheral”;
maximum-speed = “high-speed”;
dr_mode = “peripheral”;
};
#endif
如果都改为host模式如下:
#if 1
xhci_0@0x04110000 {
compatible = “generic-xhci”;
reg = <0x04110000 0x10000>;
interrupts = <0 111 4>;
usb2-lpm-disable;
};
#endif
#if 1
xhci_1@0x04120000 {
compatible = “generic-xhci”;
reg = <0x04120000 0x10000>;
interrupts = <0 112 4>;
usb2-lpm-disable;
};
#endif
3.时钟配置
3.1 COMB PHY时钟选择
himm 0x04528018
3.2 COMB PHY 时钟复位
himm 0x04510188
3.3 USB3.0 时钟控制
himm 0x04510190
3.4 USB PORT0控制
himm 0x04528038
4.常见问题
4.1 USB3.0无法识别
免责声明:文章内容来自互联网,本站不对其真实性负责,也不承担任何法律责任,如有侵权等情况,请与本站联系删除。
转载请注明出处:【海思应用篇】-(3)USB3.0 配置 https://www.yhzz.com.cn/a/14845.html