blob: de1577dfe15f5f3140624559ebaf0479551c187e [file] [log] [blame]
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +05301MSM SoC HSUSB controllers
2
3OTG:
4
5Required 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 Pham3f4459e2012-09-28 15:55:16 -07009- interrupt-names: OTG interrupt name(s) referenced in interrupts above
Manu Gautam0e0c53f2013-04-04 10:55:20 +053010 HSUSB OTG expects "core_irq" which is IRQ line from CORE and
11 optional ones are described in next section.
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053012- qcom,hsusb-otg-phy-type: PHY type can be one of
13 1 - Chipidea 45nm PHY
14 2 - Synopsis 28nm PHY
15- qcom,hsusb-otg-mode: Operational mode. Can be one of
16 1 - Peripheral only mode
17 2 - Host only mode
18 3 - OTG mode
19 Based on the mode, OTG driver registers platform devices for
20 gadget and host.
21- qcom,hsusb-otg-control: OTG control (VBUS and ID notifications)
22 can be one of
23 1 - PHY control
24 2 - PMIC control
25 3 - User control (via debugfs)
Manu Gautam57c938e2013-04-04 11:39:13 +053026- <supply-name>-supply: handle to the regulator device tree node
27 Required "supply-name" is "HSUSB_VDDCX" (when voting for VDDCX) or
28 "hsusb_vdd_dig" (when voting for VDDCX Corner voltage),
29 "HSUSB_1p8-supply" and "HSUSB_3p3-supply".
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053030
31Optional properties :
Manu Gautam0e0c53f2013-04-04 10:55:20 +053032- interrupt-names : Optional interrupt resource entries are:
33 "async_irq" : Interrupt from HSPHY for asynchronous wakeup events in LPM.
34 "pmic_id_irq" : Interrupt from PMIC for external ID pin notification.
Manu Gautam0ddbd922012-09-21 17:17:38 +053035- qcom,hsusb-otg-disable-reset: If present then core is RESET only during
36 init, otherwise core is RESET for every cable disconnect as well
37- qcom,hsusb-otg-pnoc-errata-fix: If present then workaround for PNOC
38 performance issue is applied which requires changing the mem-type
39 attribute via VMIDMT.
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053040- qcom,hsusb-otg-default-mode: The default USB mode after boot-up.
41 Applicable only when OTG is controlled by user. Can be one of
42 0 - None. Low power mode
43 1 - Peripheral
44 2 - Host
45- qcom,hsusb-otg-phy-init-seq: PHY configuration sequence. val, reg pairs
46 terminate with -1
47- qcom,hsusb-otg-power-budget: VBUS power budget in mA
48 0 will be treated as 500mA
49- qcom,hsusb-otg-pclk-src-name: The source of pclk
Manu Gautam2e8ac102012-08-31 11:41:16 -070050- Refer to "Documentation/devicetree/bindings/arm/msm/msm_bus.txt" for
51 below optional properties:
52 - qcom,msm_bus,name
53 - qcom,msm_bus,num_cases
54 - qcom,msm_bus,active_only
55 - qcom,msm_bus,num_paths
56 - qcom,msm_bus,vectors
Ido Shayevitza7114b92013-01-13 13:34:47 +020057- qcom,hsusb-otg-lpm-on-dev-suspend: If present then USB enter to
58 low power mode upon receiving bus suspend.
Ido Shayevitz26193352013-01-21 23:16:54 +020059- 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.
Shimrit Malichiffab5b02013-03-10 11:06:16 +020062- qcom,hsusb-otg-delay-lpm: If present then USB core will wait one second
63 after disconnect before entering low power mode.
Lena Salmanabde35d2013-04-25 15:29:43 +030064- 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.
Manu Gautam57c938e2013-04-04 11:39:13 +053067- <supply-name>-supply: handle to the regulator device tree node.
68 Optional "supply-name" is "vbus_otg" to supply vbus in host mode.
Mayank Rana0f286cf2013-02-27 11:43:27 +053069- 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.
Vamsi Krishna1a1684b2013-03-02 16:14:52 -080072- 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.
Manu Gautam0fd2d0e2013-03-26 18:09:11 +053075- qcom,usb2-enable-hsphy2: If present then USB2 controller is connected to 2nd
76 HSPHY.
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053077
78Example HSUSB OTG controller device node :
David Brown225abee2012-02-09 22:28:50 -080079 usb@f9690000 {
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053080 compatible = "qcom,hsusb-otg";
David Brown225abee2012-02-09 22:28:50 -080081 reg = <0xf9690000 0x400>;
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053082 interrupts = <134>;
Jack Pham3f4459e2012-09-28 15:55:16 -070083 interrupt-names = "core_irq";
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053084
85 qcom,hsusb-otg-phy-type = <2>;
86 qcom,hsusb-otg-mode = <1>;
87 qcom,hsusb-otg-otg-control = <1>;
Manu Gautambd53fba2012-07-31 16:13:06 +053088 qcom,hsusb-otg-disable-reset;
Manu Gautam0ddbd922012-09-21 17:17:38 +053089 qcom,hsusb-otg-pnoc-errata-fix;
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053090 qcom,hsusb-otg-default-mode = <2>;
David Brown225abee2012-02-09 22:28:50 -080091 qcom,hsusb-otg-phy-init-seq = <0x01 0x90 0xffffffff>;
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053092 qcom,hsusb-otg-power-budget = <500>;
93 qcom,hsusb-otg-pclk-src-name = "dfab_usb_clk";
Ido Shayevitza7114b92013-01-13 13:34:47 +020094 qcom,hsusb-otg-lpm-on-dev-suspend;
Ido Shayevitz26193352013-01-21 23:16:54 +020095 qcom,hsusb-otg-clk-always-on-workaround;
Mayank Rana0f286cf2013-02-27 11:43:27 +053096 hsusb_vdd_dig-supply = <&pm8226_s1_corner>;
97 HSUSB_1p8-supply = <&pm8226_l10>;
98 HSUSB_3p3-supply = <&pm8226_l20>;
99 qcom,vdd-voltage-level = <1 5 7>;
Vamsi Krishna1a1684b2013-03-02 16:14:52 -0800100 qcom,dp-manual-pullup;
Manu Gautam2e8ac102012-08-31 11:41:16 -0700101 qcom,msm_bus,name = "usb2";
102 qcom,msm_bus,num_cases = <2>;
103 qcom,msm_bus,active_only = <0>;
104 qcom,msm_bus,num_paths = <1>;
105 qcom,msm_bus,vectors =
106 <87 512 0 0>,
107 <87 512 60000000 960000000>;
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +0530108 };
Shimrit Malichi255b5342012-08-02 21:01:43 +0300109
Vijayavardhan Vennapusa1f5da0b2013-01-08 20:03:57 +0530110MSM HSUSB EHCI controller
111
112Required properties :
113- compatible : should be "qcom,ehci-host"
114- reg : offset and length of the register set in the memory map
115- interrupts: IRQ lines used by this controller
116- interrupt-names : Required interrupt resource entries are:
117 HSUSB EHCI expects "core_irq" and optionally "async_irq".
118- <supply-name>-supply: handle to the regulator device tree node
119 Required "supply-name" is "HSUSB_VDDCX" "HSUSB_1p8-supply" "HSUSB_3p3-supply".
120- qcom,usb2-power-budget: maximum vbus power (in mA) that can be provided.
121
122Optional properties :
123- qcom,usb2-enable-hsphy2: If present, select second PHY for USB operation.
Shimrit Malichi36a0c852013-03-10 11:39:10 +0200124- qcom,pool-64-bit-align: If present then the pool's memory will be aligned
125 to 64 bits
Shimrit Malichi82d7cbc2013-03-12 15:36:54 +0200126- qcom,enable_hbm: if present host bus manager is enabled.
Shimrit Malichi08f07342013-04-24 13:09:12 +0300127- qcom,disable-park-mode: if present park mode is enabled. Park mode enables executing
128 up to 3 usb packets from each QH.
Vijayavardhan Vennapusa1f5da0b2013-01-08 20:03:57 +0530129
130Example MSM HSUSB EHCI controller device node :
131 ehci: qcom,ehci-host@f9a55000 {
132 compatible = "qcom,ehci-host";
133 reg = <0xf9a55000 0x400>;
134 interrupts = <0 134 0>, <0 140 0>;
135 interrupt-names = "core_irq", "async_irq";
136 HSUSB_VDDCX-supply = <&pm8841_s2>;
137 HSUSB_1p8-supply = <&pm8941_l6>;
138 HSUSB_3p3-supply = <&pm8941_l24>;
139 qcom,usb2-enable-hsphy2;
140 qcom,usb2-power-budget = <500>;
141 };
142
Manu Gautam43c61a12012-08-22 17:09:37 -0700143ANDROID USB:
144
145Required properties:
146- compatible: should be "qcom,android-usb"
147
148Optional properties :
Vijayavardhan Vennapusa8ceade82012-11-01 15:11:21 +0530149- reg : offset and length of memory region that is used by device to
Manu Gautam43c61a12012-08-22 17:09:37 -0700150 update USB PID and serial numbers used by bootloader in DLOAD mode.
Vijayavardhan Vennapusa8ceade82012-11-01 15:11:21 +0530151- qcom,android-usb-swfi-latency : value to be used by device to vote
152 for DMA latency in microsecs.
Chiranjeevi Velempati9d797662013-04-22 15:45:38 +0530153- qcom,android-usb-cdrom : if this property is present then device creates
154 a new LUN as CD-ROM
Manu Gautam43c61a12012-08-22 17:09:37 -0700155
156Example Android USB device node :
157 android_usb@fc42b0c8 {
158 compatible = "qcom,android-usb";
159 reg = <0xfc42b0c8 0xc8>;
Vijayavardhan Vennapusa8ceade82012-11-01 15:11:21 +0530160 qcom,android-usb-swfi-latency = <1>;
Manu Gautam43c61a12012-08-22 17:09:37 -0700161 };
162
163
Shimrit Malichi255b5342012-08-02 21:01:43 +0300164BAM:
165
166Required properties:
167- compatible: should be "qcom,usb-bam-msm"
Manu Gautam6afd5872012-07-25 09:16:55 +0530168- reg : pairs of physical base addresses and region sizes
169 of all the memory mapped BAM devices present
Jack Phamd61ff562012-11-21 19:25:53 +0200170- reg-names : Register region name(s), in 1-1 correspondence with the
171 registers in 'reg'. This list should contain at least as many names
172 as the number of unique values given in both 'usb-active-bam' and
173 all the subnodes' 'usb-bam-type' properties.
174
175 If SSUSB_BAM is used, "ssusb" should be present.
176 If HSUSB_BAM is used, "hsusb" should be present.
177 If HSIC_BAM is used, "hsic" should be present.
178
179 If a QSCRATCH RAM1 register is designated for providing USB3
180 private memory to use as a BAM FIFO, specify "qscratch_ram1_reg".
Manu Gautam6afd5872012-07-25 09:16:55 +0530181- interrupts: IRQ lines for BAM devices
Jack Phamd61ff562012-11-21 19:25:53 +0200182- interrupt-names: BAM interrupt name(s), in 1-1 correspondence with
183 'interrupts' above.
184
185 If SSUSB_BAM is used, "ssusb" should be present.
186 If HSUSB_BAM is used, "hsusb" should be present.
187 If HSIC_BAM is used, "hsic" should be present.
Shimrit Malichi255b5342012-08-02 21:01:43 +0300188- qcom,usb-bam-num-pipes: max number of pipes that can be used
Vamsi Krishnafd09ddd2013-03-27 15:39:49 -0700189
190Optional properties:
191- qcom,usb-bam-fifo-baseaddr: base address for bam pipe's data and descriptor
192 fifos. This can be on chip memory (ocimem) or usb private memory. This
193 property is required if sub-node's mem-type is ocimem or usb private mem.
Shimrit Malichi255b5342012-08-02 21:01:43 +0300194
195A number of USB BAM pipe parameters are represented as sub-nodes:
196
197Subnode Required:
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200198- label: a string describing uniquely the usb bam pipe. The string can be
199 constracted as follows: <core>-<peer>-<direction>-<pipe num>.
200 core options: hsusb, ssusb/dwc3, hsic
201 peer options: qdss, ipa, a2
202 direction options: in (from peer to usb), out (from usb to peer)
203 pipe num options: 0..127
Manu Gautam6afd5872012-07-25 09:16:55 +0530204- qcom,usb-bam-mem-type: Type of memory used by this PIPE. Can be one of
205 0 - Uses SPS's dedicated pipe memory
Vamsi Krishnafd09ddd2013-03-27 15:39:49 -0700206 1 - USB's private memory residing @ 'qcom,usb-bam-fifo-baseaddr'
Manu Gautam6afd5872012-07-25 09:16:55 +0530207 2 - System RAM allocated by driver
Vamsi Krishnafd09ddd2013-03-27 15:39:49 -0700208 3 - OCI memory residing @ 'qcom,usb-bam-fifo-baseaddr'
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200209- qcom,bam-type: BAM type can be one of
210 0 - SSUSB_BAM
211 1 - HSUSB_BAM
212 2 - HSIC_BAM
213- qcom,dir: pipe direction
214 0 - from usb (out)
215 1 - to usb (in)
216- qcom,pipe-num: pipe number
217- qcom,peer-bam: peer BAM can be one of
218 0 - A2_P_BAM
219 1 - QDSS_P_BAM
220 2 - IPA_P_BAM
Shimrit Malichi255b5342012-08-02 21:01:43 +0300221- qcom,data-fifo-size: data fifo size
Shimrit Malichi255b5342012-08-02 21:01:43 +0300222- qcom,descriptor-fifo-size: descriptor fifo size
223
Manu Gautam355270a2012-12-21 16:52:50 +0530224Optional Properties for Subnode:
225- qcom,reset-bam-on-connect: If present then BAM is RESET before connecting
226 pipe. This may be required if BAM peripheral is also reset before connect.
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200227- qcom,dst-bam-physical-address: destination BAM physical address
228- qcom,dst-bam-pipe-index: destination BAM pipe index
229- qcom,src-bam-physical-address: source BAM physical address
230- qcom,src-bam-pipe-index: source BAM pipe index
231- qcom,data-fifo-offset: data fifo offset address
232- qcom,descriptor-fifo-offset: descriptor fifo offset address
Manu Gautam355270a2012-12-21 16:52:50 +0530233
Manu Gautamd21e2282012-08-23 13:38:50 -0700234Optional properties :
235- qcom,ignore-core-reset-ack: If present then BAM ignores ACK from USB core
236 while performing PIPE RESET
repo sync985819e2013-01-16 19:37:05 +0200237- qcom,disable-clk-gating: If present then disable BAM clock gating.
238
Shimrit Malichi255b5342012-08-02 21:01:43 +0300239Example USB BAM controller device node:
240
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200241 qcom,usbbam@f9a44000 {
Shimrit Malichi255b5342012-08-02 21:01:43 +0300242 compatible = "qcom,usb-bam-msm";
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200243 reg = <0xf9a44000 0x11000>;
244 reg-names = "hsusb";
245 interrupts = <0 135 0>;
246 interrupt-names = "hsusb";
Shimrit Malichi255b5342012-08-02 21:01:43 +0300247 qcom,usb-bam-num-pipes = <16>;
Manu Gautamd21e2282012-08-23 13:38:50 -0700248 qcom,ignore-core-reset-ack;
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200249 qcom,disable-clk-gating;
Shimrit Malichi255b5342012-08-02 21:01:43 +0300250
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200251 qcom,pipe0 {
252 label = "hsusb-ipa-out-0";
253 qcom,usb-bam-mem-type = <0>;
254 qcom,bam-type = <1>;
255 qcom,dir = <0>;
256 qcom,pipe-num = <0>;
257 qcom,peer-bam = <2>;
258 qcom,src-bam-physical-address = <0xf9a44000>;
259 qcom,src-bam-pipe-index = <1>;
260 qcom,data-fifo-offset = <0x2200>;
261 qcom,data-fifo-size = <0x1e00>;
262 qcom,descriptor-fifo-offset = <0x2100>;
263 qcom,descriptor-fifo-size = <0x100>;
264 };
Shimrit Malichi255b5342012-08-02 21:01:43 +0300265 qcom,pipe1 {
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200266 label = "hsusb-ipa-in-0";
267 qcom,usb-bam-mem-type = <0>;
268 qcom,bam-type = <1>;
269 qcom,dir = <1>;
270 qcom,pipe-num = <0>;
271 qcom,peer-bam = <2>;
Manu Gautam6afd5872012-07-25 09:16:55 +0530272 qcom,dst-bam-physical-address = <0xf9a44000>;
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200273 qcom,dst-bam-pipe-index = <0>;
274 qcom,data-fifo-offset = <0x300>;
275 qcom,data-fifo-size = <0x1e00>;
276 qcom,descriptor-fifo-offset = <0>;
277 qcom,descriptor-fifo-size = <0x300>;
Manu Gautam6afd5872012-07-25 09:16:55 +0530278 };
Shimrit Malichi255b5342012-08-02 21:01:43 +0300279 };