arm64: tegra: Enable XUSB on P2771
authorThierry Reding <treding@nvidia.com>
Thu, 10 Jan 2019 11:42:40 +0000 (12:42 +0100)
committerThierry Reding <treding@nvidia.com>
Wed, 17 Apr 2019 14:48:44 +0000 (16:48 +0200)
Enable the relevant pads for XUSB support on P2771-0000 and hook up the
USB supply voltage regulators to the ports.

Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts
arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi

index 31457f32e4d08aaafffabf15bc17520070af3090..75ee6cf1e1b4ceafca6eb67905a3de08791d3d31 100644 (file)
                status = "okay";
        };
 
+       padctl@3520000 {
+               status = "okay";
+
+               avdd-pll-erefeut-supply = <&vdd_1v8_pll>;
+               avdd-usb-supply = <&vdd_3v3_sys>;
+               dvdd-pex-supply = <&vdd_pex>;
+               dvdd-pex-pll-supply = <&vdd_pex>;
+               hvdd-pex-supply = <&vdd_1v8>;
+               hvdd-pex-pll-supply = <&vdd_1v8>;
+               vclamp-usb-supply = <&vdd_1v8>;
+               vddio-hsic-supply = <&gnd>;
+
+               pads {
+                       usb2 {
+                               status = "okay";
+
+                               lanes {
+                                       usb2-0 {
+                                               nvidia,function = "xusb";
+                                               status = "okay";
+                                       };
+
+                                       usb2-1 {
+                                               nvidia,function = "xusb";
+                                               status = "okay";
+                                       };
+
+                                       usb2-2 {
+                                               nvidia,function = "xusb";
+                                               status = "okay";
+                                       };
+                               };
+                       };
+
+                       usb3 {
+                               status = "okay";
+
+                               lanes {
+                                       usb3-0 {
+                                               nvidia,function = "xusb";
+                                               status = "okay";
+                                       };
+
+                                       usb3-1 {
+                                               nvidia,function = "xusb";
+                                               status = "okay";
+                                       };
+
+                                       usb3-2 {
+                                               nvidia,function = "xusb";
+                                               status = "okay";
+                                       };
+                               };
+                       };
+               };
+
+               ports {
+                       usb2-0 {
+                               status = "okay";
+                               mode = "otg";
+
+                               vbus-supply = <&vdd_usb0>;
+                       };
+
+                       usb2-1 {
+                               status = "okay";
+                               mode = "host";
+
+                               vbus-supply = <&vdd_usb1>;
+                       };
+
+                       usb3-0 {
+                               nvidia,usb2-companion = <1>;
+                               status = "okay";
+                       };
+               };
+       };
+
+       usb@3530000 {
+               status = "okay";
+
+               phys = <&{/padctl@3520000/pads/usb2/lanes/usb2-0}>,
+                      <&{/padctl@3520000/pads/usb2/lanes/usb2-1}>,
+                      <&{/padctl@3520000/pads/usb3/lanes/usb3-0}>;
+               phy-names = "usb2-0", "usb2-1", "usb3-0";
+       };
+
        pcie@10003000 {
                status = "okay";
 
 
                        vin-supply = <&vdd_5v0_sys>;
                };
+
+               vdd_usb0: regulator@102 {
+                       compatible = "regulator-fixed";
+                       reg = <102>;
+
+                       regulator-name = "VDD_USB0";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+
+                       gpio = <&gpio TEGRA_MAIN_GPIO(L, 4) GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+
+                       vin-supply = <&vdd_5v0_sys>;
+               };
+
+               vdd_usb1: regulator@103 {
+                       compatible = "regulator-fixed";
+                       reg = <103>;
+
+                       regulator-name = "VDD_USB1";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+
+                       gpio = <&gpio TEGRA_MAIN_GPIO(L, 5) GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+
+                       vin-supply = <&vdd_5v0_sys>;
+               };
        };
 };
index 89a2da46efae8c60b99ddac7a2b74112718ea19c..952062f0b9a944b1557d43811cf69941f8e4f24d 100644 (file)
                                                regulator-boot-on;
                                        };
 
-                                       ldo0 {
+                                       vdd_1v8_pll: ldo0 {
                                                regulator-name = "VDD_1V8_AP_PLL";
                                                regulator-min-microvolt = <1800000>;
                                                regulator-max-microvolt = <1800000>;
                #address-cells = <1>;
                #size-cells = <0>;
 
-               vdd_5v0_sys: regulator@0 {
+               gnd: regulator@0 {
                        compatible = "regulator-fixed";
                        reg = <0>;
 
+                       regulator-name = "GND";
+                       regulator-min-microvolt = <0>;
+                       regulator-max-microvolt = <0>;
+                       regulator-always-on;
+                       regulator-boot-on;
+               };
+
+               vdd_5v0_sys: regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+
                        regulator-name = "VDD_5V0_SYS";
                        regulator-min-microvolt = <5000000>;
                        regulator-max-microvolt = <5000000>;
                        regulator-boot-on;
                };
 
-               vdd_1v8_ap: regulator@1 {
+               vdd_1v8_ap: regulator@2 {
                        compatible = "regulator-fixed";
-                       reg = <1>;
+                       reg = <2>;
 
                        regulator-name = "VDD_1V8_AP";
                        regulator-min-microvolt = <1800000>;