linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] add support for ASIX AX99100
@ 2023-07-24  8:39 Jiaqing Zhao
  2023-07-24  8:39 ` [PATCH v3 1/4] can: ems_pci: remove PCI_SUBVENDOR_ID_ASIX definition Jiaqing Zhao
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jiaqing Zhao @ 2023-07-24  8:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sudip Mukherjee
  Cc: Andy Shevchenko, Wolfgang Grandegger, Marc Kleine-Budde,
	Gerhard Uttenthaler, support, linux-serial, linux-pci, linux-can,
	linux-kernel, Jiaqing Zhao

This patch adds kernel inbox driver support for the serial port and
parallel port mode controller of ASIX AX99100 PCIe to Multi I/O
Controller. This device has 4 separate PCI functions and each functions
can be configured to operate in different modes.

This patchset is tested with ASIX AX99100 in following modes:
* 4 x Serial Port
* 2 x Serial Port
* 2 x Serial Port + 1 x Parallel Port
* 1 x Parallel Port

Changes in v3:
* Keep all changes in a single patchset.
* Update commit message of patch 3.
* Get Acked-By from maintainers for patch 1 & 2.

Changes in v2:
* Split changes into 2 patchsets.
Link: https://lore.kernel.org/all/20230720102859.2985655-1-jiaqing.zhao@linux.intel.com/

Jiaqing Zhao (4):
  can: ems_pci: remove PCI_SUBVENDOR_ID_ASIX definition
  can: ems_pci: move ASIX AX99100 ids to pci_ids.h
  serial: 8250_pci: add support for ASIX AX99100
  parport_pc: add support for ASIX AX99100

 drivers/net/can/sja1000/ems_pci.c  |  7 +------
 drivers/parport/parport_pc.c       |  5 +++++
 drivers/tty/serial/8250/8250_pci.c | 10 ++++++++++
 include/linux/pci_ids.h            |  4 ++++
 4 files changed, 20 insertions(+), 6 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 1/4] can: ems_pci: remove PCI_SUBVENDOR_ID_ASIX definition
  2023-07-24  8:39 [PATCH v3 0/4] add support for ASIX AX99100 Jiaqing Zhao
@ 2023-07-24  8:39 ` Jiaqing Zhao
  2023-07-24  8:39 ` [PATCH v3 2/4] can: ems_pci: move ASIX AX99100 ids to pci_ids.h Jiaqing Zhao
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Jiaqing Zhao @ 2023-07-24  8:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sudip Mukherjee
  Cc: Andy Shevchenko, Wolfgang Grandegger, Marc Kleine-Budde,
	Gerhard Uttenthaler, support, linux-serial, linux-pci, linux-can,
	linux-kernel, Jiaqing Zhao

PCI_SUBVENDOR_ID_ASIX is defined as 0xa000, which is not the vendor id
assigned to ASIX by PCI-SIG. Remove it to avoid possible confusion and
conflict.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/sja1000/ems_pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/can/sja1000/ems_pci.c b/drivers/net/can/sja1000/ems_pci.c
index c56e27223e5f..3e18c63a982c 100644
--- a/drivers/net/can/sja1000/ems_pci.c
+++ b/drivers/net/can/sja1000/ems_pci.c
@@ -111,7 +111,6 @@ struct ems_pci_card {
 #ifndef PCI_VENDOR_ID_ASIX
 #define PCI_VENDOR_ID_ASIX 0x125b
 #define PCI_DEVICE_ID_ASIX_9110 0x9110
-#define PCI_SUBVENDOR_ID_ASIX 0xa000
 #endif
 #define PCI_SUBDEVICE_ID_EMS 0x4010
 
@@ -123,7 +122,7 @@ static const struct pci_device_id ems_pci_tbl[] = {
 	/* CPC-104P v2 */
 	{PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030, PCI_VENDOR_ID_PLX, 0x4002},
 	/* CPC-PCIe v3 */
-	{PCI_VENDOR_ID_ASIX, PCI_DEVICE_ID_ASIX_9110, PCI_SUBVENDOR_ID_ASIX, PCI_SUBDEVICE_ID_EMS},
+	{PCI_VENDOR_ID_ASIX, PCI_DEVICE_ID_ASIX_9110, 0xa000, PCI_SUBDEVICE_ID_EMS},
 	{0,}
 };
 MODULE_DEVICE_TABLE(pci, ems_pci_tbl);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v3 2/4] can: ems_pci: move ASIX AX99100 ids to pci_ids.h
  2023-07-24  8:39 [PATCH v3 0/4] add support for ASIX AX99100 Jiaqing Zhao
  2023-07-24  8:39 ` [PATCH v3 1/4] can: ems_pci: remove PCI_SUBVENDOR_ID_ASIX definition Jiaqing Zhao
