usb: dwc3: pci: Also apply Bay Trail GPIO mappings to ulpi-device
authorHans de Goede <hdegoede@redhat.com>
Sun, 13 Feb 2022 13:05:20 +0000 (14:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Feb 2022 15:30:29 +0000 (16:30 +0100)
In order for the phy driver to be able to actually get and control
the cs and reset GPIOs the dev_id member of the gpiod_lookup table must
be set to point to the dev_name() of the ulpi-device instantiated by
dwc3_ulpi_init().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220213130524.18748-6-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-pci.c

index 6bb4e9614b4f1ab3b47dcb3ab074a61ccb8eecbd..4330c974b31baec22daca24ed21c431730f16d9a 100644 (file)
@@ -241,6 +241,14 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc,
                                usleep_range(10000, 11000);
                        }
 
+                       /*
+                        * Make the pdev name predictable (only 1 DWC3 on BYT)
+                        * and patch the phy dev-name into the lookup table so
+                        * that the phy-driver can get the GPIOs.
+                        */
+                       dwc->dwc3->id = PLATFORM_DEVID_NONE;
+                       platform_bytcr_gpios.dev_id = "dwc3.ulpi";
+
                        /*
                         * Some Android tablets with a Crystal Cove PMIC
                         * (INT33FD), rely on the TUSB1211 phy for charger