Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Add D-Link DGE-530T C1 and TP-Link TG-3468 v2.



details:   https://anonhg.NetBSD.org/src/rev/b53a3e634090
branches:  trunk
changeset: 1004789:b53a3e634090
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Nov 14 09:11:35 2019 +0000

description:
Add D-Link DGE-530T C1 and TP-Link TG-3468 v2.

diffstat:

 sys/dev/pci/if_jmereg.h |  19 +++++++++++++++++++
 sys/dev/pci/if_re_pci.c |  10 ++++++++--
 sys/dev/pci/xhci_pci.c  |  11 +++++++++--
 3 files changed, 36 insertions(+), 4 deletions(-)

diffs (110 lines):

diff -r 10b3edcc457f -r b53a3e634090 sys/dev/pci/if_jmereg.h
--- a/sys/dev/pci/if_jmereg.h   Thu Nov 14 09:11:05 2019 +0000
+++ b/sys/dev/pci/if_jmereg.h   Thu Nov 14 09:11:35 2019 +0000
@@ -62,6 +62,21 @@
 #define        SPI_SCK_CTRL            0x00000002
 #define        SPI_CS_N_CTRL           0x00000001
 
+#define        JME_EFUSE_CTL1          0xB8
+#define        EFUSE_CTL1_DATA_MASK    0xF0000000
+#define        EFUSE_CTL1_EXECUTE      0x08000000
+#define        EFUSE_CTL1_CMD_AUTOLOAD 0x02000000
+#define        EFUSE_CTL1_CMD_READ     0x04000000
+#define        EFUSE_CTL1_CMD_BLOW     0x06000000
+#define        EFUSE_CTL1_CMD_MASK     0x06000000
+#define        EFUSE_CTL1_AUTOLOAD_ERR 0x00010000
+#define        EFUSE_CTL1_BYTE_SEL_MASK        0x0000FF00
+#define        EFUSE_CTL1_BIT_SEL_MASK 0x00000070
+#define        EFUSE_CTL1_AUTOLAOD_DONE        0x00000001
+
+#define        JME_EFUSE_CTL2          0xBC
+#define        EFUSE_CTL2_RESET        0x00008000
+
 #define        JME_PCI_PHYCFG0         0xC0
 
 #define        JME_PCI_PHYCFG1         0xC4
@@ -757,6 +772,10 @@
 #define        CHIPMODE_MODE_128P_MAC  0x00000003
 #define        CHIPMODE_MODE_128P_DBG  0x00000002
 #define        CHIPMODE_MODE_128P_PHY  0x00000000
+/* Chip full mask revision. */
+#define        CHIPMODE_REVFM(x)       ((x) & 0x0F)
+/* Chip ECO revision. */
+#define        CHIPMODE_REVECO(x)      (((x) >> 4) & 0x0F)
 
 /* Shadow status base address high/low. */
 #define        JME_SHBASE_ADDR_HI      0x48
diff -r 10b3edcc457f -r b53a3e634090 sys/dev/pci/if_re_pci.c
--- a/sys/dev/pci/if_re_pci.c   Thu Nov 14 09:11:05 2019 +0000
+++ b/sys/dev/pci/if_re_pci.c   Thu Nov 14 09:11:35 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_re_pci.c,v 1.49 2018/11/13 20:12:45 jdolecek Exp $  */
+/*     $NetBSD: if_re_pci.c,v 1.50 2019/11/14 09:11:35 msaitoh Exp $   */
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_re_pci.c,v 1.49 2018/11/13 20:12:45 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_re_pci.c,v 1.50 2019/11/14 09:11:35 msaitoh Exp $");
 
 #include <sys/types.h>
 
@@ -99,6 +99,9 @@
        { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8168,
            RTK_8168,
            "RealTek 8168/8111 PCIe Gigabit Ethernet" },
+       { PCI_VENDOR_NCUBE, PCI_PRODUCT_NCUBE_TG3648,
+           RTK_8168,
+           "TP-Link TG-3468 v2 (RTL8168) Gigabit Ethernet" },
        { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8169,
            RTK_8169,
            "RealTek 8169/8110 Gigabit Ethernet" },
@@ -111,6 +114,9 @@
        { PCI_VENDOR_DLINK, PCI_PRODUCT_DLINK_DGE528T,
            RTK_8169,
            "D-Link DGE-528T Gigabit Ethernet" },
+       { PCI_VENDOR_DLINK, PCI_PRODUCT_DLINK_DGE530T_C1,
+           RTK_8169,
+           "D-Link DGE-530T C1 Gigabit Ethernet" },
        { PCI_VENDOR_USR2, PCI_PRODUCT_USR2_USR997902,
            RTK_8169,
            "US Robotics (3Com) USR997902 Gigabit Ethernet" },
diff -r 10b3edcc457f -r b53a3e634090 sys/dev/pci/xhci_pci.c
--- a/sys/dev/pci/xhci_pci.c    Thu Nov 14 09:11:05 2019 +0000
+++ b/sys/dev/pci/xhci_pci.c    Thu Nov 14 09:11:35 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci_pci.c,v 1.21 2019/01/23 06:56:19 msaitoh Exp $    */
+/*     $NetBSD: xhci_pci.c,v 1.22 2019/11/14 09:11:35 msaitoh Exp $    */
 /*     OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp   */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.21 2019/01/23 06:56:19 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.22 2019/11/14 09:11:35 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_xhci_pci.h"
@@ -203,10 +203,17 @@
                       csr | PCI_COMMAND_MASTER_ENABLE);
 
        /* Allocate and establish the interrupt. */
+#if 0
        if (pci_intr_alloc(pa, &psc->sc_pihp, NULL, 0)) {
                aprint_error_dev(self, "can't allocate handler\n");
                goto fail;
        }
+#else
+       if (pci_intx_alloc(pa, &psc->sc_pihp)) {
+               aprint_error_dev(self, "can't allocate handler\n");
+               goto fail;
+       }
+#endif
        intrstr = pci_intr_string(pc, psc->sc_pihp[0], intrbuf,
            sizeof(intrbuf));
        psc->sc_ih = pci_intr_establish_xname(pc, psc->sc_pihp[0], IPL_USB,



Home | Main Index | Thread Index | Old Index