nvidia,tegra194-xusb-padctl.yaml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/phy/nvidia,tegra194-xusb-padctl.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: NVIDIA Tegra194 XUSB pad controller
  7. maintainers:
  8. - Thierry Reding <thierry.reding@gmail.com>
  9. - Jon Hunter <jonathanh@nvidia.com>
  10. description: |
  11. The Tegra XUSB pad controller manages a set of I/O lanes (with differential
  12. signals) which connect directly to pins/pads on the SoC package. Each lane
  13. is controlled by a HW block referred to as a "pad" in the Tegra hardware
  14. documentation. Each such "pad" may control either one or multiple lanes,
  15. and thus contains any logic common to all its lanes. Each lane can be
  16. separately configured and powered up.
  17. Some of the lanes are high-speed lanes, which can be used for PCIe, SATA or
  18. super-speed USB. Other lanes are for various types of low-speed, full-speed
  19. or high-speed USB (such as UTMI, ULPI and HSIC). The XUSB pad controller
  20. contains a software-configurable mux that sits between the I/O controller
  21. ports (e.g. PCIe) and the lanes.
  22. In addition to per-lane configuration, USB 3.0 ports may require additional
  23. settings on a per-board basis.
  24. Pads will be represented as children of the top-level XUSB pad controller
  25. device tree node. Each lane exposed by the pad will be represented by its
  26. own subnode and can be referenced by users of the lane using the standard
  27. PHY bindings, as described by the phy-bindings.txt file in this directory.
  28. The Tegra hardware documentation refers to the connection between the XUSB
  29. pad controller and the XUSB controller as "ports". This is confusing since
  30. "port" is typically used to denote the physical USB receptacle. The device
  31. tree binding in this document uses the term "port" to refer to the logical
  32. abstraction of the signals that are routed to a USB receptacle (i.e. a PHY
  33. for the USB signal, the VBUS power supply, the USB 2.0 companion port for
  34. USB 3.0 receptacles, ...).
  35. properties:
  36. compatible:
  37. enum:
  38. - nvidia,tegra194-xusb-padctl
  39. - nvidia,tegra234-xusb-padctl
  40. reg:
  41. items:
  42. - description: pad controller registers
  43. - description: AO registers
  44. reg-names:
  45. items:
  46. - const: padctl
  47. - const: ao
  48. interrupts:
  49. items:
  50. - description: XUSB pad controller interrupt
  51. resets:
  52. items:
  53. - description: pad controller reset
  54. reset-names:
  55. items:
  56. - const: padctl
  57. avdd-usb-supply:
  58. description: USB I/Os, VBUS, ID, REXT, D+/D- power supply. Must
  59. supply 3.3 V.
  60. vclamp-usb-supply:
  61. description: Bias rail for USB pad. Must supply 1.8 V.
  62. pads:
  63. description: A required child node named "pads" contains a list of
  64. subnodes, one for each of the pads exposed by the XUSB pad controller.
  65. Each pad may need additional resources that can be referenced in its
  66. pad node.
  67. The "status" property is used to enable or disable the use of a pad.
  68. If set to "disabled", the pad will not be used on the given board. In
  69. order to use the pad and any of its lanes, this property must be set
  70. to "okay" or absent.
  71. type: object
  72. additionalProperties: false
  73. properties:
  74. usb2:
  75. type: object
  76. additionalProperties: false
  77. properties:
  78. clocks:
  79. items:
  80. - description: USB2 tracking clock
  81. clock-names:
  82. items:
  83. - const: trk
  84. lanes:
  85. type: object
  86. additionalProperties: false
  87. properties:
  88. usb2-0:
  89. type: object
  90. additionalProperties: false
  91. properties:
  92. "#phy-cells":
  93. const: 0
  94. nvidia,function:
  95. description: Function selection for this lane.
  96. $ref: /schemas/types.yaml#/definitions/string
  97. enum: [ xusb ]
  98. usb2-1:
  99. type: object
  100. additionalProperties: false
  101. properties:
  102. "#phy-cells":
  103. const: 0
  104. nvidia,function:
  105. description: Function selection for this lane.
  106. $ref: /schemas/types.yaml#/definitions/string
  107. enum: [ xusb ]
  108. usb2-2:
  109. type: object
  110. additionalProperties: false
  111. properties:
  112. "#phy-cells":
  113. const: 0
  114. nvidia,function:
  115. description: Function selection for this lane.
  116. $ref: /schemas/types.yaml#/definitions/string
  117. enum: [ xusb ]
  118. usb2-3:
  119. type: object
  120. additionalProperties: false
  121. properties:
  122. "#phy-cells":
  123. const: 0
  124. nvidia,function:
  125. description: Function selection for this lane.
  126. $ref: /schemas/types.yaml#/definitions/string
  127. enum: [ xusb ]
  128. usb3:
  129. type: object
  130. additionalProperties: false
  131. properties:
  132. lanes:
  133. type: object
  134. additionalProperties: false
  135. properties:
  136. usb3-0:
  137. type: object
  138. additionalProperties: false
  139. properties:
  140. "#phy-cells":
  141. const: 0
  142. nvidia,function:
  143. description: Function selection for this lane.
  144. $ref: /schemas/types.yaml#/definitions/string
  145. enum: [ xusb ]
  146. usb3-1:
  147. type: object
  148. additionalProperties: false
  149. properties:
  150. "#phy-cells":
  151. const: 0
  152. nvidia,function:
  153. description: Function selection for this lane.
  154. $ref: /schemas/types.yaml#/definitions/string
  155. enum: [ xusb ]
  156. usb3-2:
  157. type: object
  158. additionalProperties: false
  159. properties:
  160. "#phy-cells":
  161. const: 0
  162. nvidia,function:
  163. description: Function selection for this lane.
  164. $ref: /schemas/types.yaml#/definitions/string
  165. enum: [ xusb ]
  166. usb3-3:
  167. type: object
  168. additionalProperties: false
  169. properties:
  170. "#phy-cells":
  171. const: 0
  172. nvidia,function:
  173. description: Function selection for this lane.
  174. $ref: /schemas/types.yaml#/definitions/string
  175. enum: [ xusb ]
  176. ports:
  177. description: A required child node named "ports" contains a list of
  178. subnodes, one for each of the ports exposed by the XUSB pad controller.
  179. Each port may need additional resources that can be referenced in its
  180. port node.
  181. The "status" property is used to enable or disable the use of a port.
  182. If set to "disabled", the port will not be used on the given board. In
  183. order to use the port, this property must be set to "okay".
  184. type: object
  185. additionalProperties: false
  186. properties:
  187. usb2-0:
  188. type: object
  189. additionalProperties: false
  190. properties:
  191. # no need to further describe this because the connector will
  192. # match on gpio-usb-b-connector or usb-b-connector and cause
  193. # that binding to be selected for the subnode
  194. connector:
  195. type: object
  196. mode:
  197. description: A string that determines the mode in which to
  198. run the port.
  199. $ref: /schemas/types.yaml#/definitions/string
  200. enum: [ host, peripheral, otg ]
  201. nvidia,internal:
  202. description: A boolean property whose presence determines
  203. that a port is internal. In the absence of this property
  204. the port is considered to be external.
  205. $ref: /schemas/types.yaml#/definitions/flag
  206. usb-role-switch:
  207. description: |
  208. A boolean property whole presence indicates that the port
  209. supports OTG or peripheral mode. If present, the port
  210. supports switching between USB host and peripheral roles.
  211. A connector must be added as a subnode in that case.
  212. See ../connector/usb-connector.yaml.
  213. vbus-supply:
  214. description: A phandle to the regulator supplying the VBUS
  215. voltage.
  216. dependencies:
  217. usb-role-switch: [ connector ]
  218. usb2-1:
  219. type: object
  220. additionalProperties: false
  221. properties:
  222. # no need to further describe this because the connector will
  223. # match on gpio-usb-b-connector or usb-b-connector and cause
  224. # that binding to be selected for the subnode
  225. connector:
  226. type: object
  227. mode:
  228. description: A string that determines the mode in which to
  229. run the port.
  230. $ref: /schemas/types.yaml#/definitions/string
  231. enum: [ host, peripheral, otg ]
  232. nvidia,internal:
  233. description: A boolean property whose presence determines
  234. that a port is internal. In the absence of this property
  235. the port is considered to be external.
  236. $ref: /schemas/types.yaml#/definitions/flag
  237. usb-role-switch:
  238. description: |
  239. A boolean property whole presence indicates that the port
  240. supports OTG or peripheral mode. If present, the port
  241. supports switching between USB host and peripheral roles.
  242. A connector must be added as a subnode in that case.
  243. See ../connector/usb-connector.yaml.
  244. vbus-supply:
  245. description: A phandle to the regulator supplying the VBUS
  246. voltage.
  247. dependencies:
  248. usb-role-switch: [ connector ]
  249. usb2-2:
  250. type: object
  251. additionalProperties: false
  252. properties:
  253. # no need to further describe this because the connector will
  254. # match on gpio-usb-b-connector or usb-b-connector and cause
  255. # that binding to be selected for the subnode
  256. connector:
  257. type: object
  258. mode:
  259. description: A string that determines the mode in which to
  260. run the port.
  261. $ref: /schemas/types.yaml#/definitions/string
  262. enum: [ host, peripheral, otg ]
  263. nvidia,internal:
  264. description: A boolean property whose presence determines
  265. that a port is internal. In the absence of this property
  266. the port is considered to be external.
  267. $ref: /schemas/types.yaml#/definitions/flag
  268. usb-role-switch:
  269. description: |
  270. A boolean property whole presence indicates that the port
  271. supports OTG or peripheral mode. If present, the port
  272. supports switching between USB host and peripheral roles.
  273. A connector must be added as a subnode in that case.
  274. See ../connector/usb-connector.yaml.
  275. vbus-supply:
  276. description: A phandle to the regulator supplying the VBUS
  277. voltage.
  278. dependencies:
  279. usb-role-switch: [ connector ]
  280. usb2-3:
  281. type: object
  282. additionalProperties: false
  283. properties:
  284. # no need to further describe this because the connector will
  285. # match on gpio-usb-b-connector or usb-b-connector and cause
  286. # that binding to be selected for the subnode
  287. connector:
  288. type: object
  289. mode:
  290. description: A string that determines the mode in which to
  291. run the port.
  292. $ref: /schemas/types.yaml#/definitions/string
  293. enum: [ host, peripheral, otg ]
  294. nvidia,internal:
  295. description: A boolean property whose presence determines
  296. that a port is internal. In the absence of this property
  297. the port is considered to be external.
  298. $ref: /schemas/types.yaml#/definitions/flag
  299. usb-role-switch:
  300. description: |
  301. A boolean property whole presence indicates that the port
  302. supports OTG or peripheral mode. If present, the port
  303. supports switching between USB host and peripheral roles.
  304. A connector must be added as a subnode in that case.
  305. See ../connector/usb-connector.yaml.
  306. vbus-supply:
  307. description: A phandle to the regulator supplying the VBUS
  308. voltage.
  309. dependencies:
  310. usb-role-switch: [ connector ]
  311. usb3-0:
  312. type: object
  313. additionalProperties: false
  314. properties:
  315. maximum-speed:
  316. description: A string property that specifies the maximum
  317. supported speed of a USB3 port.
  318. $ref: /schemas/types.yaml#/definitions/string
  319. oneOf:
  320. - description: The USB3 port supports USB 3.1 Gen 2 speed.
  321. This is the default.
  322. const: super-speed-plus
  323. - description: The USB3 port supports USB 3.1 Gen 1 speed
  324. only.
  325. const: super-speed
  326. nvidia,internal:
  327. description: A boolean property whose presence determines
  328. that a port is internal. In the absence of this property
  329. the port is considered to be external.
  330. $ref: /schemas/types.yaml#/definitions/flag
  331. nvidia,usb2-companion:
  332. description: A single cell that specifies the physical port
  333. number to map this super-speed USB port to. The range of
  334. valid port numbers varies with the SoC generation.
  335. $ref: /schemas/types.yaml#/definitions/uint32
  336. enum: [ 0, 1, 2, 3 ]
  337. vbus-supply:
  338. description: A phandle to the regulator supplying the VBUS
  339. voltage.
  340. usb3-1:
  341. type: object
  342. additionalProperties: false
  343. properties:
  344. maximum-speed:
  345. description: A string property that specifies the maximum
  346. supported speed of a USB3 port.
  347. $ref: /schemas/types.yaml#/definitions/string
  348. oneOf:
  349. - description: The USB3 port supports USB 3.1 Gen 2 speed.
  350. This is the default.
  351. const: super-speed-plus
  352. - description: The USB3 port supports USB 3.1 Gen 1 speed
  353. only.
  354. const: super-speed
  355. nvidia,internal:
  356. description: A boolean property whose presence determines
  357. that a port is internal. In the absence of this property
  358. the port is considered to be external.
  359. $ref: /schemas/types.yaml#/definitions/flag
  360. nvidia,usb2-companion:
  361. description: A single cell that specifies the physical port
  362. number to map this super-speed USB port to. The range of
  363. valid port numbers varies with the SoC generation.
  364. $ref: /schemas/types.yaml#/definitions/uint32
  365. enum: [ 0, 1, 2, 3 ]
  366. vbus-supply:
  367. description: A phandle to the regulator supplying the VBUS
  368. voltage.
  369. usb3-2:
  370. type: object
  371. additionalProperties: false
  372. properties:
  373. maximum-speed:
  374. description: A string property that specifies the maximum
  375. supported speed of a USB3 port.
  376. $ref: /schemas/types.yaml#/definitions/string
  377. oneOf:
  378. - description: The USB3 port supports USB 3.1 Gen 2 speed.
  379. This is the default.
  380. const: super-speed-plus
  381. - description: The USB3 port supports USB 3.1 Gen 1 speed
  382. only.
  383. const: super-speed
  384. nvidia,internal:
  385. description: A boolean property whose presence determines
  386. that a port is internal. In the absence of this property
  387. the port is considered to be external.
  388. $ref: /schemas/types.yaml#/definitions/flag
  389. nvidia,usb2-companion:
  390. description: A single cell that specifies the physical port
  391. number to map this super-speed USB port to. The range of
  392. valid port numbers varies with the SoC generation.
  393. $ref: /schemas/types.yaml#/definitions/uint32
  394. enum: [ 0, 1, 2, 3 ]
  395. vbus-supply:
  396. description: A phandle to the regulator supplying the VBUS
  397. voltage.
  398. usb3-3:
  399. type: object
  400. additionalProperties: false
  401. properties:
  402. maximum-speed:
  403. description: A string property that specifies the maximum
  404. supported speed of a USB3 port.
  405. $ref: /schemas/types.yaml#/definitions/string
  406. oneOf:
  407. - description: The USB3 port supports USB 3.1 Gen 2 speed.
  408. This is the default.
  409. const: super-speed-plus
  410. - description: The USB3 port supports USB 3.1 Gen 1 speed
  411. only.
  412. const: super-speed
  413. nvidia,internal:
  414. description: A boolean property whose presence determines
  415. that a port is internal. In the absence of this property
  416. the port is considered to be external.
  417. $ref: /schemas/types.yaml#/definitions/flag
  418. nvidia,usb2-companion:
  419. description: A single cell that specifies the physical port
  420. number to map this super-speed USB port to. The range of
  421. valid port numbers varies with the SoC generation.
  422. $ref: /schemas/types.yaml#/definitions/uint32
  423. enum: [ 0, 1, 2, 3 ]
  424. vbus-supply:
  425. description: A phandle to the regulator supplying the VBUS
  426. voltage.
  427. additionalProperties: false
  428. required:
  429. - compatible
  430. - reg
  431. - resets
  432. - reset-names
  433. - avdd-usb-supply
  434. - vclamp-usb-supply
  435. examples:
  436. - |
  437. #include <dt-bindings/clock/tegra194-clock.h>
  438. #include <dt-bindings/gpio/tegra194-gpio.h>
  439. #include <dt-bindings/interrupt-controller/arm-gic.h>
  440. #include <dt-bindings/reset/tegra194-reset.h>
  441. padctl@3520000 {
  442. compatible = "nvidia,tegra194-xusb-padctl";
  443. reg = <0x03520000 0x1000>,
  444. <0x03540000 0x1000>;
  445. reg-names = "padctl", "ao";
  446. interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
  447. resets = <&bpmp TEGRA194_RESET_XUSB_PADCTL>;
  448. reset-names = "padctl";
  449. avdd-usb-supply = <&vdd_usb_3v3>;
  450. vclamp-usb-supply = <&vdd_1v8ao>;
  451. pads {
  452. usb2 {
  453. clocks = <&bpmp TEGRA194_CLK_USB2_TRK>;
  454. clock-names = "trk";
  455. lanes {
  456. usb2-0 {
  457. nvidia,function = "xusb";
  458. status = "disabled";
  459. #phy-cells = <0>;
  460. };
  461. usb2-1 {
  462. nvidia,function = "xusb";
  463. #phy-cells = <0>;
  464. };
  465. usb2-2 {
  466. nvidia,function = "xusb";
  467. status = "disabled";
  468. #phy-cells = <0>;
  469. };
  470. usb2-3 {
  471. nvidia,function = "xusb";
  472. #phy-cells = <0>;
  473. };
  474. };
  475. };
  476. usb3 {
  477. lanes {
  478. usb3-0 {
  479. nvidia,function = "xusb";
  480. #phy-cells = <0>;
  481. };
  482. usb3-1 {
  483. nvidia,function = "xusb";
  484. status = "disabled";
  485. #phy-cells = <0>;
  486. };
  487. usb3-2 {
  488. nvidia,function = "xusb";
  489. status = "disabled";
  490. #phy-cells = <0>;
  491. };
  492. usb3-3 {
  493. nvidia,function = "xusb";
  494. #phy-cells = <0>;
  495. };
  496. };
  497. };
  498. };
  499. ports {
  500. usb2-0 {
  501. status = "disabled";
  502. };
  503. usb2-1 {
  504. vbus-supply = <&vdd_5v0_sys>;
  505. mode = "host";
  506. };
  507. usb2-2 {
  508. status = "disabled";
  509. };
  510. usb2-3 {
  511. vbus-supply = <&vdd_5v_sata>;
  512. mode = "host";
  513. };
  514. usb3-0 {
  515. vbus-supply = <&vdd_5v0_sys>;
  516. nvidia,usb2-companion = <1>;
  517. };
  518. usb3-1 {
  519. status = "disabled";
  520. };
  521. usb3-2 {
  522. status = "disabled";
  523. };
  524. usb3-3 {
  525. maximum-speed = "super-speed";
  526. vbus-supply = <&vdd_5v0_sys>;
  527. nvidia,usb2-companion = <3>;
  528. };
  529. };
  530. };