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) |
| 25 | |
| 26 | Optional properties : |
Manu Gautam | 0ddbd92 | 2012-09-21 17:17:38 +0530 | [diff] [blame] | 27 | - qcom,hsusb-otg-disable-reset: If present then core is RESET only during |
| 28 | init, otherwise core is RESET for every cable disconnect as well |
| 29 | - qcom,hsusb-otg-pnoc-errata-fix: If present then workaround for PNOC |
| 30 | performance issue is applied which requires changing the mem-type |
| 31 | attribute via VMIDMT. |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 32 | - qcom,hsusb-otg-default-mode: The default USB mode after boot-up. |
| 33 | Applicable only when OTG is controlled by user. Can be one of |
| 34 | 0 - None. Low power mode |
| 35 | 1 - Peripheral |
| 36 | 2 - Host |
| 37 | - qcom,hsusb-otg-phy-init-seq: PHY configuration sequence. val, reg pairs |
| 38 | terminate with -1 |
| 39 | - qcom,hsusb-otg-power-budget: VBUS power budget in mA |
| 40 | 0 will be treated as 500mA |
| 41 | - qcom,hsusb-otg-pclk-src-name: The source of pclk |
| 42 | - qcom,hsusb-otg-pmic-id-irq: ID, routed to PMIC IRQ number |
Manu Gautam | 2e8ac10 | 2012-08-31 11:41:16 -0700 | [diff] [blame] | 43 | - Refer to "Documentation/devicetree/bindings/arm/msm/msm_bus.txt" for |
| 44 | below optional properties: |
| 45 | - qcom,msm_bus,name |
| 46 | - qcom,msm_bus,num_cases |
| 47 | - qcom,msm_bus,active_only |
| 48 | - qcom,msm_bus,num_paths |
| 49 | - qcom,msm_bus,vectors |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 50 | |
| 51 | Example HSUSB OTG controller device node : |
David Brown | 225abee | 2012-02-09 22:28:50 -0800 | [diff] [blame] | 52 | usb@f9690000 { |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 53 | compatible = "qcom,hsusb-otg"; |
David Brown | 225abee | 2012-02-09 22:28:50 -0800 | [diff] [blame] | 54 | reg = <0xf9690000 0x400>; |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 55 | interrupts = <134>; |
Jack Pham | 3f4459e | 2012-09-28 15:55:16 -0700 | [diff] [blame] | 56 | interrupt-names = "core_irq"; |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 57 | |
| 58 | qcom,hsusb-otg-phy-type = <2>; |
| 59 | qcom,hsusb-otg-mode = <1>; |
| 60 | qcom,hsusb-otg-otg-control = <1>; |
Manu Gautam | bd53fba | 2012-07-31 16:13:06 +0530 | [diff] [blame] | 61 | qcom,hsusb-otg-disable-reset; |
Manu Gautam | 0ddbd92 | 2012-09-21 17:17:38 +0530 | [diff] [blame] | 62 | qcom,hsusb-otg-pnoc-errata-fix; |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 63 | qcom,hsusb-otg-default-mode = <2>; |
David Brown | 225abee | 2012-02-09 22:28:50 -0800 | [diff] [blame] | 64 | qcom,hsusb-otg-phy-init-seq = <0x01 0x90 0xffffffff>; |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 65 | qcom,hsusb-otg-power-budget = <500>; |
| 66 | qcom,hsusb-otg-pclk-src-name = "dfab_usb_clk"; |
| 67 | qcom,hsusb-otg-pmic-id-irq = <47> |
Manu Gautam | 2e8ac10 | 2012-08-31 11:41:16 -0700 | [diff] [blame] | 68 | |
| 69 | qcom,msm_bus,name = "usb2"; |
| 70 | qcom,msm_bus,num_cases = <2>; |
| 71 | qcom,msm_bus,active_only = <0>; |
| 72 | qcom,msm_bus,num_paths = <1>; |
| 73 | qcom,msm_bus,vectors = |
| 74 | <87 512 0 0>, |
| 75 | <87 512 60000000 960000000>; |
Pavankumar Kondeti | eaea7fe | 2011-10-27 14:46:45 +0530 | [diff] [blame] | 76 | }; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 77 | |
Manu Gautam | 43c61a1 | 2012-08-22 17:09:37 -0700 | [diff] [blame] | 78 | ANDROID USB: |
| 79 | |
| 80 | Required properties: |
| 81 | - compatible: should be "qcom,android-usb" |
| 82 | |
| 83 | Optional properties : |
Vijayavardhan Vennapusa | 8ceade8 | 2012-11-01 15:11:21 +0530 | [diff] [blame] | 84 | - 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] | 85 | update USB PID and serial numbers used by bootloader in DLOAD mode. |
Vijayavardhan Vennapusa | 8ceade8 | 2012-11-01 15:11:21 +0530 | [diff] [blame] | 86 | - qcom,android-usb-swfi-latency : value to be used by device to vote |
| 87 | for DMA latency in microsecs. |
Manu Gautam | 43c61a1 | 2012-08-22 17:09:37 -0700 | [diff] [blame] | 88 | |
| 89 | Example Android USB device node : |
| 90 | android_usb@fc42b0c8 { |
| 91 | compatible = "qcom,android-usb"; |
| 92 | reg = <0xfc42b0c8 0xc8>; |
Vijayavardhan Vennapusa | 8ceade8 | 2012-11-01 15:11:21 +0530 | [diff] [blame] | 93 | qcom,android-usb-swfi-latency = <1>; |
Manu Gautam | 43c61a1 | 2012-08-22 17:09:37 -0700 | [diff] [blame] | 94 | }; |
| 95 | |
| 96 | |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 97 | BAM: |
| 98 | |
| 99 | Required properties: |
| 100 | - compatible: should be "qcom,usb-bam-msm" |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 101 | - reg : pairs of physical base addresses and region sizes |
| 102 | of all the memory mapped BAM devices present |
Jack Pham | d61ff56 | 2012-11-21 19:25:53 +0200 | [diff] [blame] | 103 | - reg-names : Register region name(s), in 1-1 correspondence with the |
| 104 | registers in 'reg'. This list should contain at least as many names |
| 105 | as the number of unique values given in both 'usb-active-bam' and |
| 106 | all the subnodes' 'usb-bam-type' properties. |
| 107 | |
| 108 | If SSUSB_BAM is used, "ssusb" should be present. |
| 109 | If HSUSB_BAM is used, "hsusb" should be present. |
| 110 | If HSIC_BAM is used, "hsic" should be present. |
| 111 | |
| 112 | If a QSCRATCH RAM1 register is designated for providing USB3 |
| 113 | private memory to use as a BAM FIFO, specify "qscratch_ram1_reg". |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 114 | - interrupts: IRQ lines for BAM devices |
Jack Pham | d61ff56 | 2012-11-21 19:25:53 +0200 | [diff] [blame] | 115 | - interrupt-names: BAM interrupt name(s), in 1-1 correspondence with |
| 116 | 'interrupts' above. |
| 117 | |
| 118 | If SSUSB_BAM is used, "ssusb" should be present. |
| 119 | If HSUSB_BAM is used, "hsusb" should be present. |
| 120 | If HSIC_BAM is used, "hsic" should be present. |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 121 | - qcom,usb-active-bam: active BAM type. Can be one of |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 122 | 0 - SSUSB_BAM |
| 123 | 1 - HSUSB_BAM |
| 124 | 2 - HSIC_BAM |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 125 | - qcom,usb-total-bam-num: total number of BAMs that are supported |
| 126 | - qcom,usb-bam-num-pipes: max number of pipes that can be used |
| 127 | - qcom,usb-base-address: physical base address of the BAM |
| 128 | |
| 129 | A number of USB BAM pipe parameters are represented as sub-nodes: |
| 130 | |
| 131 | Subnode Required: |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 132 | - label: a string describing the pipe's direction and BAM instance under use |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 133 | - qcom,usb-bam-type: BAM type. Can be one of |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 134 | 0 - SSUSB_BAM |
| 135 | 1 - HSUSB_BAM |
| 136 | 2 - HSIC_BAM |
| 137 | - qcom,usb-bam-mem-type: Type of memory used by this PIPE. Can be one of |
| 138 | 0 - Uses SPS's dedicated pipe memory |
| 139 | 1 - USB's private memory residing @ 'qcom,usb-base-address' |
| 140 | 2 - System RAM allocated by driver |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 141 | - qcom,src-bam-physical-address: source BAM physical address |
| 142 | - qcom,src-bam-pipe-index: source BAM pipe index |
| 143 | - qcom,dst-bam-physical-address: destination BAM physical address |
| 144 | - qcom,dst-bam-pipe-index: destination BAM pipe index |
| 145 | - qcom,data-fifo-offset: data fifo offset address |
| 146 | - qcom,data-fifo-size: data fifo size |
| 147 | - qcom,descriptor-fifo-offset: descriptor fifo offset address |
| 148 | - qcom,descriptor-fifo-size: descriptor fifo size |
| 149 | |
Manu Gautam | 355270a | 2012-12-21 16:52:50 +0530 | [diff] [blame^] | 150 | Optional Properties for Subnode: |
| 151 | - qcom,reset-bam-on-connect: If present then BAM is RESET before connecting |
| 152 | pipe. This may be required if BAM peripheral is also reset before connect. |
| 153 | |
Manu Gautam | d21e228 | 2012-08-23 13:38:50 -0700 | [diff] [blame] | 154 | Optional properties : |
| 155 | - qcom,ignore-core-reset-ack: If present then BAM ignores ACK from USB core |
| 156 | while performing PIPE RESET |
| 157 | |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 158 | Example USB BAM controller device node: |
| 159 | |
| 160 | qcom,usbbam@f9304000 { |
| 161 | compatible = "qcom,usb-bam-msm"; |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 162 | reg = <0xf9304000 0x5000>, |
Manu Gautam | 4658d89 | 2012-08-20 18:24:52 -0700 | [diff] [blame] | 163 | <0xf9a44000 0x11000>, |
| 164 | <0xf92f880c 0x4>; |
| 165 | reg-names = "ssusb", "hsusb", "qscratch_ram1_reg"; |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 166 | interrupts = <0 132 0 0 135 0>; |
| 167 | interrupt-names = "ssusb", "hsusb"; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 168 | qcom,usb-active-bam = <0>; |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 169 | qcom,usb-total-bam-num = <2>; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 170 | qcom,usb-bam-num-pipes = <16>; |
| 171 | qcom,usb-base-address = <0xf9200000>; |
Manu Gautam | d21e228 | 2012-08-23 13:38:50 -0700 | [diff] [blame] | 172 | qcom,ignore-core-reset-ack; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 173 | |
| 174 | qcom,pipe1 { |
| 175 | label = "usb-to-peri-qdss-dwc3"; |
| 176 | qcom,usb-bam-type = <0>; |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 177 | qcom,usb-bam-mem-type = <1>; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 178 | qcom,src-bam-physical-address = <0>; |
| 179 | qcom,src-bam-pipe-index = <0>; |
| 180 | qcom,dst-bam-physical-address = <0>; |
| 181 | qcom,dst-bam-pipe-index = <0>; |
| 182 | qcom,data-fifo-offset = <0>; |
| 183 | qcom,data-fifo-size = <0>; |
| 184 | qcom,descriptor-fifo-offset = <0>; |
| 185 | qcom,descriptor-fifo-size = <0>; |
| 186 | }; |
| 187 | |
| 188 | qcom,pipe2 { |
| 189 | label = "peri-to-usb-qdss-dwc3"; |
| 190 | qcom,usb-bam-type = <0>; |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 191 | qcom,usb-bam-mem-type = <1>; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 192 | qcom,src-bam-physical-address = <0xfc37C000>; |
| 193 | qcom,src-bam-pipe-index = <0>; |
| 194 | qcom,dst-bam-physical-address = <0xf9304000>; |
| 195 | qcom,dst-bam-pipe-index = <2>; |
| 196 | qcom,data-fifo-offset = <0xf0000>; |
| 197 | qcom,data-fifo-size = <0x4000>; |
| 198 | qcom,descriptor-fifo-offset = <0xf4000>; |
| 199 | qcom,descriptor-fifo-size = <0x1400>; |
Manu Gautam | 355270a | 2012-12-21 16:52:50 +0530 | [diff] [blame^] | 200 | qcom,reset-bam-on-connect; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 201 | }; |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 202 | |
| 203 | qcom,pipe3 { |
| 204 | label = "usb-to-peri-qdss-hsusb"; |
| 205 | qcom,usb-bam-type = <1>; |
Manu Gautam | 4658d89 | 2012-08-20 18:24:52 -0700 | [diff] [blame] | 206 | qcom,usb-bam-mem-type = <1>; |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 207 | qcom,src-bam-physical-address = <0>; |
| 208 | qcom,src-bam-pipe-index = <0>; |
| 209 | qcom,dst-bam-physical-address = <0>; |
| 210 | qcom,dst-bam-pipe-index = <0>; |
| 211 | qcom,data-fifo-offset = <0>; |
| 212 | qcom,data-fifo-size = <0>; |
| 213 | qcom,descriptor-fifo-offset = <0>; |
| 214 | qcom,descriptor-fifo-size = <0>; |
| 215 | }; |
| 216 | |
| 217 | qcom,pipe4 { |
| 218 | label = "peri-to-usb-qdss-hsusb"; |
| 219 | qcom,usb-bam-type = <1>; |
Manu Gautam | 4658d89 | 2012-08-20 18:24:52 -0700 | [diff] [blame] | 220 | qcom,usb-bam-mem-type = <1>; |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 221 | qcom,src-bam-physical-address = <0xfc37c000>; |
| 222 | qcom,src-bam-pipe-index = <0>; |
| 223 | qcom,dst-bam-physical-address = <0xf9a44000>; |
| 224 | qcom,dst-bam-pipe-index = <2>; |
Manu Gautam | 4658d89 | 2012-08-20 18:24:52 -0700 | [diff] [blame] | 225 | qcom,data-fifo-offset = <0xf4000>; |
| 226 | qcom,data-fifo-size = <0x1000>; |
| 227 | qcom,descriptor-fifo-offset = <0xf5000>; |
| 228 | qcom,descriptor-fifo-size = <0x400>; |
Manu Gautam | 6afd587 | 2012-07-25 09:16:55 +0530 | [diff] [blame] | 229 | }; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 230 | }; |