blob: c1d4a054a833eb23fc5f4a6fafbe0fca932d174d [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
10 HSUSB OTG expects "core_irq" and optionally "async_irq".
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053011- 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 Gautam57c938e2013-04-04 11:39:13 +053025- <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 Kondetieaea7fe2011-10-27 14:46:45 +053029
30Optional properties :
Manu Gautam0ddbd922012-09-21 17:17:38 +053031- 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 Kondetieaea7fe2011-10-27 14:46:45 +053036- 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 Gautam2e8ac102012-08-31 11:41:16 -070047- 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 Shayevitza7114b92013-01-13 13:34:47 +020054- qcom,hsusb-otg-lpm-on-dev-suspend: If present then USB enter to
55 low power mode upon receiving bus suspend.
Ido Shayevitz26193352013-01-21 23:16:54 +020056- 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 Malichiffab5b02013-03-10 11:06:16 +020059- qcom,hsusb-otg-delay-lpm: If present then USB core will wait one second
60 after disconnect before entering low power mode.
Manu Gautam57c938e2013-04-04 11:39:13 +053061- <supply-name>-supply: handle to the regulator device tree node.
62 Optional "supply-name" is "vbus_otg" to supply vbus in host mode.
Mayank Rana0f286cf2013-02-27 11:43:27 +053063- 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 Krishna1a1684b2013-03-02 16:14:52 -080066- 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 Kondetieaea7fe2011-10-27 14:46:45 +053069
70Example HSUSB OTG controller device node :
David Brown225abee2012-02-09 22:28:50 -080071 usb@f9690000 {
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053072 compatible = "qcom,hsusb-otg";
David Brown225abee2012-02-09 22:28:50 -080073 reg = <0xf9690000 0x400>;
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053074 interrupts = <134>;
Jack Pham3f4459e2012-09-28 15:55:16 -070075 interrupt-names = "core_irq";
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053076
77 qcom,hsusb-otg-phy-type = <2>;
78 qcom,hsusb-otg-mode = <1>;
79 qcom,hsusb-otg-otg-control = <1>;
Manu Gautambd53fba2012-07-31 16:13:06 +053080 qcom,hsusb-otg-disable-reset;
Manu Gautam0ddbd922012-09-21 17:17:38 +053081 qcom,hsusb-otg-pnoc-errata-fix;
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053082 qcom,hsusb-otg-default-mode = <2>;
David Brown225abee2012-02-09 22:28:50 -080083 qcom,hsusb-otg-phy-init-seq = <0x01 0x90 0xffffffff>;
Pavankumar Kondetieaea7fe2011-10-27 14:46:45 +053084 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 Shayevitza7114b92013-01-13 13:34:47 +020087 qcom,hsusb-otg-lpm-on-dev-suspend;
Ido Shayevitz26193352013-01-21 23:16:54 +020088 qcom,hsusb-otg-clk-always-on-workaround;
Mayank Rana0f286cf2013-02-27 11:43:27 +053089 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 Krishna1a1684b2013-03-02 16:14:52 -080093 qcom,dp-manual-pullup;
Manu Gautam2e8ac102012-08-31 11:41:16 -070094 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 Kondetieaea7fe2011-10-27 14:46:45 +0530101 };
Shimrit Malichi255b5342012-08-02 21:01:43 +0300102
Vijayavardhan Vennapusa1f5da0b2013-01-08 20:03:57 +0530103MSM HSUSB EHCI controller
104
105Required 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
115Optional properties :
116- qcom,usb2-enable-hsphy2: If present, select second PHY for USB operation.
Shimrit Malichi36a0c852013-03-10 11:39:10 +0200117- qcom,pool-64-bit-align: If present then the pool's memory will be aligned
118 to 64 bits
Shimrit Malichi82d7cbc2013-03-12 15:36:54 +0200119- qcom,enable_hbm: if present host bus manager is enabled.
Vijayavardhan Vennapusa1f5da0b2013-01-08 20:03:57 +0530120
121Example 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 Gautam43c61a12012-08-22 17:09:37 -0700134ANDROID USB:
135
136Required properties:
137- compatible: should be "qcom,android-usb"
138
139Optional properties :
Vijayavardhan Vennapusa8ceade82012-11-01 15:11:21 +0530140- reg : offset and length of memory region that is used by device to
Manu Gautam43c61a12012-08-22 17:09:37 -0700141 update USB PID and serial numbers used by bootloader in DLOAD mode.
Vijayavardhan Vennapusa8ceade82012-11-01 15:11:21 +0530142- qcom,android-usb-swfi-latency : value to be used by device to vote
143 for DMA latency in microsecs.
Manu Gautam43c61a12012-08-22 17:09:37 -0700144
145Example Android USB device node :
146 android_usb@fc42b0c8 {
147 compatible = "qcom,android-usb";
148 reg = <0xfc42b0c8 0xc8>;
Vijayavardhan Vennapusa8ceade82012-11-01 15:11:21 +0530149 qcom,android-usb-swfi-latency = <1>;
Manu Gautam43c61a12012-08-22 17:09:37 -0700150 };
151
152
Shimrit Malichi255b5342012-08-02 21:01:43 +0300153BAM:
154
155Required properties:
156- compatible: should be "qcom,usb-bam-msm"
Manu Gautam6afd5872012-07-25 09:16:55 +0530157- reg : pairs of physical base addresses and region sizes
158 of all the memory mapped BAM devices present
Jack Phamd61ff562012-11-21 19:25:53 +0200159- 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 Gautam6afd5872012-07-25 09:16:55 +0530170- interrupts: IRQ lines for BAM devices
Jack Phamd61ff562012-11-21 19:25:53 +0200171- 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 Malichi255b5342012-08-02 21:01:43 +0300177- qcom,usb-bam-num-pipes: max number of pipes that can be used
Vamsi Krishnafd09ddd2013-03-27 15:39:49 -0700178
179Optional 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 Malichi255b5342012-08-02 21:01:43 +0300183
184A number of USB BAM pipe parameters are represented as sub-nodes:
185
186Subnode Required:
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200187- 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 Gautam6afd5872012-07-25 09:16:55 +0530193- 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 Krishnafd09ddd2013-03-27 15:39:49 -0700195 1 - USB's private memory residing @ 'qcom,usb-bam-fifo-baseaddr'
Manu Gautam6afd5872012-07-25 09:16:55 +0530196 2 - System RAM allocated by driver
Vamsi Krishnafd09ddd2013-03-27 15:39:49 -0700197 3 - OCI memory residing @ 'qcom,usb-bam-fifo-baseaddr'
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200198- 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 Malichi255b5342012-08-02 21:01:43 +0300210- qcom,data-fifo-size: data fifo size
Shimrit Malichi255b5342012-08-02 21:01:43 +0300211- qcom,descriptor-fifo-size: descriptor fifo size
212
Manu Gautam355270a2012-12-21 16:52:50 +0530213Optional 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 Malichidbf43d72013-03-16 03:32:27 +0200216- 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 Gautam355270a2012-12-21 16:52:50 +0530222
Manu Gautamd21e2282012-08-23 13:38:50 -0700223Optional properties :
224- qcom,ignore-core-reset-ack: If present then BAM ignores ACK from USB core
225 while performing PIPE RESET
repo sync985819e2013-01-16 19:37:05 +0200226- qcom,disable-clk-gating: If present then disable BAM clock gating.
227
Shimrit Malichi255b5342012-08-02 21:01:43 +0300228Example USB BAM controller device node:
229
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200230 qcom,usbbam@f9a44000 {
Shimrit Malichi255b5342012-08-02 21:01:43 +0300231 compatible = "qcom,usb-bam-msm";
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200232 reg = <0xf9a44000 0x11000>;
233 reg-names = "hsusb";
234 interrupts = <0 135 0>;
235 interrupt-names = "hsusb";
Shimrit Malichi255b5342012-08-02 21:01:43 +0300236 qcom,usb-bam-num-pipes = <16>;
Manu Gautamd21e2282012-08-23 13:38:50 -0700237 qcom,ignore-core-reset-ack;
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200238 qcom,disable-clk-gating;
Shimrit Malichi255b5342012-08-02 21:01:43 +0300239
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200240 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 Malichi255b5342012-08-02 21:01:43 +0300254 qcom,pipe1 {
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200255 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 Gautam6afd5872012-07-25 09:16:55 +0530261 qcom,dst-bam-physical-address = <0xf9a44000>;
Shimrit Malichidbf43d72013-03-16 03:32:27 +0200262 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 Gautam6afd5872012-07-25 09:16:55 +0530267 };
Shimrit Malichi255b5342012-08-02 21:01:43 +0300268 };