arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub
authorMatthias Kaehlcke <mka@chromium.org>
Fri, 22 Jul 2022 16:32:44 +0000 (09:32 -0700)
committerBjorn Andersson <andersson@kernel.org>
Wed, 14 Sep 2022 03:48:56 +0000 (22:48 -0500)
Add nodes for the onboard USB hub on trogdor devices. Remove the
'always-on' property from the hub regulator, since the regulator
is now managed by the onboard_usb_hub driver.

For anyone using trogdor-based devices on Linux, it should be
noted that this requires "CONFIG_USB_ONBOARD_HUB=y".

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220722093238.v24.1.I7a1a6448d50bdd38e6082204a9818c59cc7a9bfd@changeid
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r1.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi

index bfbf26fd2cd45076d007d9cac4c7ebb1e4daea91..d49de65aa9600368d219482ad2ef9a4abd21d934 100644 (file)
        compatible = "google,lazor-rev0", "qcom,sc7180";
 };
 
-&pp3300_hub {
-       /* pp3300_l7c is used to power the USB hub */
-       /delete-property/regulator-always-on;
-       /delete-property/regulator-boot-on;
-};
-
-&pp3300_l7c {
-       regulator-always-on;
-       regulator-boot-on;
-};
-
 &sn65dsi86_out {
        /*
         * Lane 0 was incorrectly mapped on the cable, but we've now decided
         */
        lane-polarities = <1 0>;
 };
+
+&usb_hub_2_x {
+        vdd-supply = <&pp3300_l7c>;
+};
+
+&usb_hub_3_x {
+        vdd-supply = <&pp3300_l7c>;
+};
index d45a59afd7fc41c46b89ab02ffbfc4226f9c4dd3..80c7108bc51b194f1dce54c0b10301a318a93338 100644 (file)
        compatible = "google,lazor-rev1", "google,lazor-rev2", "qcom,sc7180";
 };
 
-&pp3300_hub {
-       /* pp3300_l7c is used to power the USB hub */
-       /delete-property/regulator-always-on;
-       /delete-property/regulator-boot-on;
+
+&usb_hub_2_x {
+        vdd-supply = <&pp3300_l7c>;
 };
 
-&pp3300_l7c {
-       regulator-always-on;
-       regulator-boot-on;
+&usb_hub_3_x {
+        vdd-supply = <&pp3300_l7c>;
 };
index 76a130bad60ae518a18f10a2b1f1df556ab95f1e..8467ff41e6d539c31f637a29757857781db43de7 100644 (file)
        /delete-node/ charger-thermistor@0;
 };
 
-&pp3300_hub {
-       /* pp3300_l7c is used to power the USB hub */
-       /delete-property/regulator-always-on;
-       /delete-property/regulator-boot-on;
+&usb_hub_2_x {
+        vdd-supply = <&pp3300_l7c>;
 };
 
-&pp3300_l7c {
-       regulator-always-on;
-       regulator-boot-on;
+&usb_hub_3_x {
+        vdd-supply = <&pp3300_l7c>;
 };
index 59a23d0e96517ed10e53d65a2a0effdf96ad6268..bc097d1b1b234db4ebcb21c74a9f242702f0167d 100644 (file)
@@ -44,17 +44,6 @@ ap_ts_pen_1v8: &i2c4 {
        compatible = "auo,b116xa01";
 };
 
-&pp3300_hub {
-       /* pp3300_l7c is used to power the USB hub */
-       /delete-property/regulator-always-on;
-       /delete-property/regulator-boot-on;
-};
-
-&pp3300_l7c {
-       regulator-always-on;
-       regulator-boot-on;
-};
-
 &sdhc_2 {
        status = "okay";
 };
@@ -63,6 +52,14 @@ ap_ts_pen_1v8: &i2c4 {
        interrupts = <58 IRQ_TYPE_EDGE_FALLING>;
 };
 
+&usb_hub_2_x {
+        vdd-supply = <&pp3300_l7c>;
+};
+
+&usb_hub_3_x {
+        vdd-supply = <&pp3300_l7c>;
+};
+
 /* PINCTRL - modifications to sc7180-trogdor.dtsi */
 
 &trackpad_int_1v8_odl {
index b5f534db135a6fed6e867aa9a2f8c2070c8f1708..eae22e6e97c15f185fac74a64b2efaf8b2815c3c 100644 (file)
                pinctrl-names = "default";
                pinctrl-0 = <&en_pp3300_hub>;
 
-               regulator-always-on;
+               /* The BIOS leaves this regulator on */
                regulator-boot-on;
 
                vin-supply = <&pp3300_a>;
@@ -936,6 +936,24 @@ ap_spi_fp: &spi10 {
 
 &usb_1_dwc3 {
        dr_mode = "host";
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       /* 2.x hub on port 1 */
+       usb_hub_2_x: hub@1 {
+               compatible = "usbbda,5411";
+               reg = <1>;
+               vdd-supply = <&pp3300_hub>;
+               peer-hub = <&usb_hub_3_x>;
+       };
+
+       /* 3.x hub on port 2 */
+       usb_hub_3_x: hub@2 {
+               compatible = "usbbda,411";
+               reg = <2>;
+               vdd-supply = <&pp3300_hub>;
+               peer-hub = <&usb_hub_2_x>;
+       };
 };
 
 &usb_1_hsphy {