@ 2023-07-24  8:39 ` Jiaqing Zhao
  2023-07-24  8:39 ` [PATCH v3 3/4] serial: 8250_pci: add support for ASIX AX99100 Jiaqing Zhao
  2023-07-24  8:39 ` [PATCH v3 4/4] parport_pc: " Jiaqing Zhao
  3 siblings, 0 replies; 6+ messages in thread
From: Jiaqing Zhao @ 2023-07-24  8:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sudip Mukherjee
  Cc: Andy Shevchenko, Wolfgang Grandegger, Marc Kleine-Budde,
	Gerhard Uttenthaler, support, linux-serial, linux-pci, linux-can,
	linux-kernel, Jiaqing Zhao, Bjorn Helgaas

Move PCI Vendor and Device ID of ASIX AX99100 PCIe to Multi I/O
Controller to pci_ids.h for its serial and parallel port driver
support in subsequent patches.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/sja1000/ems_pci.c | 6 +-----
 include/linux/pci_ids.h           | 4 ++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/can/sja1000/ems_pci.c b/drivers/net/can/sja1000/ems_pci.c
index 3e18c63a982c..1aaedaf866f1 100644
--- a/drivers/net/can/sja1000/ems_pci.c
+++ b/drivers/net/can/sja1000/ems_pci.c
@@ -108,10 +108,6 @@ struct ems_pci_card {
 
 #define EMS_PCI_BASE_SIZE  4096 /* size of controller area */
 
-#ifndef PCI_VENDOR_ID_ASIX
-#define PCI_VENDOR_ID_ASIX 0x125b
-#define PCI_DEVICE_ID_ASIX_9110 0x9110
-#endif
 #define PCI_SUBDEVICE_ID_EMS 0x4010
 
 static const struct pci_device_id ems_pci_tbl[] = {
@@ -122,7 +118,7 @@ static const struct pci_device_id ems_pci_tbl[] = {
 	/* CPC-104P v2 */
 	{PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030, PCI_VENDOR_ID_PLX, 0x4002},
 	/* CPC-PCIe v3 */
-	{PCI_VENDOR_ID_ASIX, PCI_DEVICE_ID_ASIX_9110, 0xa000, PCI_SUBDEVICE_ID_EMS},
+	{PCI_VENDOR_ID_ASIX, PCI_DEVICE_ID_ASIX_AX99100_LB, 0xa000, PCI_SUBDEVICE_ID_EMS},
 	{0,}
 };
 MODULE_DEVICE_TABLE(pci, ems_pci_tbl);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 2dc75df1437f..16608ce4fd0f 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1760,6 +1760,10 @@
 #define PCI_SUBDEVICE_ID_AT_2700FX	0x2701
 #define PCI_SUBDEVICE_ID_AT_2701FX	0x2703
 
+#define PCI_VENDOR_ID_ASIX		0x125b
+#define PCI_DEVICE_ID_ASIX_AX99100	0x9100
+#define PCI_DEVICE_ID_ASIX_AX99100_LB	0x9110
+
 #define PCI_VENDOR_ID_ESS		0x125d
 #define PCI_DEVICE_ID_ESS_ESS1968	0x1968
 #define PCI_DEVICE_ID_ESS_ESS1978	0x1978
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v3 3/4] serial: 8250_pci: add support for ASIX AX99100
  2023-07-24  8:39 [PATCH v3 0/4] add support for ASIX AX99100 Jiaqing Zhao
  2023-07-24  8:39 ` [PATCH v3 1/4] can: ems_pci: remove PCI_SUBVENDOR_ID_ASIX definition Jiaqing Zhao
  2023-07-24  8:39 ` [PATCH v3 2/4] can: ems_pci: move ASIX AX99100 ids to pci_ids.h Jiaqing Zhao
@ 2023-07-24  8:39 ` Jiaqing Zhao
  2023-07-24  8:39 ` [PATCH v3 4/4] parport_pc: " Jiaqing Zhao
  3 siblings, 0 replies; 6+ messages in thread
From: Jiaqing Zhao @ 2023-07-24  8:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sudip Mukherjee
  Cc: Andy Shevchenko, Wolfgang Grandegger, Marc Kleine-Budde,
	Gerhard Uttenthaler, support, linux-serial, linux-pci, linux-can,
	linux-kernel, Jiaqing Zhao

Each of the 4 PCI functions on ASIX AX99100 PCIe to Multi I/O
Controller can be configured as a single-port serial port controller.
The subvendor id is 0x1000 when configured as serial port and MSI
interrupts are supported.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serial/8250/8250_pci.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index d2d547b5da95..62a9bd30b4db 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -67,6 +67,8 @@ static const struct pci_device_id pci_use_msi[] = {
 			 0xA000, 0x1000) },
 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9922,
 			 0xA000, 0x1000) },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ASIX, PCI_DEVICE_ID_ASIX_AX99100,
+			 0xA000, 0x1000) },
 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_HP_3PAR, PCI_DEVICE_ID_HPE_PCI_SERIAL,
 			 PCI_ANY_ID, PCI_ANY_ID) },
 	{ }
@@ -5557,6 +5559,14 @@ static const struct pci_device_id serial_pci_tbl[] = {
 	{	PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
 		0xA000, 0x3004,
 		0, 0, pbn_b0_bt_4_115200 },
+
+	/*
+	 * ASIX AX99100 PCIe to Multi I/O Controller
+	 */
+	{	PCI_VENDOR_ID_ASIX, PCI_DEVICE_ID_ASIX_AX99100,
+		0xA000, 0x1000,
+		0, 0, pbn_b0_1_115200 },
+
 	/* Intel CE4100 */
 	{	PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CE4100_UART,
 		PCI_ANY_ID,  PCI_ANY_ID, 0, 0,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v3 4/4] parport_pc: add support for ASIX AX99100
  2023-07-24  8:39 [PATCH v3 0/4] add support for ASIX AX99100 Jiaqing Zhao
                   ` (2 preceding siblings ...)
  2023-07-24  8:39 ` [PATCH v3 3/4] serial: 8250_pci: add support for ASIX AX99100 Jiaqing Zhao
@ 2023-07-24  8:39 ` Jiaqing Zhao
  2023-07-26 11:44   ` Sudip Mukherjee
  3 siblings, 1 reply; 6+ messages in thread
From: Jiaqing Zhao @ 2023-07-24  8:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sudip Mukherjee
  Cc: Andy Shevchenko, Wolfgang Grandegger, Marc Kleine-Budde,
	Gerhard Uttenthaler, support, linux-serial, linux-pci, linux-can,
	linux-kernel, Jiaqing Zhao

The PCI function 2 on ASIX AX99100 PCIe to Multi I/O Controller can be
configured as a single-port parallel port controller. The subvendor id
is 0x2000 when configured as parallel port. It supports IEEE-1284 EPP /
ECP with its ECR on BAR1.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/parport/parport_pc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 3bacbaf16f42..1f236aaf7867 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -2655,6 +2655,7 @@ enum parport_pc_pci_cards {
 	netmos_9815,
 	netmos_9901,
 	netmos_9865,
+	asix_ax99100,
 	quatech_sppxp100,
 	wch_ch382l,
 };
@@ -2733,6 +2734,7 @@ static struct parport_pc_pci {
 	/* netmos_9815 */		{ 2, { { 0, 1 }, { 2, 3 }, } },
 	/* netmos_9901 */               { 1, { { 0, -1 }, } },
 	/* netmos_9865 */               { 1, { { 0, -1 }, } },
+	/* asix_ax99100 */		{ 1, { { 0, 1 }, } },
 	/* quatech_sppxp100 */		{ 1, { { 0, 1 }, } },
 	/* wch_ch382l */		{ 1, { { 2, -1 }, } },
 };
@@ -2823,6 +2825,9 @@ static const struct pci_device_id parport_pc_pci_tbl[] = {
 	  0xA000, 0x1000, 0, 0, netmos_9865 },
 	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
 	  0xA000, 0x2000, 0, 0, netmos_9865 },
+	/* ASIX AX99100 PCIe to Multi I/O Controller */
+	{ PCI_VENDOR_ID_ASIX, PCI_DEVICE_ID_ASIX_AX99100,
+	  0xA000, 0x2000, 0, 0, asix_ax99100 },
 	/* Quatech SPPXP-100 Parallel port PCI ExpressCard */
 	{ PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_SPPXP_100,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, quatech_sppxp100 },
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 4/4] parport_pc: add support for ASIX AX99100
  2023-07-24  8:39 ` [PATCH v3 4/4] parport_pc: " Jiaqing Zhao
