On Mon, Nov 27, 2023 at 09:10:18PM -0700, Devin Reade wrote:
> On Tue, 2023-11-28 at 11:29 +1100, Jonathan Gray wrote:
> 
> > STD_PHYID1      67C9
> > STD_PHYID2      DC00
> > 
> > /sys/dev/mii/miivar.h
> [...]
> 
> Thanks.
> 
> So it looks like the approach here is to add a gpyphy.c and
> gpyphyreg.h file, and tie it in via miidevs, correct?

Yes, though a .h isn't needed.  Two models are described on page 182 of
the datasheet "Chip Identification and Ordering Information".

> 
> I don't understand files.mii but it looks like it's only had one
> commit in the last nine years; is files.mii obsolete?  If not,
> where do I find out more?

Not all Ethernet drivers use the sys/dev/mii code.

The config glue would look something like the below, see files.conf(5)
and config(8).

miidevs.h is regenerated by running 'make' in /sys/dev/mii after
modifying miidevs.

Index: sys/dev/mii/miidevs
===================================================================
RCS file: /cvs/src/sys/dev/mii/miidevs,v
diff -u -p -r1.133 miidevs
--- sys/dev/mii/miidevs 8 Jul 2023 08:18:30 -0000       1.133
+++ sys/dev/mii/miidevs 28 Nov 2023 04:23:25 -0000
@@ -73,6 +73,7 @@ oui PLESSEYSEMI                       0x046b40        Plessey 
Semi.
 oui NATSEMI                    0x080017        National Semi.
 oui TI                         0x080028        Texas Instruments
 oui MOTORCOMM                  0x13d47a        Motorcomm
+oui MAXLINEAR                  0x19f277        MaxLinear
 
 /* in the 79c873, AMD uses another OUI (which matches Davicom!) */
 oui xxALTIMA                   0x000895        Altima
@@ -264,6 +265,10 @@ model MARVELL E1116R               0x0024  88E1116R Gi
 model MARVELL E3016            0x0026  88E3016 10/100 PHY
 model MARVELL PHYG65G          0x0027  PHYG65G Gigabit PHY
 model MARVELL E1545            0x002a  88E1545 Quad 10/100/1000 PHY
+
+/* MaxLinear PHYs */
+model MAXLINEAR GPY115B                0x0030  GPY115B Gigabit PHY
+model MAXLINEAR GPY115C                0x0031  GPY115C Gigabit PHY
 
 /* Micrel PHYs */
 model MICREL KSZ9021           0x0021  KSZ9021 10/100/1000 PHY
Index: sys/dev/mii/files.mii
===================================================================
RCS file: /cvs/src/sys/dev/mii/files.mii,v
diff -u -p -r1.33 files.mii
--- sys/dev/mii/files.mii       4 Mar 2023 22:40:37 -0000       1.33
+++ sys/dev/mii/files.mii       28 Nov 2023 04:25:43 -0000
@@ -152,3 +152,7 @@ file        dev/mii/brswphy.c                       brswphy
 device ytphy: mii_phy
 attach ytphy at mii
 file   dev/mii/ytphy.c                         ytphy
+
+device gpyphy: mii_phy
+attach gpyphy at mii
+file   dev/mii/gpyphy.c                        gpyphy
Index: sys/arch/amd64/conf/GENERIC
===================================================================
RCS file: /cvs/src/sys/arch/amd64/conf/GENERIC,v
diff -u -p -r1.520 GENERIC
--- sys/arch/amd64/conf/GENERIC 11 Oct 2023 12:52:00 -0000      1.520
+++ sys/arch/amd64/conf/GENERIC 28 Nov 2023 04:27:28 -0000
@@ -626,6 +626,7 @@ etphy*      at mii?                         # Agere/LSI 
ET1011 Tru
 jmphy* at mii?                         # JMicron JMP202/JMP211 PHYs
 atphy* at mii?                         # Attansic F1 PHYs
 ipgphy*        at mii?                         # IC Plus IP1000A PHYs
+gpyphy* at mii?                                # MaxLinear GPY115 PHYs
 ukphy* at mii?                         # "unknown" PHYs
 
 eap*   at pci?                         # Ensoniq AudioPCI S5016

Reply via email to