Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 1 | MSM SoC HSUSB controllers |
| 2 | |
| 3 | OTG: |
| 4 | |
| 5 | Required properties : |
| 6 | - compatible : should be "qcom,hsusb-otg" |
| 7 | - regs : offset and length of the register set in the memory map |
| 8 | - interrupts: IRQ line |
Jack Pham | 3f4459e | 2012-09-28 15:55:16 -0700 | [diff] [blame] | 9 | - interrupt-names: OTG interrupt name(s) referenced in interrupts above |
| 10 | HSUSB OTG expects "core_irq" and optionally "async_irq". |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 11 | - qcom,hsusb-otg-phy-type: PHY type can be one of |
| 12 | 1 - Chipidea 45nm PHY |
| 13 | 2 - Synopsis 28nm PHY |
| 14 | - qcom,hsusb-otg-mode: Operational mode. Can be one of |
| 15 | 1 - Peripheral only mode |
| 16 | 2 - Host only mode |
| 17 | 3 - OTG mode |
| 18 | Based on the mode, OTG driver registers platform devices for |
| 19 | gadget and host. |
| 20 | - qcom,hsusb-otg-control: OTG control (VBUS and ID notifications) |
| 21 | can be one of |
| 22 | 1 - PHY control |
| 23 | 2 - PMIC control |
| 24 | 3 - User control (via debugfs) |
Manu Gautam | 57c938e | 2013-04-04 11:39:13 +0530 | [diff] [blame^] | 25 | - <supply-name>-supply: handle to the regulator device tree node |
| 26 | Required "supply-name" is "HSUSB_VDDCX" (when voting for VDDCX) or |
| 27 | "hsusb_vdd_dig" (when voting for VDDCX Corner voltage), |
| 28 | "HSUSB_1p8-supply" and "HSUSB_3p3-supply". |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 29 | |
| 30 | Optional properties : |
Manu Gautam | 0ddbd92 | 2012-09-21 17:17:38 +0530 | [diff] [blame] | 31 | - qcom,hsusb-otg-disable-reset: If present then core is RESET only during |
| 32 | init, otherwise core is RESET for every cable disconnect as well |
| 33 | - qcom,hsusb-otg-pnoc-errata-fix: If present then workaround for PNOC |
| 34 | performance issue is applied which requires changing the mem-type |
| 35 | attribute via VMIDMT. |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 36 | - qcom,hsusb-otg-default-mode: The default USB mode after boot-up. |
| 37 | Applicable only when OTG is controlled by user. Can be one of |
| 38 | 0 - None. Low power mode |
| 39 | 1 - Peripheral |
| 40 | 2 - Host |
| 41 | - qcom,hsusb-otg-phy-init-seq: PHY configuration sequence. val, reg pairs |
| 42 | terminate with -1 |
| 43 | - qcom,hsusb-otg-power-budget: VBUS power budget in mA |
| 44 | 0 will be treated as 500mA |
| 45 | - qcom,hsusb-otg-pclk-src-name: The source of pclk |
| 46 | - qcom,hsusb-otg-pmic-id-irq: ID, routed to PMIC IRQ number |
Manu Gautam | 2e8ac10 | 2012-08-31 11:41:16 -0700 | [diff] [blame] | 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 |
| 51 | - qcom,msm_bus,active_only |
| 52 | - qcom,msm_bus,num_paths |
| 53 | - qcom,msm_bus,vectors |
Ido Shayevitz | a7114b9 | 2013-01-13 13:34:47 +0200 | [diff] [blame] | 54 | - qcom,hsusb-otg-lpm-on-dev-suspend: If present then USB enter to |
| 55 | low power mode upon receiving bus suspend. |
Ido Shayevitz | 2619335 | 2013-01-21 23:16:54 +0200 | [diff] [blame] | 56 | - qcom,hsusb-otg-clk-always-on-workaround: If present then USB core clocks |
| 57 | remain active upon receiving bus suspend and USB cable is connected. |
| 58 | Used for allowing USB to respond for remote wakup. |
Shimrit Malichi | ffab5b0 | 2013-03-10 11:06:16 +0200 | [diff] [blame] | 59 | - qcom,hsusb-otg-delay-lpm: If present then USB core will wait one second |
| 60 | after disconnect before entering low power mode. |
Manu Gautam | 57c938e | 2013-04-04 11:39:13 +0530 | [diff] [blame^] | 61 | - <supply-name>-supply: handle to the regulator device tree node. |
| 62 | Optional "supply-name" is "vbus_otg" to supply vbus in host mode. |
Mayank Rana | 0f286cf | 2013-02-27 11:43:27 +0530 | [diff] [blame] | 63 | - qcom,vdd-voltage-level: This property must be a list of three integer |
| 64 | values (no, min, max) where each value represents either a voltage |
| 65 | in microvolts or a value corresponding to voltage corner. |
Vamsi Krishna | 1a1684b | 2013-03-02 16:14:52 -0800 | [diff] [blame] | 66 | - qcom,dp-manual-pullup: If present, vbus is not routed to USB controller/phy |
| 67 | and controller driver therefore enables pull-up explicitly before |
| 68 | starting controller using usbcmd run/stop bit. |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 69 | |
| 70 | Example HSUSB OTG controller device node : |
David Brown | 225abee | 2012-02-09 22:28:50 -0800 | [diff] [blame] | 71 | usb@f9690000 { |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 72 | compatible = "qcom,hsusb-otg"; |
David Brown | 225abee | 2012-02-09 22:28:50 -0800 | [diff] [blame] | 73 | reg = <0xf9690000 0x400>; |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 74 | interrupts = <134>; |
Jack Pham | 3f4459e | 2012-09-28 15:55:16 -0700 | [diff] [blame] | 75 | interrupt-names = "core_irq"; |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 76 | |
| 77 | qcom,hsusb-otg-phy-type = <2>; |
| 78 | qcom,hsusb-otg-mode = <1>; |
| 79 | qcom,hsusb-otg-otg-control = <1>; |
Manu Gautam | bd53fba | 2012-07-31 16:13:06 +0530 | [diff] [blame] | 80 | qcom,hsusb-otg-disable-reset; |
Manu Gautam | 0ddbd92 | 2012-09-21 17:17:38 +0530 | [diff] [blame] | 81 | qcom,hsusb-otg-pnoc-errata-fix; |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 82 | qcom,hsusb-otg-default-mode = <2>; |
David Brown | 225abee | 2012-02-09 22:28:50 -0800 | [diff] [blame] | 83 | qcom,hsusb-otg-phy-init-seq = <0x01 0x90 0xffffffff>; |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 84 | qcom,hsusb-otg-power-budget = <500>; |
| 85 | qcom,hsusb-otg-pclk-src-name = "dfab_usb_clk"; |
| 86 | qcom,hsusb-otg-pmic-id-irq = <47> |
Ido Shayevitz | a7114b9 | 2013-01-13 13:34:47 +0200 | [diff] [blame] | 87 | qcom,hsusb-otg-lpm-on-dev-suspend; |
Ido Shayevitz | 2619335 | 2013-01-21 23:16:54 +0200 | [diff] [blame] | 88 | qcom,hsusb-otg-clk-always-on-workaround; |
Mayank Rana | 0f286cf | 2013-02-27 11:43:27 +0530 | [diff] [blame] | 89 | hsusb_vdd_dig-supply = <&pm8226_s1_corner>; |
| 90 | HSUSB_1p8-supply = <&pm8226_l10>; |
| 91 | HSUSB_3p3-supply = <&pm8226_l20>; |
| 92 | qcom,vdd-voltage-level = <1 5 7>; |
Vamsi Krishna | 1a1684b | 2013-03-02 16:14:52 -0800 | [diff] [blame] | 93 | qcom,dp-manual-pullup; |
Manu Gautam | 2e8ac10 | 2012-08-31 11:41:16 -0700 | [diff] [blame] | 94 | qcom,msm_bus,name = "usb2"; |
| 95 | qcom,msm_bus,num_cases = <2>; |
| 96 | qcom,msm_bus,active_only = <0>; |
| 97 | qcom,msm_bus,num_paths = <1>; |
| 98 | qcom,msm_bus,vectors = |
| 99 | <87 512 0 0>, |
| 100 | <87 512 60000000 960000000>; |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 101 | }; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 102 | |
Vijayavardhan Vennapusa | 1f5da0b | 2013-01-08 20:03:57 +0530 | [diff] [blame] | 103 | MSM HSUSB EHCI controller |
| 104 | |
| 105 | Required properties : |
| 106 | - compatible : should be "qcom,ehci-host" |
| 107 | - reg : offset and length of the register set in the memory map |
| 108 | - interrupts: IRQ lines used by this controller |
| 109 | - interrupt-names : Required interrupt resource entries are: |
| 110 | HSUSB EHCI expects "core_irq" and optionally "async_irq". |
| 111 | - <supply-name>-supply: handle to the regulator device tree node |
| 112 | Required "supply-name" is "HSUSB_VDDCX" "HSUSB_1p8-supply" "HSUSB_3p3-supply". |
| 113 | - qcom,usb2-power-budget: maximum vbus power (in mA) that can be provided. |
| 114 | |
| 115 | Optional properties : |
| 116 | - qcom,usb2-enable-hsphy2: If present, select second PHY for USB operation. |
Shimrit Malichi | 36a0c85 | 2013-03-10 11:39:10 +0200 | [diff] [blame] | 117 | - qcom,pool-64-bit-align: If present then the pool's memory will be aligned |
| 118 | to 64 bits |
Shimrit Malichi | 82d7cbc | 2013-03-12 15:36:54 +0200 | [diff] [blame] | 119 | - qcom,enable_hbm: if present host bus manager is enabled. |
Vijayavardhan Vennapusa | 1f5da0b | 2013-01-08 20:03:57 +0530 | [diff] [blame] | 120 | |
| 121 | Example MSM HSUSB EHCI controller device node : |
| 122 | ehci: qcom,ehci-host@f9a55000 { |
| 123 | compatible = "qcom,ehci-host"; |
| 124 | reg = <0xf9a55000 0x400>; |
| 125 | interrupts = <0 134 0>, <0 140 0>; |
| 126 | interrupt-names = "core_irq", "async_irq"; |
| 127 | HSUSB_VDDCX-supply = <&pm8841_s2>; |
| 128 | HSUSB_1p8-supply = <&pm8941_l6>; |
| 129 | HSUSB_3p3-supply = <&pm8941_l24>; |
| 130 | qcom,usb2-enable-hsphy2; |
| 131 | qcom,usb2-power-budget = <500>; |
| 132 | }; |
| 133 | |
Manu Gautam | 43c61a1 | 2012-08-22 17:09:37 -0700 | [diff] [blame] | 134 | ANDROID USB: |
| 135 | |
| 136 | Required properties: |
| 137 | - compatible: should be "qcom,android-usb" |
| 138 | |
| 139 | Optional properties : |
Vijayavardhan Vennapusa | 8ceade8 | 2012-11-01 15:11:21 +0530 | [diff] [blame] | 140 | - reg : offset and length of memory region that is used by device to |
Manu Gautam | 43c61a1 | 2012-08-22 17:09:37 -0700 | [diff] [blame] | 141 | update USB PID and serial numbers used by bootloader in DLOAD mode. |
Vijayavardhan Vennapusa | 8ceade8 | 2012-11-01 15:11:21 +0530 | [diff] [blame] | 142 | - qcom,android-usb-swfi-latency : value to be used by device to vote |
| 143 | for DMA latency in microsecs. |
Manu Gautam | 43c61a1 | 2012-08-22 17:09:37 -0700 | [diff] [blame] | 144 | |
| 145 | Example Android USB device node : |
| 146 | android_usb@fc42b0c8 { |
| 147 | compatible = "qcom,android-usb"; |
| 148 | reg = <0xfc42b0c8 0xc8>; |
Vijayavardhan Vennapusa | 8ceade8 | 2012-11-01 15:11:21 +0530 | [diff] [blame] | 149 | qcom,android-usb-swfi-latency = <1>; |
Manu Gautam | 43c61a1 | 2012-08-22 17:09:37 -0700 | [diff] [blame] | 150 | }; |
| 151 | |
| 152 | |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 153 | BAM: |
| 154 | |
| 155 | Required properties: |
| 156 | - compatible: should be "qcom,usb-bam-msm" |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 157 | - reg : pairs of physical base addresses and region sizes |
| 158 | of all the memory mapped BAM devices present |
Jack Pham | d61ff56 | 2012-11-21 19:25:53 +0200 | [diff] [blame] | 159 | - reg-names : Register region name(s), in 1-1 correspondence with the |
| 160 | registers in 'reg'. This list should contain at least as many names |
| 161 | as the number of unique values given in both 'usb-active-bam' and |
| 162 | all the subnodes' 'usb-bam-type' properties. |
| 163 | |
| 164 | If SSUSB_BAM is used, "ssusb" should be present. |
| 165 | If HSUSB_BAM is used, "hsusb" should be present. |
| 166 | If HSIC_BAM is used, "hsic" should be present. |
| 167 | |
| 168 | If a QSCRATCH RAM1 register is designated for providing USB3 |
| 169 | private memory to use as a BAM FIFO, specify "qscratch_ram1_reg". |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 170 | - interrupts: IRQ lines for BAM devices |
Jack Pham | d61ff56 | 2012-11-21 19:25:53 +0200 | [diff] [blame] | 171 | - interrupt-names: BAM interrupt name(s), in 1-1 correspondence with |
| 172 | 'interrupts' above. |
| 173 | |
| 174 | If SSUSB_BAM is used, "ssusb" should be present. |
| 175 | If HSUSB_BAM is used, "hsusb" should be present. |
| 176 | If HSIC_BAM is used, "hsic" should be present. |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 177 | - qcom,usb-bam-num-pipes: max number of pipes that can be used |
Vamsi Krishna | fd09ddd | 2013-03-27 15:39:49 -0700 | [diff] [blame] | 178 | |
| 179 | Optional properties: |
| 180 | - qcom,usb-bam-fifo-baseaddr: base address for bam pipe's data and descriptor |
| 181 | fifos. This can be on chip memory (ocimem) or usb private memory. This |
| 182 | property is required if sub-node's mem-type is ocimem or usb private mem. |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 183 | |
| 184 | A number of USB BAM pipe parameters are represented as sub-nodes: |
| 185 | |
| 186 | Subnode Required: |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 187 | - label: a string describing uniquely the usb bam pipe. The string can be |
| 188 | constracted as follows: <core>-<peer>-<direction>-<pipe num>. |
| 189 | core options: hsusb, ssusb/dwc3, hsic |
| 190 | peer options: qdss, ipa, a2 |
| 191 | direction options: in (from peer to usb), out (from usb to peer) |
| 192 | pipe num options: 0..127 |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 193 | - qcom,usb-bam-mem-type: Type of memory used by this PIPE. Can be one of |
| 194 | 0 - Uses SPS's dedicated pipe memory |
Vamsi Krishna | fd09ddd | 2013-03-27 15:39:49 -0700 | [diff] [blame] | 195 | 1 - USB's private memory residing @ 'qcom,usb-bam-fifo-baseaddr' |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 196 | 2 - System RAM allocated by driver |
Vamsi Krishna | fd09ddd | 2013-03-27 15:39:49 -0700 | [diff] [blame] | 197 | 3 - OCI memory residing @ 'qcom,usb-bam-fifo-baseaddr' |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 198 | - qcom,bam-type: BAM type can be one of |
| 199 | 0 - SSUSB_BAM |
| 200 | 1 - HSUSB_BAM |
| 201 | 2 - HSIC_BAM |
| 202 | - qcom,dir: pipe direction |
| 203 | 0 - from usb (out) |
| 204 | 1 - to usb (in) |
| 205 | - qcom,pipe-num: pipe number |
| 206 | - qcom,peer-bam: peer BAM can be one of |
| 207 | 0 - A2_P_BAM |
| 208 | 1 - QDSS_P_BAM |
| 209 | 2 - IPA_P_BAM |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 210 | - qcom,data-fifo-size: data fifo size |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 211 | - qcom,descriptor-fifo-size: descriptor fifo size |
| 212 | |
Manu Gautam | 355270a | 2012-12-21 16:52:50 +0530 | [diff] [blame] | 213 | Optional Properties for Subnode: |
| 214 | - qcom,reset-bam-on-connect: If present then BAM is RESET before connecting |
| 215 | pipe. This may be required if BAM peripheral is also reset before connect. |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 216 | - qcom,dst-bam-physical-address: destination BAM physical address |
| 217 | - qcom,dst-bam-pipe-index: destination BAM pipe index |
| 218 | - qcom,src-bam-physical-address: source BAM physical address |
| 219 | - qcom,src-bam-pipe-index: source BAM pipe index |
| 220 | - qcom,data-fifo-offset: data fifo offset address |
| 221 | - qcom,descriptor-fifo-offset: descriptor fifo offset address |
Manu Gautam | 355270a | 2012-12-21 16:52:50 +0530 | [diff] [blame] | 222 | |
Manu Gautam | d21e228 | 2012-08-23 13:38:50 -0700 | [diff] [blame] | 223 | Optional properties : |
| 224 | - qcom,ignore-core-reset-ack: If present then BAM ignores ACK from USB core |
| 225 | while performing PIPE RESET |
repo sync | 985819e | 2013-01-16 19:37:05 +0200 | [diff] [blame] | 226 | - qcom,disable-clk-gating: If present then disable BAM clock gating. |
| 227 | |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 228 | Example USB BAM controller device node: |
| 229 | |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 230 | qcom,usbbam@f9a44000 { |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 231 | compatible = "qcom,usb-bam-msm"; |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 232 | reg = <0xf9a44000 0x11000>; |
| 233 | reg-names = "hsusb"; |
| 234 | interrupts = <0 135 0>; |
| 235 | interrupt-names = "hsusb"; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 236 | qcom,usb-bam-num-pipes = <16>; |
Manu Gautam | d21e228 | 2012-08-23 13:38:50 -0700 | [diff] [blame] | 237 | qcom,ignore-core-reset-ack; |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 238 | qcom,disable-clk-gating; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 239 | |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 240 | qcom,pipe0 { |
| 241 | label = "hsusb-ipa-out-0"; |
| 242 | qcom,usb-bam-mem-type = <0>; |
| 243 | qcom,bam-type = <1>; |
| 244 | qcom,dir = <0>; |
| 245 | qcom,pipe-num = <0>; |
| 246 | qcom,peer-bam = <2>; |
| 247 | qcom,src-bam-physical-address = <0xf9a44000>; |
| 248 | qcom,src-bam-pipe-index = <1>; |
| 249 | qcom,data-fifo-offset = <0x2200>; |
| 250 | qcom,data-fifo-size = <0x1e00>; |
| 251 | qcom,descriptor-fifo-offset = <0x2100>; |
| 252 | qcom,descriptor-fifo-size = <0x100>; |
| 253 | }; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 254 | qcom,pipe1 { |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 255 | label = "hsusb-ipa-in-0"; |
| 256 | qcom,usb-bam-mem-type = <0>; |
| 257 | qcom,bam-type = <1>; |
| 258 | qcom,dir = <1>; |
| 259 | qcom,pipe-num = <0>; |
| 260 | qcom,peer-bam = <2>; |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 261 | qcom,dst-bam-physical-address = <0xf9a44000>; |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 262 | qcom,dst-bam-pipe-index = <0>; |
| 263 | qcom,data-fifo-offset = <0x300>; |
| 264 | qcom,data-fifo-size = <0x1e00>; |
| 265 | qcom,descriptor-fifo-offset = <0>; |
| 266 | qcom,descriptor-fifo-size = <0x300>; |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 267 | }; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 268 | }; |