ns16550: add support for Intel LPSS UART
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Tue, 15 Mar 2022 11:09:01 +0000 (12:09 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 15 Mar 2022 11:09:01 +0000 (12:09 +0100)
This adds support for serial console as found in a laptop with TGL-LP
(StarBook MkV). Since the device is on the bus 0, it needs to be enabled
via "com1=...,amt", not just "...,pci".

Device specification is in Intel docs 631119-007 and 631120-001.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/char/ns16550.c

index e5b4a908551672a9821d684e537116ba6fac4725..fb75cee4a13ad32dd14d198c0fc9c1e3886720e2 100644 (file)
@@ -91,6 +91,7 @@ struct ns16550_config {
         param_exar_xr17v352,
         param_exar_xr17v354,
         param_exar_xr17v358,
+        param_intel_lpss,
     } param;
 };
 
@@ -822,6 +823,16 @@ static const struct ns16550_config_param __initconst uart_param[] = {
         .mmio = 1,
         .max_ports = 8,
     },
+    [param_intel_lpss] = {
+        .uart_offset = 0x000,
+        .reg_shift = 2,
+        .reg_width = 1,
+        .fifo_size = 64,
+        .lsr_mask = UART_LSR_THRE,
+        .bar0 = 1,
+        .mmio = 1,
+        .max_ports = 1,
+    },
 };
 
 static const struct ns16550_config __initconst uart_config[] =
@@ -1066,6 +1077,12 @@ static const struct ns16550_config __initconst uart_config[] =
         .dev_id = 0x0358,
         .param = param_exar_xr17v358
     },
+    /* Intel Corp. TGL-LP LPSS PCI */
+    {
+        .vendor_id = PCI_VENDOR_ID_INTEL,
+        .dev_id = 0xa0c7,
+        .param = param_intel_lpss
+    },
 };
 
 static int __init