首页 > 技术知识 > 正文

【海思应用篇】-(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 配置

猜你喜欢