18c2ecf20Sopenharmony_ciDevice tree binding for NVIDIA Tegra XUSB pad controller
28c2ecf20Sopenharmony_ci========================================================
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ciNOTE: It turns out that this binding isn't an accurate description of the XUSB
58c2ecf20Sopenharmony_cipad controller. While the description is good enough for the functional subset
68c2ecf20Sopenharmony_cirequired for PCIe and SATA, it lacks the flexibility to represent the features
78c2ecf20Sopenharmony_cineeded for USB. For the new binding, see ../phy/nvidia,tegra-xusb-padctl.txt.
88c2ecf20Sopenharmony_ciThe binding described in this file is deprecated and should not be used.
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciThe Tegra XUSB pad controller manages a set of lanes, each of which can be
118c2ecf20Sopenharmony_ciassigned to one out of a set of different pads. Some of these pads have an
128c2ecf20Sopenharmony_ciassociated PHY that must be powered up before the pad can be used.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciThis document defines the device-specific binding for the XUSB pad controller.
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciRefer to pinctrl-bindings.txt in this directory for generic information about
178c2ecf20Sopenharmony_cipin controller device tree bindings and ../phy/phy-bindings.txt for details on
188c2ecf20Sopenharmony_cihow to describe and reference PHYs in device trees.
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciRequired properties:
218c2ecf20Sopenharmony_ci--------------------
228c2ecf20Sopenharmony_ci- compatible: For Tegra124, must contain "nvidia,tegra124-xusb-padctl".
238c2ecf20Sopenharmony_ci  Otherwise, must contain '"nvidia,<chip>-xusb-padctl",
248c2ecf20Sopenharmony_ci  "nvidia-tegra124-xusb-padctl"', where <chip> is tegra132 or tegra210.
258c2ecf20Sopenharmony_ci- reg: Physical base address and length of the controller's registers.
268c2ecf20Sopenharmony_ci- resets: Must contain an entry for each entry in reset-names.
278c2ecf20Sopenharmony_ci  See ../reset/reset.txt for details.
288c2ecf20Sopenharmony_ci- reset-names: Must include the following entries:
298c2ecf20Sopenharmony_ci  - padctl
308c2ecf20Sopenharmony_ci- #phy-cells: Should be 1. The specifier is the index of the PHY to reference.
318c2ecf20Sopenharmony_ci  See <dt-bindings/pinctrl/pinctrl-tegra-xusb.h> for the list of valid values.
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ciLane muxing:
348c2ecf20Sopenharmony_ci------------
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ciChild nodes contain the pinmux configurations following the conventions from
378c2ecf20Sopenharmony_cithe pinctrl-bindings.txt document. Typically a single, static configuration is
388c2ecf20Sopenharmony_cigiven and applied at boot time.
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ciEach subnode describes groups of lanes along with parameters and pads that
418c2ecf20Sopenharmony_cithey should be assigned to. The name of these subnodes is not important. All
428c2ecf20Sopenharmony_cisubnodes should be parsed solely based on their content.
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ciEach subnode only applies the parameters that are explicitly listed. In other
458c2ecf20Sopenharmony_ciwords, if a subnode that lists a function but no pin configuration parameters
468c2ecf20Sopenharmony_ciimplies no information about any pin configuration parameters. Similarly, a
478c2ecf20Sopenharmony_cisubnode that describes only an IDDQ parameter implies no information about
488c2ecf20Sopenharmony_ciwhat function the pins are assigned to. For this reason even seemingly boolean
498c2ecf20Sopenharmony_civalues are actually tristates in this binding: unspecified, off or on.
508c2ecf20Sopenharmony_ciUnspecified is represented as an absent property, and off/on are represented
518c2ecf20Sopenharmony_cias integer values 0 and 1.
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ciRequired properties:
548c2ecf20Sopenharmony_ci- nvidia,lanes: An array of strings. Each string is the name of a lane.
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ciOptional properties:
578c2ecf20Sopenharmony_ci- nvidia,function: A string that is the name of the function (pad) that the
588c2ecf20Sopenharmony_ci  pin or group should be assigned to. Valid values for function names are
598c2ecf20Sopenharmony_ci  listed below.
608c2ecf20Sopenharmony_ci- nvidia,iddq: Enables IDDQ mode of the lane. (0: no, 1: yes)
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ciNote that not all of these properties are valid for all lanes. Lanes can be
638c2ecf20Sopenharmony_cidivided into three groups:
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci  - otg-0, otg-1, otg-2:
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci    Valid functions for this group are: "snps", "xusb", "uart", "rsvd".
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci    The nvidia,iddq property does not apply to this group.
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci  - ulpi-0, hsic-0, hsic-1:
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci    Valid functions for this group are: "snps", "xusb".
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci    The nvidia,iddq property does not apply to this group.
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci  - pcie-0, pcie-1, pcie-2, pcie-3, pcie-4, sata-0:
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ci    Valid functions for this group are: "pcie", "usb3", "sata", "rsvd".
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ciExample:
838c2ecf20Sopenharmony_ci========
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ciSoC file extract:
868c2ecf20Sopenharmony_ci-----------------
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci	padctl@7009f000 {
898c2ecf20Sopenharmony_ci		compatible = "nvidia,tegra124-xusb-padctl";
908c2ecf20Sopenharmony_ci		reg = <0x0 0x7009f000 0x0 0x1000>;
918c2ecf20Sopenharmony_ci		resets = <&tegra_car 142>;
928c2ecf20Sopenharmony_ci		reset-names = "padctl";
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ci		#phy-cells = <1>;
958c2ecf20Sopenharmony_ci	};
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ciBoard file extract:
988c2ecf20Sopenharmony_ci-------------------
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ci	pcie-controller@1003000 {
1018c2ecf20Sopenharmony_ci		...
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci		phys = <&padctl 0>;
1048c2ecf20Sopenharmony_ci		phy-names = "pcie";
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ci		...
1078c2ecf20Sopenharmony_ci	};
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci	...
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ci	padctl: padctl@7009f000 {
1128c2ecf20Sopenharmony_ci		pinctrl-0 = <&padctl_default>;
1138c2ecf20Sopenharmony_ci		pinctrl-names = "default";
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ci		padctl_default: pinmux {
1168c2ecf20Sopenharmony_ci			usb3 {
1178c2ecf20Sopenharmony_ci				nvidia,lanes = "pcie-0", "pcie-1";
1188c2ecf20Sopenharmony_ci				nvidia,function = "usb3";
1198c2ecf20Sopenharmony_ci				nvidia,iddq = <0>;
1208c2ecf20Sopenharmony_ci			};
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_ci			pcie {
1238c2ecf20Sopenharmony_ci				nvidia,lanes = "pcie-2", "pcie-3",
1248c2ecf20Sopenharmony_ci					       "pcie-4";
1258c2ecf20Sopenharmony_ci				nvidia,function = "pcie";
1268c2ecf20Sopenharmony_ci				nvidia,iddq = <0>;
1278c2ecf20Sopenharmony_ci			};
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ci			sata {
1308c2ecf20Sopenharmony_ci				nvidia,lanes = "sata-0";
1318c2ecf20Sopenharmony_ci				nvidia,function = "sata";
1328c2ecf20Sopenharmony_ci				nvidia,iddq = <0>;
1338c2ecf20Sopenharmony_ci			};
1348c2ecf20Sopenharmony_ci		};
1358c2ecf20Sopenharmony_ci	};
136