@ 2023-07-26 11:44   ` Sudip Mukherjee
  0 siblings, 0 replies; 6+ messages in thread
From: Sudip Mukherjee @ 2023-07-26 11:44 UTC (permalink / raw)
  To: Jiaqing Zhao, Greg Kroah-Hartman
  Cc: Andy Shevchenko, Wolfgang Grandegger, Marc Kleine-Budde,
	Gerhard Uttenthaler, support, linux-serial, linux-pci, linux-can,
	linux-kernel

On Mon, 24 Jul 2023 at 09:40, Jiaqing Zhao <jiaqing.zhao@linux.intel.com> wrote:
>
> The PCI function 2 on ASIX AX99100 PCIe to Multi I/O Controller can be
> configured as a single-port parallel port controller. The subvendor id
> is 0x2000 when configured as parallel port. It supports IEEE-1284 EPP /
> ECP with its ECR on BAR1.
>
> Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>


-- 
Regards
Sudip

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-26 11:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-24  8:39 [PATCH v3 0/4] add support for ASIX AX99100 Jiaqing Zhao
2023-07-24  8:39 ` [PATCH v3 1/4] can: ems_pci: remove PCI_SUBVENDOR_ID_ASIX definition Jiaqing Zhao
2023-07-24  8:39 ` [PATCH v3 2/4] can: ems_pci: move ASIX AX99100 ids to pci_ids.h Jiaqing Zhao
2023-07-24  8:39 ` [PATCH v3 3/4] serial: 8250_pci: add support for ASIX AX99100 Jiaqing Zhao
2023-07-24  8:39 ` [PATCH v3 4/4] parport_pc: " Jiaqing Zhao
2023-07-26 11:44   ` Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).