Skip to content

Commit 550f4dd

Browse files
committed
accel/ivpu: Add support for Nova Lake's NPU
Add support for NPU6 generation that will be present on Nova Lake CPUs. As with previous generations, it maintains compatibility so no bigger functional changes apart from removing deprecated call to soc_cpu_drive() function. Quiescing TOP_MMIO in SOC_CPU_NOC as part of boot procedure is no longer needed starting from 60XX. Remove soc_cpu_drive() call from NPU6 onward. The VPU_CPU_NOC_QREQN, VPU_CPU_NOC_QACCEPTN, and VPU_CPU_NOC_QDENY registers are deprecated and non-functional on 60XX. They will be removed in future generations. Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Signed-off-by: Maciej Falkowski <maciej.falkowski@linux.intel.com> Link: https://lore.kernel.org/r/20251022105348.2237273-1-maciej.falkowski@linux.intel.com
1 parent b36ca97 commit 550f4dd

4 files changed

Lines changed: 17 additions & 0 deletions

File tree

drivers/accel/ivpu/ivpu_drv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,7 @@ static struct pci_device_id ivpu_pci_ids[] = {
707707
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_LNL) },
708708
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PTL_P) },
709709
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_WCL) },
710+
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_NVL) },
710711
{ }
711712
};
712713
MODULE_DEVICE_TABLE(pci, ivpu_pci_ids);

drivers/accel/ivpu/ivpu_drv.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#define PCI_DEVICE_ID_LNL 0x643e
2828
#define PCI_DEVICE_ID_PTL_P 0xb03e
2929
#define PCI_DEVICE_ID_WCL 0xfd3e
30+
#define PCI_DEVICE_ID_NVL 0xd71d
3031

3132
#define IVPU_HW_IP_37XX 37
3233
#define IVPU_HW_IP_40XX 40
@@ -245,6 +246,8 @@ static inline int ivpu_hw_ip_gen(struct ivpu_device *vdev)
245246
case PCI_DEVICE_ID_PTL_P:
246247
case PCI_DEVICE_ID_WCL:
247248
return IVPU_HW_IP_50XX;
249+
case PCI_DEVICE_ID_NVL:
250+
return IVPU_HW_IP_60XX;
248251
default:
249252
dump_stack();
250253
ivpu_err(vdev, "Unknown NPU IP generation\n");
@@ -261,6 +264,7 @@ static inline int ivpu_hw_btrs_gen(struct ivpu_device *vdev)
261264
case PCI_DEVICE_ID_LNL:
262265
case PCI_DEVICE_ID_PTL_P:
263266
case PCI_DEVICE_ID_WCL:
267+
case PCI_DEVICE_ID_NVL:
264268
return IVPU_HW_BTRS_LNL;
265269
default:
266270
dump_stack();

drivers/accel/ivpu/ivpu_fw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ static struct {
5656
{ IVPU_HW_IP_40XX, "intel/vpu/vpu_40xx_v0.0.bin" },
5757
{ IVPU_HW_IP_50XX, "intel/vpu/vpu_50xx_v1.bin" },
5858
{ IVPU_HW_IP_50XX, "intel/vpu/vpu_50xx_v0.0.bin" },
59+
{ IVPU_HW_IP_60XX, "intel/vpu/vpu_60xx_v1.bin" },
5960
};
6061

6162
/* Production fw_names from the table above */
6263
MODULE_FIRMWARE("intel/vpu/vpu_37xx_v1.bin");
6364
MODULE_FIRMWARE("intel/vpu/vpu_40xx_v1.bin");
6465
MODULE_FIRMWARE("intel/vpu/vpu_50xx_v1.bin");
66+
MODULE_FIRMWARE("intel/vpu/vpu_60xx_v1.bin");
6567

6668
static int ivpu_fw_request(struct ivpu_device *vdev)
6769
{

drivers/accel/ivpu/ivpu_hw_ip.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,13 @@ static void pwr_island_delay_set(struct ivpu_device *vdev)
691691
status = high ? 46 : 3;
692692
break;
693693

694+
case PCI_DEVICE_ID_NVL:
695+
post = high ? 198 : 17;
696+
post1 = 0;
697+
post2 = high ? 198 : 17;
698+
status = 0;
699+
break;
700+
694701
default:
695702
dump_stack();
696703
ivpu_err(vdev, "Unknown device ID\n");
@@ -889,6 +896,9 @@ static int soc_cpu_drive_40xx(struct ivpu_device *vdev, bool enable)
889896

890897
static int soc_cpu_enable(struct ivpu_device *vdev)
891898
{
899+
if (ivpu_hw_ip_gen(vdev) >= IVPU_HW_IP_60XX)
900+
return 0;
901+
892902
return soc_cpu_drive_40xx(vdev, true);
893903
}
894904

0 commit comments

Comments
 (0)