Skip to contentSkip to conversation

accel/ivpu: Intel NPU Panther Lake support

PATCH Applied Maciej Falkowski 3 participants 6 messages Oct 4, 2024 – Oct 11, 2024

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

cover accel/ivpu: Intel NPU Panther Lake support

This patchset adds initial support for 5th generation Intel NPU that is going to be present in the upcoming Panther Lake CPUs.

Maciej Falkowski (1):
accel/ivpu: Add initial Panther Lake support

Wachowski, Karol (1):
accel/ivpu: Update power island delays

 drivers/accel/ivpu/ivpu_drv.c         |  1 +
 drivers/accel/ivpu/ivpu_drv.h         | 10 ++++--
 drivers/accel/ivpu/ivpu_fw.c          |  3 ++
 drivers/accel/ivpu/ivpu_hw_40xx_reg.h |  2 ++
 drivers/accel/ivpu/ivpu_hw_ip.c       | 49 +++++++++++++++++----------
 5 files changed, 45 insertions(+), 20 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/2 accel/ivpu: Add initial Panther Lake support

Add support for the 5th generation of Intel NPU that is going to be present in PTL_P (Panther Lake) CPUs. NPU5 code reuses almost all of previous driver code.

---
 drivers/accel/ivpu/ivpu_drv.c |  1 +
 drivers/accel/ivpu/ivpu_drv.h | 10 +++++++---
 drivers/accel/ivpu/ivpu_fw.c  |  3 +++
 3 files changed, 11 insertions(+), 3 deletions(-)
drivers/accel/ivpu/ivpu_drv.c +1 -0
index c91400ecf926..1b3127ce0ee2 100644
@@ -722,6 +722,7 @@ static struct pci_device_id ivpu_pci_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_MTL) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_ARL) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_LNL) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PTL_P) },
 	{ }
 };
 MODULE_DEVICE_TABLE(pci, ivpu_pci_ids);
drivers/accel/ivpu/ivpu_drv.h +7 -3
index 63f13b697eed..d0f750c5c453 100644
@@ -23,9 +23,10 @@
 #define DRIVER_DESC "Driver for Intel NPU (Neural Processing Unit)"
 #define DRIVER_DATE "20230117"
 
-#define PCI_DEVICE_ID_MTL   0x7d1d
-#define PCI_DEVICE_ID_ARL   0xad1d
-#define PCI_DEVICE_ID_LNL   0x643e
+#define PCI_DEVICE_ID_MTL	0x7d1d
+#define PCI_DEVICE_ID_ARL	0xad1d
+#define PCI_DEVICE_ID_LNL	0x643e
+#define PCI_DEVICE_ID_PTL_P	0xb03e
 
 #define IVPU_HW_IP_37XX 37
 #define IVPU_HW_IP_40XX 40
@@ -215,6 +216,8 @@ static inline int ivpu_hw_ip_gen(struct ivpu_device *vdev)
 		return IVPU_HW_IP_37XX;
 	case PCI_DEVICE_ID_LNL:
 		return IVPU_HW_IP_40XX;
+	case PCI_DEVICE_ID_PTL_P:
+		return IVPU_HW_IP_50XX;
 	default:
 		dump_stack();
 		ivpu_err(vdev, "Unknown NPU IP generation\n");
@@ -229,6 +232,7 @@ static inline int ivpu_hw_btrs_gen(struct ivpu_device *vdev)
 	case PCI_DEVICE_ID_ARL:
 		return IVPU_HW_BTRS_MTL;
 	case PCI_DEVICE_ID_LNL:
+	case PCI_DEVICE_ID_PTL_P:
 		return IVPU_HW_BTRS_LNL;
 	default:
 		dump_stack();
drivers/accel/ivpu/ivpu_fw.c +3 -0
index ede6165e09d9..33ce4680c2cd 100644
@@ -58,11 +58,14 @@ static struct {
 	{ IVPU_HW_IP_37XX, "intel/vpu/vpu_37xx_v0.0.bin" },
 	{ IVPU_HW_IP_40XX, "vpu_40xx.bin" },
 	{ IVPU_HW_IP_40XX, "intel/vpu/vpu_40xx_v0.0.bin" },
+	{ IVPU_HW_IP_50XX, "vpu_50xx.bin" },
+	{ IVPU_HW_IP_50XX, "intel/vpu/vpu_50xx_v0.0.bin" },
 };
 
 /* Production fw_names from the table above */
 MODULE_FIRMWARE("intel/vpu/vpu_37xx_v0.0.bin");
 MODULE_FIRMWARE("intel/vpu/vpu_40xx_v0.0.bin");
+MODULE_FIRMWARE("intel/vpu/vpu_50xx_v0.0.bin");
 
 static int ivpu_fw_request(struct ivpu_device *vdev)
 {
Signature · 1 line
2.34.1
#3 lore raw

PATCH 2/2 accel/ivpu: Update power island delays

In reply to Maciej Falkowski

From: "Wachowski, Karol" <[email protected]>

Apply Hardware Architecture Specification compatible delays for main island power delivery for 50xx and above.

---
 drivers/accel/ivpu/ivpu_hw_40xx_reg.h |  2 ++
 drivers/accel/ivpu/ivpu_hw_ip.c       | 49 +++++++++++++++++----------
 2 files changed, 34 insertions(+), 17 deletions(-)
drivers/accel/ivpu/ivpu_hw_40xx_reg.h +2 -0
index d0b795b344c7..fc0ee8d637f9 100644
@@ -115,6 +115,8 @@
 
 #define VPU_50XX_HOST_SS_AON_PWR_ISLAND_EN_POST_DLY			0x00030068u
 #define VPU_50XX_HOST_SS_AON_PWR_ISLAND_EN_POST_DLY_POST_DLY_MASK	GENMASK(7, 0)
+#define VPU_50XX_HOST_SS_AON_PWR_ISLAND_EN_POST_DLY_POST1_DLY_MASK	GENMASK(15, 8)
+#define VPU_50XX_HOST_SS_AON_PWR_ISLAND_EN_POST_DLY_POST2_DLY_MASK	GENMASK(23, 16)
 
 #define VPU_50XX_HOST_SS_AON_PWR_ISLAND_STATUS_DLY			0x0003006cu
 #define VPU_50XX_HOST_SS_AON_PWR_ISLAND_STATUS_DLY_STATUS_DLY_MASK	GENMASK(7, 0)
drivers/accel/ivpu/ivpu_hw_ip.c +32 -17

80 lines not on this page · raw message

Signature · 1 line
2.34.1
#5 lore raw
In reply to Maciej Falkowski

Applied to drm-misc-next

Quoted 16 lines · Maciej Falkowski

This patchset adds initial support for 5th generation Intel NPU that is going to be present in the upcoming Panther Lake CPUs.

Maciej Falkowski (1):
accel/ivpu: Add initial Panther Lake support

Wachowski, Karol (1):
accel/ivpu: Update power island delays

 drivers/accel/ivpu/ivpu_drv.c         |  1 +
 drivers/accel/ivpu/ivpu_drv.h         | 10 ++++--
 drivers/accel/ivpu/ivpu_fw.c          |  3 ++
 drivers/accel/ivpu/ivpu_hw_40xx_reg.h |  2 ++
 drivers/accel/ivpu/ivpu_hw_ip.c       | 49 +++++++++++++++++----------
 5 files changed, 45 insertions(+), 20 deletions(-)