xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/usb/am33xx-usb.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun  AM33xx MUSB
2*4882a593Smuzhiyun~~~~~~~~~~~~~~~
3*4882a593Smuzhiyun- compatible: ti,am33xx-usb
4*4882a593Smuzhiyun- reg: offset and length of the usbss register sets
5*4882a593Smuzhiyun- ti,hwmods : must be "usb_otg_hs"
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunThe glue layer contains multiple child nodes. It is required to have
8*4882a593Smuzhiyunat least a control module node, USB node and a PHY node. The second USB
9*4882a593Smuzhiyunnode and its PHY node are optional. The DMA node is also optional.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunReset module
12*4882a593Smuzhiyun~~~~~~~~~~~~
13*4882a593Smuzhiyun- compatible: ti,am335x-usb-ctrl-module
14*4882a593Smuzhiyun- reg: offset and length of the "USB control registers" in the "Control
15*4882a593Smuzhiyun  Module" block. A second offset and length for the USB wake up control
16*4882a593Smuzhiyun  in the same memory block.
17*4882a593Smuzhiyun- reg-names: "phy_ctrl" for the "USB control registers" and "wakeup" for
18*4882a593Smuzhiyun  the USB wake up control register.
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunUSB PHY
21*4882a593Smuzhiyun~~~~~~~
22*4882a593Smuzhiyuncompatible: ti,am335x-usb-phy
23*4882a593Smuzhiyunreg: offset and length of the "USB PHY" register space
24*4882a593Smuzhiyunti,ctrl_mod: reference to the "reset module" node
25*4882a593Smuzhiyunreg-names: phy
26*4882a593SmuzhiyunThe PHY should have a "phy" alias numbered properly in the alias
27*4882a593Smuzhiyunnode.
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunUSB
30*4882a593Smuzhiyun~~~
31*4882a593Smuzhiyun- compatible: ti,musb-am33xx
32*4882a593Smuzhiyun- reg: offset and length of "USB Controller Registers", and offset and
33*4882a593Smuzhiyun  length of "USB Core" register space.
34*4882a593Smuzhiyun- reg-names: control for the ""USB Controller Registers" and "mc" for
35*4882a593Smuzhiyun  "USB Core" register space
36*4882a593Smuzhiyun- interrupts: USB interrupt number
37*4882a593Smuzhiyun- interrupt-names: mc
38*4882a593Smuzhiyun- dr_mode: Should be one of "host", "peripheral" or "otg".
39*4882a593Smuzhiyun- mentor,multipoint: Should be "1" indicating the musb controller supports
40*4882a593Smuzhiyun  multipoint. This is a MUSB configuration-specific setting.
41*4882a593Smuzhiyun- mentor,num-eps: Specifies the number of endpoints. This is also a
42*4882a593Smuzhiyun  MUSB configuration-specific setting. Should be set to "16"
43*4882a593Smuzhiyun- mentor,ram-bits: Specifies the ram address size. Should be set to "12"
44*4882a593Smuzhiyun- mentor,power: Should be "500". This signifies the controller can supply up to
45*4882a593Smuzhiyun  500mA when operating in host mode.
46*4882a593Smuzhiyun- phys: reference to the USB phy
47*4882a593Smuzhiyun- dmas: specifies the dma channels
48*4882a593Smuzhiyun- dma-names: specifies the names of the channels. Use "rxN" for receive
49*4882a593Smuzhiyun  and "txN" for transmit endpoints. N specifies the endpoint number.
50*4882a593Smuzhiyun
51*4882a593SmuzhiyunThe controller should have an "usb" alias numbered properly in the alias
52*4882a593Smuzhiyunnode.
53*4882a593Smuzhiyun
54*4882a593SmuzhiyunDMA
55*4882a593Smuzhiyun~~~
56*4882a593Smuzhiyun- compatible: ti,am3359-cppi41
57*4882a593Smuzhiyun- reg: offset and length of the following register spaces: USBSS, USB
58*4882a593Smuzhiyun  CPPI DMA Controller, USB CPPI DMA Scheduler, USB Queue Manager
59*4882a593Smuzhiyun- reg-names: glue, controller, scheduler, queuemgr
60*4882a593Smuzhiyun- #dma-cells: should be set to 2. The first number represents the
61*4882a593Smuzhiyun  endpoint number (0 … 14 for endpoints 1 … 15 on instance 0 and 15 … 29
62*4882a593Smuzhiyun  for endpoints 1 … 15 on instance 1). The second number is 0 for RX and
63*4882a593Smuzhiyun  1 for TX transfers.
64*4882a593Smuzhiyun- #dma-channels: should be set to 30 representing the 15 endpoints for
65*4882a593Smuzhiyun  each USB instance.
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunExample:
68*4882a593Smuzhiyun~~~~~~~~
69*4882a593SmuzhiyunThe following example contains all the nodes as used on am335x-evm:
70*4882a593Smuzhiyun
71*4882a593Smuzhiyunaliases {
72*4882a593Smuzhiyun	usb0 = &usb0;
73*4882a593Smuzhiyun	usb1 = &usb1;
74*4882a593Smuzhiyun	phy0 = &usb0_phy;
75*4882a593Smuzhiyun	phy1 = &usb1_phy;
76*4882a593Smuzhiyun};
77*4882a593Smuzhiyun
78*4882a593Smuzhiyunusb: usb@47400000 {
79*4882a593Smuzhiyun	compatible = "ti,am33xx-usb";
80*4882a593Smuzhiyun	reg = <0x47400000 0x1000>;
81*4882a593Smuzhiyun	ranges;
82*4882a593Smuzhiyun	#address-cells = <1>;
83*4882a593Smuzhiyun	#size-cells = <1>;
84*4882a593Smuzhiyun	ti,hwmods = "usb_otg_hs";
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun	ctrl_mod: control@44e10000 {
87*4882a593Smuzhiyun		compatible = "ti,am335x-usb-ctrl-module";
88*4882a593Smuzhiyun		reg = <0x44e10620 0x10
89*4882a593Smuzhiyun			0x44e10648 0x4>;
90*4882a593Smuzhiyun		reg-names = "phy_ctrl", "wakeup";
91*4882a593Smuzhiyun	};
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun	usb0_phy: usb-phy@47401300 {
94*4882a593Smuzhiyun		compatible = "ti,am335x-usb-phy";
95*4882a593Smuzhiyun		reg = <0x47401300 0x100>;
96*4882a593Smuzhiyun		reg-names = "phy";
97*4882a593Smuzhiyun		ti,ctrl_mod = <&ctrl_mod>;
98*4882a593Smuzhiyun		#phy-cells = <0>;
99*4882a593Smuzhiyun	};
100*4882a593Smuzhiyun
101*4882a593Smuzhiyun	usb0: usb@47401000 {
102*4882a593Smuzhiyun		compatible = "ti,musb-am33xx";
103*4882a593Smuzhiyun		reg = <0x47401400 0x400
104*4882a593Smuzhiyun			0x47401000 0x200>;
105*4882a593Smuzhiyun		reg-names = "mc", "control";
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun		interrupts = <18>;
108*4882a593Smuzhiyun		interrupt-names = "mc";
109*4882a593Smuzhiyun		dr_mode = "otg"
110*4882a593Smuzhiyun		mentor,multipoint = <1>;
111*4882a593Smuzhiyun		mentor,num-eps = <16>;
112*4882a593Smuzhiyun		mentor,ram-bits = <12>;
113*4882a593Smuzhiyun		mentor,power = <500>;
114*4882a593Smuzhiyun		phys = <&usb0_phy>;
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun		dmas = <&cppi41dma  0 0 &cppi41dma  1 0
117*4882a593Smuzhiyun			&cppi41dma  2 0 &cppi41dma  3 0
118*4882a593Smuzhiyun			&cppi41dma  4 0 &cppi41dma  5 0
119*4882a593Smuzhiyun			&cppi41dma  6 0 &cppi41dma  7 0
120*4882a593Smuzhiyun			&cppi41dma  8 0 &cppi41dma  9 0
121*4882a593Smuzhiyun			&cppi41dma 10 0 &cppi41dma 11 0
122*4882a593Smuzhiyun			&cppi41dma 12 0 &cppi41dma 13 0
123*4882a593Smuzhiyun			&cppi41dma 14 0 &cppi41dma  0 1
124*4882a593Smuzhiyun			&cppi41dma  1 1 &cppi41dma  2 1
125*4882a593Smuzhiyun			&cppi41dma  3 1 &cppi41dma  4 1
126*4882a593Smuzhiyun			&cppi41dma  5 1 &cppi41dma  6 1
127*4882a593Smuzhiyun			&cppi41dma  7 1 &cppi41dma  8 1
128*4882a593Smuzhiyun			&cppi41dma  9 1 &cppi41dma 10 1
129*4882a593Smuzhiyun			&cppi41dma 11 1 &cppi41dma 12 1
130*4882a593Smuzhiyun			&cppi41dma 13 1 &cppi41dma 14 1>;
131*4882a593Smuzhiyun		dma-names =
132*4882a593Smuzhiyun			"rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
133*4882a593Smuzhiyun			"rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
134*4882a593Smuzhiyun			"rx14", "rx15",
135*4882a593Smuzhiyun			"tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
136*4882a593Smuzhiyun			"tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
137*4882a593Smuzhiyun			"tx14", "tx15";
138*4882a593Smuzhiyun	};
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun	usb1_phy: usb-phy@47401b00 {
141*4882a593Smuzhiyun		compatible = "ti,am335x-usb-phy";
142*4882a593Smuzhiyun		reg = <0x47401b00 0x100>;
143*4882a593Smuzhiyun		reg-names = "phy";
144*4882a593Smuzhiyun		ti,ctrl_mod = <&ctrl_mod>;
145*4882a593Smuzhiyun		#phy-cells = <0>;
146*4882a593Smuzhiyun	};
147*4882a593Smuzhiyun
148*4882a593Smuzhiyun	usb1: usb@47401800 {
149*4882a593Smuzhiyun		compatible = "ti,musb-am33xx";
150*4882a593Smuzhiyun		reg = <0x47401c00 0x400
151*4882a593Smuzhiyun			0x47401800 0x200>;
152*4882a593Smuzhiyun		reg-names = "mc", "control";
153*4882a593Smuzhiyun		interrupts = <19>;
154*4882a593Smuzhiyun		interrupt-names = "mc";
155*4882a593Smuzhiyun		dr_mode = "host"
156*4882a593Smuzhiyun		mentor,multipoint = <1>;
157*4882a593Smuzhiyun		mentor,num-eps = <16>;
158*4882a593Smuzhiyun		mentor,ram-bits = <12>;
159*4882a593Smuzhiyun		mentor,power = <500>;
160*4882a593Smuzhiyun		phys = <&usb1_phy>;
161*4882a593Smuzhiyun
162*4882a593Smuzhiyun		dmas = <&cppi41dma 15 0 &cppi41dma 16 0
163*4882a593Smuzhiyun			&cppi41dma 17 0 &cppi41dma 18 0
164*4882a593Smuzhiyun			&cppi41dma 19 0 &cppi41dma 20 0
165*4882a593Smuzhiyun			&cppi41dma 21 0 &cppi41dma 22 0
166*4882a593Smuzhiyun			&cppi41dma 23 0 &cppi41dma 24 0
167*4882a593Smuzhiyun			&cppi41dma 25 0 &cppi41dma 26 0
168*4882a593Smuzhiyun			&cppi41dma 27 0 &cppi41dma 28 0
169*4882a593Smuzhiyun			&cppi41dma 29 0 &cppi41dma 15 1
170*4882a593Smuzhiyun			&cppi41dma 16 1 &cppi41dma 17 1
171*4882a593Smuzhiyun			&cppi41dma 18 1 &cppi41dma 19 1
172*4882a593Smuzhiyun			&cppi41dma 20 1 &cppi41dma 21 1
173*4882a593Smuzhiyun			&cppi41dma 22 1 &cppi41dma 23 1
174*4882a593Smuzhiyun			&cppi41dma 24 1 &cppi41dma 25 1
175*4882a593Smuzhiyun			&cppi41dma 26 1 &cppi41dma 27 1
176*4882a593Smuzhiyun			&cppi41dma 28 1 &cppi41dma 29 1>;
177*4882a593Smuzhiyun		dma-names =
178*4882a593Smuzhiyun			"rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
179*4882a593Smuzhiyun			"rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
180*4882a593Smuzhiyun			"rx14", "rx15",
181*4882a593Smuzhiyun			"tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
182*4882a593Smuzhiyun			"tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
183*4882a593Smuzhiyun			"tx14", "tx15";
184*4882a593Smuzhiyun	};
185*4882a593Smuzhiyun
186*4882a593Smuzhiyun	cppi41dma: dma-controller@7402000 {
187*4882a593Smuzhiyun		compatible = "ti,am3359-cppi41";
188*4882a593Smuzhiyun		reg =  <0x47400000 0x1000
189*4882a593Smuzhiyun			0x47402000 0x1000
190*4882a593Smuzhiyun			0x47403000 0x1000
191*4882a593Smuzhiyun			0x47404000 0x4000>;
192*4882a593Smuzhiyun		reg-names = "glue", "controller", "scheduler", "queuemgr";
193*4882a593Smuzhiyun		interrupts = <17>;
194*4882a593Smuzhiyun		interrupt-names = "glue";
195*4882a593Smuzhiyun		#dma-cells = <2>;
196*4882a593Smuzhiyun		#dma-channels = <30>;
197*4882a593Smuzhiyun		#dma-requests = <256>;
198*4882a593Smuzhiyun	};
199*4882a593Smuzhiyun};
200