Skip to contentSkip to conversation

usb: dwc3: pci: Allow Elkhart Lake to utilize DSM method for PM functionality

PATCH In review Raymond Tan 3 participants 5 messages Aug 3, 2020 – Aug 20, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover usb: dwc3: pci: Allow Elkhart Lake to utilize DSM method for PM functionality

Elkhart Lake adopted the DWC3 IP from other platforms, thus require same DSM method to put the controller into D0/D3 state through PMU register.

Raymond Tan (2):
usb: dwc3: pci: Fix DEFINE for Intel Elkhart Lake
usb: dwc3: pci: Allow Elkhart Lake to utilize DSM method for PM
functionality

 drivers/usb/dwc3/dwc3-pci.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/2 usb: dwc3: pci: Fix DEFINE for Intel Elkhart Lake

There's no separate low power (LP) version of Elkhart Lake, thus this patch updates the PCI Device ID DEFINE to indicate this.

---
 drivers/usb/dwc3/dwc3-pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/dwc3/dwc3-pci.c +2 -2
index f420d7d..4f436b3 100644
@@ -36,7 +36,7 @@
 #define PCI_DEVICE_ID_INTEL_CNPH		0xa36e
 #define PCI_DEVICE_ID_INTEL_CNPV		0xa3b0
 #define PCI_DEVICE_ID_INTEL_ICLLP		0x34ee
-#define PCI_DEVICE_ID_INTEL_EHLLP		0x4b7e
+#define PCI_DEVICE_ID_INTEL_EHL			0x4b7e
 #define PCI_DEVICE_ID_INTEL_TGPLP		0xa0ee
 #define PCI_DEVICE_ID_INTEL_TGPH		0x43ee
 #define PCI_DEVICE_ID_INTEL_JSP			0x4dee
@@ -356,7 +356,7 @@ static const struct pci_device_id dwc3_pci_id_table[] = {
 	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICLLP),
 	  (kernel_ulong_t) &dwc3_pci_intel_properties, },
 
-	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_EHLLP),
+	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_EHL),
 	  (kernel_ulong_t) &dwc3_pci_intel_properties, },
 
 	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGPLP),
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/2 usb: dwc3: pci: Allow Elkhart Lake to utilize DSM method for PM functionality

In reply to Raymond Tan

Similar to some other IA platforms, Elkhart Lake too depends on the PMU register write to request transition of Dx power state.

Thus, we add the PCI_DEVICE_ID_INTEL_EHL to the list of devices that shall execute the ACPI _DSM method during D0/D3 sequence.

---
 drivers/usb/dwc3/dwc3-pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-pci.c +2 -1
index 4f436b3..4d50187 100644
@@ -149,7 +149,8 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)
 
 	if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
 		if (pdev->device == PCI_DEVICE_ID_INTEL_BXT ||
-				pdev->device == PCI_DEVICE_ID_INTEL_BXT_M) {
+		    pdev->device == PCI_DEVICE_ID_INTEL_BXT_M ||
+		    pdev->device == PCI_DEVICE_ID_INTEL_EHL) {
 			guid_parse(PCI_INTEL_BXT_DSM_GUID, &dwc->guid);
 			dwc->has_dsm_for_pm = true;
 		}
Signature · 1 line
2.7.4
#3 lore raw
Quoted 16 lines · Raymond Tan

Similar to some other IA platforms, Elkhart Lake too depends on the PMU register write to request transition of Dx power state.

Thus, we add the PCI_DEVICE_ID_INTEL_EHL to the list of devices that shall execute the ACPI _DSM method during D0/D3 sequence.

---
 drivers/usb/dwc3/dwc3-pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-pci.c +0 -0
index 4f436b3..4d50187 100644

drivers/usb/dwc3/dwc3-pci.c static int dwc3_pci_quirks(struct dwc3_pci *dwc) · line 153

Quoted 6 lines
drivers/usb/dwc3/dwc3-pci.c +2 -1
@@ -149,7 +149,8 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)
 
 	if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
 		if (pdev->device == PCI_DEVICE_ID_INTEL_BXT ||
-				pdev->device == PCI_DEVICE_ID_INTEL_BXT_M) {
+		    pdev->device == PCI_DEVICE_ID_INTEL_BXT_M ||
+		    pdev->device == PCI_DEVICE_ID_INTEL_EHL) {

this looks like a bug fix which could be added during -rc cycle. As such, it should be patch 1 in this series. Renaming the macro is less critical. Can you update your series so I can take patch 1 during -rc and patch 2 for next merge window? Please, don't forget to add the
Fixes: tag ;-)

Signature · 1 line
balbi
#4 lore raw
Quoted 19 lines · Felipe Balbi
Quoted 17 lines · Raymond Tan

Similar to some other IA platforms, Elkhart Lake too depends on the PMU register write to request transition of Dx power state.

Thus, we add the PCI_DEVICE_ID_INTEL_EHL to the list of devices that shall execute the ACPI _DSM method during D0/D3 sequence.

---
 drivers/usb/dwc3/dwc3-pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-pci.c +0 -0
index 4f436b3..4d50187 100644
@@ -149,7 +149,8 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)
 
Quoted 11 lines

drivers/usb/dwc3/dwc3-pci.c static int dwc3_pci_quirks(struct dwc3_pci *dwc) · line 153

Quoted 5 lines
drivers/usb/dwc3/dwc3-pci.c +2 -1
 	if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
 		if (pdev->device == PCI_DEVICE_ID_INTEL_BXT ||
-				pdev->device == PCI_DEVICE_ID_INTEL_BXT_M) {
+		    pdev->device == PCI_DEVICE_ID_INTEL_BXT_M ||
+		    pdev->device == PCI_DEVICE_ID_INTEL_EHL) {

this looks like a bug fix which could be added during -rc cycle. As such, it should be patch 1 in this series. Renaming the macro is less critical. Can you update your series so I can take patch 1 during -rc and patch 2 for next merge window? Please, don't forget to add the
Fixes: tag ;-)

Raymond, I'll take care of this patch (and the other one too). I have now some changes that need to be made on top of this patch, and I don't want to wait with them anymore, so I'll include these in my series.

thanks,

Signature · 1 line
heikki