summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/usb/am33xx-usb.txt
blob: 7a198a30408abf3f8a164189d60248f1dfcddc8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
  AM33xx MUSB
~~~~~~~~~~~~~~~
- compatible: ti,am33xx-usb
- reg: offset and length of the usbss register sets
- ti,hwmods : must be "usb_otg_hs"

The glue layer contains multiple child nodes. It is required to have
at least a control module node, USB node and a PHY node. The second USB
node and its PHY node are optional. The DMA node is also optional.

Reset module
~~~~~~~~~~~~
- compatible: ti,am335x-usb-ctrl-module
- reg: offset and length of the "USB control registers" in the "Control
  Module" block. A second offset and length for the USB wake up control
  in the same memory block.
- reg-names: "phy_ctrl" for the "USB control registers" and "wakeup" for
  the USB wake up control register.

USB PHY
~~~~~~~
compatible: ti,am335x-usb-phy
reg: offset and length of the "USB PHY" register space
ti,ctrl_mod: reference to the "reset module" node
reg-names: phy
The PHY should have a "phy" alias numbered properly in the alias
node.

USB
~~~
- compatible: ti,musb-am33xx
- reg: offset and length of "USB Controller Registers", and offset and
  length of "USB Core" register space.
- reg-names: control for the ""USB Controller Registers" and "mc" for
  "USB Core" register space
- interrupts: USB interrupt number
- interrupt-names: mc
- dr_mode: Should be one of "host", "peripheral" or "otg".
- mentor,multipoint: Should be "1" indicating the musb controller supports
  multipoint. This is a MUSB configuration-specific setting.
- mentor,num-eps: Specifies the number of endpoints. This is also a
  MUSB configuration-specific setting. Should be set to "16"
- mentor,ram-bits: Specifies the ram address size. Should be set to "12"
- mentor,power: Should be "500". This signifies the controller can supply up to
  500mA when operating in host mode.
- phys: reference to the USB phy
- dmas: specifies the dma channels
- dma-names: specifies the names of the channels. Use "rxN" for receive
  and "txN" for transmit endpoints. N specifies the endpoint number.

The controller should have an "usb" alias numbered properly in the alias
node.

DMA
~~~
- compatible: ti,am3359-cppi41
- reg: offset and length of the following register spaces: USBSS, USB
  CPPI DMA Controller, USB CPPI DMA Scheduler, USB Queue Manager
- reg-names: glue, controller, scheduler, queuemgr
- #dma-cells: should be set to 2. The first number represents the
  endpoint number (0 … 14 for endpoints 1 … 15 on instance 0 and 15 … 29
  for endpoints 1 … 15 on instance 1). The second number is 0 for RX and
  1 for TX transfers.
- #dma-channels: should be set to 30 representing the 15 endpoints for
  each USB instance.

Example:
~~~~~~~~
The following example contains all the nodes as used on am335x-evm:

aliases {
	usb0 = &usb0;
	usb1 = &usb1;
	phy0 = &usb0_phy;
	phy1 = &usb1_phy;
};

usb: usb@47400000 {
	compatible = "ti,am33xx-usb";
	reg = <0x47400000 0x1000>;
	ranges;
	#address-cells = <1>;
	#size-cells = <1>;
	ti,hwmods = "usb_otg_hs";

	ctrl_mod: control@44e10000 {
		compatible = "ti,am335x-usb-ctrl-module";
		reg = <0x44e10620 0x10
			0x44e10648 0x4>;
		reg-names = "phy_ctrl", "wakeup";
	};

	usb0_phy: usb-phy@47401300 {
		compatible = "ti,am335x-usb-phy";
		reg = <0x47401300 0x100>;
		reg-names = "phy";
		ti,ctrl_mod = <&ctrl_mod>;
		#phy-cells = <0>;
	};

	usb0: usb@47401000 {
		compatible = "ti,musb-am33xx";
		reg = <0x47401400 0x400
			0x47401000 0x200>;
		reg-names = "mc", "control";

		interrupts = <18>;
		interrupt-names = "mc";
		dr_mode = "otg"
		mentor,multipoint = <1>;
		mentor,num-eps = <16>;
		mentor,ram-bits = <12>;
		mentor,power = <500>;
		phys = <&usb0_phy>;

		dmas = <&cppi41dma  0 0 &cppi41dma  1 0
			&cppi41dma  2 0 &cppi41dma  3 0
			&cppi41dma  4 0 &cppi41dma  5 0
			&cppi41dma  6 0 &cppi41dma  7 0
			&cppi41dma  8 0 &cppi41dma  9 0
			&cppi41dma 10 0 &cppi41dma 11 0
			&cppi41dma 12 0 &cppi41dma 13 0
			&cppi41dma 14 0 &cppi41dma  0 1
			&cppi41dma  1 1 &cppi41dma  2 1
			&cppi41dma  3 1 &cppi41dma  4 1
			&cppi41dma  5 1 &cppi41dma  6 1
			&cppi41dma  7 1 &cppi41dma  8 1
			&cppi41dma  9 1 &cppi41dma 10 1
			&cppi41dma 11 1 &cppi41dma 12 1
			&cppi41dma 13 1 &cppi41dma 14 1>;
		dma-names =
			"rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
			"rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
			"rx14", "rx15",
			"tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
			"tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
			"tx14", "tx15";
	};

	usb1_phy: usb-phy@47401b00 {
		compatible = "ti,am335x-usb-phy";
		reg = <0x47401b00 0x100>;
		reg-names = "phy";
		ti,ctrl_mod = <&ctrl_mod>;
		#phy-cells = <0>;
	};

	usb1: usb@47401800 {
		compatible = "ti,musb-am33xx";
		reg = <0x47401c00 0x400
			0x47401800 0x200>;
		reg-names = "mc", "control";
		interrupts = <19>;
		interrupt-names = "mc";
		dr_mode = "host"
		mentor,multipoint = <1>;
		mentor,num-eps = <16>;
		mentor,ram-bits = <12>;
		mentor,power = <500>;
		phys = <&usb1_phy>;

		dmas = <&cppi41dma 15 0 &cppi41dma 16 0
			&cppi41dma 17 0 &cppi41dma 18 0
			&cppi41dma 19 0 &cppi41dma 20 0
			&cppi41dma 21 0 &cppi41dma 22 0
			&cppi41dma 23 0 &cppi41dma 24 0
			&cppi41dma 25 0 &cppi41dma 26 0
			&cppi41dma 27 0 &cppi41dma 28 0
			&cppi41dma 29 0 &cppi41dma 15 1
			&cppi41dma 16 1 &cppi41dma 17 1
			&cppi41dma 18 1 &cppi41dma 19 1
			&cppi41dma 20 1 &cppi41dma 21 1
			&cppi41dma 22 1 &cppi41dma 23 1
			&cppi41dma 24 1 &cppi41dma 25 1
			&cppi41dma 26 1 &cppi41dma 27 1
			&cppi41dma 28 1 &cppi41dma 29 1>;
		dma-names =
			"rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
			"rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
			"rx14", "rx15",
			"tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
			"tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
			"tx14", "tx15";
	};

	cppi41dma: dma-controller@7402000 {
		compatible = "ti,am3359-cppi41";
		reg =  <0x47400000 0x1000
			0x47402000 0x1000
			0x47403000 0x1000
			0x47404000 0x4000>;
		reg-names = "glue", "controller", "scheduler", "queuemgr";
		interrupts = <17>;
		interrupt-names = "glue";
		#dma-cells = <2>;
		#dma-channels = <30>;
		#dma-requests = <256>;
	};
};