mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Add ACPI bindings to the genet
@ 2020-02-24 22:53 Jeremy Linton
  2020-02-24 22:53 ` [PATCH v2 1/6] mdio_bus: Add generic mdio_find_bus() Jeremy Linton
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Jeremy Linton @ 2020-02-24 22:53 UTC (permalink / raw)
  To: netdev
  Cc: opendmb, f.fainelli, davem, bcm-kernel-feedback-list,
	linux-kernel, wahrenst, andrew, hkallweit1, Jeremy Linton

This patch series allows the BCM GENET, as used on the RPi4,
to attach when booted in an ACPI environment. The DSDT entry to
trigger this is seen below. Of note, the first patch adds a
small extension to the mdio layer which allows drivers to find
the mii_bus without firmware assistance. The fifth patch in
the set retrieves the MAC address from the umac registers
rather than carrying it directly in the DSDT. This of course
requires the firmware to pre-program it, so we continue to fall
back on a random one if it appears to be garbage.

v1 -> v2:
     fail on missing phy-mode property
     replace phy-mode internal property read string with
     	     device_get_phy_mode() equivalent
     rework mac address detection logic so that it merges
     	    the acpi/DT case into device_get_mac_address()
	    allowing _DSD mac address properties.
     some commit messages justifying why phy_find_first()
     	    isn't the worst choice for this driver.

+    Device (ETH0)
+    {
+      Name (_HID, "BCM6E4E")
+      Name (_UID, 0)
+      Name (_CCA, 0x0)
+      Method (_STA)
+      {
+        Return (0xf)
+      }
+      Method (_CRS, 0x0, Serialized)
+      {
+        Name (RBUF, ResourceTemplate ()
+        {
+          Memory32Fixed (ReadWrite, 0xFd580000, 0x10000, )
+          Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBD }
+          Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBE }
+        })
+        Return (RBUF)
+      }
+      Name (_DSD, Package () {
+        ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+          Package () {
+          Package () { "phy-mode", "rgmii-rxid" },
+        }
+      })
+    }

Jeremy Linton (6):
  mdio_bus: Add generic mdio_find_bus()
  net: bcmgenet: refactor phy mode configuration
  net: bcmgenet: enable automatic phy discovery
  net: bcmgenet: Initial bcmgenet ACPI support
  net: bcmgenet: Fetch MAC address from the adapter
  net: bcmgenet: reduce severity of missing clock warnings

 .../net/ethernet/broadcom/genet/bcmgenet.c    | 62 +++++++++-----
 drivers/net/ethernet/broadcom/genet/bcmmii.c  | 82 ++++++++++++++-----
 drivers/net/phy/mdio_bus.c                    | 17 ++++
 include/linux/phy.h                           |  1 +
 4 files changed, 120 insertions(+), 42 deletions(-)

-- 
2.24.1


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

end of thread, other threads:[~2020-02-24 23:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 22:53 [PATCH v2 0/6] Add ACPI bindings to the genet Jeremy Linton
2020-02-24 22:53 ` [PATCH v2 1/6] mdio_bus: Add generic mdio_find_bus() Jeremy Linton
2020-02-24 22:59   ` Florian Fainelli
2020-02-24 22:53 ` [PATCH v2 2/6] net: bcmgenet: refactor phy mode configuration Jeremy Linton
2020-02-24 22:58   ` Florian Fainelli
2020-02-24 22:54 ` [PATCH v2 3/6] net: bcmgenet: enable automatic phy discovery Jeremy Linton
2020-02-24 22:54 ` [PATCH v2 4/6] net: bcmgenet: Initial bcmgenet ACPI support Jeremy Linton
2020-02-24 22:58   ` Florian Fainelli
2020-02-24 22:54 ` [PATCH v2 5/6] net: bcmgenet: Fetch MAC address from the adapter Jeremy Linton
2020-02-24 22:54 ` [PATCH v2 6/6] net: bcmgenet: reduce severity of missing clock warnings Jeremy Linton
2020-02-24 23:09 ` [PATCH v2 0/6] Add ACPI bindings to the genet Florian Fainelli
2020-02-24 23:31   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome