msm-hsusb.txt 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. MSM SoC HSUSB controllers
  2. OTG:
  3. Required properties :
  4. - compatible : should be "qcom,hsusb-otg"
  5. - regs : offset and length of the register set in the memory map
  6. - interrupts: IRQ line
  7. - interrupt-names: OTG interrupt name(s) referenced in interrupts above
  8. HSUSB OTG expects "core_irq" which is IRQ line from CORE and
  9. optional ones are described in next section.
  10. - qcom,hsusb-otg-phy-type: PHY type can be one of
  11. 1 - Chipidea 45nm PHY
  12. 2 - Synopsis 28nm PHY
  13. - qcom,hsusb-otg-mode: Operational mode. Can be one of
  14. 1 - Peripheral only mode
  15. 2 - Host only mode
  16. 3 - OTG mode
  17. Based on the mode, OTG driver registers platform devices for
  18. gadget and host.
  19. - qcom,hsusb-otg-control: OTG control (VBUS and ID notifications)
  20. can be one of
  21. 1 - PHY control
  22. 2 - PMIC control
  23. 3 - User control (via debugfs)
  24. - <supply-name>-supply: handle to the regulator device tree node
  25. Required "supply-name" is "HSUSB_VDDCX" (when voting for VDDCX) or
  26. "hsusb_vdd_dig" (when voting for VDDCX Corner voltage),
  27. "HSUSB_1p8-supply" and "HSUSB_3p3-supply".
  28. Optional properties :
  29. - interrupt-names : Optional interrupt resource entries are:
  30. "async_irq" : Interrupt from HSPHY for asynchronous wakeup events in LPM.
  31. "pmic_id_irq" : Interrupt from PMIC for external ID pin notification.
  32. - qcom,hsusb-otg-disable-reset: If present then core is RESET only during
  33. init, otherwise core is RESET for every cable disconnect as well
  34. - qcom,hsusb-otg-pnoc-errata-fix: If present then workaround for PNOC
  35. performance issue is applied which requires changing the mem-type
  36. attribute via VMIDMT.
  37. - qcom,hsusb-otg-default-mode: The default USB mode after boot-up.
  38. Applicable only when OTG is controlled by user. Can be one of
  39. 0 - None. Low power mode
  40. 1 - Peripheral
  41. 2 - Host
  42. - qcom,hsusb-otg-phy-init-seq: PHY configuration sequence. val, reg pairs
  43. terminate with -1
  44. - qcom,hsusb-otg-power-budget: VBUS power budget in mA
  45. 0 will be treated as 500mA
  46. - qcom,hsusb-otg-pclk-src-name: The source of pclk
  47. - Refer to "Documentation/devicetree/bindings/arm/msm/msm_bus.txt" for
  48. below optional properties:
  49. - qcom,msm_bus,name
  50. - qcom,msm_bus,num_cases - There are three valid cases for this: NONE, MAX
  51. and MIN bandwidth votes. Minimum two cases must be defined for
  52. both NONE and MAX votes. If MIN vote is different from NONE VOTE
  53. then specify third case for MIN VOTE.
  54. - qcom,msm_bus,active_only
  55. - qcom,msm_bus,num_paths
  56. - qcom,msm_bus,vectors
  57. - qcom,hsusb-otg-lpm-on-dev-suspend: If present then USB enter to
  58. low power mode upon receiving bus suspend.
  59. - qcom,hsusb-otg-clk-always-on-workaround: If present then USB core clocks
  60. remain active upon receiving bus suspend and USB cable is connected.
  61. Used for allowing USB to respond for remote wakup.
  62. - qcom,hsusb-otg-delay-lpm: If present then USB core will wait one second
  63. after disconnect before entering low power mode.
  64. - qcom,hsusb-otg-delay-lpm-hndshk-on-disconnect: If present then USB core will
  65. wait for the handshake with the IPA to complete before entering low
  66. power mode.
  67. - <supply-name>-supply: handle to the regulator device tree node.
  68. Optional "supply-name" is "vbus_otg" to supply vbus in host mode.
  69. - qcom,vdd-voltage-level: This property must be a list of three integer
  70. values (no, min, max) where each value represents either a voltage
  71. in microvolts or a value corresponding to voltage corner.
  72. - qcom,dp-manual-pullup: If present, vbus is not routed to USB controller/phy
  73. and controller driver therefore enables pull-up explicitly before
  74. starting controller using usbcmd run/stop bit.
  75. - qcom,usb2-enable-hsphy2: If present then USB2 controller is connected to 2nd
  76. HSPHY.
  77. - qcom,hsusb-log2-itc: value of 2^(log2_itc-1) will be used as the
  78. interrupt threshold (ITC), when log2_itc is between 1 to 7.
  79. - qcom,hsusb-l1-supported: If present, the device supports l1 (Link power
  80. management).
  81. - qcom,no-selective-suspend: If present selective suspend is disabled on hub ports.
  82. - qcom,hsusb-otg-mpm-dpsehv-int: If present, indicates mpm interrupt to be configured
  83. for detection of dp line transition during VDD minimization.
  84. - qcom,hsusb-otg-mpm-dmsehv-int: If present, indicates mpm interrupt to be configured
  85. for detection of dm line transition during VDD minimization.
  86. - qcom,ahb-async-bridge-bypass: If present, indicates that enable AHB2AHB By Pass
  87. mode with device controller for better throughput. With this mode, USB Core
  88. runs using PNOC clock and synchronous to it. Hence it is must to have proper
  89. "qcom,msm_bus,vectors" to have high bus frequency. User shouldn't try to
  90. enable this feature without proper bus voting.
  91. -qcom,disable-retention-with-vdd-min: If present dont allow phy retention but allow
  92. vdd min.
  93. - qcom,usbin-vadc: Corresponding vadc device's phandle to read usbin voltage using VADC.
  94. This will be used to get value of usb power supply's VOLTAGE_NOW property.
  95. Example HSUSB OTG controller device node :
  96. usb@f9690000 {
  97. compatible = "qcom,hsusb-otg";
  98. reg = <0xf9690000 0x400>;
  99. interrupts = <134>;
  100. interrupt-names = "core_irq";
  101. qcom,hsusb-otg-phy-type = <2>;
  102. qcom,hsusb-otg-mode = <1>;
  103. qcom,hsusb-otg-otg-control = <1>;
  104. qcom,hsusb-otg-disable-reset;
  105. qcom,hsusb-otg-pnoc-errata-fix;
  106. qcom,hsusb-otg-default-mode = <2>;
  107. qcom,hsusb-otg-phy-init-seq = <0x01 0x90 0xffffffff>;
  108. qcom,hsusb-otg-power-budget = <500>;
  109. qcom,hsusb-otg-pclk-src-name = "dfab_usb_clk";
  110. qcom,hsusb-otg-lpm-on-dev-suspend;
  111. qcom,hsusb-otg-clk-always-on-workaround;
  112. hsusb_vdd_dig-supply = <&pm8226_s1_corner>;
  113. HSUSB_1p8-supply = <&pm8226_l10>;
  114. HSUSB_3p3-supply = <&pm8226_l20>;
  115. qcom,vdd-voltage-level = <1 5 7>;
  116. qcom,dp-manual-pullup;
  117. qcom,disable-retention-with-vdd-min;
  118. qcom,hsusb-otg-dpsehv-int = <49>;
  119. qcom,hsusb-otg-dmsehv-int = <58>;
  120. qcom,usbin-vadc = <&pm8226_vadc>;
  121. qcom,msm_bus,name = "usb2";
  122. qcom,msm_bus,num_cases = <2>;
  123. qcom,msm_bus,active_only = <0>;
  124. qcom,msm_bus,num_paths = <1>;
  125. qcom,msm_bus,vectors =
  126. <87 512 0 0>,
  127. <87 512 60000000 960000000>;
  128. };
  129. MSM HSUSB EHCI controller
  130. Required properties :
  131. - compatible : should be "qcom,ehci-host"
  132. - reg : offset and length of the register set in the memory map
  133. - interrupts: IRQ lines used by this controller
  134. - interrupt-names : Required interrupt resource entries are:
  135. HSUSB EHCI expects "core_irq" and optionally "async_irq".
  136. - <supply-name>-supply: handle to the regulator device tree node
  137. Required "supply-name" is either "hsusb_vdd_dig" or "HSUSB_VDDCX"
  138. "HSUSB_1p8-supply" "HSUSB_3p3-supply".
  139. - qcom,usb2-power-budget: maximum vbus power (in mA) that can be provided.
  140. Optional properties :
  141. - qcom,usb2-enable-hsphy2: If present, select second PHY for USB operation.
  142. - qcom,resume-gpio: if present then peripheral connected to usb controller
  143. cannot wakeup from XO shutdown using in-band usb bus resume. Use resume
  144. gpio to wakeup peripheral.
  145. - qcom,vdd-voltage-level: This property must be a list of five integer
  146. values (no, 0.5vsuspend, 0.75suspend, min, max) where each value respresents
  147. either a voltage in microvolts or a value corresponding to voltage corner.
  148. First value represents value to vote when USB is not at all active, second
  149. value represents value to vote when target is not connected to dock during low
  150. power mode, third value represents vlaue to vote when target is connected to dock
  151. and no peripheral connected over dock during low power mode, fourth value represents
  152. minimum value to vote when USB is operational, fifth item represents maximum value
  153. to vote for USB is operational.
  154. - qcom,usb2-enable-uicc: If present, usb2 port will be used for uicc card connection.
  155. Example MSM HSUSB EHCI controller device node :
  156. ehci: qcom,ehci-host@f9a55000 {
  157. compatible = "qcom,ehci-host";
  158. reg = <0xf9a55000 0x400>;
  159. interrupts = <0 134 0>, <0 140 0>;
  160. interrupt-names = "core_irq", "async_irq";
  161. hsusb_vdd_dig-supply = <&pm8841_s2_corner>;
  162. HSUSB_1p8-supply = <&pm8941_l6>;
  163. HSUSB_3p3-supply = <&pm8941_l24>;
  164. qcom,usb2-enable-hsphy2;
  165. qcom,usb2-power-budget = <500>;
  166. qcom,vdd-voltage-level = <1 2 3 5 7>;
  167. qcom,usb2-enable-uicc;
  168. };
  169. ANDROID USB:
  170. Required properties:
  171. - compatible: should be "qcom,android-usb"
  172. Optional properties :
  173. - reg : offset and length of memory region that is used by device to
  174. update USB PID and serial numbers used by bootloader in DLOAD mode.
  175. - qcom,android-usb-swfi-latency : value to be used by device to vote
  176. for DMA latency in microsecs.
  177. - qcom,android-usb-cdrom : if this property is present then device creates
  178. a new LUN as CD-ROM
  179. - qcom,android-usb-internal-ums : if this property is present then device
  180. creates a new LUN as internal usb mass storage.
  181. - qcom,streaming-func : add list of usb function name. If mention usb function
  182. is being enable as part of USB composition, streaming mode is enable with
  183. usb device controller to get better throughput. NOTE: Inverted CRC and
  184. turnaround timeout is observed on enabling streaming. Hence it is required
  185. to see these errors and number of erros on enabling this at USB level to make
  186. final decision to enable this feature or not.
  187. - qcom,android-usb-uicc-nluns : Number of mass storage LUNs required for
  188. the UICC card.
  189. Example Android USB device node :
  190. android_usb@fc42b0c8 {
  191. compatible = "qcom,android-usb";
  192. reg = <0xfc42b0c8 0xc8>;
  193. qcom,android-usb-swfi-latency = <1>;
  194. qcom,streaming-func = "rndis","mtp";
  195. qcom,android-usb-uicc-nluns = <1>;
  196. };
  197. BAM:
  198. Required properties:
  199. - compatible: should be "qcom,usb-bam-msm"
  200. - reg : pairs of physical base addresses and region sizes
  201. of all the memory mapped BAM devices present
  202. - reg-names : Register region name(s), in 1-1 correspondence with the
  203. registers in 'reg'. This list should contain at least as many names
  204. as the number of unique values given in both 'usb-active-bam' and
  205. all the subnodes' 'usb-bam-type' properties.
  206. If SSUSB_BAM is used, "ssusb" should be present.
  207. If HSUSB_BAM is used, "hsusb" should be present.
  208. If HSIC_BAM is used, "hsic" should be present.
  209. If a QSCRATCH RAM1 register is designated for providing USB3
  210. private memory to use as a BAM FIFO, specify "qscratch_ram1_reg".
  211. - interrupts: IRQ lines for BAM devices
  212. - interrupt-names: BAM interrupt name(s), in 1-1 correspondence with
  213. 'interrupts' above.
  214. If SSUSB_BAM is used, "ssusb" should be present.
  215. If HSUSB_BAM is used, "hsusb" should be present.
  216. If HSIC_BAM is used, "hsic" should be present.
  217. - qcom,usb-bam-num-pipes: max number of pipes that can be used
  218. Optional properties:
  219. - qcom,usb-bam-fifo-baseaddr: base address for bam pipe's data and descriptor
  220. fifos. This can be on chip memory (ocimem) or usb private memory. This
  221. property is required if sub-node's mem-type is ocimem or usb private mem.
  222. A number of USB BAM pipe parameters are represented as sub-nodes:
  223. Subnode Required:
  224. - label: a string describing uniquely the usb bam pipe. The string can be
  225. constracted as follows: <core>-<peer>-<direction>-<pipe num>.
  226. core options: hsusb, ssusb/dwc3, hsic
  227. peer options: qdss, ipa, a2
  228. direction options: in (from peer to usb), out (from usb to peer)
  229. pipe num options: 0..127
  230. - qcom,usb-bam-mem-type: Type of memory used by this PIPE. Can be one of
  231. 0 - Uses SPS's dedicated pipe memory
  232. 1 - USB's private memory residing @ 'qcom,usb-bam-fifo-baseaddr'
  233. 2 - System RAM allocated by driver
  234. 3 - OCI memory residing @ 'qcom,usb-bam-fifo-baseaddr'
  235. - qcom,bam-type: BAM type can be one of
  236. 0 - SSUSB_BAM
  237. 1 - HSUSB_BAM
  238. 2 - HSIC_BAM
  239. - qcom,dir: pipe direction
  240. 0 - from usb (out)
  241. 1 - to usb (in)
  242. - qcom,pipe-num: pipe number
  243. - qcom,peer-bam: peer BAM can be one of
  244. 0 - A2_P_BAM
  245. 1 - QDSS_P_BAM
  246. 2 - IPA_P_BAM
  247. - qcom,data-fifo-size: data fifo size
  248. - qcom,descriptor-fifo-size: descriptor fifo size
  249. Optional Properties for Subnode:
  250. - qcom,reset-bam-on-connect: If present then BAM is RESET before connecting
  251. pipe. This may be required if BAM peripheral is also reset before connect.
  252. - qcom,dst-bam-physical-address: destination BAM physical address
  253. - qcom,dst-bam-pipe-index: destination BAM pipe index
  254. - qcom,src-bam-physical-address: source BAM physical address
  255. - qcom,src-bam-pipe-index: source BAM pipe index
  256. - qcom,data-fifo-offset: data fifo offset address
  257. - qcom,descriptor-fifo-offset: descriptor fifo offset address
  258. Optional properties :
  259. - qcom,ignore-core-reset-ack: If present then BAM ignores ACK from USB core
  260. while performing PIPE RESET
  261. - qcom,disable-clk-gating: If present then disable BAM clock gating.
  262. Example USB BAM controller device node:
  263. qcom,usbbam@f9a44000 {
  264. compatible = "qcom,usb-bam-msm";
  265. reg = <0xf9a44000 0x11000>;
  266. reg-names = "hsusb";
  267. interrupts = <0 135 0>;
  268. interrupt-names = "hsusb";
  269. qcom,usb-bam-num-pipes = <16>;
  270. qcom,ignore-core-reset-ack;
  271. qcom,disable-clk-gating;
  272. qcom,pipe0 {
  273. label = "hsusb-ipa-out-0";
  274. qcom,usb-bam-mem-type = <0>;
  275. qcom,bam-type = <1>;
  276. qcom,dir = <0>;
  277. qcom,pipe-num = <0>;
  278. qcom,peer-bam = <2>;
  279. qcom,src-bam-physical-address = <0xf9a44000>;
  280. qcom,src-bam-pipe-index = <1>;
  281. qcom,data-fifo-offset = <0x2200>;
  282. qcom,data-fifo-size = <0x1e00>;
  283. qcom,descriptor-fifo-offset = <0x2100>;
  284. qcom,descriptor-fifo-size = <0x100>;
  285. };
  286. qcom,pipe1 {
  287. label = "hsusb-ipa-in-0";
  288. qcom,usb-bam-mem-type = <0>;
  289. qcom,bam-type = <1>;
  290. qcom,dir = <1>;
  291. qcom,pipe-num = <0>;
  292. qcom,peer-bam = <2>;
  293. qcom,dst-bam-physical-address = <0xf9a44000>;
  294. qcom,dst-bam-pipe-index = <0>;
  295. qcom,data-fifo-offset = <0x300>;
  296. qcom,data-fifo-size = <0x1e00>;
  297. qcom,descriptor-fifo-offset = <0>;
  298. qcom,descriptor-fifo-size = <0x300>;
  299. };
  300. };